From aedaffb46945c590e97154d75235208c6fcb1062 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 18 Nov 2024 15:53:28 +0100 Subject: [PATCH 01/59] Partially copy `rustc_target::Abi` --- frontend/exporter/src/types/hir.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/exporter/src/types/hir.rs b/frontend/exporter/src/types/hir.rs index 4287fb190..307120076 100644 --- a/frontend/exporter/src/types/hir.rs +++ b/frontend/exporter/src/types/hir.rs @@ -144,7 +144,18 @@ pub struct FnHeader { pub abi: Abi, } -sinto_todo!(rustc_target::spec::abi, Abi); +/// Reflects [`rustc_target::spec::abi::Abi`] +#[derive_group(Serializers)] +#[derive(AdtInto, Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[args(<'tcx, S: BaseState<'tcx>>, from: rustc_target::spec::abi::Abi, state: S as s)] +pub enum Abi { + Rust, + C { + unwind: bool, + }, + #[todo] + Other(String), +} /// Function definition #[derive_group(Serializers)] From e1e4ab40f601c2b79b612b64fee519f83b5c554e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 18 Nov 2024 15:56:40 +0100 Subject: [PATCH 02/59] Simplify `get_function_from_operand` a bit --- frontend/exporter/src/types/mir.rs | 44 +++++++----------------------- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/frontend/exporter/src/types/mir.rs b/frontend/exporter/src/types/mir.rs index ecc4d9d72..fd1f45e3e 100644 --- a/frontend/exporter/src/types/mir.rs +++ b/frontend/exporter/src/types/mir.rs @@ -390,7 +390,7 @@ pub(crate) fn get_function_from_def_id_and_generics<'tcx, S: BaseState<'tcx> + H let impl_expr = self_clause_for_item(s, &assoc, generics).unwrap(); // Return only the method generics; the trait generics are included in `impl_expr`. let method_generics = &generics[num_container_generics..]; - (method_generics.sinto(s), Option::Some(impl_expr)) + (method_generics.sinto(s), Some(impl_expr)) } rustc_middle::ty::AssocItemContainer::ImplContainer => { // Solve the trait constraints of the impl block. @@ -399,12 +399,12 @@ pub(crate) fn get_function_from_def_id_and_generics<'tcx, S: BaseState<'tcx> + H let container_trait_refs = solve_item_required_traits(s, container_def_id, container_generics); trait_refs.extend(container_trait_refs); - (generics.sinto(s), Option::None) + (generics.sinto(s), None) } } } else { // Regular function call - (generics.sinto(s), Option::None) + (generics.sinto(s), None) }; (def_id.sinto(s), generics, trait_refs, source) @@ -420,44 +420,20 @@ fn get_function_from_operand<'tcx, S: UnderOwnerState<'tcx> + HasMir<'tcx>>( s: &S, func: &rustc_middle::mir::Operand<'tcx>, ) -> (FunOperand, Vec, Vec, Option) { - use std::ops::Deref; // Match on the func operand: it should be a constant as we don't support // closures for now. - use rustc_middle::mir::{Const, Operand}; + use rustc_middle::mir::Operand; use rustc_middle::ty::TyKind; match func { Operand::Constant(c) => { - // Regular function case - let c = c.deref(); - let (def_id, generics) = match &c.const_ { - Const::Ty(c_ty, _c) => { - // The type of the constant should be a FnDef, allowing - // us to retrieve the function's identifier and instantiation. - assert!(c_ty.is_fn()); - match c_ty.kind() { - TyKind::FnDef(def_id, generics) => (*def_id, *generics), - _ => { - unreachable!(); - } - } - } - Const::Val(_, c_ty) => { - // Same as for the `Ty` case above - assert!(c_ty.is_fn()); - match c_ty.kind() { - TyKind::FnDef(def_id, generics) => (*def_id, *generics), - _ => { - unreachable!(); - } - } - } - Const::Unevaluated(_, _) => { - unimplemented!(); - } + let c_ty = c.const_.ty(); + // The type of the constant should be a FnDef, allowing us to retrieve the function's + // identifier and instantiation. + let TyKind::FnDef(def_id, generics) = c_ty.kind() else { + unreachable!(); }; - let (fun_id, generics, trait_refs, trait_info) = - get_function_from_def_id_and_generics(s, def_id, generics); + get_function_from_def_id_and_generics(s, *def_id, *generics); (FunOperand::Id(fun_id), generics, trait_refs, trait_info) } Operand::Move(place) => { From 6719e5001148be47c60a2fc42f11ac58b51a7dd5 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 19 Nov 2024 16:28:41 +0100 Subject: [PATCH 03/59] Expose `Ty::new` --- frontend/exporter/src/types/ty.rs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/frontend/exporter/src/types/ty.rs b/frontend/exporter/src/types/ty.rs index c254bb0b7..9dfad01de 100644 --- a/frontend/exporter/src/types/ty.rs +++ b/frontend/exporter/src/types/ty.rs @@ -743,6 +743,15 @@ pub struct Ty { } impl Ty { + #[cfg(feature = "rustc")] + pub fn new<'tcx, S: BaseState<'tcx>>(s: &S, kind: TyKind) -> Self { + s.with_global_cache(|cache| { + let table_session = &mut cache.id_table_session; + let kind = id_table::Node::new(kind, table_session); + Ty { kind } + }) + } + pub fn inner(&self) -> &Arc { self.kind.inner() } @@ -758,15 +767,12 @@ impl<'tcx, S: UnderOwnerState<'tcx>> SInto for rustc_middle::ty::Ty<'tcx> if let Some(ty) = s.with_cache(|cache| cache.tys.get(self).cloned()) { return ty; } - let ty_kind: TyKind = self.kind().sinto(s); - s.with_global_cache(|cache| { - let table_session = &mut cache.id_table_session; - let cache = cache.per_item.entry(s.owner_id()).or_default(); - let kind = id_table::Node::new(ty_kind, table_session); - let ty = Ty { kind }; + let kind: TyKind = self.kind().sinto(s); + let ty = Ty::new(s, kind); + s.with_cache(|cache| { cache.tys.insert(*self, ty.clone()); - ty - }) + }); + ty } } From c47610f1898dafc3225bf3d79d448ab5e3647cdb Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 19 Nov 2024 17:24:14 +0100 Subject: [PATCH 04/59] Mini clarification --- frontend/exporter/src/types/mir.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/exporter/src/types/mir.rs b/frontend/exporter/src/types/mir.rs index fd1f45e3e..fa04da2b2 100644 --- a/frontend/exporter/src/types/mir.rs +++ b/frontend/exporter/src/types/mir.rs @@ -954,13 +954,13 @@ pub enum AggregateKind { let closure = generics.as_closure(); let sig = closure.sig().sinto(s); - // Solve the predicates from the parent (i.e., the function which calls the closure). + // Solve the predicates from the parent (i.e., the item which defines the closure). let tcx = s.base().tcx; let parent_generics = closure.parent_args(); - let generics = tcx.mk_args(parent_generics); + let parent_generics_ref = tcx.mk_args(parent_generics); // TODO: does this handle nested closures? let parent = tcx.generics_of(rust_id).parent.unwrap(); - let trait_refs = solve_item_required_traits(s, parent, generics); + let trait_refs = solve_item_required_traits(s, parent, parent_generics_ref); AggregateKind::Closure(def_id, parent_generics.sinto(s), trait_refs, sig) })] From 9f6c8343261c785687451fe167ede3810439ef85 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 19 Nov 2024 17:53:13 +0100 Subject: [PATCH 05/59] Improve translation of MIR calls --- frontend/exporter/src/types/mir.rs | 45 +++++++++++------------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/frontend/exporter/src/types/mir.rs b/frontend/exporter/src/types/mir.rs index fa04da2b2..db5839bc9 100644 --- a/frontend/exporter/src/types/mir.rs +++ b/frontend/exporter/src/types/mir.rs @@ -410,51 +410,40 @@ pub(crate) fn get_function_from_def_id_and_generics<'tcx, S: BaseState<'tcx> + H (def_id.sinto(s), generics, trait_refs, source) } +/// Get a `FunOperand` from an `Operand` used in a function call. /// Return the [DefId] of the function referenced by an operand, with the /// parameters substitution. /// The [Operand] comes from a [TerminatorKind::Call]. -/// Only supports calls to top-level functions (which are considered as constants -/// by rustc); doesn't support closures for now. #[cfg(feature = "rustc")] fn get_function_from_operand<'tcx, S: UnderOwnerState<'tcx> + HasMir<'tcx>>( s: &S, - func: &rustc_middle::mir::Operand<'tcx>, + op: &rustc_middle::mir::Operand<'tcx>, ) -> (FunOperand, Vec, Vec, Option) { // Match on the func operand: it should be a constant as we don't support // closures for now. use rustc_middle::mir::Operand; use rustc_middle::ty::TyKind; - match func { - Operand::Constant(c) => { - let c_ty = c.const_.ty(); - // The type of the constant should be a FnDef, allowing us to retrieve the function's - // identifier and instantiation. - let TyKind::FnDef(def_id, generics) = c_ty.kind() else { - unreachable!(); - }; - let (fun_id, generics, trait_refs, trait_info) = - get_function_from_def_id_and_generics(s, *def_id, *generics); - (FunOperand::Id(fun_id), generics, trait_refs, trait_info) + let ty = op.ty(&s.mir().local_decls, s.base().tcx); + trace!("type: {:?}", ty); + // If the type of the value is one of the singleton types that corresponds to each function, + // that's enough information. + if let TyKind::FnDef(def_id, generics) = ty.kind() { + let (fun_id, generics, trait_refs, trait_info) = + get_function_from_def_id_and_generics(s, *def_id, *generics); + return (FunOperand::Id(fun_id), generics, trait_refs, trait_info); + } + match op { + Operand::Constant(_) => { + unimplemented!("{:?}", op); } Operand::Move(place) => { - // Closure case. - // The closure can not have bound variables nor trait references, - // so we don't need to extract generics, trait refs, etc. - let body = s.mir(); - let ty = func.ty(&body.local_decls, s.base().tcx); - trace!("type: {:?}", ty); - trace!("type kind: {:?}", ty.kind()); - let sig = match ty.kind() { - rustc_middle::ty::TyKind::FnPtr(sig, ..) => sig, - _ => unreachable!(), - }; - trace!("FnPtr: {:?}", sig); + // Function pointer. A fn pointer cannot have bound variables or trait references, so + // we don't need to extract generics, trait refs, etc. let place = place.sinto(s); - (FunOperand::Move(place), Vec::new(), Vec::new(), None) } Operand::Copy(_place) => { - unimplemented!("{:?}", func); + unimplemented!("{:?}", op); } } } From d83c24a47a87129d44daf675df6dd22ff99464e7 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 19 Nov 2024 17:25:08 +0100 Subject: [PATCH 06/59] Add more info to `FullDefKind::Ctor` --- frontend/exporter/src/traits/resolution.rs | 2 +- frontend/exporter/src/types/new/full_def.rs | 39 +++++++++++++++++++-- frontend/exporter/src/types/ty.rs | 9 +++-- 3 files changed, 42 insertions(+), 8 deletions(-) diff --git a/frontend/exporter/src/traits/resolution.rs b/frontend/exporter/src/traits/resolution.rs index f7c67a86b..53379a6a5 100644 --- a/frontend/exporter/src/traits/resolution.rs +++ b/frontend/exporter/src/traits/resolution.rs @@ -121,7 +121,7 @@ fn initial_search_predicates<'tcx>( use DefKind::*; match tcx.def_kind(def_id) { // These inherit some predicates from their parent. - AssocTy | AssocFn | AssocConst | Closure => { + AssocTy | AssocFn | AssocConst | Closure | Ctor(..) | Variant => { let parent = tcx.parent(def_id); acc_predicates(tcx, parent, predicates, pred_id); } diff --git a/frontend/exporter/src/types/new/full_def.rs b/frontend/exporter/src/types/new/full_def.rs index eabdde186..cacd983e4 100644 --- a/frontend/exporter/src/types/new/full_def.rs +++ b/frontend/exporter/src/types/new/full_def.rs @@ -350,8 +350,15 @@ pub enum FullDefKind { // ADT parts /// Refers to the variant definition, [`DefKind::Ctor`] refers to its constructor if it exists. Variant, - /// Refers to the struct or enum variant's constructor. - Ctor(CtorOf, CtorKind), + /// The constructor function of a tuple/unit struct or tuple/unit enum variant. + #[custom_arm(RDefKind::Ctor(ctor_of, _) => get_ctor_contents(s, ctor_of.sinto(s)),)] + Ctor { + adt_def_id: DefId, + ctor_of: CtorOf, + variant_id: VariantIdx, + fields: IndexVec, + output_ty: Ty, + }, /// A field in a struct, enum or union. e.g. /// - `bar` in `struct Foo { bar: u8 }` /// - `Foo::Bar::0` in `enum Foo { Bar(u8) }` @@ -762,6 +769,34 @@ where } } +#[cfg(feature = "rustc")] +fn get_ctor_contents<'tcx, S, Body>(s: &S, ctor_of: CtorOf) -> FullDefKind +where + S: UnderOwnerState<'tcx>, + Body: IsBody + TypeMappable, +{ + let tcx = s.base().tcx; + let def_id = s.owner_id(); + + // The def_id of the adt this ctor belongs to. + let adt_def_id = match ctor_of { + CtorOf::Struct => tcx.parent(def_id), + CtorOf::Variant => tcx.parent(tcx.parent(def_id)), + }; + let adt_def = tcx.adt_def(adt_def_id); + let variant_id = adt_def.variant_index_with_ctor_id(def_id); + let fields = adt_def.variant(variant_id).fields.sinto(s); + let generic_args = ty::GenericArgs::identity_for_item(tcx, adt_def_id); + let output_ty = ty::Ty::new_adt(tcx, adt_def, generic_args).sinto(s); + FullDefKind::Ctor { + adt_def_id: adt_def_id.sinto(s), + ctor_of, + variant_id: variant_id.sinto(s), + fields, + output_ty, + } +} + /// This normalizes trait clauses before calling `sinto` on them. This is a bit of a hack required /// by charon for now. We can't normalize all clauses as this would lose region information in /// outlives clauses. diff --git a/frontend/exporter/src/types/ty.rs b/frontend/exporter/src/types/ty.rs index 9dfad01de..457f8193c 100644 --- a/frontend/exporter/src/types/ty.rs +++ b/frontend/exporter/src/types/ty.rs @@ -341,11 +341,10 @@ pub struct VariantDef { pub name: Symbol, pub discr_def: DiscriminantDefinition, pub discr_val: DiscriminantValue, - /// The definitions of the fields on this variant. In case of - /// [tuple - /// structs](https://doc.rust-lang.org/book/ch05-01-defining-structs.html#using-tuple-structs-without-named-fields-to-create-different-types), + /// The definitions of the fields on this variant. In case of [tuple + /// structs/variants](https://doc.rust-lang.org/book/ch05-01-defining-structs.html#using-tuple-structs-without-named-fields-to-create-different-types), /// the fields are anonymous, otherwise fields are named. - pub fields: Vec, + pub fields: IndexVec, /// Span of the definition of the variant pub span: Span, } @@ -363,7 +362,7 @@ impl VariantDef { name: def.name.sinto(s), discr_def: def.discr.sinto(s), discr_val: discr_val.sinto(s), - fields: def.fields.raw.sinto(s), + fields: def.fields.sinto(s), span: s.base().tcx.def_span(def.def_id).sinto(s), } } From 494c76afe41dc510f743375e92c93942492bc20a Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 20 Nov 2024 15:33:20 +0100 Subject: [PATCH 07/59] Reorder some defs --- frontend/exporter/src/types/ty.rs | 98 +++++++++++++++---------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/frontend/exporter/src/types/ty.rs b/frontend/exporter/src/types/ty.rs index 457f8193c..6aa480c64 100644 --- a/frontend/exporter/src/types/ty.rs +++ b/frontend/exporter/src/types/ty.rs @@ -1316,39 +1316,6 @@ pub enum PredicateKind { NormalizesTo(NormalizesTo), } -#[cfg(feature = "rustc")] -fn get_container_for_assoc_item<'tcx, S: BaseState<'tcx>>( - s: &S, - item: &ty::AssocItem, -) -> AssocItemContainer { - let tcx = s.base().tcx; - let container_id = item.container_id(tcx); - match item.container { - ty::AssocItemContainer::TraitContainer => AssocItemContainer::TraitContainer { - trait_id: container_id.sinto(s), - }, - ty::AssocItemContainer::ImplContainer => { - if let Some(implemented_trait_item) = item.trait_item_def_id { - // The trait ref that is being implemented by this `impl` block. - let implemented_trait_ref = tcx - .impl_trait_ref(container_id) - .unwrap() - .instantiate_identity(); - AssocItemContainer::TraitImplContainer { - impl_id: container_id.sinto(s), - implemented_trait: implemented_trait_ref.def_id.sinto(s), - implemented_trait_item: implemented_trait_item.sinto(s), - overrides_default: tcx.defaultness(implemented_trait_item).has_value(), - } - } else { - AssocItemContainer::InherentImplContainer { - impl_id: container_id.sinto(s), - } - } - } - } -} - /// Reflects [`ty::AssocItem`] #[derive(AdtInto)] #[args(<'tcx, S: BaseState<'tcx>>, from: ty::AssocItem, state: S as s)] @@ -1368,19 +1335,15 @@ pub struct AssocItem { pub opt_rpitit_info: Option, } -/// Reflects [`ty::ImplTraitInTraitData`] +/// Reflects [`ty::AssocKind`] #[derive(AdtInto)] -#[args(<'tcx, S: BaseState<'tcx>>, from: ty::ImplTraitInTraitData, state: S as _s)] +#[args(, from: ty::AssocKind, state: S as _tcx)] #[derive_group(Serializers)] #[derive(Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)] -pub enum ImplTraitInTraitData { - Trait { - fn_def_id: DefId, - opaque_def_id: DefId, - }, - Impl { - fn_def_id: DefId, - }, +pub enum AssocKind { + Const, + Fn, + Type, } #[derive_group(Serializers)] @@ -1402,13 +1365,50 @@ pub enum AssocItemContainer { }, } -/// Reflects [`ty::AssocKind`] +#[cfg(feature = "rustc")] +fn get_container_for_assoc_item<'tcx, S: BaseState<'tcx>>( + s: &S, + item: &ty::AssocItem, +) -> AssocItemContainer { + let tcx = s.base().tcx; + let container_id = item.container_id(tcx); + match item.container { + ty::AssocItemContainer::TraitContainer => AssocItemContainer::TraitContainer { + trait_id: container_id.sinto(s), + }, + ty::AssocItemContainer::ImplContainer => { + if let Some(implemented_trait_item) = item.trait_item_def_id { + // The trait ref that is being implemented by this `impl` block. + let implemented_trait_ref = tcx + .impl_trait_ref(container_id) + .unwrap() + .instantiate_identity(); + AssocItemContainer::TraitImplContainer { + impl_id: container_id.sinto(s), + implemented_trait: implemented_trait_ref.def_id.sinto(s), + implemented_trait_item: implemented_trait_item.sinto(s), + overrides_default: tcx.defaultness(implemented_trait_item).has_value(), + } + } else { + AssocItemContainer::InherentImplContainer { + impl_id: container_id.sinto(s), + } + } + } + } +} + +/// Reflects [`ty::ImplTraitInTraitData`] #[derive(AdtInto)] -#[args(, from: ty::AssocKind, state: S as _tcx)] +#[args(<'tcx, S: BaseState<'tcx>>, from: ty::ImplTraitInTraitData, state: S as _s)] #[derive_group(Serializers)] #[derive(Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)] -pub enum AssocKind { - Const, - Fn, - Type, +pub enum ImplTraitInTraitData { + Trait { + fn_def_id: DefId, + opaque_def_id: DefId, + }, + Impl { + fn_def_id: DefId, + }, } From 9b2269b9193bd9cf3a1fb94fbc5b7b3376b22218 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 21 Nov 2024 06:52:57 +0100 Subject: [PATCH 08/59] frontend(cli): output source maps if any When the engine is producing a source map, the CLI now add inline source data to it and save it as a `.map` file. --- cli/subcommands/src/cargo_hax.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cli/subcommands/src/cargo_hax.rs b/cli/subcommands/src/cargo_hax.rs index d77a0b50f..ee353799c 100644 --- a/cli/subcommands/src/cargo_hax.rs +++ b/cli/subcommands/src/cargo_hax.rs @@ -332,6 +332,27 @@ fn run_engine( std::fs::write(&path, file.contents).unwrap(); wrote = true; } + if let Some(mut sourcemap) = file.sourcemap.clone() { + sourcemap.sourcesContent = sourcemap + .sources + .iter() + .map(PathBuf::from) + .map(|path| { + if path.is_absolute() { + path + } else { + manifest_dir.join(path).to_path_buf() + } + }) + .map(|path| fs::read_to_string(path).ok()) + .collect(); + let f = std::fs::File::create(path.with_file_name(format!( + "{}.map", + path.file_name().unwrap().to_string_lossy() + ))) + .unwrap(); + serde_json::to_writer(std::io::BufWriter::new(f), &sourcemap).unwrap() + } HaxMessage::ProducedFile { path, wrote }.report(message_format, None) } } From 07851ee8795e4acd52a3eae267d777f1942236b1 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 21 Nov 2024 06:54:47 +0100 Subject: [PATCH 09/59] feat(engine/sourcemaps): derive more yojson --- engine/utils/sourcemaps/location.ml | 2 +- engine/utils/sourcemaps/mappings/dual.ml | 2 +- engine/utils/sourcemaps/mappings/mappings.ml | 5 +++-- engine/utils/sourcemaps/mappings/mappings.mli | 8 ++++++-- engine/utils/sourcemaps/mappings/types.ml | 6 ++++-- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/engine/utils/sourcemaps/location.ml b/engine/utils/sourcemaps/location.ml index cf2bda904..1086dce76 100644 --- a/engine/utils/sourcemaps/location.ml +++ b/engine/utils/sourcemaps/location.ml @@ -1,6 +1,6 @@ open Prelude -type t = { line : int; col : int } [@@deriving eq] +type t = { line : int; col : int } [@@deriving eq, yojson] let show { line; col } = "(" ^ Int.to_string line ^ ":" ^ Int.to_string col ^ ")" diff --git a/engine/utils/sourcemaps/mappings/dual.ml b/engine/utils/sourcemaps/mappings/dual.ml index 09548fd9f..5161e133f 100644 --- a/engine/utils/sourcemaps/mappings/dual.ml +++ b/engine/utils/sourcemaps/mappings/dual.ml @@ -1,4 +1,4 @@ -type 'a t = { gen : 'a; src : 'a } [@@deriving show, eq] +type 'a t = { gen : 'a; src : 'a } [@@deriving show, eq, yojson] let transpose ~(default : 'a t) ({ gen; src } : 'a option t) : 'a t option = match (gen, src) with diff --git a/engine/utils/sourcemaps/mappings/mappings.ml b/engine/utils/sourcemaps/mappings/mappings.ml index 67fb40347..1ce0612f3 100644 --- a/engine/utils/sourcemaps/mappings/mappings.ml +++ b/engine/utils/sourcemaps/mappings/mappings.ml @@ -2,10 +2,11 @@ open Prelude include Types type range = { start : Location.t; end_ : Location.t option } -[@@deriving show, eq] +[@@deriving show, eq, yojson] module Chunk = struct - type t = { gen : range; src : range; meta : meta } [@@deriving show, eq] + type t = { gen : range; src : range; meta : meta } + [@@deriving show, eq, yojson] let compare (x : t) (y : t) = Location.compare x.gen.start y.gen.start diff --git a/engine/utils/sourcemaps/mappings/mappings.mli b/engine/utils/sourcemaps/mappings/mappings.mli index 7bc0e9d55..44f72a818 100644 --- a/engine/utils/sourcemaps/mappings/mappings.mli +++ b/engine/utils/sourcemaps/mappings/mappings.mli @@ -1,8 +1,12 @@ -type meta = { file_offset : int; name : int option } [@@deriving show, eq] +type meta = { file_offset : int; name : int option } +[@@deriving show, eq, yojson] + type range = { start : Location.t; end_ : Location.t option } +[@@deriving show, eq, yojson] module Chunk : sig - type t = { gen : range; src : range; meta : meta } [@@deriving show, eq] + type t = { gen : range; src : range; meta : meta } + [@@deriving show, eq, yojson] val compare : t -> t -> int end diff --git a/engine/utils/sourcemaps/mappings/types.ml b/engine/utils/sourcemaps/mappings/types.ml index be2cd146e..f670fc023 100644 --- a/engine/utils/sourcemaps/mappings/types.ml +++ b/engine/utils/sourcemaps/mappings/types.ml @@ -1,4 +1,6 @@ open Prelude -type meta = { file_offset : int; name : int option } [@@deriving show, eq] -type point = Location.t Dual.t * meta option [@@deriving show, eq] +type meta = { file_offset : int; name : int option } +[@@deriving show, eq, yojson] + +type point = Location.t Dual.t * meta option [@@deriving show, eq, yojson] From 5586b78b645f1fc20dc947578d138ade52f6cfe8 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 21 Nov 2024 06:55:15 +0100 Subject: [PATCH 10/59] feat(engine/genprinter): helpers around annotated strings --- engine/lib/generic_printer/generic_printer.ml | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/engine/lib/generic_printer/generic_printer.ml b/engine/lib/generic_printer/generic_printer.ml index c82312e44..811051c0e 100644 --- a/engine/lib/generic_printer/generic_printer.ml +++ b/engine/lib/generic_printer/generic_printer.ml @@ -74,6 +74,29 @@ module AnnotatedString = struct let to_spanned_strings ((s, annots) : t) : (Ast.span * string) list = Annotation.split_with_string s annots + (** Lifts a string to an annotated list *) + let pure (s : string) : t = (s, []) + + (** Concatenate two annotated strings *) + let concat (x : t) (y : t) : t = + let (xs, xl), (ys, yl) = (x, y) in + let last_x = + let lines = String.split ~on:'\n' xs in + let last_line = List.last lines |> Option.value ~default:"" in + let col, line = (String.length last_line, List.length lines) in + Annotation.{ col; line } + in + let yl = + let f ({ line; col } : Annotation.loc) : Annotation.loc = + { + line = line + last_x.line; + col = (match col with 0 -> col + last_x.col | _ -> col); + } + in + List.map ~f:(f *** Fn.id) yl + in + (xs ^ ys, xl @ yl) + let to_sourcemap : t -> Types.source_map = snd >> List.filter_map ~f:Annotation.to_mapping >> Sourcemaps.Source_maps.mk >> fun ({ @@ -90,7 +113,7 @@ module AnnotatedString = struct { mappings; sourceRoot; sources; sourcesContent; names; version; file } end -(** Helper class that brings imperative span *) +(** Helper class that brings imperative span *) class span_helper : object method span_data : Annotation.t list (** Get the span annotation accumulated while printing *) From 01aad4aab4ab4430f02feb40bb241419971b88e2 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 21 Nov 2024 06:55:47 +0100 Subject: [PATCH 11/59] fix(engine/source maps): file offsets are relative --- engine/utils/sourcemaps/mappings/instruction.ml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/engine/utils/sourcemaps/mappings/instruction.ml b/engine/utils/sourcemaps/mappings/instruction.ml index 922e1593a..5f36760a9 100644 --- a/engine/utils/sourcemaps/mappings/instruction.ml +++ b/engine/utils/sourcemaps/mappings/instruction.ml @@ -75,23 +75,32 @@ let to_points ?(init = Dual.default Location.default) : t list -> point list = >> snd >> List.rev let from_points : point list -> t list = - List.folding_map ~init:(Dual.default Location.default) - ~f:(fun { src; gen } (x, m) -> + List.folding_map + ~init:(Dual.default Location.default, None) + ~f:(fun ({ src; gen }, m0) (x, m) -> let d = Location.(Dual.{ Dual.src = x.src - src; Dual.gen = x.gen - gen }) in let shift_gen_col = (if Int.(d.gen.line = 0) then d else x).gen.col in + let relative_m = + Option.map m ~f:(fun m -> + match m0 with + | Some m0 -> + { file_offset = m.file_offset - m0.file_offset; name = None } + | None -> m) + in let output = (if Int.(d.gen.line = 0) then [] else [ ShiftGenLinesResetGenCols { lines = d.gen.line } ]) @ - match m with + match relative_m with | Some meta -> [ Full { shift_gen_col; shift_src = d.src; meta } ] | None when Int.(shift_gen_col = 0) -> [] + | _ when Int.(shift_gen_col = 0) -> [] | _ -> [ ShiftGenCols shift_gen_col ] in let x = match m with Some _ -> x | None -> { x with src } in - (x, output)) + ((x, Option.first_some m m0), output)) >> List.concat let%test _ = From 412fdf09ae1b1dd4b0659def1de59a18029b73aa Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 21 Nov 2024 06:56:14 +0100 Subject: [PATCH 12/59] feat(engine/coq): output source maps --- engine/backends/coq/coq/coq_backend.ml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/engine/backends/coq/coq/coq_backend.ml b/engine/backends/coq/coq/coq_backend.ml index 7258e44ea..cbf6c6166 100644 --- a/engine/backends/coq/coq/coq_backend.ml +++ b/engine/backends/coq/coq/coq_backend.ml @@ -767,13 +767,16 @@ let translate m _ ~bundles:_ (items : AST.item list) : Types.file list = ~f:(map_first_letter String.uppercase) (fst ns :: snd ns)) in - let contents, _annotations = my_printer#entrypoint_modul items in - Types. - { - path = mod_name ^ ".v"; - contents = hardcoded_coq_headers ^ "\n" ^ contents; - sourcemap = None; - }) + let sourcemap, contents = + let annotated = my_printer#entrypoint_modul items in + let open Generic_printer.AnnotatedString in + let header = pure hardcoded_coq_headers in + let annotated = concat header annotated in + (to_sourcemap annotated, to_string annotated) + in + let sourcemap = Some sourcemap in + let path = mod_name ^ ".v" in + Types.{ path; contents; sourcemap }) open Phase_utils From 33131af62a10e4cda1a145561562aeb7b2209ad8 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 21 Nov 2024 07:22:50 +0100 Subject: [PATCH 13/59] fix(sourcemaps): misc --- cli/subcommands/src/cargo_hax.rs | 2 +- engine/utils/sourcemaps/mappings/instruction.ml | 4 +--- engine/utils/sourcemaps/source_maps.ml | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cli/subcommands/src/cargo_hax.rs b/cli/subcommands/src/cargo_hax.rs index ee353799c..2d2f91749 100644 --- a/cli/subcommands/src/cargo_hax.rs +++ b/cli/subcommands/src/cargo_hax.rs @@ -341,7 +341,7 @@ fn run_engine( if path.is_absolute() { path } else { - manifest_dir.join(path).to_path_buf() + working_dir.join(path).to_path_buf() } }) .map(|path| fs::read_to_string(path).ok()) diff --git a/engine/utils/sourcemaps/mappings/instruction.ml b/engine/utils/sourcemaps/mappings/instruction.ml index 5f36760a9..767f846c8 100644 --- a/engine/utils/sourcemaps/mappings/instruction.ml +++ b/engine/utils/sourcemaps/mappings/instruction.ml @@ -8,9 +8,7 @@ type t = [@@deriving show { with_path = false }, eq] let encode_one : t -> string * [ `Sep | `NeedsSep ] = function - | ShiftGenLinesResetGenCols { lines } -> - Stdlib.prerr_endline ("lines:::" ^ Int.to_string lines); - (String.make lines ';', `Sep) + | ShiftGenLinesResetGenCols { lines } -> (String.make lines ';', `Sep) | ShiftGenCols n -> (Vql.encode_base64 [ n ], `NeedsSep) | Full { shift_gen_col; shift_src; meta = { file_offset; name } } -> ( Vql.encode_base64 diff --git a/engine/utils/sourcemaps/source_maps.ml b/engine/utils/sourcemaps/source_maps.ml index 6da383baa..96bd09b24 100644 --- a/engine/utils/sourcemaps/source_maps.ml +++ b/engine/utils/sourcemaps/source_maps.ml @@ -45,7 +45,6 @@ let mk ?(file = "") ?(sourceRoot = "") ?(sourcesContent = fun _ -> None) Chunk.{ gen; src; meta } in let mappings = List.map mappings ~f |> List.sort ~compare:Chunk.compare in - Stdlib.prerr_endline @@ [%show: Chunk.t list] mappings; let mappings = Mappings.encode mappings in let sourcesContent = List.map ~f:sourcesContent sources in { mappings; sourceRoot; sourcesContent; sources; names; version = 3; file } From a8dfb6ff4971633c0245ec0f51510b2d474907e5 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 20 Nov 2024 15:58:27 +0100 Subject: [PATCH 14/59] Get parent generics in `AssocItem` --- frontend/exporter/src/types/ty.rs | 28 ++++++++++++++----- .../toolchain__traits into-fstar.snap | 12 ++++---- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/frontend/exporter/src/types/ty.rs b/frontend/exporter/src/types/ty.rs index 6aa480c64..c0b12fd4d 100644 --- a/frontend/exporter/src/types/ty.rs +++ b/frontend/exporter/src/types/ty.rs @@ -1350,11 +1350,18 @@ pub enum AssocKind { #[derive(Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)] pub enum AssocItemContainer { TraitContainer { - trait_id: DefId, + trait_ref: TraitRef, }, TraitImplContainer { + /// The def_id of the impl block. impl_id: DefId, - implemented_trait: DefId, + /// The generics applied to the impl block (that's just the identity generics). + impl_generics: Vec, + /// The impl exprs applied to the impl block (again the identity). + impl_required_impl_exprs: Vec, + /// The trait ref implemented by the impl block. + implemented_trait_ref: TraitRef, + /// The def_id of the associated item (in the trait declaration) that is being implemented. implemented_trait_item: DefId, /// Whether the corresponding trait item had a default (and therefore this one overrides /// it). @@ -1371,21 +1378,28 @@ fn get_container_for_assoc_item<'tcx, S: BaseState<'tcx>>( item: &ty::AssocItem, ) -> AssocItemContainer { let tcx = s.base().tcx; + // We want to solve traits in the context of this item. + let state_with_id = &with_owner_id(s.base(), (), (), item.def_id); let container_id = item.container_id(tcx); match item.container { - ty::AssocItemContainer::TraitContainer => AssocItemContainer::TraitContainer { - trait_id: container_id.sinto(s), - }, + ty::AssocItemContainer::TraitContainer => { + let trait_ref = ty::TraitRef::identity(tcx, container_id).sinto(state_with_id); + AssocItemContainer::TraitContainer { trait_ref } + } ty::AssocItemContainer::ImplContainer => { if let Some(implemented_trait_item) = item.trait_item_def_id { - // The trait ref that is being implemented by this `impl` block. + let impl_generics = ty::GenericArgs::identity_for_item(tcx, container_id); + let impl_required_impl_exprs = + solve_item_required_traits(state_with_id, container_id, impl_generics); let implemented_trait_ref = tcx .impl_trait_ref(container_id) .unwrap() .instantiate_identity(); AssocItemContainer::TraitImplContainer { impl_id: container_id.sinto(s), - implemented_trait: implemented_trait_ref.def_id.sinto(s), + impl_generics: impl_generics.sinto(state_with_id), + impl_required_impl_exprs, + implemented_trait_ref: implemented_trait_ref.sinto(state_with_id), implemented_trait_item: implemented_trait_item.sinto(s), overrides_default: tcx.defaultness(implemented_trait_item).has_value(), } diff --git a/test-harness/src/snapshots/toolchain__traits into-fstar.snap b/test-harness/src/snapshots/toolchain__traits into-fstar.snap index 3ada99292..fcc166dc9 100644 --- a/test-harness/src/snapshots/toolchain__traits into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__traits into-fstar.snap @@ -55,7 +55,7 @@ open FStar.Mul class t_Bar (v_Self: Type0) (v_T: Type0) = { __marker_trait_t_Bar:Prims.unit } class t_Foo (v_Self: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_12056653545434731362:t_Bar v_Self f_U; + [@@@ FStar.Tactics.Typeclasses.no_method]_super_5461126672499050919:t_Bar v_Self f_U; f_U:Type0 } ''' @@ -391,7 +391,7 @@ class t_SubTrait (v_Self: Type0) (v_TypeArg: Type0) (v_ConstArg: usize) = { v_TypeArg v_ConstArg; f_AssocType:Type0; - f_AssocType_10469511598065652520:t_Trait f_AssocType v_TypeArg v_ConstArg + f_AssocType_5566993444404141271:t_Trait f_AssocType v_TypeArg v_ConstArg } ''' "Traits.Interlaced_consts_types.fst" = ''' @@ -468,7 +468,7 @@ open FStar.Mul class t_Trait1 (v_Self: Type0) = { f_T:Type0; - f_T_1640036513185240095:t_Trait1 f_T + f_T_7805326132379548775:t_Trait1 f_T } class t_Trait2 (v_Self: Type0) = { @@ -613,8 +613,8 @@ let use_impl_trait (_: Prims.unit) : Prims.unit = class t_Foo (v_Self: Type0) = { f_AssocType:Type0; - f_AssocType_15525962639250476383:t_SuperTrait f_AssocType; - f_AssocType_17265963849229885182:Core.Clone.t_Clone f_AssocType; + f_AssocType_15012754260415912210:t_SuperTrait f_AssocType; + f_AssocType_3242921639065184873:Core.Clone.t_Clone f_AssocType; f_N:usize; f_assoc_f_pre:Prims.unit -> Type0; f_assoc_f_post:Prims.unit -> Prims.unit -> Type0; @@ -651,7 +651,7 @@ let g (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Foo v_T) (x let impl_Foo_for_tuple_: t_Foo Prims.unit = { f_AssocType = i32; - f_AssocType_15525962639250476383 = FStar.Tactics.Typeclasses.solve; + f_AssocType_15012754260415912210 = FStar.Tactics.Typeclasses.solve; f_N = sz 32; f_assoc_f_pre = (fun (_: Prims.unit) -> true); f_assoc_f_post = (fun (_: Prims.unit) (out: Prims.unit) -> true); From d74e33ae7605f418eee308e0bf0d2f07dc0312fd Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 21 Nov 2024 14:58:31 +0100 Subject: [PATCH 15/59] fix(enigne/coq): missing newline --- engine/backends/coq/coq/coq_backend.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/backends/coq/coq/coq_backend.ml b/engine/backends/coq/coq/coq_backend.ml index cbf6c6166..0e03029fc 100644 --- a/engine/backends/coq/coq/coq_backend.ml +++ b/engine/backends/coq/coq/coq_backend.ml @@ -770,7 +770,7 @@ let translate m _ ~bundles:_ (items : AST.item list) : Types.file list = let sourcemap, contents = let annotated = my_printer#entrypoint_modul items in let open Generic_printer.AnnotatedString in - let header = pure hardcoded_coq_headers in + let header = pure (hardcoded_coq_headers ^ "\n") in let annotated = concat header annotated in (to_sourcemap annotated, to_string annotated) in From 209db260f86dd18ca30f279b62421631b52043df Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Wed, 30 Oct 2024 12:01:31 +0100 Subject: [PATCH 16/59] Coq Core Lib --- proof-libs/coq/coq/.gitignore | 7 + proof-libs/coq/coq/_CoqProject | 41 + proof-libs/coq/coq/src/Core_Array.v | 72 + proof-libs/coq/coq/src/Core_Base_Int.v | 30 + .../coq/coq/src/Core_Base_Int_Base_impl.v | 617 ++++++++ .../coq/coq/src/Core_Base_Int_Base_spec.v | 129 ++ .../coq/src/Core_Base_Int_Number_conversion.v | 80 + proof-libs/coq/coq/src/Core_Base_Seq.v | 30 + .../coq/coq/src/Core_Base_Seq_Base_impl.v | 142 ++ .../coq/coq/src/Core_Base_Seq_Base_spec.v | 20 + proof-libs/coq/coq/src/Core_Clone.v | 13 + proof-libs/coq/coq/src/Core_Cmp.v | 165 ++ proof-libs/coq/coq/src/Core_Coerce.v | 21 + proof-libs/coq/coq/src/Core_Convert.v | 32 + proof-libs/coq/coq/src/Core_Int.v | 1321 +++++++++++++++++ proof-libs/coq/coq/src/Core_Intrinsics.v | 119 ++ proof-libs/coq/coq/src/Core_Marker.v | 31 + proof-libs/coq/coq/src/Core_Num.v | 317 ++++ proof-libs/coq/coq/src/Core_Ops.v | 52 + proof-libs/coq/coq/src/Core_Ops_Arith.v | 59 + proof-libs/coq/coq/src/Core_Ops_Bit.v | 57 + proof-libs/coq/coq/src/Core_Option.v | 12 + proof-libs/coq/coq/src/Core_Panicking.v | 20 + proof-libs/coq/coq/src/Core_Primitive.v | 552 +++++++ 24 files changed, 3939 insertions(+) create mode 100644 proof-libs/coq/coq/.gitignore create mode 100644 proof-libs/coq/coq/_CoqProject create mode 100644 proof-libs/coq/coq/src/Core_Array.v create mode 100644 proof-libs/coq/coq/src/Core_Base_Int.v create mode 100644 proof-libs/coq/coq/src/Core_Base_Int_Base_impl.v create mode 100644 proof-libs/coq/coq/src/Core_Base_Int_Base_spec.v create mode 100644 proof-libs/coq/coq/src/Core_Base_Int_Number_conversion.v create mode 100644 proof-libs/coq/coq/src/Core_Base_Seq.v create mode 100644 proof-libs/coq/coq/src/Core_Base_Seq_Base_impl.v create mode 100644 proof-libs/coq/coq/src/Core_Base_Seq_Base_spec.v create mode 100644 proof-libs/coq/coq/src/Core_Clone.v create mode 100644 proof-libs/coq/coq/src/Core_Cmp.v create mode 100644 proof-libs/coq/coq/src/Core_Coerce.v create mode 100644 proof-libs/coq/coq/src/Core_Convert.v create mode 100644 proof-libs/coq/coq/src/Core_Int.v create mode 100644 proof-libs/coq/coq/src/Core_Intrinsics.v create mode 100644 proof-libs/coq/coq/src/Core_Marker.v create mode 100644 proof-libs/coq/coq/src/Core_Num.v create mode 100644 proof-libs/coq/coq/src/Core_Ops.v create mode 100644 proof-libs/coq/coq/src/Core_Ops_Arith.v create mode 100644 proof-libs/coq/coq/src/Core_Ops_Bit.v create mode 100644 proof-libs/coq/coq/src/Core_Option.v create mode 100644 proof-libs/coq/coq/src/Core_Panicking.v create mode 100644 proof-libs/coq/coq/src/Core_Primitive.v diff --git a/proof-libs/coq/coq/.gitignore b/proof-libs/coq/coq/.gitignore new file mode 100644 index 000000000..0b7287c5c --- /dev/null +++ b/proof-libs/coq/coq/.gitignore @@ -0,0 +1,7 @@ +*.vo* +*.aux +*.glob +*.cache +.Makefile.d +Makefile +Makefile.conf diff --git a/proof-libs/coq/coq/_CoqProject b/proof-libs/coq/coq/_CoqProject new file mode 100644 index 000000000..d24f4b58d --- /dev/null +++ b/proof-libs/coq/coq/_CoqProject @@ -0,0 +1,41 @@ +-R src/ Core +-arg -w +-arg all + +./src/Core_Clone.v + +./src/Core_Marker.v + +./src/Core_Option.v +./src/Core_Cmp.v + +./src/Core_Base_Int.v +./src/Core_Base_Int_Base_spec.v +./src/Core_Base_Int_Base_impl.v + +./src/Core_Coerce.v +./src/Core_Convert.v + +./src/Core_Ops_Arith.v +./src/Core_Ops_Bit.v + +./src/Core_Ops.v + +./src/Core_Int.v + +./src/Core_Base_Seq.v +./src/Core_Base_Seq_Base_spec.v + +./src/Core_Panicking.v + +./src/Core_Base_Seq_Base_impl.v + +./src/Core_Primitive.v + +./src/Core_Base_Int_Number_conversion.v + +./src/Core_Array.v + +./src/Core_Intrinsics.v + +./src/Core_Num.v diff --git a/proof-libs/coq/coq/src/Core_Array.v b/proof-libs/coq/coq/src/Core_Array.v new file mode 100644 index 000000000..99cc68b86 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Array.v @@ -0,0 +1,72 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + + +From Core Require Import Core_Coerce (t_Abstraction). +Export Core_Coerce (t_Abstraction). + +From Core Require Import Core_Coerce (t_Concretization). +Export Core_Coerce (t_Concretization). + + +From Core Require Import Core_Base_Int_Number_conversion. +Export Core_Base_Int_Number_conversion. + +From Core Require Import Core_Base_Seq. +Export Core_Base_Seq. + +From Core Require Import Core_Int. +Export Core_Int. + + +From Core Require Import Core_Cmp. +Export Core_Cmp. + +From Core Require Import Core_Clone. +Export Core_Clone. + + +From Core Require Import Core_Primitive. +Export Core_Primitive. + +Instance t_Clone_427868774 `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} : t_Clone (t_Array (v_T) (v_N)) := + { + t_Clone_f_clone := fun (self : t_Array (v_T) (v_N)) => + Build_t_Array (t_Clone_f_clone (t_Array_f_v self)); + }. + +Instance t_PartialEq_670168337 `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} `{t_PartialEq v_T v_T} : t_PartialEq (t_Array (v_T) (v_N)) (t_Array (v_T) (v_N)) := + { + t_PartialEq_f_eq := fun (self : t_Array (v_T) (v_N)) (other : t_Array (v_T) (v_N)) => + t_PartialEq_f_eq (t_Clone_f_clone (t_Array_f_v self)) (t_Array_f_v other); + t_PartialEq_f_ne := fun (self : t_Array (v_T) (v_N)) (other : t_Array (v_T) (v_N)) => + negb (t_PartialEq_f_eq (t_Clone_f_clone (t_Array_f_v self)) (t_Array_f_v other)); + }. + +Definition impl_2__reverse `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} (self : t_Array (v_T) (v_N)) : t_Array (v_T) (v_N) := + Build_t_Array (impl_2__rev (t_Array_f_v self)). + +Lemma lt_usize_implies_hax_int (x : t_usize) (y : t_usize) : + t_PartialOrd_f_lt (x) (y) = true -> + t_PartialOrd_f_lt (t_From_f_from (x)) (t_From_f_from (y)) = true. +Proof. Admitted. + +Lemma lift_usize_equality (x : t_HaxInt) (y : t_usize) : + t_PartialEq_f_eq (x) (t_From_f_from y) = true -> + t_PartialEq_f_eq (t_From_f_from (x)) (y) = true. +Proof. Admitted. + +Program Definition impl_2__index `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} (self : t_Array (v_T) (v_N)) (i : t_usize) `{andb (t_PartialEq_f_eq (impl_2__len (t_Array_f_v self)) (t_From_f_from (v_N))) (t_PartialOrd_f_lt (i) (v_N)) = true} : v_T := + impl_2__get_index (H1 := _) (t_Array_f_v self) (t_From_f_from (i)). +Admit Obligations. + +Definition impl_2__new `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} (x : v_T) : t_Array (v_T) (v_N) := + Build_t_Array (impl_2__repeat (t_From_f_from (v_N)) (x)). + +Program Definition impl_2__set_index `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} (self : t_Array (v_T) (v_N)) (i : t_usize) (t : v_T) `{andb (t_PartialEq_f_eq (impl_2__len (t_Array_f_v self)) (t_From_f_from (v_N))) (t_PartialOrd_f_lt (i) (v_N)) = true} : t_Array (v_T) (v_N) := + Build_t_Array (impl_2__set_index (H1 := _) (t_Array_f_v self) (t_From_f_from (i)) (t)). +Admit Obligations. diff --git a/proof-libs/coq/coq/src/Core_Base_Int.v b/proof-libs/coq/coq/src/Core_Base_Int.v new file mode 100644 index 000000000..78d754524 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Base_Int.v @@ -0,0 +1,30 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +Definition t_HaxInt : Type := N. +Definition t_Positive : Type := positive. + +Notation "'t_POS'" := t_HaxInt. +Notation "'t_POS_POS_ZERO'" := N0. +Notation "'t_POS_POS_POS'" := Npos. + +Notation "'t_POSITIVE'" := t_Positive. +Notation "'t_POSITIVE_POSITIVE_XH'" := xH. +Notation "'t_POSITIVE_POSITIVE_XO'" := xO. +Notation "'t_POSITIVE_POSITIVE_XI'" := xI. + +Definition t_Unary : Type := nat. + +Notation "'t_UNARY'" := t_Unary. +Notation "'t_UNARY_UNARY_ZERO'" := O. +Notation "'t_UNARY_UNARY_SUCC'" := S. diff --git a/proof-libs/coq/coq/src/Core_Base_Int_Base_impl.v b/proof-libs/coq/coq/src/Core_Base_Int_Base_impl.v new file mode 100644 index 000000000..213d51628 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Base_Int_Base_impl.v @@ -0,0 +1,617 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Base_Int. +Export Core_Base_Int. + + +From Core Require Import Core_Cmp. +Export Core_Cmp. + +From Core Require Import Core_Clone. +Export Core_Clone. + +From Core Require Import Core_Option. +Export Core_Option. + +From Core Require Import Core_Base_Int_Base_spec. +Export Core_Base_Int_Base_spec. + +Definition impl_7__sub__double_mask (lhs : t_HaxInt) : t_HaxInt := + match impl_9__match_pos (lhs) with + | t_POS_POS_ZERO => + impl_9__ZERO + | t_POS_POS_POS (p) => + impl_4__to_int (impl_8__xO (p)) + end. + +Definition impl_7__sub__succ_double_mask (lhs : t_HaxInt) : t_HaxInt := + match impl_9__match_pos (lhs) with + | t_POS_POS_ZERO => + impl_4__to_int (impl_8__xH) + | t_POS_POS_POS (p) => + impl_4__to_int (impl_8__xI (p)) + end. + +Definition impl_8__double (self : t_HaxInt) : t_HaxInt := + match impl_9__match_pos (self) with + | t_POS_POS_ZERO => + impl_9__ZERO + | t_POS_POS_POS (p) => + impl_4__to_int (impl_8__xO (p)) + end. + +Definition impl_8__half (self : t_HaxInt) : t_HaxInt := + match impl_9__match_pos (self) with + | t_POS_POS_ZERO => + impl_9__ZERO + | t_POS_POS_POS (n) => + match impl_8__match_positive (n) with + | t_POSITIVE_POSITIVE_XH => + impl_9__ZERO + | t_POSITIVE_POSITIVE_XO (p) => + impl_4__to_int (p) + | t_POSITIVE_POSITIVE_XI (p) => + impl_4__to_int (p) + end + end. + +Definition impl_8__succ_double (self : t_HaxInt) : t_Positive := + match impl_9__match_pos (self) with + | t_POS_POS_ZERO => + impl_8__xH + | t_POS_POS_POS (p) => + impl_8__xI (p) + end. + +Fixpoint impl__cmp__cmp_binary_cont (x : t_Positive) (y : t_Positive) (r : t_Ordering) : t_Ordering := + match impl_8__match_positive (x) with + | t_POSITIVE_POSITIVE_XH => + match impl_8__match_positive (y) with + | t_POSITIVE_POSITIVE_XH => + r + | t_POSITIVE_POSITIVE_XO (q) + | t_POSITIVE_POSITIVE_XI (q) => + t_Ordering_Ordering_Less + end + | t_POSITIVE_POSITIVE_XO (p) => + match impl_8__match_positive (y) with + | t_POSITIVE_POSITIVE_XH => + t_Ordering_Ordering_Greater + | t_POSITIVE_POSITIVE_XO (q) => + impl__cmp__cmp_binary_cont (p) (q) (r) + | t_POSITIVE_POSITIVE_XI (q) => + impl__cmp__cmp_binary_cont (p) (q) (t_Ordering_Ordering_Less) + end + | t_POSITIVE_POSITIVE_XI (p) => + match impl_8__match_positive (y) with + | t_POSITIVE_POSITIVE_XH => + t_Ordering_Ordering_Greater + | t_POSITIVE_POSITIVE_XO (q) => + impl__cmp__cmp_binary_cont (p) (q) (t_Ordering_Ordering_Greater) + | t_POSITIVE_POSITIVE_XI (q) => + impl__cmp__cmp_binary_cont (p) (q) (r) + end + end. + +Definition impl__cmp (lhs : t_Positive) (rhs : t_Positive) : t_Ordering := + impl__cmp__cmp_binary_cont (lhs) (rhs) (t_Ordering_Ordering_Equal). + +Instance t_PartialEq_427583131 : t_PartialEq (t_Positive) (t_Positive) := + { + t_PartialEq_f_eq := fun (self : t_Positive) (other : t_Positive) => + t_PartialEq_f_eq (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) (t_Ordering_Ordering_Equal); + t_PartialEq_f_ne := fun (self : t_Positive) (other : t_Positive) => + negb (t_PartialEq_f_eq (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) (t_Ordering_Ordering_Equal)); + }. + +Definition impl_2__cmp (lhs : t_HaxInt) (rhs : t_HaxInt) : t_Ordering := + match impl_9__match_pos (lhs) with + | t_POS_POS_ZERO => + match impl_9__match_pos (rhs) with + | t_POS_POS_ZERO => + t_Ordering_Ordering_Equal + | t_POS_POS_POS (q) => + t_Ordering_Ordering_Less + end + | t_POS_POS_POS (p) => + match impl_9__match_pos (rhs) with + | t_POS_POS_ZERO => + t_Ordering_Ordering_Greater + | t_POS_POS_POS (q) => + impl__cmp (p) (q) + end + end. + +Instance t_PartialEq_822848086 : t_PartialEq (t_HaxInt) (t_HaxInt) := + { + t_PartialEq_f_eq := fun (self : t_HaxInt) (other : t_HaxInt) => + t_PartialEq_f_eq (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) (t_Ordering_Ordering_Equal); + t_PartialEq_f_ne := fun (self : t_HaxInt) (other : t_HaxInt) => + negb (t_PartialEq_f_eq (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) (t_Ordering_Ordering_Equal)); + }. + +Fixpoint impl_4__succ (self : t_Positive) : t_Positive := + match impl_8__match_positive (self) with + | t_POSITIVE_POSITIVE_XH => + impl_8__xO (impl_8__xH) + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__xI (q) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__xO (impl_4__succ (q)) + end. + +Fixpoint impl_7__sub__pred_double (lhs : t_Positive) : t_Positive := + match impl_8__match_positive (lhs) with + | t_POSITIVE_POSITIVE_XH => + impl_8__xH + | t_POSITIVE_POSITIVE_XO (p) => + impl_8__xI (impl_7__sub__pred_double (p)) + | t_POSITIVE_POSITIVE_XI (p) => + impl_8__xI (impl_8__xO (p)) + end. + +Definition impl_7__sub__double_pred_mask (lhs : t_Positive) : t_HaxInt := + match impl_8__match_positive (lhs) with + | t_POSITIVE_POSITIVE_XH => + impl_9__ZERO + | t_POSITIVE_POSITIVE_XO (p) => + impl_4__to_int (impl_8__xO (impl_7__sub__pred_double (p))) + | t_POSITIVE_POSITIVE_XI (p) => + impl_4__to_int (impl_8__xO (impl_8__xO (p))) + end. + +Fixpoint impl_9__power_of_two (self : t_Unary) : t_Positive := + match impl_6__match_unary (self) with + | t_UNARY_UNARY_ZERO => + impl_8__xH + | t_UNARY_UNARY_SUCC (x) => + impl_8__xO (impl_9__power_of_two (x)) + end. + +Fixpoint impl_12__shl__shl_helper (rhs : t_Unary) (lhs : t_HaxInt) : t_HaxInt := + if + impl_9__is_zero (t_Clone_f_clone (lhs)) + then + lhs + else + match impl_6__match_unary (rhs) with + | t_UNARY_UNARY_ZERO => + lhs + | t_UNARY_UNARY_SUCC (n) => + impl_12__shl__shl_helper (n) (impl_8__double (lhs)) + end. + +Definition impl_12__shl (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + impl_12__shl__shl_helper (impl_5__from_int (rhs)) (self). + +Fixpoint impl_13__shr__shr_helper (rhs : t_Unary) (lhs : t_HaxInt) : t_HaxInt := + if + impl_9__is_zero (t_Clone_f_clone (lhs)) + then + lhs + else + match impl_6__match_unary (rhs) with + | t_UNARY_UNARY_ZERO => + lhs + | t_UNARY_UNARY_SUCC (n) => + impl_13__shr__shr_helper (n) (impl_8__half (lhs)) + end. + +Definition impl_13__shr (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + impl_13__shr__shr_helper (impl_5__from_int (rhs)) (self). + +Fixpoint impl_14__bitxor__bitxor_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := + match impl_8__match_positive (lhs) with + | t_POSITIVE_POSITIVE_XH => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_9__ZERO + | t_POSITIVE_POSITIVE_XO (q) => + impl_4__to_int (impl_8__xI (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_4__to_int (impl_8__xO (q)) + end + | t_POSITIVE_POSITIVE_XO (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_4__to_int (impl_8__xI (p)) + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__double (impl_14__bitxor__bitxor_binary (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_4__to_int (impl_8__succ_double (impl_14__bitxor__bitxor_binary (p) (q))) + end + | t_POSITIVE_POSITIVE_XI (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_4__to_int (impl_8__xO (p)) + | t_POSITIVE_POSITIVE_XO (q) => + impl_4__to_int (impl_8__succ_double (impl_14__bitxor__bitxor_binary (p) (q))) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__double (impl_14__bitxor__bitxor_binary (p) (q)) + end + end. + +Definition impl_14__bitxor (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match impl_9__match_pos (self) with + | t_POS_POS_ZERO => + rhs + | t_POS_POS_POS (p) => + match impl_9__match_pos (rhs) with + | t_POS_POS_ZERO => + impl_4__to_int (p) + | t_POS_POS_POS (q) => + impl_14__bitxor__bitxor_binary (p) (q) + end + end. + +Fixpoint impl_15__bitand__bitand_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := + match impl_8__match_positive (lhs) with + | t_POSITIVE_POSITIVE_XH => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XO (q) => + impl_9__ZERO + | t_POSITIVE_POSITIVE_XI (_) + | t_POSITIVE_POSITIVE_XH => + impl_9__ONE + end + | t_POSITIVE_POSITIVE_XO (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_9__ZERO + | t_POSITIVE_POSITIVE_XO (q) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__double (impl_15__bitand__bitand_binary (p) (q)) + end + | t_POSITIVE_POSITIVE_XI (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_9__ONE + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__double (impl_15__bitand__bitand_binary (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_4__to_int (impl_8__succ_double (impl_15__bitand__bitand_binary (p) (q))) + end + end. + +Definition impl_15__bitand (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match impl_9__match_pos (self) with + | t_POS_POS_ZERO => + impl_9__ZERO + | t_POS_POS_POS (p) => + match impl_9__match_pos (rhs) with + | t_POS_POS_ZERO => + impl_9__ZERO + | t_POS_POS_POS (q) => + impl_15__bitand__bitand_binary (p) (q) + end + end. + +Fixpoint impl_16__bitor__bitor_binary (lhs : t_Positive) (rhs : t_Positive) : t_Positive := + match impl_8__match_positive (lhs) with + | t_POSITIVE_POSITIVE_XH => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__xI (q) + | t_POSITIVE_POSITIVE_XH => + impl_8__xH + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__xI (q) + end + | t_POSITIVE_POSITIVE_XO (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_8__xI (p) + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__xO (impl_16__bitor__bitor_binary (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__xI (impl_16__bitor__bitor_binary (p) (q)) + end + | t_POSITIVE_POSITIVE_XI (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_8__xI (p) + | t_POSITIVE_POSITIVE_XO (q) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__xI (impl_16__bitor__bitor_binary (p) (q)) + end + end. + +Definition impl_16__bitor (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match impl_9__match_pos (self) with + | t_POS_POS_ZERO => + rhs + | t_POS_POS_POS (p) => + match impl_9__match_pos (rhs) with + | t_POS_POS_ZERO => + impl_4__to_int (p) + | t_POS_POS_POS (q) => + impl_4__to_int (impl_16__bitor__bitor_binary (p) (q)) + end + end. + +Instance t_PartialOrd_895391065 : t_PartialOrd (t_Positive) (t_Positive) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_Positive) (other : t_Positive) => + t_Option_Option_Some (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))); + t_PartialOrd_f_lt := fun (self : t_Positive) (other : t_Positive) => + match t_Option_Option_Some (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_Positive) (other : t_Positive) => + match t_Option_Option_Some (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_Positive) (other : t_Positive) => + match t_Option_Option_Some (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_Positive) (other : t_Positive) => + match t_Option_Option_Some (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialOrd_414924529 : t_PartialOrd (t_HaxInt) (t_HaxInt) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_HaxInt) (other : t_HaxInt) => + t_Option_Option_Some (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))); + t_PartialOrd_f_lt := fun (self : t_HaxInt) (other : t_HaxInt) => + match t_Option_Option_Some (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_HaxInt) (other : t_HaxInt) => + match t_Option_Option_Some (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_HaxInt) (other : t_HaxInt) => + match t_Option_Option_Some (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_HaxInt) (other : t_HaxInt) => + match t_Option_Option_Some (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Fixpoint impl_4__add (self : t_Positive) (rhs : t_Positive) : t_Positive := + match impl_8__match_positive (self) with + | t_POSITIVE_POSITIVE_XH => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_8__xO (impl_8__xH) + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__xI (q) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__xO (impl_4__succ (q)) + end + | t_POSITIVE_POSITIVE_XO (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_8__xI (p) + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__xO (impl_4__add (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__xI (impl_4__add (p) (q)) + end + | t_POSITIVE_POSITIVE_XI (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_8__xO (impl_4__succ (p)) + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__xI (impl_4__add (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__xO (impl_4__add__add_carry (p) (q)) + end + end + +with impl_4__add__add_carry (lhs : t_Positive) (rhs : t_Positive) : t_Positive := + match impl_8__match_positive (lhs) with + | t_POSITIVE_POSITIVE_XH => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_8__xI (impl_8__xH) + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__xO (impl_4__succ (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__xI (impl_4__succ (q)) + end + | t_POSITIVE_POSITIVE_XO (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_8__xO (impl_4__succ (p)) + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__xI (impl_4__add (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__xO (impl_4__add__add_carry (p) (q)) + end + | t_POSITIVE_POSITIVE_XI (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_8__xI (impl_4__succ (p)) + | t_POSITIVE_POSITIVE_XO (q) => + impl_8__xO (impl_4__add__add_carry (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_8__xI (impl_4__add__add_carry (p) (q)) + end + end. + +Definition impl_6__add (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match impl_9__match_pos (self) with + | t_POS_POS_ZERO => + rhs + | t_POS_POS_POS (p) => + match impl_9__match_pos (rhs) with + | t_POS_POS_ZERO => + impl_4__to_int (p) + | t_POS_POS_POS (q) => + impl_4__to_int (impl_4__add (p) (q)) + end + end. + +Fixpoint impl_7__sub__sub_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := + match impl_8__match_positive (lhs) with + | t_POSITIVE_POSITIVE_XH => + impl_9__ZERO + | t_POSITIVE_POSITIVE_XO (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_4__to_int (impl_7__sub__pred_double (p)) + | t_POSITIVE_POSITIVE_XO (q) => + impl_7__sub__double_mask (impl_7__sub__sub_binary (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_7__sub__succ_double_mask (impl_7__sub__sub_carry (p) (q)) + end + | t_POSITIVE_POSITIVE_XI (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_4__to_int (impl_8__xO (p)) + | t_POSITIVE_POSITIVE_XO (q) => + impl_7__sub__succ_double_mask (impl_7__sub__sub_binary (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_7__sub__double_mask (impl_7__sub__sub_binary (p) (q)) + end + end + +with impl_7__sub__sub_carry (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := + match impl_8__match_positive (lhs) with + | t_POSITIVE_POSITIVE_XH => + impl_9__ZERO + | t_POSITIVE_POSITIVE_XO (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_7__sub__double_pred_mask (p) + | t_POSITIVE_POSITIVE_XO (q) => + impl_7__sub__succ_double_mask (impl_7__sub__sub_carry (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_7__sub__double_mask (impl_7__sub__sub_carry (p) (q)) + end + | t_POSITIVE_POSITIVE_XI (p) => + match impl_8__match_positive (rhs) with + | t_POSITIVE_POSITIVE_XH => + impl_4__to_int (impl_7__sub__pred_double (p)) + | t_POSITIVE_POSITIVE_XO (q) => + impl_7__sub__double_mask (impl_7__sub__sub_binary (p) (q)) + | t_POSITIVE_POSITIVE_XI (q) => + impl_7__sub__succ_double_mask (impl_7__sub__sub_carry (p) (q)) + end + end. + +Definition impl_7__sub (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match impl_9__match_pos (self) with + | t_POS_POS_ZERO => + impl_9__ZERO + | t_POS_POS_POS (p) => + match impl_9__match_pos (rhs) with + | t_POS_POS_ZERO => + impl_4__to_int (p) + | t_POS_POS_POS (q) => + impl_7__sub__sub_binary (p) (q) + end + end. + +Fixpoint impl_5__mul (self : t_Positive) (rhs : t_Positive) : t_Positive := + match impl_8__match_positive (self) with + | t_POSITIVE_POSITIVE_XH => + rhs + | t_POSITIVE_POSITIVE_XO (p) => + impl_8__xO (impl_5__mul (p) (rhs)) + | t_POSITIVE_POSITIVE_XI (p) => + impl_4__add (t_Clone_f_clone (rhs)) (impl_8__xO (impl_5__mul (p) (rhs))) + end. + +Definition impl_11__mul (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match impl_9__match_pos (self) with + | t_POS_POS_ZERO => + impl_9__ZERO + | t_POS_POS_POS (p) => + match impl_9__match_pos (rhs) with + | t_POS_POS_ZERO => + impl_9__ZERO + | t_POS_POS_POS (q) => + impl_4__to_int (impl_5__mul (p) (q)) + end + end. + +Fixpoint impl_10__divmod__divmod_binary (a : t_Positive) (b : t_Positive) : (t_HaxInt*t_HaxInt) := + match impl_8__match_positive (a) with + | t_POSITIVE_POSITIVE_XH => + match impl_8__match_positive (b) with + | t_POSITIVE_POSITIVE_XH => + (impl_9__ONE,impl_9__ZERO) + | t_POSITIVE_POSITIVE_XO (q) + | t_POSITIVE_POSITIVE_XI (q) => + (impl_9__ZERO,impl_9__ONE) + end + | t_POSITIVE_POSITIVE_XO (a) => + let '(q,r) := impl_10__divmod__divmod_binary (a) (t_Clone_f_clone (b)) in + let r := impl_8__double (r) in + if + t_PartialOrd_f_le (impl_4__to_int (t_Clone_f_clone (b))) (t_Clone_f_clone (r)) + then + (impl_4__to_int (impl_8__succ_double (q)),impl_7__sub (r) (impl_4__to_int (b))) + else + (impl_8__double (q),r) + | t_POSITIVE_POSITIVE_XI (a) => + let '(q,r) := impl_10__divmod__divmod_binary (a) (t_Clone_f_clone (b)) in + let r := impl_4__to_int (impl_8__succ_double (r)) in + if + t_PartialOrd_f_le (impl_4__to_int (t_Clone_f_clone (b))) (t_Clone_f_clone (r)) + then + (impl_4__to_int (impl_8__succ_double (q)),impl_7__sub (r) (impl_4__to_int (b))) + else + (impl_8__double (q),r) + end. + +Definition impl_10__divmod (a : t_HaxInt) (b : t_HaxInt) : (t_HaxInt*t_HaxInt) := + match impl_9__match_pos (a) with + | t_POS_POS_ZERO => + (impl_9__ZERO,impl_9__ZERO) + | t_POS_POS_POS (p) => + match impl_9__match_pos (b) with + | t_POS_POS_ZERO => + (impl_9__ZERO,impl_4__to_int (p)) + | t_POS_POS_POS (q) => + impl_10__divmod__divmod_binary (p) (q) + end + end. + +Definition impl_10__div (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + let '(q,r) := impl_10__divmod (self) (rhs) in + q. + +Definition impl_10__rem (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + let '(q,r) := impl_10__divmod (self) (rhs) in + r. diff --git a/proof-libs/coq/coq/src/Core_Base_Int_Base_spec.v b/proof-libs/coq/coq/src/Core_Base_Int_Base_spec.v new file mode 100644 index 000000000..e8c46c4f8 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Base_Int_Base_spec.v @@ -0,0 +1,129 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Base_Int. +Export Core_Base_Int. + +From Core Require Import Core_Clone (t_Clone). +Export Core_Clone (t_Clone). +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Base_Int. +Export Core_Base_Int. + +From Core Require Import Core_Clone (t_Clone). +Export Core_Clone (t_Clone). + +Definition impl_9__ONE : t_HaxInt := 1%N. + +Definition impl_9__ZERO : t_HaxInt := 0%N. + +Definition v_BITS_128_ : t_HaxInt := 128%N. + +Definition v_BITS_16_ : t_HaxInt := 16%N. + +Definition v_BITS_32_ : t_HaxInt := 32%N. + +Definition v_BITS_64_ : t_HaxInt := 64%N. + +Definition v_BITS_8_ : t_HaxInt := 8%N. + +Definition v_WORDSIZE_128_ : t_HaxInt := N.pow 2 128. + +Definition v_WORDSIZE_128_SUB_1_ : t_HaxInt := (N.pow 2 128 - 1)%N. + +Definition v_WORDSIZE_16_ : t_HaxInt := N.pow 2 16. + +Definition v_WORDSIZE_16_SUB_1_ : t_HaxInt := (N.pow 2 16 - 1)%N. + +Definition v_WORDSIZE_32_ : t_HaxInt := N.pow 2 32. + +Definition v_WORDSIZE_32_SUB_1_ : t_HaxInt := (N.pow 2 32 - 1)%N. + +Definition v_WORDSIZE_64_ : t_HaxInt := N.pow 2 64. + +Definition v_WORDSIZE_64_SUB_1_ : t_HaxInt := (N.pow 2 64 - 1)%N. + +Definition v_WORDSIZE_8_ : t_HaxInt := N.pow 2 8. + +Definition v_WORDSIZE_8_SUB_1_ : t_HaxInt := (N.pow 2 8 - 1)%N. + +Instance t_Clone_599065907 : t_Clone (t_HaxInt) := + { + t_Clone_f_clone := fun (self : t_HaxInt) => self; + }. + +Definition impl_7__div2 (self : t_HaxInt) : t_HaxInt := N.div self 2. + +Definition impl_9__is_zero (self : t_HaxInt) : bool := match self with | N0 => true | _ => false end. + +Definition impl_9__pred (self : t_HaxInt) `{negb (impl_9__is_zero (self)) = true} : t_HaxInt := + N.pred self. + +Definition impl_9__succ (self : t_HaxInt) : t_HaxInt := + N.succ self. + +Instance t_Clone_793353639 : t_Clone (t_Positive) := + { + t_Clone_f_clone := fun (self : t_Positive) => + self; + }. + +Instance t_Clone_620939287 : t_Clone (t_Unary) := + { + t_Clone_f_clone := fun (self : t_Unary) => + self; + }. + +Definition impl_4__from_int (x : t_HaxInt) : t_Positive := + match x with | N0 => xH | Npos p => p end. + +Definition impl_4__to_int (self : t_Positive) : t_HaxInt := + Npos self. + +Definition impl_5__from_int (x : t_HaxInt) : t_Unary := + N.to_nat x. + +Definition impl_5__to_int (self : t_Unary) : t_HaxInt := + N.of_nat self. + +Definition impl_6__match_unary (self : t_Unary) : t_UNARY := + self. + +Definition impl_8__is_xH (self : t_Positive) : bool := + match self with xH => true | _ => false end. + +Definition impl_8__is_xI (self : t_Positive) : bool := + match self with xI _ => true | _ => false end. + +Definition impl_8__is_xO (self : t_Positive) : bool := + match self with xO _ => true | _ => false end. + +Definition impl_8__match_positive (self : t_Positive) : t_POSITIVE := + self. + +Definition impl_8__xH : t_Positive := + xH. + +Definition impl_8__xI (self : t_Positive) : t_Positive := + xI self. + +Definition impl_8__xO (self : t_Positive) : t_Positive := + xO self. + +Definition impl_9__match_pos (self : t_HaxInt) : t_POS := + if + impl_9__is_zero ((self)) + then + t_POS_POS_ZERO + else + t_POS_POS_POS (impl_4__from_int (self)). diff --git a/proof-libs/coq/coq/src/Core_Base_Int_Number_conversion.v b/proof-libs/coq/coq/src/Core_Base_Int_Number_conversion.v new file mode 100644 index 000000000..4f1df3ef3 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Base_Int_Number_conversion.v @@ -0,0 +1,80 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Base_Int. +Export Core_Base_Int. + +From Core Require Import Core_Primitive. +Export Core_Primitive. + +From Core Require Import Core_Cmp. +Export Core_Cmp. + +From Core Require Import Core_Convert. +Export Core_Convert. + +(* NotImplementedYet *) + +Instance t_From_62544291 : t_From (t_HaxInt) (t_u8) := + { + t_From_f_from := fun (x : t_u8) => t_U8_f_v (t_u8_0 x); + }. + +Instance t_From_1006987144 : t_From (t_u8) (t_HaxInt) := + { + t_From_f_from := fun (x : t_HaxInt) => Build_t_u8 (Build_t_U8 x) + }. + +Instance t_From_1039663005 : t_From (t_HaxInt) (t_u16) := + { + t_From_f_from := fun (x : t_u16) => t_U16_f_v (t_u16_0 x); + }. + +Instance t_From_1052282100 : t_From (t_u16) (t_HaxInt) := + { + t_From_f_from := fun (x : t_HaxInt) => Build_t_u16 (Build_t_U16 x); + }. + +Instance t_From_529475850 : t_From (t_HaxInt) (t_u32) := + { + t_From_f_from := fun (x : t_u32) => t_U32_f_v (t_u32_0 x); + }. + +Instance t_From_447931916 : t_From (t_u32) (t_HaxInt) := + { + t_From_f_from := fun (x : t_HaxInt) => Build_t_u32 (Build_t_U32 x); + }. + +Instance t_From_616445870 : t_From (t_HaxInt) (t_u64) := + { + t_From_f_from := fun (x : t_u64) => t_U64_f_v (t_u64_0 x); + }. + +Instance t_From_70650389 : t_From (t_u64) (t_HaxInt) := + { + t_From_f_from := fun (x : t_HaxInt) => Build_t_u64 (Build_t_U64 x); + }. + +Instance t_From_184355489 : t_From (t_HaxInt) (t_u128) := + { + t_From_f_from := fun (x : t_u128) => t_U128_f_v (t_u128_0 x); + }. + +Instance t_From_844812452 : t_From (t_u128) (t_HaxInt) := + { + t_From_f_from := fun (x : t_HaxInt) => Build_t_u128 (Build_t_U128 x); + }. + +Instance t_From_946823391 : t_From (t_HaxInt) (t_usize) := + { + t_From_f_from := fun (x : t_usize) => t_U64_f_v (t_usize_0 x); + }. + +Instance t_From_655514338 : t_From (t_usize) (t_HaxInt) := + { + t_From_f_from := fun (x : t_HaxInt) => Build_t_usize (Build_t_U64 x); + }. diff --git a/proof-libs/coq/coq/src/Core_Base_Seq.v b/proof-libs/coq/coq/src/Core_Base_Seq.v new file mode 100644 index 000000000..a92c32d89 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Base_Seq.v @@ -0,0 +1,30 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Clone (t_Clone). +Export Core_Clone (t_Clone). + +From Core Require Import Core_Cmp (t_PartialEq). +Export Core_Cmp (t_PartialEq). + +From Core Require Import Core_Marker (t_Sized). +Export Core_Marker (t_Sized). + +From Core Require Import Core_Base_Int. +Export Core_Base_Int. + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +Definition t_Seq `{v_T : Type} `{t_Sized v_T} : Type := list v_T. +Arguments t_Seq:clear implicits. +Arguments t_Seq (_) {_}. + +Notation "'t_LIST'" := t_Seq. +Notation "'t_LIST_LIST_NIL'" := nil. +Notation "'t_LIST_LIST_CONS'" := cons. diff --git a/proof-libs/coq/coq/src/Core_Base_Seq_Base_impl.v b/proof-libs/coq/coq/src/Core_Base_Seq_Base_impl.v new file mode 100644 index 000000000..013f2e2e0 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Base_Seq_Base_impl.v @@ -0,0 +1,142 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + + +From Core Require Import Core_Base_Seq. +Export Core_Base_Seq. + +From Core Require Import Core_Base_Seq_Base_spec. +Export Core_Base_Seq_Base_spec. + +From Core Require Import Core_Panicking. +Export Core_Panicking. + +From Core Require Import Core_Marker. +Export Core_Marker. + +From Core Require Import Core_Clone. +Export Core_Clone. + +From Core Require Import Core_Cmp. +Export Core_Cmp. + +From Core Require Import Core_Base_Int_Base_impl. +Export Core_Base_Int_Base_impl. + +Definition impl_2__is_empty `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) : bool := + match impl_1__match_list (self) with + | t_LIST_LIST_NIL => + true + | t_LIST_LIST_CONS (_) (_) => + false + end. + +Definition impl_2__tl `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) `{negb (impl_2__is_empty (self)) = true} : t_Seq (v_T) := + match impl_1__match_list (self) with + | t_LIST_LIST_NIL => + impl_1__NIL + | t_LIST_LIST_CONS (_) (tl) => + tl + end. + +Definition impl_2__hd__panic_cold_explicit (_ : unit) `{false = true} : t_Never := + panic_explicit (H := H) (tt). + +Definition impl_2__hd `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) `{negb (impl_2__is_empty (self)) = true} : v_T := + match impl_1__match_list (self) as k return negb (impl_2__is_empty k) = true -> _ with + | t_LIST_LIST_NIL => + fun F => + never_to_any (impl_2__hd__panic_cold_explicit (H := F) (tt)) + | t_LIST_LIST_CONS (hd) (_) => + fun _ => + hd + end H1. + +Definition impl_2__set_index__set_index_unary__panic_cold_explicit (_ : unit) `{false = true} : t_Never := + panic_explicit (H := H) (tt). + +Fixpoint impl__eq_inner `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} `{t_PartialEq v_T v_T} (self : t_Seq (v_T)) (other : t_Seq (v_T)) : bool := + match impl_1__match_list (t_Clone_f_clone (self)) with + | t_LIST_LIST_NIL => + impl_2__is_empty (t_Clone_f_clone (other)) + | t_LIST_LIST_CONS (x) (xs) => + match impl_1__match_list (t_Clone_f_clone (other)) with + | t_LIST_LIST_NIL => + false + | t_LIST_LIST_CONS (y) (ys) => + andb (t_PartialEq_f_eq (x) (y)) (impl__eq_inner (xs) (ys)) + end + end. + +Instance t_PartialEq_531240694 `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} `{t_PartialEq v_T v_T} : t_PartialEq (t_Seq (v_T)) (t_Seq (v_T)) := + { + t_PartialEq_f_eq := fun (self : t_Seq (v_T)) (other : t_Seq (v_T)) => + impl__eq_inner (self) (other); + t_PartialEq_f_ne := fun (self : t_Seq (v_T)) (other : t_Seq (v_T)) => + negb (impl__eq_inner (self) (other)); + }. + +Fixpoint impl_2__len `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) : t_HaxInt := + match impl_1__match_list (self) with + | t_LIST_LIST_NIL => + impl_9__ZERO + | t_LIST_LIST_CONS (_) (tl) => + impl_9__succ (impl_2__len (tl)) + end. + +Fixpoint impl_2__rev_accum `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) (accum : t_Seq (v_T)) : t_Seq (v_T) := + match impl_1__match_list (self) with + | t_LIST_LIST_NIL => + accum + | t_LIST_LIST_CONS (hd) (tl) => + impl_2__rev_accum (tl) (impl_1__cons (accum) (hd)) + end. + +Definition impl_2__rev `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) : t_Seq (v_T) := + impl_2__rev_accum (self) (impl_1__NIL). + +Program Fixpoint impl_2__get_index__get_index_unary `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (l : t_Seq (v_T)) (i : t_Unary) `{t_PartialOrd_f_lt (impl_5__to_int i) ((impl_2__len (l))) = true} : v_T := + match impl_6__match_unary (i) with + | t_UNARY_UNARY_ZERO => + impl_2__hd (l) + | t_UNARY_UNARY_SUCC (n) => + impl_2__get_index__get_index_unary (impl_2__tl (l)) (n) + end. +Admit Obligations. + +Program Definition impl_2__get_index `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) (i : t_HaxInt) `{t_PartialOrd_f_lt (i) (impl_2__len (self)) = true} : v_T := + impl_2__get_index__get_index_unary (H1 := _) (self) (impl_5__from_int (i)). +Admit Obligations. + +Fixpoint impl_2__repeat__repeat_unary `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (n : t_Unary) (v : v_T) : t_Seq (v_T) := + match impl_6__match_unary (n) with + | t_UNARY_UNARY_ZERO => + impl_1__NIL + | t_UNARY_UNARY_SUCC (m) => + impl_1__cons (impl_2__repeat__repeat_unary (m) (t_Clone_f_clone (v))) (v) + end. + +Definition impl_2__repeat `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (n : t_HaxInt) (v : v_T) : t_Seq (v_T) := + impl_2__repeat__repeat_unary (impl_5__from_int (n)) (v). + +Program Fixpoint impl_2__set_index__set_index_unary `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (x : t_Seq (v_T)) (i : t_Unary) (v : v_T) `{t_PartialOrd_f_lt (impl_5__to_int i) ((impl_2__len (x))) = true} : t_Seq (v_T) := + match impl_1__match_list (x) with + | t_LIST_LIST_NIL => + never_to_any (impl_2__set_index__set_index_unary__panic_cold_explicit (H := _) (tt)) + | t_LIST_LIST_CONS (hd) (tl) => + match impl_6__match_unary (i) with + | t_UNARY_UNARY_ZERO => + impl_1__cons (tl) (v) + | t_UNARY_UNARY_SUCC (n) => + impl_1__cons (impl_2__set_index__set_index_unary (tl) (n) (v)) (hd) + end + end. +Admit Obligations. + +Program Definition impl_2__set_index `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) (i : t_HaxInt) (v : v_T) `{t_PartialOrd_f_lt (i) (impl_2__len (self)) = true} : t_Seq (v_T) := + impl_2__set_index__set_index_unary (H1 := _) (self) (impl_5__from_int (i)) (v). +Admit Obligations. diff --git a/proof-libs/coq/coq/src/Core_Base_Seq_Base_spec.v b/proof-libs/coq/coq/src/Core_Base_Seq_Base_spec.v new file mode 100644 index 000000000..895d9f453 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Base_Seq_Base_spec.v @@ -0,0 +1,20 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Base_Seq. +Export Core_Base_Seq. + +Instance t_Clone_528107485 `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} : t_Clone (t_Seq (v_T)) := + { + t_Clone_f_clone := fun (self : t_Seq (v_T)) => self; + }. + +Definition impl_1__NIL `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} : t_Seq (v_T) := nil. + +Definition impl_1__cons `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) (t : v_T) : t_Seq (v_T) := cons t self. + +Definition impl_1__match_list `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) : t_LIST (v_T) := self. diff --git a/proof-libs/coq/coq/src/Core_Clone.v b/proof-libs/coq/coq/src/Core_Clone.v new file mode 100644 index 000000000..020e2c3af --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Clone.v @@ -0,0 +1,13 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +Class t_Clone `{v_Self : Type} : Type := + { + t_Clone_f_clone : v_Self -> v_Self; + }. +Arguments t_Clone:clear implicits. +Arguments t_Clone (_). diff --git a/proof-libs/coq/coq/src/Core_Cmp.v b/proof-libs/coq/coq/src/Core_Cmp.v new file mode 100644 index 000000000..a38506da5 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Cmp.v @@ -0,0 +1,165 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + + +From Core Require Import Core_Option (t_Option). +Export Core_Option (t_Option). + +Definition discriminant_t_Ordering_Ordering_Equal := + 0%N. + +Definition discriminant_t_Ordering_Ordering_Greater := + 1%N. + +Inductive t_Ordering : Type := +| t_Ordering_Ordering_Less +| t_Ordering_Ordering_Equal +| t_Ordering_Ordering_Greater. +Arguments t_Ordering:clear implicits. +Arguments t_Ordering. + +Definition impl__Ordering__is_eq (self : t_Ordering) : bool := + match self with + | t_Ordering_Ordering_Equal => + true + | _ => + false + end. + +Definition impl__Ordering__is_gt (self : t_Ordering) : bool := + match self with + | t_Ordering_Ordering_Greater => + true + | _ => + false + end. + +Definition impl__Ordering__is_lt (self : t_Ordering) : bool := + match self with + | t_Ordering_Ordering_Less => + true + | _ => + false + end. + +Definition impl__Ordering__reverse (self : t_Ordering) : t_Ordering := + match self with + | t_Ordering_Ordering_Less => + t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal => + t_Ordering_Ordering_Equal + | t_Ordering_Ordering_Greater => + t_Ordering_Ordering_Less + end. + +Definition discriminant_t_Ordering_Ordering_Less := + 1%N. + +Definition t_Ordering_cast_to_repr (x : t_Ordering) := + match x with + | t_Ordering_Ordering_Less => + discriminant_t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal => + discriminant_t_Ordering_Ordering_Equal + | t_Ordering_Ordering_Greater => + discriminant_t_Ordering_Ordering_Greater + end. + +Class t_PartialEq `{v_Self : Type} `{v_Rhs : Type} : Type := + { + t_PartialEq_f_eq : v_Self -> v_Rhs -> bool; + t_PartialEq_f_ne : v_Self -> v_Rhs -> bool; + }. +Arguments t_PartialEq:clear implicits. +Arguments t_PartialEq (_) (_). + +Definition impl__Ordering__is_ge (self : t_Ordering) : bool := + negb (match self with + | t_Ordering_Ordering_Less => + true + | _ => + false + end). + +Definition impl__Ordering__is_le (self : t_Ordering) : bool := + negb (match self with + | t_Ordering_Ordering_Greater => + true + | _ => + false + end). + +Definition impl__Ordering__is_ne (self : t_Ordering) : bool := + negb (match self with + | t_Ordering_Ordering_Equal => + true + | _ => + false + end). + +Instance t_PartialEq_322340293 : t_PartialEq (t_Ordering) (t_Ordering) := + { + t_PartialEq_f_eq := fun (self : t_Ordering) (other : t_Ordering) => + match self with + | t_Ordering_Ordering_Less => + match other with + | t_Ordering_Ordering_Less => + true + | _ => + false + end + | t_Ordering_Ordering_Equal => + match other with + | t_Ordering_Ordering_Equal => + true + | _ => + false + end + | t_Ordering_Ordering_Greater => + match other with + | t_Ordering_Ordering_Greater => + true + | _ => + false + end + end; + t_PartialEq_f_ne := fun (self : t_Ordering) (other : t_Ordering) => + negb (match self with + | t_Ordering_Ordering_Less => + match other with + | t_Ordering_Ordering_Less => + true + | _ => + false + end + | t_Ordering_Ordering_Equal => + match other with + | t_Ordering_Ordering_Equal => + true + | _ => + false + end + | t_Ordering_Ordering_Greater => + match other with + | t_Ordering_Ordering_Greater => + true + | _ => + false + end + end); + }. + +Class t_PartialOrd `{v_Self : Type} `{v_Rhs : Type} `{t_PartialEq v_Self v_Rhs} : Type := + { + t_PartialOrd_f_partial_cmp : v_Self -> v_Rhs -> t_Option (t_Ordering); + t_PartialOrd_f_lt : v_Self -> v_Rhs -> bool; + t_PartialOrd_f_le : v_Self -> v_Rhs -> bool; + t_PartialOrd_f_gt : v_Self -> v_Rhs -> bool; + t_PartialOrd_f_ge : v_Self -> v_Rhs -> bool; + }. +Arguments t_PartialOrd:clear implicits. +Arguments t_PartialOrd (_) (_) {_}. diff --git a/proof-libs/coq/coq/src/Core_Coerce.v b/proof-libs/coq/coq/src/Core_Coerce.v new file mode 100644 index 000000000..0c7d5730e --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Coerce.v @@ -0,0 +1,21 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +Class t_Concretization `{v_Self : Type} `{v_T : Type} : Type := + { + t_Concretization_f_concretize : v_Self -> v_T; + }. +Arguments t_Concretization:clear implicits. +Arguments t_Concretization (_) (_). + +Class t_Abstraction `{v_Self : Type} : Type := + { + t_Abstraction_f_AbstractType : Type; + t_Abstraction_f_lift : v_Self -> t_Abstraction_f_AbstractType; + }. +Arguments t_Abstraction:clear implicits. +Arguments t_Abstraction (_). diff --git a/proof-libs/coq/coq/src/Core_Convert.v b/proof-libs/coq/coq/src/Core_Convert.v new file mode 100644 index 000000000..92e7f58d5 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Convert.v @@ -0,0 +1,32 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +Class t_From `{v_Self : Type} `{v_T : Type} : Type := + { + t_From_f_from : v_T -> v_Self; + }. +Arguments t_From:clear implicits. +Arguments t_From (_) (_). + +Instance t_From_888864539 `{v_T : Type} : t_From (v_T) (v_T) := + { + t_From_f_from := fun (t : v_T) => + t; + }. + +Class t_Into `{v_Self : Type} `{v_T : Type} : Type := + { + t_Into_f_into : v_Self -> v_T; + }. +Arguments t_Into:clear implicits. +Arguments t_Into (_) (_). + +Instance t_Into_28327994 `{v_T : Type} `{v_U : Type} `{t_From v_U v_T} : t_Into (v_T) (v_U) := + { + t_Into_f_into := fun (self : v_T) => + t_From_f_from (self); + }. diff --git a/proof-libs/coq/coq/src/Core_Int.v b/proof-libs/coq/coq/src/Core_Int.v new file mode 100644 index 000000000..1c9f74592 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Int.v @@ -0,0 +1,1321 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + + +From Core Require Import Core_Marker. +Export Core_Marker. + +From Core Require Import Core_Ops_Arith. +Export Core_Ops_Arith. + +From Core Require Import Core_Ops_Bit. +Export Core_Ops_Bit. + + +From Core Require Import Core_Cmp. +Export Core_Cmp. + + +From Core Require Import Core_Base_Int_Base_spec. +Export Core_Base_Int_Base_spec. + +From Core Require Import Core_Base_Int_Base_impl. +Export Core_Base_Int_Base_impl. + + +From Core Require Import Core_Coerce. +Export Core_Coerce. + + +From Core Require Import Core_Option. +Export Core_Option. + +From Core Require Import Core_Clone. +Export Core_Clone. + +From Core Require Import Core_Convert. +Export Core_Convert. + +Class t_Constants `{v_Self : Type} : Type := + { + t_Constants_f_ZERO : v_Self; + t_Constants_f_ONE : v_Self; + t_Constants_f_MIN : v_Self; + t_Constants_f_MAX : v_Self; + }. +Arguments t_Constants:clear implicits. +Arguments t_Constants (_). + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +Definition impl_21__WORDSIZE : t_HaxInt := + v_WORDSIZE_8_. + +Definition impl_48__WORDSIZE : t_HaxInt := + v_WORDSIZE_16_. + +Definition impl_75__WORDSIZE : t_HaxInt := + v_WORDSIZE_32_. + +Definition impl_102__WORDSIZE : t_HaxInt := + v_WORDSIZE_64_. + +Definition impl_129__WORDSIZE : t_HaxInt := + v_WORDSIZE_128_. + +Record t_U128 : Type := + { + t_U128_f_v : t_HaxInt + }. +Arguments t_U128:clear implicits. +Arguments t_U128. + +Instance t_Constants_262847618 : t_Constants (t_U128) := + { + t_Constants_f_ZERO := Build_t_U128 (impl_9__ZERO); + t_Constants_f_ONE := Build_t_U128 (impl_9__ONE); + t_Constants_f_MIN := Build_t_U128 (impl_9__ZERO); + t_Constants_f_MAX := Build_t_U128 (v_WORDSIZE_128_SUB_1_); + }. + +Instance t_Clone_864982688 : t_Clone (t_U128) := + { + t_Clone_f_clone := fun (self : t_U128) => + Build_t_U128 (t_Clone_f_clone (t_U128_f_v self)); + }. + +Record t_U16 : Type := + { + t_U16_f_v : t_HaxInt + }. +Arguments t_U16:clear implicits. +Arguments t_U16. + +Instance t_Constants_109024683 : t_Constants (t_U16) := + { + t_Constants_f_ZERO := Build_t_U16 (impl_9__ZERO); + t_Constants_f_ONE := Build_t_U16 (impl_9__ONE); + t_Constants_f_MIN := Build_t_U16 (impl_9__ZERO); + t_Constants_f_MAX := Build_t_U16 (v_WORDSIZE_16_SUB_1_); + }. + +Instance t_Clone_516308087 : t_Clone (t_U16) := + { + t_Clone_f_clone := fun (self : t_U16) => + Build_t_U16 (t_Clone_f_clone (t_U16_f_v self)); + }. + +Record t_U32 : Type := + { + t_U32_f_v : t_HaxInt + }. +Arguments t_U32:clear implicits. +Arguments t_U32. + +Definition impl_21__BITS : t_U32 := + Build_t_U32 (v_BITS_8_). + +Definition impl_48__BITS : t_U32 := + Build_t_U32 (v_BITS_16_). + +Instance t_Constants_516415142 : t_Constants (t_U32) := + { + t_Constants_f_ZERO := Build_t_U32 (impl_9__ZERO); + t_Constants_f_ONE := Build_t_U32 (impl_9__ONE); + t_Constants_f_MIN := Build_t_U32 (impl_9__ZERO); + t_Constants_f_MAX := Build_t_U32 (v_WORDSIZE_32_SUB_1_); + }. + +Definition impl_75__BITS : t_U32 := + Build_t_U32 (v_BITS_32_). + +Instance t_Clone_816356986 : t_Clone (t_U32) := + { + t_Clone_f_clone := fun (self : t_U32) => + Build_t_U32 (t_Clone_f_clone (t_U32_f_v self)); + }. + +Definition impl_102__BITS : t_U32 := + Build_t_U32 (v_BITS_64_). + +Definition impl_129__BITS : t_U32 := + Build_t_U32 (v_BITS_128_). + +Record t_U64 : Type := + { + t_U64_f_v : t_HaxInt + }. +Arguments t_U64:clear implicits. +Arguments t_U64. + +Instance t_Constants_576498638 : t_Constants (t_U64) := + { + t_Constants_f_ZERO := Build_t_U64 (impl_9__ZERO); + t_Constants_f_ONE := Build_t_U64 (impl_9__ONE); + t_Constants_f_MIN := Build_t_U64 (impl_9__ZERO); + t_Constants_f_MAX := Build_t_U64 (v_WORDSIZE_64_SUB_1_); + }. + +Instance t_Clone_899858620 : t_Clone (t_U64) := + { + t_Clone_f_clone := fun (self : t_U64) => + Build_t_U64 (t_Clone_f_clone (t_U64_f_v self)); + }. + +Record t_U8 : Type := + { + t_U8_f_v : t_HaxInt + }. +Arguments t_U8:clear implicits. +Arguments t_U8. + +Instance t_Constants_524257484 : t_Constants (t_U8) := + { + t_Constants_f_ZERO := Build_t_U8 (impl_9__ZERO); + t_Constants_f_ONE := Build_t_U8 (impl_9__ONE); + t_Constants_f_MIN := Build_t_U8 (impl_9__ZERO); + t_Constants_f_MAX := Build_t_U8 (v_WORDSIZE_8_SUB_1_); + }. + +Instance t_Clone_1016243736 : t_Clone (t_U8) := + { + t_Clone_f_clone := fun (self : t_U8) => + Build_t_U8 (t_Clone_f_clone (t_U8_f_v self)); + }. + +Instance t_Abstraction_566214702 : t_Abstraction (t_U8) := + { + t_Abstraction_f_AbstractType := t_HaxInt; + t_Abstraction_f_lift := fun (self : t_U8) => + t_U8_f_v self; + }. + +Instance t_PartialEq_118986006 : t_PartialEq (t_U8) (t_U8) := + { + t_PartialEq_f_eq := fun (self : t_U8) (rhs : t_U8) => + t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); + t_PartialEq_f_ne := fun (self : t_U8) (rhs : t_U8) => + negb (t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs)))); + }. + +Instance t_PartialOrd_672693761 : t_PartialOrd (t_U8) (t_U8) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_U8) (rhs : t_U8) => + t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); + t_PartialOrd_f_lt := fun (self : t_U8) (rhs : t_U8) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_U8) (rhs : t_U8) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_U8) (rhs : t_U8) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_U8) (rhs : t_U8) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_Abstraction_134234872 : t_Abstraction (t_U16) := + { + t_Abstraction_f_AbstractType := t_HaxInt; + t_Abstraction_f_lift := fun (self : t_U16) => + t_U16_f_v self; + }. + +Instance t_PartialEq_712273567 : t_PartialEq (t_U16) (t_U16) := + { + t_PartialEq_f_eq := fun (self : t_U16) (rhs : t_U16) => + t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); + t_PartialEq_f_ne := fun (self : t_U16) (rhs : t_U16) => + negb (t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs)))); + }. + +Instance t_PartialOrd_17851967 : t_PartialOrd (t_U16) (t_U16) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_U16) (rhs : t_U16) => + t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); + t_PartialOrd_f_lt := fun (self : t_U16) (rhs : t_U16) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_U16) (rhs : t_U16) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_U16) (rhs : t_U16) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_U16) (rhs : t_U16) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_Abstraction_699270934 : t_Abstraction (t_U32) := + { + t_Abstraction_f_AbstractType := t_HaxInt; + t_Abstraction_f_lift := fun (self : t_U32) => + t_U32_f_v self; + }. + +Instance t_PartialEq_334097439 : t_PartialEq (t_U32) (t_U32) := + { + t_PartialEq_f_eq := fun (self : t_U32) (rhs : t_U32) => + t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); + t_PartialEq_f_ne := fun (self : t_U32) (rhs : t_U32) => + negb (t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs)))); + }. + +Instance t_PartialOrd_768426650 : t_PartialOrd (t_U32) (t_U32) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_U32) (rhs : t_U32) => + t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); + t_PartialOrd_f_lt := fun (self : t_U32) (rhs : t_U32) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_U32) (rhs : t_U32) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_U32) (rhs : t_U32) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_U32) (rhs : t_U32) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_Abstraction_374630185 : t_Abstraction (t_U64) := + { + t_Abstraction_f_AbstractType := t_HaxInt; + t_Abstraction_f_lift := fun (self : t_U64) => + t_U64_f_v self; + }. + +Instance t_PartialEq_164055385 : t_PartialEq (t_U64) (t_U64) := + { + t_PartialEq_f_eq := fun (self : t_U64) (rhs : t_U64) => + t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); + t_PartialEq_f_ne := fun (self : t_U64) (rhs : t_U64) => + negb (t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs)))); + }. + +Instance t_PartialOrd_565848459 : t_PartialOrd (t_U64) (t_U64) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_U64) (rhs : t_U64) => + t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); + t_PartialOrd_f_lt := fun (self : t_U64) (rhs : t_U64) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_U64) (rhs : t_U64) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_U64) (rhs : t_U64) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_U64) (rhs : t_U64) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_Abstraction_462669591 : t_Abstraction (t_U128) := + { + t_Abstraction_f_AbstractType := t_HaxInt; + t_Abstraction_f_lift := fun (self : t_U128) => + t_U128_f_v self; + }. + +Instance t_PartialEq_1056014937 : t_PartialEq (t_U128) (t_U128) := + { + t_PartialEq_f_eq := fun (self : t_U128) (rhs : t_U128) => + t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); + t_PartialEq_f_ne := fun (self : t_U128) (rhs : t_U128) => + negb (t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs)))); + }. + +Instance t_PartialOrd_967097068 : t_PartialOrd (t_U128) (t_U128) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_U128) (rhs : t_U128) => + t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); + t_PartialOrd_f_lt := fun (self : t_U128) (rhs : t_U128) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_U128) (rhs : t_U128) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_U128) (rhs : t_U128) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_U128) (rhs : t_U128) => + match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_Concretization_265873841 : t_Concretization (t_HaxInt) (t_U8) := + { + t_Concretization_f_concretize := fun (self : t_HaxInt) => + Build_t_U8 (impl_10__rem (self) (v_WORDSIZE_8_)); + }. + +Instance t_From_51944146 : t_From (t_U8) (t_U16) := + { + t_From_f_from := fun (x : t_U16) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_1017513021 : t_From (t_U8) (t_U32) := + { + t_From_f_from := fun (x : t_U32) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_23951205 : t_From (t_U8) (t_U64) := + { + t_From_f_from := fun (x : t_U64) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_800503147 : t_From (t_U8) (t_U128) := + { + t_From_f_from := fun (x : t_U128) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_Concretization_369613743 : t_Concretization (t_HaxInt) (t_U16) := + { + t_Concretization_f_concretize := fun (self : t_HaxInt) => + Build_t_U16 (impl_10__rem (self) (v_WORDSIZE_16_)); + }. + +Instance t_From_926291537 : t_From (t_U16) (t_U8) := + { + t_From_f_from := fun (x : t_U8) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_784540441 : t_From (t_U16) (t_U32) := + { + t_From_f_from := fun (x : t_U32) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_426489148 : t_From (t_U16) (t_U64) := + { + t_From_f_from := fun (x : t_U64) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_948759743 : t_From (t_U16) (t_U128) := + { + t_From_f_from := fun (x : t_U128) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_Concretization_34651280 : t_Concretization (t_HaxInt) (t_U32) := + { + t_Concretization_f_concretize := fun (self : t_HaxInt) => + Build_t_U32 (impl_10__rem (self) (v_WORDSIZE_32_)); + }. + +Instance t_From_35635710 : t_From (t_U32) (t_U8) := + { + t_From_f_from := fun (x : t_U8) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_487860229 : t_From (t_U32) (t_U16) := + { + t_From_f_from := fun (x : t_U16) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_726835366 : t_From (t_U32) (t_U64) := + { + t_From_f_from := fun (x : t_U64) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_452621038 : t_From (t_U32) (t_U128) := + { + t_From_f_from := fun (x : t_U128) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_Concretization_841277766 : t_Concretization (t_HaxInt) (t_U64) := + { + t_Concretization_f_concretize := fun (self : t_HaxInt) => + Build_t_U64 (impl_10__rem (self) (v_WORDSIZE_64_)); + }. + +Instance t_From_520130596 : t_From (t_U64) (t_U8) := + { + t_From_f_from := fun (x : t_U8) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_627850588 : t_From (t_U64) (t_U16) := + { + t_From_f_from := fun (x : t_U16) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_184030199 : t_From (t_U64) (t_U32) := + { + t_From_f_from := fun (x : t_U32) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_203853320 : t_From (t_U64) (t_U128) := + { + t_From_f_from := fun (x : t_U128) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_Concretization_814811766 : t_Concretization (t_HaxInt) (t_U128) := + { + t_Concretization_f_concretize := fun (self : t_HaxInt) => + Build_t_U128 (impl_10__rem (self) (v_WORDSIZE_128_)); + }. + +Instance t_From_473330350 : t_From (t_U128) (t_U8) := + { + t_From_f_from := fun (x : t_U8) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_119329024 : t_From (t_U128) (t_U16) := + { + t_From_f_from := fun (x : t_U16) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_763371499 : t_From (t_U128) (t_U32) := + { + t_From_f_from := fun (x : t_U32) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_From_576231031 : t_From (t_U128) (t_U64) := + { + t_From_f_from := fun (x : t_U64) => + t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); + }. + +Instance t_Neg_351404352 : t_Neg (t_U8) := + { + t_Neg_f_Output := t_U8; + t_Neg_f_neg := fun (self : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_7__sub (v_WORDSIZE_8_) (impl_10__rem (t_Abstraction_f_lift (self)) (v_WORDSIZE_8_))); + }. + +Instance t_Mul_960114544 : t_Mul (t_U8) (t_U8) := + { + t_Mul_f_Output := t_U8; + t_Mul_f_mul := fun (self : t_U8) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_11__mul (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_707040129 : t_Rem (t_U8) (t_U8) := + { + t_Rem_f_Output := t_U8; + t_Rem_f_rem := fun (self : t_U8) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_10__rem (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Add_121545721 : t_Add (t_U8) (t_U8) := + { + t_Add_f_Output := t_U8; + t_Add_f_add := fun (self : t_U8) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_6__add (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Div_98187967 : t_Div (t_U8) (t_U8) := + { + t_Div_f_Output := t_U8; + t_Div_f_div := fun (self : t_U8) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_10__div (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_377719001 : t_Shl (t_U8) (t_U8) := + { + t_Shl_f_Output := t_U8; + t_Shl_f_shl := fun (self : t_U8) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_251987868 : t_Shl (t_U8) (t_U16) := + { + t_Shl_f_Output := t_U8; + t_Shl_f_shl := fun (self : t_U8) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_1004268259 : t_Shl (t_U8) (t_U32) := + { + t_Shl_f_Output := t_U8; + t_Shl_f_shl := fun (self : t_U8) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_400796854 : t_Shl (t_U8) (t_U64) := + { + t_Shl_f_Output := t_U8; + t_Shl_f_shl := fun (self : t_U8) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_79328015 : t_Shl (t_U8) (t_U128) := + { + t_Shl_f_Output := t_U8; + t_Shl_f_shl := fun (self : t_U8) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_319870959 : t_Shr (t_U8) (t_U8) := + { + t_Shr_f_Output := t_U8; + t_Shr_f_shr := fun (self : t_U8) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_879984593 : t_Shr (t_U8) (t_U16) := + { + t_Shr_f_Output := t_U8; + t_Shr_f_shr := fun (self : t_U8) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_88869181 : t_Shr (t_U8) (t_U32) := + { + t_Shr_f_Output := t_U8; + t_Shr_f_shr := fun (self : t_U8) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_77214537 : t_Shr (t_U8) (t_U64) := + { + t_Shr_f_Output := t_U8; + t_Shr_f_shr := fun (self : t_U8) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_346939843 : t_Shr (t_U8) (t_U128) := + { + t_Shr_f_Output := t_U8; + t_Shr_f_shr := fun (self : t_U8) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitXor_428151757 : t_BitXor (t_U8) (t_U8) := + { + t_BitXor_f_Output := t_U8; + t_BitXor_f_bitxor := fun (self : t_U8) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_14__bitxor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitAnd_719505946 : t_BitAnd (t_U8) (t_U8) := + { + t_BitAnd_f_Output := t_U8; + t_BitAnd_f_bitand := fun (self : t_U8) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_15__bitand (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitOr_516494164 : t_BitOr (t_U8) (t_U8) := + { + t_BitOr_f_Output := t_U8; + t_BitOr_f_bitor := fun (self : t_U8) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_16__bitor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_758687224 : t_Neg (t_U16) := + { + t_Neg_f_Output := t_U16; + t_Neg_f_neg := fun (self : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_7__sub (v_WORDSIZE_16_) (impl_10__rem (t_Abstraction_f_lift (self)) (v_WORDSIZE_16_))); + }. + +Instance t_Mul_467924553 : t_Mul (t_U16) (t_U16) := + { + t_Mul_f_Output := t_U16; + t_Mul_f_mul := fun (self : t_U16) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_11__mul (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_333671536 : t_Rem (t_U16) (t_U16) := + { + t_Rem_f_Output := t_U16; + t_Rem_f_rem := fun (self : t_U16) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_10__rem (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Add_71250682 : t_Add (t_U16) (t_U16) := + { + t_Add_f_Output := t_U16; + t_Add_f_add := fun (self : t_U16) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_6__add (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Div_638997407 : t_Div (t_U16) (t_U16) := + { + t_Div_f_Output := t_U16; + t_Div_f_div := fun (self : t_U16) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_10__div (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_189335836 : t_Shl (t_U16) (t_U8) := + { + t_Shl_f_Output := t_U16; + t_Shl_f_shl := fun (self : t_U16) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_400009554 : t_Shl (t_U16) (t_U16) := + { + t_Shl_f_Output := t_U16; + t_Shl_f_shl := fun (self : t_U16) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_40960466 : t_Shl (t_U16) (t_U32) := + { + t_Shl_f_Output := t_U16; + t_Shl_f_shl := fun (self : t_U16) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_472600731 : t_Shl (t_U16) (t_U64) := + { + t_Shl_f_Output := t_U16; + t_Shl_f_shl := fun (self : t_U16) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_114665376 : t_Shl (t_U16) (t_U128) := + { + t_Shl_f_Output := t_U16; + t_Shl_f_shl := fun (self : t_U16) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_327818009 : t_Shr (t_U16) (t_U8) := + { + t_Shr_f_Output := t_U16; + t_Shr_f_shr := fun (self : t_U16) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_212310233 : t_Shr (t_U16) (t_U16) := + { + t_Shr_f_Output := t_U16; + t_Shr_f_shr := fun (self : t_U16) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_591081376 : t_Shr (t_U16) (t_U32) := + { + t_Shr_f_Output := t_U16; + t_Shr_f_shr := fun (self : t_U16) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_428437762 : t_Shr (t_U16) (t_U64) := + { + t_Shr_f_Output := t_U16; + t_Shr_f_shr := fun (self : t_U16) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_847453429 : t_Shr (t_U16) (t_U128) := + { + t_Shr_f_Output := t_U16; + t_Shr_f_shr := fun (self : t_U16) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitXor_448510460 : t_BitXor (t_U16) (t_U16) := + { + t_BitXor_f_Output := t_U16; + t_BitXor_f_bitxor := fun (self : t_U16) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_14__bitxor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitAnd_493952949 : t_BitAnd (t_U16) (t_U16) := + { + t_BitAnd_f_Output := t_U16; + t_BitAnd_f_bitand := fun (self : t_U16) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_15__bitand (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitOr_196126415 : t_BitOr (t_U16) (t_U16) := + { + t_BitOr_f_Output := t_U16; + t_BitOr_f_bitor := fun (self : t_U16) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_16__bitor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_28434759 : t_Neg (t_U32) := + { + t_Neg_f_Output := t_U32; + t_Neg_f_neg := fun (self : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_7__sub (v_WORDSIZE_32_) (impl_10__rem (t_Abstraction_f_lift (self)) (v_WORDSIZE_32_))); + }. + +Instance t_Mul_694927493 : t_Mul (t_U32) (t_U32) := + { + t_Mul_f_Output := t_U32; + t_Mul_f_mul := fun (self : t_U32) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_11__mul (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_64936096 : t_Rem (t_U32) (t_U32) := + { + t_Rem_f_Output := t_U32; + t_Rem_f_rem := fun (self : t_U32) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_10__rem (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Add_54748823 : t_Add (t_U32) (t_U32) := + { + t_Add_f_Output := t_U32; + t_Add_f_add := fun (self : t_U32) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_6__add (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Div_579184696 : t_Div (t_U32) (t_U32) := + { + t_Div_f_Output := t_U32; + t_Div_f_div := fun (self : t_U32) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_10__div (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_582224230 : t_Shl (t_U32) (t_U8) := + { + t_Shl_f_Output := t_U32; + t_Shl_f_shl := fun (self : t_U32) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_784746781 : t_Shl (t_U32) (t_U16) := + { + t_Shl_f_Output := t_U32; + t_Shl_f_shl := fun (self : t_U32) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_969375690 : t_Shl (t_U32) (t_U32) := + { + t_Shl_f_Output := t_U32; + t_Shl_f_shl := fun (self : t_U32) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_522639233 : t_Shl (t_U32) (t_U64) := + { + t_Shl_f_Output := t_U32; + t_Shl_f_shl := fun (self : t_U32) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_521929493 : t_Shl (t_U32) (t_U128) := + { + t_Shl_f_Output := t_U32; + t_Shl_f_shl := fun (self : t_U32) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_13621365 : t_Shr (t_U32) (t_U8) := + { + t_Shr_f_Output := t_U32; + t_Shr_f_shr := fun (self : t_U32) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_425099630 : t_Shr (t_U32) (t_U16) := + { + t_Shr_f_Output := t_U32; + t_Shr_f_shr := fun (self : t_U32) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_488072124 : t_Shr (t_U32) (t_U32) := + { + t_Shr_f_Output := t_U32; + t_Shr_f_shr := fun (self : t_U32) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_176245311 : t_Shr (t_U32) (t_U64) := + { + t_Shr_f_Output := t_U32; + t_Shr_f_shr := fun (self : t_U32) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_128161029 : t_Shr (t_U32) (t_U128) := + { + t_Shr_f_Output := t_U32; + t_Shr_f_shr := fun (self : t_U32) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitXor_302699331 : t_BitXor (t_U32) (t_U32) := + { + t_BitXor_f_Output := t_U32; + t_BitXor_f_bitxor := fun (self : t_U32) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_14__bitxor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitAnd_259909825 : t_BitAnd (t_U32) (t_U32) := + { + t_BitAnd_f_Output := t_U32; + t_BitAnd_f_bitand := fun (self : t_U32) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_15__bitand (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitOr_944485878 : t_BitOr (t_U32) (t_U32) := + { + t_BitOr_f_Output := t_U32; + t_BitOr_f_bitor := fun (self : t_U32) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_16__bitor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_262148082 : t_Neg (t_U64) := + { + t_Neg_f_Output := t_U64; + t_Neg_f_neg := fun (self : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_7__sub (v_WORDSIZE_64_) (impl_10__rem (t_Abstraction_f_lift (self)) (v_WORDSIZE_64_))); + }. + +Instance t_Mul_542100838 : t_Mul (t_U64) (t_U64) := + { + t_Mul_f_Output := t_U64; + t_Mul_f_mul := fun (self : t_U64) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_11__mul (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_476079061 : t_Rem (t_U64) (t_U64) := + { + t_Rem_f_Output := t_U64; + t_Rem_f_rem := fun (self : t_U64) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_10__rem (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Add_680559927 : t_Add (t_U64) (t_U64) := + { + t_Add_f_Output := t_U64; + t_Add_f_add := fun (self : t_U64) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_6__add (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Div_288928025 : t_Div (t_U64) (t_U64) := + { + t_Div_f_Output := t_U64; + t_Div_f_div := fun (self : t_U64) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_10__div (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_458903955 : t_Shl (t_U64) (t_U8) := + { + t_Shl_f_Output := t_U64; + t_Shl_f_shl := fun (self : t_U64) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_547067457 : t_Shl (t_U64) (t_U16) := + { + t_Shl_f_Output := t_U64; + t_Shl_f_shl := fun (self : t_U64) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_467944790 : t_Shl (t_U64) (t_U32) := + { + t_Shl_f_Output := t_U64; + t_Shl_f_shl := fun (self : t_U64) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_188141782 : t_Shl (t_U64) (t_U64) := + { + t_Shl_f_Output := t_U64; + t_Shl_f_shl := fun (self : t_U64) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_936592019 : t_Shl (t_U64) (t_U128) := + { + t_Shl_f_Output := t_U64; + t_Shl_f_shl := fun (self : t_U64) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_362241607 : t_Shr (t_U64) (t_U8) := + { + t_Shr_f_Output := t_U64; + t_Shr_f_shr := fun (self : t_U64) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_336624052 : t_Shr (t_U64) (t_U16) := + { + t_Shr_f_Output := t_U64; + t_Shr_f_shr := fun (self : t_U64) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_87524769 : t_Shr (t_U64) (t_U32) := + { + t_Shr_f_Output := t_U64; + t_Shr_f_shr := fun (self : t_U64) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_998089409 : t_Shr (t_U64) (t_U64) := + { + t_Shr_f_Output := t_U64; + t_Shr_f_shr := fun (self : t_U64) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_1000705430 : t_Shr (t_U64) (t_U128) := + { + t_Shr_f_Output := t_U64; + t_Shr_f_shr := fun (self : t_U64) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitXor_68539793 : t_BitXor (t_U64) (t_U64) := + { + t_BitXor_f_Output := t_U64; + t_BitXor_f_bitxor := fun (self : t_U64) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_14__bitxor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitAnd_91153110 : t_BitAnd (t_U64) (t_U64) := + { + t_BitAnd_f_Output := t_U64; + t_BitAnd_f_bitand := fun (self : t_U64) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_15__bitand (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitOr_746401002 : t_BitOr (t_U64) (t_U64) := + { + t_BitOr_f_Output := t_U64; + t_BitOr_f_bitor := fun (self : t_U64) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_16__bitor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_446348865 : t_Neg (t_U128) := + { + t_Neg_f_Output := t_U128; + t_Neg_f_neg := fun (self : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_7__sub (v_WORDSIZE_128_) (impl_10__rem (t_Abstraction_f_lift (self)) (v_WORDSIZE_128_))); + }. + +Instance t_Mul_529926072 : t_Mul (t_U128) (t_U128) := + { + t_Mul_f_Output := t_U128; + t_Mul_f_mul := fun (self : t_U128) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_11__mul (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_813931227 : t_Rem (t_U128) (t_U128) := + { + t_Rem_f_Output := t_U128; + t_Rem_f_rem := fun (self : t_U128) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_10__rem (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Add_509210048 : t_Add (t_U128) (t_U128) := + { + t_Add_f_Output := t_U128; + t_Add_f_add := fun (self : t_U128) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_6__add (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Div_733456046 : t_Div (t_U128) (t_U128) := + { + t_Div_f_Output := t_U128; + t_Div_f_div := fun (self : t_U128) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_10__div (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_634756453 : t_Shl (t_U128) (t_U8) := + { + t_Shl_f_Output := t_U128; + t_Shl_f_shl := fun (self : t_U128) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_17499927 : t_Shl (t_U128) (t_U16) := + { + t_Shl_f_Output := t_U128; + t_Shl_f_shl := fun (self : t_U128) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_839364374 : t_Shl (t_U128) (t_U32) := + { + t_Shl_f_Output := t_U128; + t_Shl_f_shl := fun (self : t_U128) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_268379728 : t_Shl (t_U128) (t_U64) := + { + t_Shl_f_Output := t_U128; + t_Shl_f_shl := fun (self : t_U128) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_50621237 : t_Shl (t_U128) (t_U128) := + { + t_Shl_f_Output := t_U128; + t_Shl_f_shl := fun (self : t_U128) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_205513961 : t_Shr (t_U128) (t_U8) := + { + t_Shr_f_Output := t_U128; + t_Shr_f_shr := fun (self : t_U128) (rhs : t_U8) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_691521055 : t_Shr (t_U128) (t_U16) := + { + t_Shr_f_Output := t_U128; + t_Shr_f_shr := fun (self : t_U128) (rhs : t_U16) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_345208632 : t_Shr (t_U128) (t_U32) := + { + t_Shr_f_Output := t_U128; + t_Shr_f_shr := fun (self : t_U128) (rhs : t_U32) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_1027860982 : t_Shr (t_U128) (t_U64) := + { + t_Shr_f_Output := t_U128; + t_Shr_f_shr := fun (self : t_U128) (rhs : t_U64) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_54460338 : t_Shr (t_U128) (t_U128) := + { + t_Shr_f_Output := t_U128; + t_Shr_f_shr := fun (self : t_U128) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitXor_579850070 : t_BitXor (t_U128) (t_U128) := + { + t_BitXor_f_Output := t_U128; + t_BitXor_f_bitxor := fun (self : t_U128) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_14__bitxor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitAnd_550145691 : t_BitAnd (t_U128) (t_U128) := + { + t_BitAnd_f_Output := t_U128; + t_BitAnd_f_bitand := fun (self : t_U128) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_15__bitand (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_BitOr_123199302 : t_BitOr (t_U128) (t_U128) := + { + t_BitOr_f_Output := t_U128; + t_BitOr_f_bitor := fun (self : t_U128) (rhs : t_U128) => + t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_16__bitor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); + }. + +Instance t_Sub_209890052 : t_Sub (t_U8) (t_U8) := + { + t_Sub_f_Output := t_U8; + t_Sub_f_sub := fun (self : t_U8) (rhs : t_U8) => + t_Add_f_add (t_Add := t_Add_121545721) (self) (t_Neg_f_neg (rhs)); + }. + +Instance t_Not_3946298 : t_Not (t_U8) := + { + t_Not_f_Output := t_U8; + t_Not_f_not := fun (self : t_U8) => + t_BitXor_f_bitxor (self) (t_Constants_f_MAX : t_U8); + }. + +Instance t_Sub_307813249 : t_Sub (t_U16) (t_U16) := + { + t_Sub_f_Output := t_U16; + t_Sub_f_sub := fun (self : t_U16) (rhs : t_U16) => + t_Add_f_add (t_Add := t_Add_71250682) (self) (t_Neg_f_neg (rhs)); + }. + +Instance t_Not_887206550 : t_Not (t_U16) := + { + t_Not_f_Output := t_U16; + t_Not_f_not := fun (self : t_U16) => + t_BitXor_f_bitxor (self) (t_Constants_f_MAX); + }. + +Instance t_Sub_967239595 : t_Sub (t_U32) (t_U32) := + { + t_Sub_f_Output := t_U32; + t_Sub_f_sub := fun (self : t_U32) (rhs : t_U32) => + t_Add_f_add (t_Add := t_Add_54748823) (self) (t_Neg_f_neg (rhs)); + }. + +Instance t_Not_966968542 : t_Not (t_U32) := + { + t_Not_f_Output := t_U32; + t_Not_f_not := fun (self : t_U32) => + t_BitXor_f_bitxor (self) (t_Constants_f_MAX); + }. + +Instance t_Sub_324061209 : t_Sub (t_U64) (t_U64) := + { + t_Sub_f_Output := t_U64; + t_Sub_f_sub := fun (self : t_U64) (rhs : t_U64) => + t_Add_f_add (t_Add := t_Add_680559927) (self) (t_Neg_f_neg (rhs)); + }. + +Instance t_Not_807247311 : t_Not (t_U64) := + { + t_Not_f_Output := t_U64; + t_Not_f_not := fun (self : t_U64) => + t_BitXor_f_bitxor (self) (t_Constants_f_MAX); + }. + +Instance t_Sub_549381231 : t_Sub (t_U128) (t_U128) := + { + t_Sub_f_Output := t_U128; + t_Sub_f_sub := fun (self : t_U128) (rhs : t_U128) => + t_Add_f_add (t_Add := t_Add_509210048) (self) (t_Neg_f_neg (rhs)); + }. + +Instance t_Not_651062842 : t_Not (t_U128) := + { + t_Not_f_Output := t_U128; + t_Not_f_not := fun (self : t_U128) => + t_BitXor_f_bitxor (self) (t_Constants_f_MAX); + }. diff --git a/proof-libs/coq/coq/src/Core_Intrinsics.v b/proof-libs/coq/coq/src/Core_Intrinsics.v new file mode 100644 index 000000000..e7216d21d --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Intrinsics.v @@ -0,0 +1,119 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Primitive. +Export Core_Primitive. + +From Core Require Import Core_Int. +Export Core_Int. + +From Core Require Import Core_Coerce. +Export Core_Coerce. + +(* NotImplementedYet *) + +Definition unchecked_add_u128 (x : t_u128) (y : t_u128) : t_u128 := + Build_t_u128 (Build_t_U128 (impl_6__add (t_Abstraction_f_lift (t_u128_0 x)) (t_Abstraction_f_lift (t_u128_0 y)))). + +Definition unchecked_add_u16 (x : t_u16) (y : t_u16) : t_u16 := + Build_t_u16 (Build_t_U16 (impl_6__add (t_Abstraction_f_lift (t_u16_0 x)) (t_Abstraction_f_lift (t_u16_0 y)))). + +Definition unchecked_add_u32 (x : t_u32) (y : t_u32) : t_u32 := + Build_t_u32 (Build_t_U32 (impl_6__add (t_Abstraction_f_lift (t_u32_0 x)) (t_Abstraction_f_lift (t_u32_0 y)))). + +Definition unchecked_add_u64 (x : t_u64) (y : t_u64) : t_u64 := + Build_t_u64 (Build_t_U64 (impl_6__add (t_Abstraction_f_lift (t_u64_0 x)) (t_Abstraction_f_lift (t_u64_0 y)))). + +Definition unchecked_add_u8 (x : t_u8) (y : t_u8) : t_u8 := + Build_t_u8 (Build_t_U8 (impl_6__add (t_Abstraction_f_lift (t_u8_0 x)) (t_Abstraction_f_lift (t_u8_0 y)))). + +Definition unchecked_add_usize (x : t_usize) (y : t_usize) : t_usize := + Build_t_usize (Build_t_U64 (impl_6__add (t_Abstraction_f_lift (t_usize_0 x)) (t_Abstraction_f_lift (t_usize_0 y)))). + +Definition add_with_overflow_u128 (x : t_u128) (y : t_u128) : (t_u128*bool) := + let overflow := impl_6__add (t_Abstraction_f_lift (t_u128_0 x)) (t_Abstraction_f_lift (t_u128_0 y)) in + let res : t_U128 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in + (Build_t_u128 (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction := t_Abstraction_462669591) (res)) (overflow)). + +Definition add_with_overflow_u16 (x : t_u16) (y : t_u16) : (t_u16*bool) := + let overflow := impl_6__add (t_Abstraction_f_lift (t_u16_0 x)) (t_Abstraction_f_lift (t_u16_0 y)) in + let res : t_U16 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in + (Build_t_u16 (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction:=t_Abstraction_134234872) (res)) (overflow)). + +Definition add_with_overflow_u32 (x : t_u32) (y : t_u32) : (t_u32*bool) := + let overflow := impl_6__add (t_Abstraction_f_lift (t_u32_0 x)) (t_Abstraction_f_lift (t_u32_0 y)) in + let res : t_U32 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in + (Build_t_u32 (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction:=t_Abstraction_699270934) (res)) (overflow)). + +Definition add_with_overflow_u64 (x : t_u64) (y : t_u64) : (t_u64*bool) := + let overflow := impl_6__add (t_Abstraction_f_lift (t_u64_0 x)) (t_Abstraction_f_lift (t_u64_0 y)) in + let res : t_U64 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in + (Build_t_u64 (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction:=t_Abstraction_374630185) (res)) (overflow)). + +Definition add_with_overflow_u8 (x : t_u8) (y : t_u8) : (t_u8*bool) := + let overflow := impl_6__add (t_Abstraction_f_lift (t_u8_0 x)) (t_Abstraction_f_lift (t_u8_0 y)) in + let res : t_U8 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in + (Build_t_u8 (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction := t_Abstraction_566214702) (res)) (overflow)). + +Definition add_with_overflow_usize (x : t_usize) (y : t_usize) : (t_usize*bool) := + let overflow := impl_6__add (t_Abstraction_f_lift (t_usize_0 x)) (t_Abstraction_f_lift (t_usize_0 y)) in + let res : t_U64 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in + (Build_t_usize (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction := t_Abstraction_374630185) (res)) (overflow)). + +Definition wrapping_add_u128 (a : t_u128) (b : t_u128) : t_u128 := + Build_t_u128 (t_Add_f_add (t_u128_0 a) (t_u128_0 b)). + +Definition wrapping_add_u16 (a : t_u16) (b : t_u16) : t_u16 := + Build_t_u16 (t_Add_f_add (t_u16_0 a) (t_u16_0 b)). + +Definition wrapping_add_u32 (a : t_u32) (b : t_u32) : t_u32 := + Build_t_u32 (t_Add_f_add (t_u32_0 a) (t_u32_0 b)). + +Definition wrapping_add_u64 (a : t_u64) (b : t_u64) : t_u64 := + Build_t_u64 (t_Add_f_add (t_u64_0 a) (t_u64_0 b)). + +Definition wrapping_add_u8 (a : t_u8) (b : t_u8) : t_u8 := + Build_t_u8 (t_Add_f_add (t_u8_0 a) (t_u8_0 b)). + +Definition wrapping_add_usize (a : t_usize) (b : t_usize) : t_usize := + Build_t_usize (t_Add_f_add (t_usize_0 a) (t_usize_0 b)). + +Definition wrapping_mul_u128 (a : t_u128) (b : t_u128) : t_u128 := + Build_t_u128 (t_Mul_f_mul (t_u128_0 a) (t_u128_0 b)). + +Definition wrapping_mul_u16 (a : t_u16) (b : t_u16) : t_u16 := + Build_t_u16 (t_Mul_f_mul (t_u16_0 a) (t_u16_0 b)). + +Definition wrapping_mul_u32 (a : t_u32) (b : t_u32) : t_u32 := + Build_t_u32 (t_Mul_f_mul (t_u32_0 a) (t_u32_0 b)). + +Definition wrapping_mul_u64 (a : t_u64) (b : t_u64) : t_u64 := + Build_t_u64 (t_Mul_f_mul (t_u64_0 a) (t_u64_0 b)). + +Definition wrapping_mul_u8 (a : t_u8) (b : t_u8) : t_u8 := + Build_t_u8 (t_Mul_f_mul (t_u8_0 a) (t_u8_0 b)). + +Definition wrapping_mul_usize (a : t_usize) (b : t_usize) : t_usize := + Build_t_usize (t_Mul_f_mul (t_usize_0 a) (t_usize_0 b)). + +Definition wrapping_sub_u128 (a : t_u128) (b : t_u128) : t_u128 := + Build_t_u128 (t_Sub_f_sub (t_u128_0 a) (t_u128_0 b)). + +Definition wrapping_sub_u16 (a : t_u16) (b : t_u16) : t_u16 := + Build_t_u16 (t_Sub_f_sub (t_u16_0 a) (t_u16_0 b)). + +Definition wrapping_sub_u32 (a : t_u32) (b : t_u32) : t_u32 := + Build_t_u32 (t_Sub_f_sub (t_u32_0 a) (t_u32_0 b)). + +Definition wrapping_sub_u64 (a : t_u64) (b : t_u64) : t_u64 := + Build_t_u64 (t_Sub_f_sub (t_u64_0 a) (t_u64_0 b)). + +Definition wrapping_sub_u8 (a : t_u8) (b : t_u8) : t_u8 := + Build_t_u8 (t_Sub_f_sub (t_u8_0 a) (t_u8_0 b)). + +Definition wrapping_sub_usize (a : t_usize) (b : t_usize) : t_usize := + Build_t_usize (t_Sub_f_sub (t_usize_0 a) (t_usize_0 b)). diff --git a/proof-libs/coq/coq/src/Core_Marker.v b/proof-libs/coq/coq/src/Core_Marker.v new file mode 100644 index 000000000..1ad36f565 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Marker.v @@ -0,0 +1,31 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Clone (t_Clone). +Export Core_Clone (t_Clone). + +Class t_Copy `{v_Self : Type} `{t_Clone v_Self} : Type := + { + }. +Arguments t_Copy:clear implicits. +Arguments t_Copy (_) {_}. + +Class t_Destruct `{v_Self : Type} : Type := + { + }. +Arguments t_Destruct:clear implicits. +Arguments t_Destruct (_). + +Class t_Sized `{v_Self : Type} : Type := + { + }. +Arguments t_Sized:clear implicits. +Arguments t_Sized (_). + +(* *** *) + +Instance t_Sized_any T : t_Sized T := {}. diff --git a/proof-libs/coq/coq/src/Core_Num.v b/proof-libs/coq/coq/src/Core_Num.v new file mode 100644 index 000000000..f229d38db --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Num.v @@ -0,0 +1,317 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Int. +Export Core_Int. + +From Core Require Import Core_Primitive. +Export Core_Primitive. + +From Core Require Import Core_Intrinsics. +Export Core_Intrinsics. + +(* NotImplementedYet *) + +Definition impl_4__MAX : t_u128 := + Build_t_u128 (t_Constants_f_MAX). + +Definition impl_4__MIN : t_u128 := + Build_t_u128 (t_Constants_f_MIN). + +Definition impl_1__MAX : t_u16 := + Build_t_u16 (t_Constants_f_MAX). + +Definition impl_1__MIN : t_u16 := + Build_t_u16 (t_Constants_f_MIN). + +Definition impl__BITS : t_u32 := + Build_t_u32 (impl_21__BITS). + +Definition impl_1__BITS : t_u32 := + Build_t_u32 (impl_48__BITS). + +Definition impl_2__BITS : t_u32 := + Build_t_u32 (impl_75__BITS). + +Definition impl_2__MAX : t_u32 := + Build_t_u32 (t_Constants_f_MAX). + +Definition impl_2__MIN : t_u32 := + Build_t_u32 (t_Constants_f_MIN). + +Definition impl_3__BITS : t_u32 := + Build_t_u32 (impl_102__BITS). + +Definition impl_4__BITS : t_u32 := + Build_t_u32 (impl_129__BITS). + +Definition impl_5__BITS : t_u32 := + Build_t_u32 (impl_102__BITS). + +Definition impl_3__MAX : t_u64 := + Build_t_u64 (t_Constants_f_MAX). + +Definition impl_3__MIN : t_u64 := + Build_t_u64 (t_Constants_f_MIN). + +Definition impl__MAX : t_u8 := + Build_t_u8 (t_Constants_f_MAX). + +Definition impl__MIN : t_u8 := + Build_t_u8 (t_Constants_f_MIN). + +Definition impl_5__MAX : t_usize := + Build_t_usize (t_Constants_f_MAX). + +Definition impl_5__MIN : t_usize := + Build_t_usize (t_Constants_f_MIN). + +Definition impl__overflowing_add (self : t_u8) (rhs : t_u8) : (t_u8*bool) := + add_with_overflow_u8 (self) (rhs). + +Definition impl_1__overflowing_add (self : t_u16) (rhs : t_u16) : (t_u16*bool) := + add_with_overflow_u16 (self) (rhs). + +Definition impl_2__overflowing_add (self : t_u32) (rhs : t_u32) : (t_u32*bool) := + add_with_overflow_u32 (self) (rhs). + +Definition impl_3__overflowing_add (self : t_u64) (rhs : t_u64) : (t_u64*bool) := + add_with_overflow_u64 (self) (rhs). + +Definition impl_4__overflowing_add (self : t_u128) (rhs : t_u128) : (t_u128*bool) := + add_with_overflow_u128 (self) (rhs). + +Definition impl_5__overflowing_add (self : t_usize) (rhs : t_usize) : (t_usize*bool) := + add_with_overflow_usize (self) (rhs). + +(* Definition impl__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 1%N))) : t_u8 := *) +(* let ret := t_Constants_f_ZERO in *) +(* let index := t_Constants_f_ZERO in *) +(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 1%N)) (fun '(index,ret) _ => *) +(* true) ((index,ret)) (fun '(index,ret) i => *) +(* let val_i : t_U8 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) +(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) +(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) +(* (index,ret)) in *) +(* Build_t_u8 (ret). *) + +(* Definition impl__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 1%N))) : t_u8 := *) +(* impl__from_le_bytes (impl_2__reverse (bytes)). *) + +Definition impl__wrapping_add (self : t_u8) (rhs : t_u8) : t_u8 := + wrapping_add_u8 (self) (rhs). + +Definition impl__wrapping_mul (self : t_u8) (rhs : t_u8) : t_u8 := + wrapping_mul_u8 (self) (rhs). + +(* Definition impl_1__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 2%N))) : t_u16 := *) +(* let ret := t_Constants_f_ZERO in *) +(* let index := t_Constants_f_ZERO in *) +(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 2%N)) (fun '(index,ret) _ => *) +(* true) ((index,ret)) (fun '(index,ret) i => *) +(* let val_i : t_U16 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) +(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) +(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) +(* (index,ret)) in *) +(* Build_t_u16 (ret). *) + +(* Definition impl_1__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 2%N))) : t_u16 := *) +(* impl_1__from_le_bytes (impl_2__reverse (bytes)). *) + +Definition impl_1__wrapping_add (self : t_u16) (rhs : t_u16) : t_u16 := + wrapping_add_u16 (self) (rhs). + +Definition impl_1__wrapping_mul (self : t_u16) (rhs : t_u16) : t_u16 := + wrapping_mul_u16 (self) (rhs). + +(* Definition impl_2__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 4%N))) : t_u32 := *) +(* let ret := t_Constants_f_ZERO in *) +(* let index := t_Constants_f_ZERO in *) +(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 4%N)) (fun '(index,ret) _ => *) +(* true) ((index,ret)) (fun '(index,ret) i => *) +(* let val_i : t_U32 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) +(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) +(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) +(* (index,ret)) in *) +(* Build_t_u32 (ret). *) + +(* Definition impl_2__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 4%N))) : t_u32 := *) +(* impl_2__from_le_bytes (impl_2__reverse (bytes)). *) + +Definition impl_2__wrapping_add (self : t_u32) (rhs : t_u32) : t_u32 := + wrapping_add_u32 (self) (rhs). + +Definition impl_2__wrapping_mul (self : t_u32) (rhs : t_u32) : t_u32 := + wrapping_mul_u32 (self) (rhs). + +(* Definition impl_3__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 8%N))) : t_u64 := *) +(* let ret := t_Constants_f_ZERO in *) +(* let index := t_Constants_f_ZERO in *) +(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 8%N)) (fun '(index,ret) _ => *) +(* true) ((index,ret)) (fun '(index,ret) i => *) +(* let val_i : t_U64 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) +(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) +(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) +(* (index,ret)) in *) +(* Build_t_u64 (ret). *) + +(* Definition impl_3__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 8%N))) : t_u64 := *) +(* impl_3__from_le_bytes (impl_2__reverse (bytes)). *) + +Definition impl_3__wrapping_add (self : t_u64) (rhs : t_u64) : t_u64 := + wrapping_add_u64 (self) (rhs). + +Definition impl_3__wrapping_mul (self : t_u64) (rhs : t_u64) : t_u64 := + wrapping_mul_u64 (self) (rhs). + +(* Definition impl_4__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 16%N))) : t_u128 := *) +(* let ret := t_Constants_f_ZERO in *) +(* let index := t_Constants_f_ZERO in *) +(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 16%N)) (fun '(index,ret) _ => *) +(* true) ((index,ret)) (fun '(index,ret) i => *) +(* let val_i : t_U128 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) +(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) +(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) +(* (index,ret)) in *) +(* Build_t_u128 (ret). *) + +(* Definition impl_4__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 16%N))) : t_u128 := *) +(* impl_4__from_le_bytes (impl_2__reverse (bytes)). *) + +Definition impl_4__wrapping_add (self : t_u128) (rhs : t_u128) : t_u128 := + wrapping_add_u128 (self) (rhs). + +Definition impl_4__wrapping_mul (self : t_u128) (rhs : t_u128) : t_u128 := + wrapping_mul_u128 (self) (rhs). + +(* Definition impl_5__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 8%N))) : t_usize := *) +(* let ret := t_Constants_f_ZERO in *) +(* let index := t_Constants_f_ZERO in *) +(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 8%N)) (fun '(index,ret) _ => *) +(* true) ((index,ret)) (fun '(index,ret) i => *) +(* let val_i : t_U64 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) +(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) +(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) +(* (index,ret)) in *) +(* Build_t_usize (ret). *) + +(* Definition impl_5__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 8%N))) : t_usize := *) +(* impl_5__from_le_bytes (impl_2__reverse (bytes)). *) + +Definition impl_5__wrapping_add (self : t_usize) (rhs : t_usize) : t_usize := + wrapping_add_usize (self) (rhs). + +Definition impl_5__wrapping_mul (self : t_usize) (rhs : t_usize) : t_usize := + wrapping_mul_usize (self) (rhs). + +Definition impl__wrapping_sub (self : t_u8) (rhs : t_u8) : t_u8 := + wrapping_sub_u8 (self) (rhs). + +Definition impl__wrapping_neg (self : t_u8) : t_u8 := + impl__wrapping_sub (Build_t_u8 (t_Constants_f_ZERO)) (self). + +Definition impl_1__wrapping_sub (self : t_u16) (rhs : t_u16) : t_u16 := + wrapping_sub_u16 (self) (rhs). + +Definition impl_1__wrapping_neg (self : t_u16) : t_u16 := + impl_1__wrapping_sub (Build_t_u16 (t_Constants_f_ZERO)) (self). + +Definition impl_2__wrapping_sub (self : t_u32) (rhs : t_u32) : t_u32 := + wrapping_sub_u32 (self) (rhs). + +Definition impl_2__wrapping_neg (self : t_u32) : t_u32 := + impl_2__wrapping_sub (Build_t_u32 (t_Constants_f_ZERO)) (self). + +Definition impl_3__wrapping_sub (self : t_u64) (rhs : t_u64) : t_u64 := + wrapping_sub_u64 (self) (rhs). + +Definition impl_3__wrapping_neg (self : t_u64) : t_u64 := + impl_3__wrapping_sub (Build_t_u64 (t_Constants_f_ZERO)) (self). + +Definition impl_4__wrapping_sub (self : t_u128) (rhs : t_u128) : t_u128 := + wrapping_sub_u128 (self) (rhs). + +Definition impl_4__wrapping_neg (self : t_u128) : t_u128 := + impl_4__wrapping_sub (Build_t_u128 (t_Constants_f_ZERO)) (self). + +Definition impl_5__wrapping_sub (self : t_usize) (rhs : t_usize) : t_usize := + wrapping_sub_usize (self) (rhs). + +Definition impl_5__wrapping_neg (self : t_usize) : t_usize := + impl_5__wrapping_sub (Build_t_usize (t_Constants_f_ZERO)) (self). + +Definition impl__wrapping_rem (self : t_u8) (rhs : t_u8) : t_u8 := + t_Rem_f_rem (self) (rhs). + +Definition impl__wrapping_rem_euclid (self : t_u8) (rhs : t_u8) : t_u8 := + t_Rem_f_rem (self) (rhs). + +Definition impl__wrapping_div (self : t_u8) (rhs : t_u8) : t_u8 := + t_Div_f_div (self) (rhs). + +Definition impl__wrapping_div_euclid (self : t_u8) (rhs : t_u8) : t_u8 := + t_Div_f_div (self) (rhs). + +Definition impl_1__wrapping_rem (self : t_u16) (rhs : t_u16) : t_u16 := + t_Rem_f_rem (self) (rhs). + +Definition impl_1__wrapping_rem_euclid (self : t_u16) (rhs : t_u16) : t_u16 := + t_Rem_f_rem (self) (rhs). + +Definition impl_1__wrapping_div (self : t_u16) (rhs : t_u16) : t_u16 := + t_Div_f_div (self) (rhs). + +Definition impl_1__wrapping_div_euclid (self : t_u16) (rhs : t_u16) : t_u16 := + t_Div_f_div (self) (rhs). + +Definition impl_2__wrapping_rem (self : t_u32) (rhs : t_u32) : t_u32 := + t_Rem_f_rem (self) (rhs). + +Definition impl_2__wrapping_rem_euclid (self : t_u32) (rhs : t_u32) : t_u32 := + t_Rem_f_rem (self) (rhs). + +Definition impl_2__wrapping_div (self : t_u32) (rhs : t_u32) : t_u32 := + t_Div_f_div (self) (rhs). + +Definition impl_2__wrapping_div_euclid (self : t_u32) (rhs : t_u32) : t_u32 := + t_Div_f_div (self) (rhs). + +Definition impl_3__wrapping_rem (self : t_u64) (rhs : t_u64) : t_u64 := + t_Rem_f_rem (self) (rhs). + +Definition impl_3__wrapping_rem_euclid (self : t_u64) (rhs : t_u64) : t_u64 := + t_Rem_f_rem (self) (rhs). + +Definition impl_3__wrapping_div (self : t_u64) (rhs : t_u64) : t_u64 := + t_Div_f_div (self) (rhs). + +Definition impl_3__wrapping_div_euclid (self : t_u64) (rhs : t_u64) : t_u64 := + t_Div_f_div (self) (rhs). + +Definition impl_4__wrapping_rem (self : t_u128) (rhs : t_u128) : t_u128 := + t_Rem_f_rem (self) (rhs). + +Definition impl_4__wrapping_rem_euclid (self : t_u128) (rhs : t_u128) : t_u128 := + t_Rem_f_rem (self) (rhs). + +Definition impl_4__wrapping_div (self : t_u128) (rhs : t_u128) : t_u128 := + t_Div_f_div (self) (rhs). + +Definition impl_4__wrapping_div_euclid (self : t_u128) (rhs : t_u128) : t_u128 := + t_Div_f_div (self) (rhs). + +Definition impl_5__wrapping_rem (self : t_usize) (rhs : t_usize) : t_usize := + t_Rem_f_rem (self) (rhs). + +Definition impl_5__wrapping_rem_euclid (self : t_usize) (rhs : t_usize) : t_usize := + t_Rem_f_rem (self) (rhs). + +Definition impl_5__wrapping_div (self : t_usize) (rhs : t_usize) : t_usize := + t_Div_f_div (self) (rhs). + +Definition impl_5__wrapping_div_euclid (self : t_usize) (rhs : t_usize) : t_usize := + t_Div_f_div (self) (rhs). diff --git a/proof-libs/coq/coq/src/Core_Ops.v b/proof-libs/coq/coq/src/Core_Ops.v new file mode 100644 index 000000000..f3f969e13 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Ops.v @@ -0,0 +1,52 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Ops_Arith. +Export Core_Ops_Arith. + +(* From Core Require Import Core_Ops_Arith (t_Add). *) +(* Export Core_Ops_Arith (t_Add). *) + +(* From Core Require Import Core_Ops_Arith (t_Div). *) +(* Export Core_Ops_Arith (t_Div). *) + +(* From Core Require Import Core_Ops_Arith (t_Mul). *) +(* Export Core_Ops_Arith (t_Mul). *) + +(* From Core Require Import Core_Ops_Arith (t_Neg). *) +(* Export Core_Ops_Arith (t_Neg). *) + +(* From Core Require Import Core_Ops_Arith (t_Rem). *) +(* Export Core_Ops_Arith (t_Rem). *) + +(* From Core Require Import Core_Ops_Arith (t_Sub). *) +(* Export Core_Ops_Arith (t_Sub). *) + +From Core Require Import Core_Ops_Bit. +Export Core_Ops_Bit. + +(* From Core Require Import Core_Ops_Bit (t_BitAnd). *) +(* Export Core_Ops_Bit (t_BitAnd). *) + +(* From Core Require Import Core_Ops_Bit (t_BitOr). *) +(* Export Core_Ops_Bit (t_BitOr). *) + +(* From Core Require Import Core_Ops_Bit (t_BitXor). *) +(* Export Core_Ops_Bit (t_BitXor). *) + +(* From Core Require Import Core_Ops_Bit (t_Not). *) +(* Export Core_Ops_Bit (t_Not). *) + +(* From Core Require Import Core_Ops_Bit (t_Shl). *) +(* Export Core_Ops_Bit (t_Shl). *) + +(* From Core Require Import Core_Ops_Bit (t_Shr). *) +(* Export Core_Ops_Bit (t_Shr). *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/src/Core_Ops_Arith.v b/proof-libs/coq/coq/src/Core_Ops_Arith.v new file mode 100644 index 000000000..9a8eb127a --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Ops_Arith.v @@ -0,0 +1,59 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Marker (t_Sized). +Export Core_Marker (t_Sized). + +(* NotImplementedYet *) + +Class t_Add `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := + { + t_Add_f_Output : Type; + t_Add_f_add : v_Self -> v_Rhs -> t_Add_f_Output; + }. +Arguments t_Add:clear implicits. +Arguments t_Add (_) (_) {_}. + +Class t_Div `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := + { + t_Div_f_Output : Type; + t_Div_f_div : v_Self -> v_Rhs -> t_Div_f_Output; + }. +Arguments t_Div:clear implicits. +Arguments t_Div (_) (_) {_}. + +Class t_Mul `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := + { + t_Mul_f_Output : Type; + t_Mul_f_mul : v_Self -> v_Rhs -> t_Mul_f_Output; + }. +Arguments t_Mul:clear implicits. +Arguments t_Mul (_) (_) {_}. + +Class t_Neg `{v_Self : Type} : Type := + { + t_Neg_f_Output : Type; + t_Neg_f_neg : v_Self -> t_Neg_f_Output; + }. +Arguments t_Neg:clear implicits. +Arguments t_Neg (_). + +Class t_Rem `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := + { + t_Rem_f_Output : Type; + t_Rem_f_rem : v_Self -> v_Rhs -> t_Rem_f_Output; + }. +Arguments t_Rem:clear implicits. +Arguments t_Rem (_) (_) {_}. + +Class t_Sub `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := + { + t_Sub_f_Output : Type; + t_Sub_f_sub : v_Self -> v_Rhs -> t_Sub_f_Output; + }. +Arguments t_Sub:clear implicits. +Arguments t_Sub (_) (_) {_}. diff --git a/proof-libs/coq/coq/src/Core_Ops_Bit.v b/proof-libs/coq/coq/src/Core_Ops_Bit.v new file mode 100644 index 000000000..6ec42a34d --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Ops_Bit.v @@ -0,0 +1,57 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Marker (t_Sized). +Export Core_Marker (t_Sized). + +Class t_BitAnd `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := + { + t_BitAnd_f_Output : Type; + t_BitAnd_f_bitand : v_Self -> v_Rhs -> t_BitAnd_f_Output; + }. +Arguments t_BitAnd:clear implicits. +Arguments t_BitAnd (_) (_) {_}. + +Class t_BitOr `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := + { + t_BitOr_f_Output : Type; + t_BitOr_f_bitor : v_Self -> v_Rhs -> t_BitOr_f_Output; + }. +Arguments t_BitOr:clear implicits. +Arguments t_BitOr (_) (_) {_}. + +Class t_BitXor `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := + { + t_BitXor_f_Output : Type; + t_BitXor_f_bitxor : v_Self -> v_Rhs -> t_BitXor_f_Output; + }. +Arguments t_BitXor:clear implicits. +Arguments t_BitXor (_) (_) {_}. + +Class t_Not `{v_Self : Type} : Type := + { + t_Not_f_Output : Type; + t_Not_f_not : v_Self -> t_Not_f_Output; + }. +Arguments t_Not:clear implicits. +Arguments t_Not (_). + +Class t_Shl `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := + { + t_Shl_f_Output : Type; + t_Shl_f_shl : v_Self -> v_Rhs -> t_Shl_f_Output; + }. +Arguments t_Shl:clear implicits. +Arguments t_Shl (_) (_) {_}. + +Class t_Shr `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := + { + t_Shr_f_Output : Type; + t_Shr_f_shr : v_Self -> v_Rhs -> t_Shr_f_Output; + }. +Arguments t_Shr:clear implicits. +Arguments t_Shr (_) (_) {_}. diff --git a/proof-libs/coq/coq/src/Core_Option.v b/proof-libs/coq/coq/src/Core_Option.v new file mode 100644 index 000000000..665b6adf9 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Option.v @@ -0,0 +1,12 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +Inductive t_Option `{v_T : Type} : Type := +| t_Option_Option_None +| t_Option_Option_Some : v_T -> _. +Arguments t_Option:clear implicits. +Arguments t_Option (_). diff --git a/proof-libs/coq/coq/src/Core_Panicking.v b/proof-libs/coq/coq/src/Core_Panicking.v new file mode 100644 index 000000000..086ae44e0 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Panicking.v @@ -0,0 +1,20 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Marker. +Export Core_Marker. + +Definition t_Never : Type := False. + +Definition never_to_any `{v_T : Type} `{t_Sized v_T} (x : t_Never) : v_T := + (match x with end). + +Fixpoint panic (expr : string) `{false = true} : t_Never := + never_to_any (Bool.diff_false_true H). + +Definition panic_explicit (_ : unit) `{false = true} : t_Never := + never_to_any (Bool.diff_false_true H). diff --git a/proof-libs/coq/coq/src/Core_Primitive.v b/proof-libs/coq/coq/src/Core_Primitive.v new file mode 100644 index 000000000..7c5050da2 --- /dev/null +++ b/proof-libs/coq/coq/src/Core_Primitive.v @@ -0,0 +1,552 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import String. + +From Core Require Import Core_Int. +Export Core_Int. + + +From Core Require Import Core_Ops_Arith. +Export Core_Ops_Arith. + + +From Core Require Import Core_Ops_Bit. +Export Core_Ops_Bit. + + +From Core Require Import Core_Cmp. +Export Core_Cmp. + + +From Core Require Import Core_Base_Int_Base_impl. +Export Core_Base_Int_Base_impl. + +From Core Require Import Core_Base_Seq_Base_impl. +Export Core_Base_Seq_Base_impl. + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +Record t_u128 : Type := + { + t_u128_0 : t_U128 + }. +Arguments t_u128:clear implicits. +Arguments t_u128. + +Instance t_Clone_687423776 : t_Clone (t_u128) := + { + t_Clone_f_clone := fun (self : t_u128) => + Build_t_u128 (t_Clone_f_clone (t_u128_0 self)); + }. + +Instance t_PartialEq_359515708 : t_PartialEq (t_u128) (t_u128) := + { + t_PartialEq_f_eq := fun (self : t_u128) (rhs : t_u128) => + t_PartialEq_f_eq (t_u128_0 self) (t_u128_0 rhs); + t_PartialEq_f_ne := fun (self : t_u128) (rhs : t_u128) => + negb (t_PartialEq_f_eq (t_u128_0 self) (t_u128_0 rhs)); + }. + +Instance t_PartialOrd_133463987 : t_PartialOrd (t_u128) (t_u128) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_u128) (rhs : t_u128) => + t_PartialOrd_f_partial_cmp (t_u128_0 self) (t_u128_0 rhs); + t_PartialOrd_f_lt := fun (self : t_u128) (rhs : t_u128) => + match t_PartialOrd_f_partial_cmp (t_u128_0 self) (t_u128_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_u128) (rhs : t_u128) => + match t_PartialOrd_f_partial_cmp (t_u128_0 self) (t_u128_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_u128) (rhs : t_u128) => + match t_PartialOrd_f_partial_cmp (t_u128_0 self) (t_u128_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_u128) (rhs : t_u128) => + match t_PartialOrd_f_partial_cmp (t_u128_0 self) (t_u128_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Record t_u16 : Type := + { + t_u16_0 : t_U16 + }. +Arguments t_u16:clear implicits. +Arguments t_u16. + +Instance t_Clone_676169635 : t_Clone (t_u16) := + { + t_Clone_f_clone := fun (self : t_u16) => + Build_t_u16 (t_Clone_f_clone (t_u16_0 self)); + }. + +Instance t_PartialEq_499855381 : t_PartialEq (t_u16) (t_u16) := + { + t_PartialEq_f_eq := fun (self : t_u16) (rhs : t_u16) => + t_PartialEq_f_eq (t_u16_0 self) (t_u16_0 rhs); + t_PartialEq_f_ne := fun (self : t_u16) (rhs : t_u16) => + negb (t_PartialEq_f_eq (t_u16_0 self) (t_u16_0 rhs)); + }. + +Instance t_PartialOrd_901197325 : t_PartialOrd (t_u16) (t_u16) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_u16) (rhs : t_u16) => + t_PartialOrd_f_partial_cmp (t_u16_0 self) (t_u16_0 rhs); + t_PartialOrd_f_lt := fun (self : t_u16) (rhs : t_u16) => + match t_PartialOrd_f_partial_cmp (t_u16_0 self) (t_u16_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_u16) (rhs : t_u16) => + match t_PartialOrd_f_partial_cmp (t_u16_0 self) (t_u16_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_u16) (rhs : t_u16) => + match t_PartialOrd_f_partial_cmp (t_u16_0 self) (t_u16_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_u16) (rhs : t_u16) => + match t_PartialOrd_f_partial_cmp (t_u16_0 self) (t_u16_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Record t_u32 : Type := + { + t_u32_0 : t_U32 + }. +Arguments t_u32:clear implicits. +Arguments t_u32. + +Instance t_Clone_148051061 : t_Clone (t_u32) := + { + t_Clone_f_clone := fun (self : t_u32) => + Build_t_u32 (t_Clone_f_clone (t_u32_0 self)); + }. + +Instance t_PartialEq_988555028 : t_PartialEq (t_u32) (t_u32) := + { + t_PartialEq_f_eq := fun (self : t_u32) (rhs : t_u32) => + t_PartialEq_f_eq (t_u32_0 self) (t_u32_0 rhs); + t_PartialEq_f_ne := fun (self : t_u32) (rhs : t_u32) => + negb (t_PartialEq_f_eq (t_u32_0 self) (t_u32_0 rhs)); + }. + +Instance t_PartialOrd_675443355 : t_PartialOrd (t_u32) (t_u32) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_u32) (rhs : t_u32) => + t_PartialOrd_f_partial_cmp (t_u32_0 self) (t_u32_0 rhs); + t_PartialOrd_f_lt := fun (self : t_u32) (rhs : t_u32) => + match t_PartialOrd_f_partial_cmp (t_u32_0 self) (t_u32_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_u32) (rhs : t_u32) => + match t_PartialOrd_f_partial_cmp (t_u32_0 self) (t_u32_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_u32) (rhs : t_u32) => + match t_PartialOrd_f_partial_cmp (t_u32_0 self) (t_u32_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_u32) (rhs : t_u32) => + match t_PartialOrd_f_partial_cmp (t_u32_0 self) (t_u32_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Record t_u64 : Type := + { + t_u64_0 : t_U64 + }. +Arguments t_u64:clear implicits. +Arguments t_u64. + +Instance t_Clone_732456945 : t_Clone (t_u64) := + { + t_Clone_f_clone := fun (self : t_u64) => + Build_t_u64 (t_Clone_f_clone (t_u64_0 self)); + }. + +Instance t_PartialEq_387792562 : t_PartialEq (t_u64) (t_u64) := + { + t_PartialEq_f_eq := fun (self : t_u64) (rhs : t_u64) => + t_PartialEq_f_eq (t_u64_0 self) (t_u64_0 rhs); + t_PartialEq_f_ne := fun (self : t_u64) (rhs : t_u64) => + negb (t_PartialEq_f_eq (t_u64_0 self) (t_u64_0 rhs)); + }. + +Instance t_PartialOrd_864557835 : t_PartialOrd (t_u64) (t_u64) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_u64) (rhs : t_u64) => + t_PartialOrd_f_partial_cmp (t_u64_0 self) (t_u64_0 rhs); + t_PartialOrd_f_lt := fun (self : t_u64) (rhs : t_u64) => + match t_PartialOrd_f_partial_cmp (t_u64_0 self) (t_u64_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_u64) (rhs : t_u64) => + match t_PartialOrd_f_partial_cmp (t_u64_0 self) (t_u64_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_u64) (rhs : t_u64) => + match t_PartialOrd_f_partial_cmp (t_u64_0 self) (t_u64_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_u64) (rhs : t_u64) => + match t_PartialOrd_f_partial_cmp (t_u64_0 self) (t_u64_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Record t_u8 : Type := + { + t_u8_0 : t_U8 + }. +Arguments t_u8:clear implicits. +Arguments t_u8. + +Instance t_Clone_448525304 : t_Clone (t_u8) := + { + t_Clone_f_clone := fun (self : t_u8) => + Build_t_u8 (t_Clone_f_clone (t_u8_0 self)); + }. + +Instance t_PartialEq_92335612 : t_PartialEq (t_u8) (t_u8) := + { + t_PartialEq_f_eq := fun (self : t_u8) (rhs : t_u8) => + t_PartialEq_f_eq (t_u8_0 self) (t_u8_0 rhs); + t_PartialEq_f_ne := fun (self : t_u8) (rhs : t_u8) => + negb (t_PartialEq_f_eq (t_u8_0 self) (t_u8_0 rhs)); + }. + +Instance t_PartialOrd_414384327 : t_PartialOrd (t_u8) (t_u8) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_u8) (rhs : t_u8) => + t_PartialOrd_f_partial_cmp (t_u8_0 self) (t_u8_0 rhs); + t_PartialOrd_f_lt := fun (self : t_u8) (rhs : t_u8) => + match t_PartialOrd_f_partial_cmp (t_u8_0 self) (t_u8_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_u8) (rhs : t_u8) => + match t_PartialOrd_f_partial_cmp (t_u8_0 self) (t_u8_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_u8) (rhs : t_u8) => + match t_PartialOrd_f_partial_cmp (t_u8_0 self) (t_u8_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_u8) (rhs : t_u8) => + match t_PartialOrd_f_partial_cmp (t_u8_0 self) (t_u8_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Record t_usize : Type := + { + t_usize_0 : t_U64 + }. +Arguments t_usize:clear implicits. +Arguments t_usize. + +Instance t_Clone_323393662 : t_Clone (t_usize) := + { + t_Clone_f_clone := fun (self : t_usize) => + Build_t_usize (t_Clone_f_clone (t_usize_0 self)); + }. + +Instance t_PartialEq_585670484 : t_PartialEq (t_usize) (t_usize) := + { + t_PartialEq_f_eq := fun (self : t_usize) (rhs : t_usize) => + t_PartialEq_f_eq (t_usize_0 self) (t_usize_0 rhs); + t_PartialEq_f_ne := fun (self : t_usize) (rhs : t_usize) => + negb (t_PartialEq_f_eq (t_usize_0 self) (t_usize_0 rhs)); + }. + +Instance t_PartialOrd_249911946 : t_PartialOrd (t_usize) (t_usize) := + { + t_PartialOrd_f_partial_cmp := fun (self : t_usize) (rhs : t_usize) => + t_PartialOrd_f_partial_cmp (t_usize_0 self) (t_usize_0 rhs); + t_PartialOrd_f_lt := fun (self : t_usize) (rhs : t_usize) => + match t_PartialOrd_f_partial_cmp (t_usize_0 self) (t_usize_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less) => + true + | _ => + false + end; + t_PartialOrd_f_le := fun (self : t_usize) (rhs : t_usize) => + match t_PartialOrd_f_partial_cmp (t_usize_0 self) (t_usize_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Less + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + t_PartialOrd_f_gt := fun (self : t_usize) (rhs : t_usize) => + match t_PartialOrd_f_partial_cmp (t_usize_0 self) (t_usize_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater) => + true + | _ => + false + end; + t_PartialOrd_f_ge := fun (self : t_usize) (rhs : t_usize) => + match t_PartialOrd_f_partial_cmp (t_usize_0 self) (t_usize_0 rhs) with + | t_Option_Option_Some (t_Ordering_Ordering_Greater + | t_Ordering_Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_Mul_310564612 : t_Mul (t_u8) (t_u8) := + { + t_Mul_f_Output := t_u8; + t_Mul_f_mul := fun (self : t_u8) (rhs : t_u8) => + Build_t_u8 (t_Mul_f_mul (t_u8_0 self) (t_u8_0 rhs)); + }. + +Instance t_Rem_765572693 : t_Rem (t_u8) (t_u8) := + { + t_Rem_f_Output := t_u8; + t_Rem_f_rem := fun (self : t_u8) (rhs : t_u8) => + Build_t_u8 (t_Rem_f_rem (t_u8_0 self) (t_u8_0 rhs)); + }. + +Instance t_Add_960049504 : t_Add (t_u8) (t_u8) := + { + t_Add_f_Output := t_u8; + t_Add_f_add := fun (self : t_u8) (rhs : t_u8) => + Build_t_u8 (t_Add_f_add (t_u8_0 self) (t_u8_0 rhs)); + }. + +Instance t_Div_866285265 : t_Div (t_u8) (t_u8) := + { + t_Div_f_Output := t_u8; + t_Div_f_div := fun (self : t_u8) (rhs : t_u8) => + Build_t_u8 (t_Div_f_div (t_u8_0 self) (t_u8_0 rhs)); + }. + +Instance t_Mul_257417847 : t_Mul (t_u16) (t_u16) := + { + t_Mul_f_Output := t_u16; + t_Mul_f_mul := fun (self : t_u16) (rhs : t_u16) => + Build_t_u16 (t_Mul_f_mul (t_u16_0 self) (t_u16_0 rhs)); + }. + +Instance t_Rem_318118895 : t_Rem (t_u16) (t_u16) := + { + t_Rem_f_Output := t_u16; + t_Rem_f_rem := fun (self : t_u16) (rhs : t_u16) => + Build_t_u16 (t_Rem_f_rem (t_u16_0 self) (t_u16_0 rhs)); + }. + +Instance t_Add_554073404 : t_Add (t_u16) (t_u16) := + { + t_Add_f_Output := t_u16; + t_Add_f_add := fun (self : t_u16) (rhs : t_u16) => + Build_t_u16 (t_Add_f_add (t_u16_0 self) (t_u16_0 rhs)); + }. + +Instance t_Div_1045893244 : t_Div (t_u16) (t_u16) := + { + t_Div_f_Output := t_u16; + t_Div_f_div := fun (self : t_u16) (rhs : t_u16) => + Build_t_u16 (t_Div_f_div (t_u16_0 self) (t_u16_0 rhs)); + }. + +Instance t_Mul_800987573 : t_Mul (t_u32) (t_u32) := + { + t_Mul_f_Output := t_u32; + t_Mul_f_mul := fun (self : t_u32) (rhs : t_u32) => + Build_t_u32 (t_Mul_f_mul (t_u32_0 self) (t_u32_0 rhs)); + }. + +Instance t_Rem_666023061 : t_Rem (t_u32) (t_u32) := + { + t_Rem_f_Output := t_u32; + t_Rem_f_rem := fun (self : t_u32) (rhs : t_u32) => + Build_t_u32 (t_Rem_f_rem (t_u32_0 self) (t_u32_0 rhs)); + }. + +Instance t_Add_446443714 : t_Add (t_u32) (t_u32) := + { + t_Add_f_Output := t_u32; + t_Add_f_add := fun (self : t_u32) (rhs : t_u32) => + Build_t_u32 (t_Add_f_add (t_u32_0 self) (t_u32_0 rhs)); + }. + +Instance t_Div_688119654 : t_Div (t_u32) (t_u32) := + { + t_Div_f_Output := t_u32; + t_Div_f_div := fun (self : t_u32) (rhs : t_u32) => + Build_t_u32 (t_Div_f_div (t_u32_0 self) (t_u32_0 rhs)); + }. + +Instance t_Mul_33292302 : t_Mul (t_u64) (t_u64) := + { + t_Mul_f_Output := t_u64; + t_Mul_f_mul := fun (self : t_u64) (rhs : t_u64) => + Build_t_u64 (t_Mul_f_mul (t_u64_0 self) (t_u64_0 rhs)); + }. + +Instance t_Rem_647345183 : t_Rem (t_u64) (t_u64) := + { + t_Rem_f_Output := t_u64; + t_Rem_f_rem := fun (self : t_u64) (rhs : t_u64) => + Build_t_u64 (t_Rem_f_rem (t_u64_0 self) (t_u64_0 rhs)); + }. + +Instance t_Add_843567851 : t_Add (t_u64) (t_u64) := + { + t_Add_f_Output := t_u64; + t_Add_f_add := fun (self : t_u64) (rhs : t_u64) => + Build_t_u64 (t_Add_f_add (t_u64_0 self) (t_u64_0 rhs)); + }. + +Instance t_Div_1022519543 : t_Div (t_u64) (t_u64) := + { + t_Div_f_Output := t_u64; + t_Div_f_div := fun (self : t_u64) (rhs : t_u64) => + Build_t_u64 (t_Div_f_div (t_u64_0 self) (t_u64_0 rhs)); + }. + +Instance t_Mul_338793759 : t_Mul (t_u128) (t_u128) := + { + t_Mul_f_Output := t_u128; + t_Mul_f_mul := fun (self : t_u128) (rhs : t_u128) => + Build_t_u128 (t_Mul_f_mul (t_u128_0 self) (t_u128_0 rhs)); + }. + +Instance t_Rem_265261400 : t_Rem (t_u128) (t_u128) := + { + t_Rem_f_Output := t_u128; + t_Rem_f_rem := fun (self : t_u128) (rhs : t_u128) => + Build_t_u128 (t_Rem_f_rem (t_u128_0 self) (t_u128_0 rhs)); + }. + +Instance t_Add_6018763 : t_Add (t_u128) (t_u128) := + { + t_Add_f_Output := t_u128; + t_Add_f_add := fun (self : t_u128) (rhs : t_u128) => + Build_t_u128 (t_Add_f_add (t_u128_0 self) (t_u128_0 rhs)); + }. + +Instance t_Div_344800454 : t_Div (t_u128) (t_u128) := + { + t_Div_f_Output := t_u128; + t_Div_f_div := fun (self : t_u128) (rhs : t_u128) => + Build_t_u128 (t_Div_f_div (t_u128_0 self) (t_u128_0 rhs)); + }. + +Instance t_Mul_628159638 : t_Mul (t_usize) (t_usize) := + { + t_Mul_f_Output := t_usize; + t_Mul_f_mul := fun (self : t_usize) (rhs : t_usize) => + Build_t_usize (t_Mul_f_mul (t_usize_0 self) (t_usize_0 rhs)); + }. + +Instance t_Rem_315243380 : t_Rem (t_usize) (t_usize) := + { + t_Rem_f_Output := t_usize; + t_Rem_f_rem := fun (self : t_usize) (rhs : t_usize) => + Build_t_usize (t_Rem_f_rem (t_usize_0 self) (t_usize_0 rhs)); + }. + +Instance t_Add_1007246287 : t_Add (t_usize) (t_usize) := + { + t_Add_f_Output := t_usize; + t_Add_f_add := fun (self : t_usize) (rhs : t_usize) => + Build_t_usize (t_Add_f_add (t_usize_0 self) (t_usize_0 rhs)); + }. + +Instance t_Div_611868226 : t_Div (t_usize) (t_usize) := + { + t_Div_f_Output := t_usize; + t_Div_f_div := fun (self : t_usize) (rhs : t_usize) => + Build_t_usize (t_Div_f_div (t_usize_0 self) (t_usize_0 rhs)); + }. + +Record t_Array `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} : Type := + { + t_Array_f_v : t_Seq (v_T) + }. +Arguments t_Array:clear implicits. +Arguments t_Array (_) (_) {_}. +Arguments Build_t_Array {_} {_} {_}. From eba7e40be5c1c841162adec67216d7d017277998 Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Fri, 22 Nov 2024 13:08:33 +0100 Subject: [PATCH 17/59] Move generated core to seperate folder --- proof-libs/coq/coq/{ => generated-core}/_CoqProject | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Array.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Base_Int.v | 0 .../coq/coq/{ => generated-core}/src/Core_Base_Int_Base_impl.v | 0 .../coq/coq/{ => generated-core}/src/Core_Base_Int_Base_spec.v | 0 .../{ => generated-core}/src/Core_Base_Int_Number_conversion.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Base_Seq.v | 0 .../coq/coq/{ => generated-core}/src/Core_Base_Seq_Base_impl.v | 0 .../coq/coq/{ => generated-core}/src/Core_Base_Seq_Base_spec.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Clone.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Cmp.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Coerce.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Convert.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Int.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Intrinsics.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Marker.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Num.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Ops.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Ops_Arith.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Ops_Bit.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Option.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Panicking.v | 0 proof-libs/coq/coq/{ => generated-core}/src/Core_Primitive.v | 0 23 files changed, 0 insertions(+), 0 deletions(-) rename proof-libs/coq/coq/{ => generated-core}/_CoqProject (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Array.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Base_Int.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Base_Int_Base_impl.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Base_Int_Base_spec.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Base_Int_Number_conversion.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Base_Seq.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Base_Seq_Base_impl.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Base_Seq_Base_spec.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Clone.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Cmp.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Coerce.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Convert.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Int.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Intrinsics.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Marker.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Num.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Ops.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Ops_Arith.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Ops_Bit.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Option.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Panicking.v (100%) rename proof-libs/coq/coq/{ => generated-core}/src/Core_Primitive.v (100%) diff --git a/proof-libs/coq/coq/_CoqProject b/proof-libs/coq/coq/generated-core/_CoqProject similarity index 100% rename from proof-libs/coq/coq/_CoqProject rename to proof-libs/coq/coq/generated-core/_CoqProject diff --git a/proof-libs/coq/coq/src/Core_Array.v b/proof-libs/coq/coq/generated-core/src/Core_Array.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Array.v rename to proof-libs/coq/coq/generated-core/src/Core_Array.v diff --git a/proof-libs/coq/coq/src/Core_Base_Int.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Int.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Base_Int.v rename to proof-libs/coq/coq/generated-core/src/Core_Base_Int.v diff --git a/proof-libs/coq/coq/src/Core_Base_Int_Base_impl.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_impl.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Base_Int_Base_impl.v rename to proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_impl.v diff --git a/proof-libs/coq/coq/src/Core_Base_Int_Base_spec.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_spec.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Base_Int_Base_spec.v rename to proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_spec.v diff --git a/proof-libs/coq/coq/src/Core_Base_Int_Number_conversion.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Number_conversion.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Base_Int_Number_conversion.v rename to proof-libs/coq/coq/generated-core/src/Core_Base_Int_Number_conversion.v diff --git a/proof-libs/coq/coq/src/Core_Base_Seq.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Base_Seq.v rename to proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v diff --git a/proof-libs/coq/coq/src/Core_Base_Seq_Base_impl.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_impl.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Base_Seq_Base_impl.v rename to proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_impl.v diff --git a/proof-libs/coq/coq/src/Core_Base_Seq_Base_spec.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_spec.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Base_Seq_Base_spec.v rename to proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_spec.v diff --git a/proof-libs/coq/coq/src/Core_Clone.v b/proof-libs/coq/coq/generated-core/src/Core_Clone.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Clone.v rename to proof-libs/coq/coq/generated-core/src/Core_Clone.v diff --git a/proof-libs/coq/coq/src/Core_Cmp.v b/proof-libs/coq/coq/generated-core/src/Core_Cmp.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Cmp.v rename to proof-libs/coq/coq/generated-core/src/Core_Cmp.v diff --git a/proof-libs/coq/coq/src/Core_Coerce.v b/proof-libs/coq/coq/generated-core/src/Core_Coerce.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Coerce.v rename to proof-libs/coq/coq/generated-core/src/Core_Coerce.v diff --git a/proof-libs/coq/coq/src/Core_Convert.v b/proof-libs/coq/coq/generated-core/src/Core_Convert.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Convert.v rename to proof-libs/coq/coq/generated-core/src/Core_Convert.v diff --git a/proof-libs/coq/coq/src/Core_Int.v b/proof-libs/coq/coq/generated-core/src/Core_Int.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Int.v rename to proof-libs/coq/coq/generated-core/src/Core_Int.v diff --git a/proof-libs/coq/coq/src/Core_Intrinsics.v b/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Intrinsics.v rename to proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v diff --git a/proof-libs/coq/coq/src/Core_Marker.v b/proof-libs/coq/coq/generated-core/src/Core_Marker.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Marker.v rename to proof-libs/coq/coq/generated-core/src/Core_Marker.v diff --git a/proof-libs/coq/coq/src/Core_Num.v b/proof-libs/coq/coq/generated-core/src/Core_Num.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Num.v rename to proof-libs/coq/coq/generated-core/src/Core_Num.v diff --git a/proof-libs/coq/coq/src/Core_Ops.v b/proof-libs/coq/coq/generated-core/src/Core_Ops.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Ops.v rename to proof-libs/coq/coq/generated-core/src/Core_Ops.v diff --git a/proof-libs/coq/coq/src/Core_Ops_Arith.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Ops_Arith.v rename to proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v diff --git a/proof-libs/coq/coq/src/Core_Ops_Bit.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Ops_Bit.v rename to proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v diff --git a/proof-libs/coq/coq/src/Core_Option.v b/proof-libs/coq/coq/generated-core/src/Core_Option.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Option.v rename to proof-libs/coq/coq/generated-core/src/Core_Option.v diff --git a/proof-libs/coq/coq/src/Core_Panicking.v b/proof-libs/coq/coq/generated-core/src/Core_Panicking.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Panicking.v rename to proof-libs/coq/coq/generated-core/src/Core_Panicking.v diff --git a/proof-libs/coq/coq/src/Core_Primitive.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive.v similarity index 100% rename from proof-libs/coq/coq/src/Core_Primitive.v rename to proof-libs/coq/coq/generated-core/src/Core_Primitive.v From a390694eb6e8af12bb9cc525e5be31e8580c9164 Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Fri, 22 Nov 2024 13:11:56 +0100 Subject: [PATCH 18/59] Move handwritten code to subfolder --- proof-libs/fstar/{ => handwritten-core}/core/Alloc.Alloc.fst | 0 .../core/Alloc.Collections.Binary_heap.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Alloc.Fmt.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Alloc.Slice.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Alloc.String.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Alloc.Vec.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Array.Iter.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Array.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Clone.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Cmp.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Convert.fst | 0 .../core/Core.Core_arch.Arm_shared.Neon.fsti | 0 .../fstar/{ => handwritten-core}/core/Core.Core_arch.X86.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Core_arch.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Default.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Fmt.Rt.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Fmt.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Hint.fsti | 0 .../{ => handwritten-core}/core/Core.Iter.Adapters.Enumerate.fst | 0 .../{ => handwritten-core}/core/Core.Iter.Adapters.Step_by.fst | 0 .../{ => handwritten-core}/core/Core.Iter.Traits.Collect.fst | 0 .../{ => handwritten-core}/core/Core.Iter.Traits.Iterator.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Iter.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Marker.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Mem.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Num.Error.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Num.fsti | 0 .../fstar/{ => handwritten-core}/core/Core.Ops.Arith.Neg.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Arith.fsti | 0 .../fstar/{ => handwritten-core}/core/Core.Ops.Control_flow.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Deref.fst | 0 .../fstar/{ => handwritten-core}/core/Core.Ops.Index.IndexMut.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Index.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Range.fsti | 0 .../fstar/{ => handwritten-core}/core/Core.Ops.Try_trait.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Option.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Panicking.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Result.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Slice.Iter.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Slice.fsti | 0 .../fstar/{ => handwritten-core}/core/Core.Str.Converts.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Str.Error.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.Str.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Core.fst | 0 proof-libs/fstar/{ => handwritten-core}/core/Makefile | 0 proof-libs/fstar/{ => handwritten-core}/core/README.md | 0 proof-libs/fstar/{ => handwritten-core}/core/Rand_core.fsti | 0 proof-libs/fstar/{ => handwritten-core}/core/Std.Io.Stdio.fsti | 0 proof-libs/fstar/{ => handwritten-core}/rust_primitives/Makefile | 0 .../rust_primitives/Rust_primitives.Arrays.fst | 0 .../rust_primitives/Rust_primitives.Arrays.fsti | 0 .../rust_primitives/Rust_primitives.BitVectors.fst | 0 .../rust_primitives/Rust_primitives.BitVectors.fsti | 0 .../Rust_primitives.Hax.Control_flow_monad.Mexception.fst | 0 .../Rust_primitives.Hax.Control_flow_monad.Moption.fst | 0 .../Rust_primitives.Hax.Control_flow_monad.Mresult.fst | 0 .../rust_primitives/Rust_primitives.Hax.Folds.fsti | 0 .../rust_primitives/Rust_primitives.Hax.Int.fst | 0 .../Rust_primitives.Hax.Monomorphized_update_at.fst | 0 .../Rust_primitives.Hax.Monomorphized_update_at.fsti | 0 .../rust_primitives/Rust_primitives.Hax.fst | 0 .../rust_primitives/Rust_primitives.Integers.fst | 0 .../rust_primitives/Rust_primitives.Integers.fsti | 0 .../rust_primitives/Rust_primitives.Iterators.fsti | 0 .../{ => handwritten-core}/rust_primitives/Rust_primitives.fst | 0 66 files changed, 0 insertions(+), 0 deletions(-) rename proof-libs/fstar/{ => handwritten-core}/core/Alloc.Alloc.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Alloc.Collections.Binary_heap.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Alloc.Fmt.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Alloc.Slice.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Alloc.String.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Alloc.Vec.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Array.Iter.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Array.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Clone.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Cmp.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Convert.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Core_arch.Arm_shared.Neon.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Core_arch.X86.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Core_arch.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Default.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Fmt.Rt.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Fmt.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Hint.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Iter.Adapters.Enumerate.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Iter.Adapters.Step_by.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Iter.Traits.Collect.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Iter.Traits.Iterator.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Iter.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Marker.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Mem.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Num.Error.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Num.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Arith.Neg.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Arith.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Control_flow.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Deref.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Index.IndexMut.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Index.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Range.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.Try_trait.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Ops.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Option.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Panicking.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Result.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Slice.Iter.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Slice.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Str.Converts.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Str.Error.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.Str.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Core.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Makefile (100%) rename proof-libs/fstar/{ => handwritten-core}/core/README.md (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Rand_core.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/core/Std.Io.Stdio.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Makefile (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Arrays.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Arrays.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.BitVectors.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.BitVectors.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mexception.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Moption.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mresult.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Hax.Folds.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Hax.Int.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Hax.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Integers.fst (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Integers.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.Iterators.fsti (100%) rename proof-libs/fstar/{ => handwritten-core}/rust_primitives/Rust_primitives.fst (100%) diff --git a/proof-libs/fstar/core/Alloc.Alloc.fst b/proof-libs/fstar/handwritten-core/core/Alloc.Alloc.fst similarity index 100% rename from proof-libs/fstar/core/Alloc.Alloc.fst rename to proof-libs/fstar/handwritten-core/core/Alloc.Alloc.fst diff --git a/proof-libs/fstar/core/Alloc.Collections.Binary_heap.fsti b/proof-libs/fstar/handwritten-core/core/Alloc.Collections.Binary_heap.fsti similarity index 100% rename from proof-libs/fstar/core/Alloc.Collections.Binary_heap.fsti rename to proof-libs/fstar/handwritten-core/core/Alloc.Collections.Binary_heap.fsti diff --git a/proof-libs/fstar/core/Alloc.Fmt.fsti b/proof-libs/fstar/handwritten-core/core/Alloc.Fmt.fsti similarity index 100% rename from proof-libs/fstar/core/Alloc.Fmt.fsti rename to proof-libs/fstar/handwritten-core/core/Alloc.Fmt.fsti diff --git a/proof-libs/fstar/core/Alloc.Slice.fst b/proof-libs/fstar/handwritten-core/core/Alloc.Slice.fst similarity index 100% rename from proof-libs/fstar/core/Alloc.Slice.fst rename to proof-libs/fstar/handwritten-core/core/Alloc.Slice.fst diff --git a/proof-libs/fstar/core/Alloc.String.fst b/proof-libs/fstar/handwritten-core/core/Alloc.String.fst similarity index 100% rename from proof-libs/fstar/core/Alloc.String.fst rename to proof-libs/fstar/handwritten-core/core/Alloc.String.fst diff --git a/proof-libs/fstar/core/Alloc.Vec.fst b/proof-libs/fstar/handwritten-core/core/Alloc.Vec.fst similarity index 100% rename from proof-libs/fstar/core/Alloc.Vec.fst rename to proof-libs/fstar/handwritten-core/core/Alloc.Vec.fst diff --git a/proof-libs/fstar/core/Core.Array.Iter.fsti b/proof-libs/fstar/handwritten-core/core/Core.Array.Iter.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Array.Iter.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Array.Iter.fsti diff --git a/proof-libs/fstar/core/Core.Array.fst b/proof-libs/fstar/handwritten-core/core/Core.Array.fst similarity index 100% rename from proof-libs/fstar/core/Core.Array.fst rename to proof-libs/fstar/handwritten-core/core/Core.Array.fst diff --git a/proof-libs/fstar/core/Core.Clone.fst b/proof-libs/fstar/handwritten-core/core/Core.Clone.fst similarity index 100% rename from proof-libs/fstar/core/Core.Clone.fst rename to proof-libs/fstar/handwritten-core/core/Core.Clone.fst diff --git a/proof-libs/fstar/core/Core.Cmp.fsti b/proof-libs/fstar/handwritten-core/core/Core.Cmp.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Cmp.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Cmp.fsti diff --git a/proof-libs/fstar/core/Core.Convert.fst b/proof-libs/fstar/handwritten-core/core/Core.Convert.fst similarity index 100% rename from proof-libs/fstar/core/Core.Convert.fst rename to proof-libs/fstar/handwritten-core/core/Core.Convert.fst diff --git a/proof-libs/fstar/core/Core.Core_arch.Arm_shared.Neon.fsti b/proof-libs/fstar/handwritten-core/core/Core.Core_arch.Arm_shared.Neon.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Core_arch.Arm_shared.Neon.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Core_arch.Arm_shared.Neon.fsti diff --git a/proof-libs/fstar/core/Core.Core_arch.X86.fsti b/proof-libs/fstar/handwritten-core/core/Core.Core_arch.X86.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Core_arch.X86.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Core_arch.X86.fsti diff --git a/proof-libs/fstar/core/Core.Core_arch.fsti b/proof-libs/fstar/handwritten-core/core/Core.Core_arch.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Core_arch.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Core_arch.fsti diff --git a/proof-libs/fstar/core/Core.Default.fsti b/proof-libs/fstar/handwritten-core/core/Core.Default.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Default.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Default.fsti diff --git a/proof-libs/fstar/core/Core.Fmt.Rt.fsti b/proof-libs/fstar/handwritten-core/core/Core.Fmt.Rt.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Fmt.Rt.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Fmt.Rt.fsti diff --git a/proof-libs/fstar/core/Core.Fmt.fsti b/proof-libs/fstar/handwritten-core/core/Core.Fmt.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Fmt.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Fmt.fsti diff --git a/proof-libs/fstar/core/Core.Hint.fsti b/proof-libs/fstar/handwritten-core/core/Core.Hint.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Hint.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Hint.fsti diff --git a/proof-libs/fstar/core/Core.Iter.Adapters.Enumerate.fst b/proof-libs/fstar/handwritten-core/core/Core.Iter.Adapters.Enumerate.fst similarity index 100% rename from proof-libs/fstar/core/Core.Iter.Adapters.Enumerate.fst rename to proof-libs/fstar/handwritten-core/core/Core.Iter.Adapters.Enumerate.fst diff --git a/proof-libs/fstar/core/Core.Iter.Adapters.Step_by.fst b/proof-libs/fstar/handwritten-core/core/Core.Iter.Adapters.Step_by.fst similarity index 100% rename from proof-libs/fstar/core/Core.Iter.Adapters.Step_by.fst rename to proof-libs/fstar/handwritten-core/core/Core.Iter.Adapters.Step_by.fst diff --git a/proof-libs/fstar/core/Core.Iter.Traits.Collect.fst b/proof-libs/fstar/handwritten-core/core/Core.Iter.Traits.Collect.fst similarity index 100% rename from proof-libs/fstar/core/Core.Iter.Traits.Collect.fst rename to proof-libs/fstar/handwritten-core/core/Core.Iter.Traits.Collect.fst diff --git a/proof-libs/fstar/core/Core.Iter.Traits.Iterator.fst b/proof-libs/fstar/handwritten-core/core/Core.Iter.Traits.Iterator.fst similarity index 100% rename from proof-libs/fstar/core/Core.Iter.Traits.Iterator.fst rename to proof-libs/fstar/handwritten-core/core/Core.Iter.Traits.Iterator.fst diff --git a/proof-libs/fstar/core/Core.Iter.fsti b/proof-libs/fstar/handwritten-core/core/Core.Iter.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Iter.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Iter.fsti diff --git a/proof-libs/fstar/core/Core.Marker.fst b/proof-libs/fstar/handwritten-core/core/Core.Marker.fst similarity index 100% rename from proof-libs/fstar/core/Core.Marker.fst rename to proof-libs/fstar/handwritten-core/core/Core.Marker.fst diff --git a/proof-libs/fstar/core/Core.Mem.fsti b/proof-libs/fstar/handwritten-core/core/Core.Mem.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Mem.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Mem.fsti diff --git a/proof-libs/fstar/core/Core.Num.Error.fsti b/proof-libs/fstar/handwritten-core/core/Core.Num.Error.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Num.Error.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Num.Error.fsti diff --git a/proof-libs/fstar/core/Core.Num.fsti b/proof-libs/fstar/handwritten-core/core/Core.Num.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Num.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Num.fsti diff --git a/proof-libs/fstar/core/Core.Ops.Arith.Neg.fsti b/proof-libs/fstar/handwritten-core/core/Core.Ops.Arith.Neg.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Ops.Arith.Neg.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Ops.Arith.Neg.fsti diff --git a/proof-libs/fstar/core/Core.Ops.Arith.fsti b/proof-libs/fstar/handwritten-core/core/Core.Ops.Arith.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Ops.Arith.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Ops.Arith.fsti diff --git a/proof-libs/fstar/core/Core.Ops.Control_flow.fst b/proof-libs/fstar/handwritten-core/core/Core.Ops.Control_flow.fst similarity index 100% rename from proof-libs/fstar/core/Core.Ops.Control_flow.fst rename to proof-libs/fstar/handwritten-core/core/Core.Ops.Control_flow.fst diff --git a/proof-libs/fstar/core/Core.Ops.Deref.fst b/proof-libs/fstar/handwritten-core/core/Core.Ops.Deref.fst similarity index 100% rename from proof-libs/fstar/core/Core.Ops.Deref.fst rename to proof-libs/fstar/handwritten-core/core/Core.Ops.Deref.fst diff --git a/proof-libs/fstar/core/Core.Ops.Index.IndexMut.fst b/proof-libs/fstar/handwritten-core/core/Core.Ops.Index.IndexMut.fst similarity index 100% rename from proof-libs/fstar/core/Core.Ops.Index.IndexMut.fst rename to proof-libs/fstar/handwritten-core/core/Core.Ops.Index.IndexMut.fst diff --git a/proof-libs/fstar/core/Core.Ops.Index.fst b/proof-libs/fstar/handwritten-core/core/Core.Ops.Index.fst similarity index 100% rename from proof-libs/fstar/core/Core.Ops.Index.fst rename to proof-libs/fstar/handwritten-core/core/Core.Ops.Index.fst diff --git a/proof-libs/fstar/core/Core.Ops.Range.fsti b/proof-libs/fstar/handwritten-core/core/Core.Ops.Range.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Ops.Range.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Ops.Range.fsti diff --git a/proof-libs/fstar/core/Core.Ops.Try_trait.fst b/proof-libs/fstar/handwritten-core/core/Core.Ops.Try_trait.fst similarity index 100% rename from proof-libs/fstar/core/Core.Ops.Try_trait.fst rename to proof-libs/fstar/handwritten-core/core/Core.Ops.Try_trait.fst diff --git a/proof-libs/fstar/core/Core.Ops.fst b/proof-libs/fstar/handwritten-core/core/Core.Ops.fst similarity index 100% rename from proof-libs/fstar/core/Core.Ops.fst rename to proof-libs/fstar/handwritten-core/core/Core.Ops.fst diff --git a/proof-libs/fstar/core/Core.Option.fst b/proof-libs/fstar/handwritten-core/core/Core.Option.fst similarity index 100% rename from proof-libs/fstar/core/Core.Option.fst rename to proof-libs/fstar/handwritten-core/core/Core.Option.fst diff --git a/proof-libs/fstar/core/Core.Panicking.fst b/proof-libs/fstar/handwritten-core/core/Core.Panicking.fst similarity index 100% rename from proof-libs/fstar/core/Core.Panicking.fst rename to proof-libs/fstar/handwritten-core/core/Core.Panicking.fst diff --git a/proof-libs/fstar/core/Core.Result.fst b/proof-libs/fstar/handwritten-core/core/Core.Result.fst similarity index 100% rename from proof-libs/fstar/core/Core.Result.fst rename to proof-libs/fstar/handwritten-core/core/Core.Result.fst diff --git a/proof-libs/fstar/core/Core.Slice.Iter.fst b/proof-libs/fstar/handwritten-core/core/Core.Slice.Iter.fst similarity index 100% rename from proof-libs/fstar/core/Core.Slice.Iter.fst rename to proof-libs/fstar/handwritten-core/core/Core.Slice.Iter.fst diff --git a/proof-libs/fstar/core/Core.Slice.fsti b/proof-libs/fstar/handwritten-core/core/Core.Slice.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Slice.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Slice.fsti diff --git a/proof-libs/fstar/core/Core.Str.Converts.fsti b/proof-libs/fstar/handwritten-core/core/Core.Str.Converts.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Str.Converts.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Str.Converts.fsti diff --git a/proof-libs/fstar/core/Core.Str.Error.fsti b/proof-libs/fstar/handwritten-core/core/Core.Str.Error.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Str.Error.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Str.Error.fsti diff --git a/proof-libs/fstar/core/Core.Str.fsti b/proof-libs/fstar/handwritten-core/core/Core.Str.fsti similarity index 100% rename from proof-libs/fstar/core/Core.Str.fsti rename to proof-libs/fstar/handwritten-core/core/Core.Str.fsti diff --git a/proof-libs/fstar/core/Core.fst b/proof-libs/fstar/handwritten-core/core/Core.fst similarity index 100% rename from proof-libs/fstar/core/Core.fst rename to proof-libs/fstar/handwritten-core/core/Core.fst diff --git a/proof-libs/fstar/core/Makefile b/proof-libs/fstar/handwritten-core/core/Makefile similarity index 100% rename from proof-libs/fstar/core/Makefile rename to proof-libs/fstar/handwritten-core/core/Makefile diff --git a/proof-libs/fstar/core/README.md b/proof-libs/fstar/handwritten-core/core/README.md similarity index 100% rename from proof-libs/fstar/core/README.md rename to proof-libs/fstar/handwritten-core/core/README.md diff --git a/proof-libs/fstar/core/Rand_core.fsti b/proof-libs/fstar/handwritten-core/core/Rand_core.fsti similarity index 100% rename from proof-libs/fstar/core/Rand_core.fsti rename to proof-libs/fstar/handwritten-core/core/Rand_core.fsti diff --git a/proof-libs/fstar/core/Std.Io.Stdio.fsti b/proof-libs/fstar/handwritten-core/core/Std.Io.Stdio.fsti similarity index 100% rename from proof-libs/fstar/core/Std.Io.Stdio.fsti rename to proof-libs/fstar/handwritten-core/core/Std.Io.Stdio.fsti diff --git a/proof-libs/fstar/rust_primitives/Makefile b/proof-libs/fstar/handwritten-core/rust_primitives/Makefile similarity index 100% rename from proof-libs/fstar/rust_primitives/Makefile rename to proof-libs/fstar/handwritten-core/rust_primitives/Makefile diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Arrays.fst b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Arrays.fst similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Arrays.fst rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Arrays.fst diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Arrays.fsti b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Arrays.fsti similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Arrays.fsti rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Arrays.fsti diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.BitVectors.fst b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.BitVectors.fst similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.BitVectors.fst rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.BitVectors.fst diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.BitVectors.fsti b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.BitVectors.fsti similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.BitVectors.fsti rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.BitVectors.fsti diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mexception.fst b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mexception.fst similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mexception.fst rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mexception.fst diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Moption.fst b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Moption.fst similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Moption.fst rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Moption.fst diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mresult.fst b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mresult.fst similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mresult.fst rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mresult.fst diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Folds.fsti b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Folds.fsti similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Folds.fsti rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Folds.fsti diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Int.fst b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Int.fst similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Int.fst rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Int.fst diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fsti b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fsti similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fsti rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fsti diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.fst b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.fst similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Hax.fst rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.fst diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Integers.fst b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Integers.fst similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Integers.fst rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Integers.fst diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Integers.fsti b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Integers.fsti similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Integers.fsti rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Integers.fsti diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.Iterators.fsti b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Iterators.fsti similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.Iterators.fsti rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Iterators.fsti diff --git a/proof-libs/fstar/rust_primitives/Rust_primitives.fst b/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.fst similarity index 100% rename from proof-libs/fstar/rust_primitives/Rust_primitives.fst rename to proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.fst From 57518de1b68d5eec2675dae353794be2b162cf34 Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Fri, 22 Nov 2024 13:15:16 +0100 Subject: [PATCH 19/59] Add generated annotated-core lib for fstar --- .../fstar/generated-core/Core.Array.fst | 151 + .../Core.Base.Int.Base_impl.fst | 853 ++++ .../Core.Base.Int.Base_spec.fst | 146 + .../Core.Base.Int.Number_conversion.fst | 340 ++ .../fstar/generated-core/Core.Base.Int.fst | 23 + .../Core.Base.Seq.Base_impl.fst | 221 + .../Core.Base.Seq.Base_spec.fst | 29 + .../fstar/generated-core/Core.Base.Seq.fst | 10 + .../fstar/generated-core/Core.Clone.fst | 10 + proof-libs/fstar/generated-core/Core.Cmp.fst | 165 + .../fstar/generated-core/Core.Coerce.fst | 19 + .../fstar/generated-core/Core.Convert.fst | 33 + proof-libs/fstar/generated-core/Core.Int.fst | 3568 +++++++++++++++++ .../fstar/generated-core/Core.Intrinsics.fst | 343 ++ .../fstar/generated-core/Core.Marker.fst | 12 + proof-libs/fstar/generated-core/Core.Num.fst | 200 + .../fstar/generated-core/Core.Ops.Arith.fst | 81 + .../fstar/generated-core/Core.Ops.Bit.fst | 74 + .../fstar/generated-core/Core.Ops.Deref.fst | 9 + .../fstar/generated-core/Core.Option.fst | 8 + .../fstar/generated-core/Core.Panicking.fst | 17 + .../fstar/generated-core/Core.Prelude.fst | 4 + .../fstar/generated-core/Core.Primitive.fst | 844 ++++ proof-libs/fstar/generated-core/Makefile | 26 + proof-libs/fstar/generated-core/Prelude.fst | 599 +++ 25 files changed, 7785 insertions(+) create mode 100644 proof-libs/fstar/generated-core/Core.Array.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Int.Base_impl.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Int.Base_spec.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Int.Number_conversion.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Int.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Seq.Base_impl.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Seq.Base_spec.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Seq.fst create mode 100644 proof-libs/fstar/generated-core/Core.Clone.fst create mode 100644 proof-libs/fstar/generated-core/Core.Cmp.fst create mode 100644 proof-libs/fstar/generated-core/Core.Coerce.fst create mode 100644 proof-libs/fstar/generated-core/Core.Convert.fst create mode 100644 proof-libs/fstar/generated-core/Core.Int.fst create mode 100644 proof-libs/fstar/generated-core/Core.Intrinsics.fst create mode 100644 proof-libs/fstar/generated-core/Core.Marker.fst create mode 100644 proof-libs/fstar/generated-core/Core.Num.fst create mode 100644 proof-libs/fstar/generated-core/Core.Ops.Arith.fst create mode 100644 proof-libs/fstar/generated-core/Core.Ops.Bit.fst create mode 100644 proof-libs/fstar/generated-core/Core.Ops.Deref.fst create mode 100644 proof-libs/fstar/generated-core/Core.Option.fst create mode 100644 proof-libs/fstar/generated-core/Core.Panicking.fst create mode 100644 proof-libs/fstar/generated-core/Core.Prelude.fst create mode 100644 proof-libs/fstar/generated-core/Core.Primitive.fst create mode 100644 proof-libs/fstar/generated-core/Makefile create mode 100644 proof-libs/fstar/generated-core/Prelude.fst diff --git a/proof-libs/fstar/generated-core/Core.Array.fst b/proof-libs/fstar/generated-core/Core.Array.fst new file mode 100644 index 000000000..a3008ddd5 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Array.fst @@ -0,0 +1,151 @@ +module Core.Array +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +open Core.Primitive +open Core.Cmp +open Core.Base.Int.Number_conversion + +type t_Array (v_T: eqtype) (v_N: usize) = { f_v:Core.Base.Seq.t_Seq v_T } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl + (#v_T: eqtype) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Clone.t_Clone (t_Array v_T v_N) = + { + f_clone_pre = (fun (self: t_Array v_T v_N) -> true); + f_clone_post = (fun (self: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); + f_clone + = + fun (self: t_Array v_T v_N) -> + { f_v = Core.Base.Seq.Base_spec.impl__clone #v_T self.f_v } <: t_Array v_T v_N + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1 + (#v_T: eqtype) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Cmp.t_PartialEq v_T v_T) + : Core.Cmp.t_PartialEq (t_Array v_T v_N) (t_Array v_T v_N) = + { + f_eq_pre = (fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) -> true); + f_eq_post = (fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) (out: bool) -> true); + f_eq + = + (fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) -> + (Core.Base.Seq.Base_spec.impl__clone #v_T self.f_v <: Core.Base.Seq.t_Seq v_T) =. other.f_v); + f_ne_pre = (fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) -> true); + f_ne_post = (fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) (out: bool) -> true); + f_ne + = + fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) -> + ~.((Core.Base.Seq.Base_spec.impl__clone #v_T self.f_v <: Core.Base.Seq.t_Seq v_T) =. other.f_v + <: + bool) + } + +let impl_2__reverse + (#v_T: eqtype) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: t_Array v_T v_N) + : t_Array v_T v_N = + { f_v = Core.Base.Seq.Base_impl.impl_2__rev #v_T self.f_v } <: t_Array v_T v_N + +// let lt_usize_implies_hax_int (x y: usize) +// : Lemma (requires x <. y) +// (ensures +// (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve x +// <: +// Core.Base.Int.t_HaxInt) <. +// (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve y +// <: +// Core.Base.Int.t_HaxInt)) = admit () + +// let lift_usize_equality (x: Core.Base.Int.t_HaxInt) (y: usize) +// : Lemma +// (requires +// x =. +// (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve y +// <: +// Core.Base.Int.t_HaxInt)) +// (ensures +// (Core.Convert.f_from #usize +// #Core.Base.Int.t_HaxInt +// #FStar.Tactics.Typeclasses.solve +// x +// <: +// usize) =. +// y) = admit () + +let impl_2__index + (#v_T: eqtype) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: t_Array v_T v_N) + (i: usize) + : Prims.Pure v_T + (requires + // (Core.Base.Seq.Base_impl.impl_2__len #v_T self.f_v <: Core.Base.Int.t_HaxInt) =. + // (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve v_N + // <: + // Core.Base.Int.t_HaxInt) && + // i <. v_N && + ((Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve i) <. (Core.Base.Seq.Base_impl.impl_2__len #v_T self.f_v <: Core.Base.Int.t_HaxInt))) + (fun _ -> Prims.l_True) = + Core.Base.Seq.Base_impl.impl_2__get_index #v_T + self.f_v + (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve i + <: + Core.Base.Int.t_HaxInt) + +let impl_2__new + (#v_T: eqtype) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (x: v_T) + : t_Array v_T v_N = + { + f_v + = + Core.Base.Seq.Base_impl.impl_2__repeat #v_T + (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve v_N + <: + Core.Base.Int.t_HaxInt) + x + } + <: + t_Array v_T v_N + +let impl_2__set_index + (#v_T: eqtype) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: t_Array v_T v_N) + (i: usize) + (t: v_T) + : Prims.Pure (t_Array v_T v_N) + (requires + // (Core.Base.Seq.Base_impl.impl_2__len #v_T self.f_v <: Core.Base.Int.t_HaxInt) =. + // (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve v_N + // <: + // Core.Base.Int.t_HaxInt) && + // i <. v_N && + ((Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve i) <. (Core.Base.Seq.Base_impl.impl_2__len #v_T self.f_v <: Core.Base.Int.t_HaxInt))) + (fun _ -> Prims.l_True) = + { + f_v + = + Core.Base.Seq.Base_impl.impl_2__set_index #v_T + self.f_v + (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve i + <: + Core.Base.Int.t_HaxInt) + t + } + <: + t_Array v_T v_N diff --git a/proof-libs/fstar/generated-core/Core.Base.Int.Base_impl.fst b/proof-libs/fstar/generated-core/Core.Base.Int.Base_impl.fst new file mode 100644 index 000000000..67087a854 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Int.Base_impl.fst @@ -0,0 +1,853 @@ +module Core.Base.Int.Base_impl +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +open Core.Cmp + +let impl_7__sub__double_mask (lhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_9__match_pos lhs with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POS_POS p -> + Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO p + <: + Core.Base.Int.t_Positive) + +let impl_7__sub__succ_double_mask (lhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_9__match_pos lhs with + | Core.Base.Int.POS_ZERO -> + Core.Base.Int.Base_spec.impl_4__to_int Core.Base.Int.Base_spec.impl_8__xH + | Core.Base.Int.POS_POS p -> + Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xI p + <: + Core.Base.Int.t_Positive) + +let impl_8__double (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_9__match_pos self with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POS_POS p -> + Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO p + <: + Core.Base.Int.t_Positive) + +let impl_8__half (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_9__match_pos self with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POS_POS n -> + match Core.Base.Int.Base_spec.impl_8__match_positive n with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POSITIVE_XO p -> Core.Base.Int.Base_spec.impl_4__to_int p + | Core.Base.Int.POSITIVE_XI p -> Core.Base.Int.Base_spec.impl_4__to_int p + +let impl_8__succ_double (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_Positive = + match Core.Base.Int.Base_spec.impl_9__match_pos self with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_8__xH + | Core.Base.Int.POS_POS p -> Core.Base.Int.Base_spec.impl_8__xI p + +let rec impl__cmp__cmp_binary_cont (x y: Core.Base.Int.t_Positive) (r: Core.Cmp.t_Ordering) + : Core.Cmp.t_Ordering = + match Core.Base.Int.Base_spec.impl_8__match_positive x with + | Core.Base.Int.POSITIVE_XH -> + (match Core.Base.Int.Base_spec.impl_8__match_positive y with + | Core.Base.Int.POSITIVE_XH -> r + | Core.Base.Int.POSITIVE_XO q + | Core.Base.Int.POSITIVE_XI q -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) + | Core.Base.Int.POSITIVE_XO p -> + (match Core.Base.Int.Base_spec.impl_8__match_positive y with + | Core.Base.Int.POSITIVE_XH -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering + | Core.Base.Int.POSITIVE_XO q -> impl__cmp__cmp_binary_cont p q r + | Core.Base.Int.POSITIVE_XI q -> + impl__cmp__cmp_binary_cont p q (Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering)) + | Core.Base.Int.POSITIVE_XI p -> + match Core.Base.Int.Base_spec.impl_8__match_positive y with + | Core.Base.Int.POSITIVE_XH -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering + | Core.Base.Int.POSITIVE_XO q -> + impl__cmp__cmp_binary_cont p q (Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering) + | Core.Base.Int.POSITIVE_XI q -> impl__cmp__cmp_binary_cont p q r + +let impl__cmp (lhs rhs: Core.Base.Int.t_Positive) : Core.Cmp.t_Ordering = + impl__cmp__cmp_binary_cont lhs rhs (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Cmp.t_PartialEq Core.Base.Int.t_Positive Core.Base.Int.t_Positive = + { + f_eq_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); + f_eq_post + = + (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); + f_eq + = + (fun x y -> x = y) + // (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> + // (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive + // #FStar.Tactics.Typeclasses.solve + // self + // <: + // Core.Base.Int.t_Positive) + // (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other + // <: + // Core.Base.Int.t_Positive) + // <: + // Core.Cmp.t_Ordering) =. + // (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)) + ; + f_ne_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); + f_ne_post + = + (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); + f_ne + = + fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> + ~.((impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_Positive) + (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Int.t_Positive) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + <: + bool) + } + +let impl_2__cmp (lhs rhs: Core.Base.Int.t_HaxInt) : Core.Cmp.t_Ordering = + match Core.Base.Int.Base_spec.impl_9__match_pos lhs with + | Core.Base.Int.POS_ZERO -> + (match Core.Base.Int.Base_spec.impl_9__match_pos rhs with + | Core.Base.Int.POS_ZERO -> Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering + | Core.Base.Int.POS_POS q -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) + | Core.Base.Int.POS_POS p -> + match Core.Base.Int.Base_spec.impl_9__match_pos rhs with + | Core.Base.Int.POS_ZERO -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering + | Core.Base.Int.POS_POS q -> impl__cmp p q + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Cmp.t_PartialEq Core.Base.Int.t_HaxInt Core.Base.Int.t_HaxInt = + { + f_eq_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); + f_eq_post + = + (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); + f_eq + = + (fun x y -> x = y) + // (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> + // (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt + // #FStar.Tactics.Typeclasses.solve + // self + // <: + // Core.Base.Int.t_HaxInt) + // (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other + // <: + // Core.Base.Int.t_HaxInt) + // <: + // Core.Cmp.t_Ordering) =. + // (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)) + ; + f_ne_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); + f_ne_post + = + (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); + f_ne + = + fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> + ~.((impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Int.t_HaxInt) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + <: + bool) + } + +let rec impl_4__succ (self: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = + match Core.Base.Int.Base_spec.impl_8__match_positive self with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_8__xO Core.Base.Int.Base_spec.impl_8__xH + | Core.Base.Int.POSITIVE_XO q -> Core.Base.Int.Base_spec.impl_8__xI q + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_8__xO (impl_4__succ q <: Core.Base.Int.t_Positive) + +let rec impl_7__sub__pred_double (lhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = + match Core.Base.Int.Base_spec.impl_8__match_positive lhs with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_8__xH + | Core.Base.Int.POSITIVE_XO p -> + Core.Base.Int.Base_spec.impl_8__xI (impl_7__sub__pred_double p <: Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI p -> + Core.Base.Int.Base_spec.impl_8__xI (Core.Base.Int.Base_spec.impl_8__xO p + <: + Core.Base.Int.t_Positive) + +let impl_7__sub__double_pred_mask (lhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_8__match_positive lhs with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POSITIVE_XO p -> + Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO (impl_7__sub__pred_double + p + <: + Core.Base.Int.t_Positive) + <: + Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI p -> + Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO (Core.Base.Int.Base_spec.impl_8__xO + p + <: + Core.Base.Int.t_Positive) + <: + Core.Base.Int.t_Positive) + +let rec impl_9__power_of_two (self: Core.Base.Int.t_Unary) : Core.Base.Int.t_Positive = + match Core.Base.Int.Base_spec.impl_6__match_unary self with + | Core.Base.Int.UNARY_ZERO -> Core.Base.Int.Base_spec.impl_8__xH + | Core.Base.Int.UNARY_SUCC x -> + Core.Base.Int.Base_spec.impl_8__xO (impl_9__power_of_two x <: Core.Base.Int.t_Positive) + +let rec impl_12__shl__shl_helper (rhs: Core.Base.Int.t_Unary) (lhs: Core.Base.Int.t_HaxInt) + : Core.Base.Int.t_HaxInt = + if + Core.Base.Int.Base_spec.impl_9__is_zero (Core.Clone.f_clone #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + lhs + <: + Core.Base.Int.t_HaxInt) + then lhs + else + match Core.Base.Int.Base_spec.impl_6__match_unary rhs with + | Core.Base.Int.UNARY_ZERO -> lhs + | Core.Base.Int.UNARY_SUCC n -> + impl_12__shl__shl_helper n (impl_8__double lhs <: Core.Base.Int.t_HaxInt) + +let impl_12__shl (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + impl_12__shl__shl_helper (Core.Base.Int.Base_spec.impl_5__from_int rhs <: Core.Base.Int.t_Unary) + self + +let rec impl_13__shr__shr_helper (rhs: Core.Base.Int.t_Unary) (lhs: Core.Base.Int.t_HaxInt) + : Core.Base.Int.t_HaxInt = + if + Core.Base.Int.Base_spec.impl_9__is_zero (Core.Clone.f_clone #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + lhs + <: + Core.Base.Int.t_HaxInt) + then lhs + else + match Core.Base.Int.Base_spec.impl_6__match_unary rhs with + | Core.Base.Int.UNARY_ZERO -> lhs + | Core.Base.Int.UNARY_SUCC n -> + impl_13__shr__shr_helper n (impl_8__half lhs <: Core.Base.Int.t_HaxInt) + +let impl_13__shr (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + impl_13__shr__shr_helper (Core.Base.Int.Base_spec.impl_5__from_int rhs <: Core.Base.Int.t_Unary) + self + +let rec impl_14__bitxor__bitxor_binary (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_8__match_positive lhs with + | Core.Base.Int.POSITIVE_XH -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POSITIVE_XO q -> + Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xI q + <: + Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO q + <: + Core.Base.Int.t_Positive)) + | Core.Base.Int.POSITIVE_XO p -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xI p + <: + Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XO q -> + impl_8__double (impl_14__bitxor__bitxor_binary p q <: Core.Base.Int.t_HaxInt) + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double (impl_14__bitxor__bitxor_binary p + q + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_Positive)) + | Core.Base.Int.POSITIVE_XI p -> + match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO p + <: + Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XO q -> + Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double (impl_14__bitxor__bitxor_binary p + q + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI q -> + impl_8__double (impl_14__bitxor__bitxor_binary p q <: Core.Base.Int.t_HaxInt) + +let impl_14__bitxor (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_9__match_pos self with + | Core.Base.Int.POS_ZERO -> rhs + | Core.Base.Int.POS_POS p -> + match Core.Base.Int.Base_spec.impl_9__match_pos rhs with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_4__to_int p + | Core.Base.Int.POS_POS q -> impl_14__bitxor__bitxor_binary p q + +let rec impl_15__bitand__bitand_binary (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_8__match_positive lhs with + | Core.Base.Int.POSITIVE_XH -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XO q -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POSITIVE_XI _ + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ONE) + | Core.Base.Int.POSITIVE_XO p -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POSITIVE_XO q + | Core.Base.Int.POSITIVE_XI q -> + impl_8__double (impl_15__bitand__bitand_binary p q <: Core.Base.Int.t_HaxInt)) + | Core.Base.Int.POSITIVE_XI p -> + match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ONE + | Core.Base.Int.POSITIVE_XO q -> + impl_8__double (impl_15__bitand__bitand_binary p q <: Core.Base.Int.t_HaxInt) + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double (impl_15__bitand__bitand_binary p + q + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_Positive) + +let impl_15__bitand (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_9__match_pos self with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POS_POS p -> + match Core.Base.Int.Base_spec.impl_9__match_pos rhs with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POS_POS q -> impl_15__bitand__bitand_binary p q + +let rec impl_16__bitor__bitor_binary (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = + match Core.Base.Int.Base_spec.impl_8__match_positive lhs with + | Core.Base.Int.POSITIVE_XH -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XO q -> Core.Base.Int.Base_spec.impl_8__xI q + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_8__xH + | Core.Base.Int.POSITIVE_XI q -> Core.Base.Int.Base_spec.impl_8__xI q) + | Core.Base.Int.POSITIVE_XO p -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_8__xI p + | Core.Base.Int.POSITIVE_XO q -> + Core.Base.Int.Base_spec.impl_8__xO (impl_16__bitor__bitor_binary p q + <: + Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_8__xI (impl_16__bitor__bitor_binary p q + <: + Core.Base.Int.t_Positive)) + | Core.Base.Int.POSITIVE_XI p -> + match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_8__xI p + | Core.Base.Int.POSITIVE_XO q + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_8__xI (impl_16__bitor__bitor_binary p q + <: + Core.Base.Int.t_Positive) + +let impl_16__bitor (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_9__match_pos self with + | Core.Base.Int.POS_ZERO -> rhs + | Core.Base.Int.POS_POS p -> + match Core.Base.Int.Base_spec.impl_9__match_pos rhs with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_4__to_int p + | Core.Base.Int.POS_POS q -> + Core.Base.Int.Base_spec.impl_4__to_int (impl_16__bitor__bitor_binary p q + <: + Core.Base.Int.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Cmp.t_PartialOrd Core.Base.Int.t_Positive Core.Base.Int.t_Positive = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre + = + (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); + f_partial_cmp_post + = + (fun + (self: Core.Base.Int.t_Positive) + (other: Core.Base.Int.t_Positive) + (out: Core.Option.t_Option Core.Cmp.t_Ordering) + -> + true); + f_partial_cmp + = + (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> + Core.Option.Option_Some + (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_Positive) + (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Int.t_Positive)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); + f_lt_post + = + (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); + f_lt + = + (fun self other -> self < other) + // (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> + // match + // Core.Option.Option_Some + // (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive + // #FStar.Tactics.Typeclasses.solve + // self + // <: + // Core.Base.Int.t_Positive) + // (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other + // <: + // Core.Base.Int.t_Positive)) + // <: + // Core.Option.t_Option Core.Cmp.t_Ordering + // with + // | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + // | _ -> false) + ; + f_le_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); + f_le_post + = + (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); + f_le + = + (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> + match + Core.Option.Option_Some + (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_Positive) + (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Int.t_Positive)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); + f_gt_post + = + (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); + f_gt + = + (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> + match + Core.Option.Option_Some + (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_Positive) + (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Int.t_Positive)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); + f_ge_post + = + (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); + f_ge + = + fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> + match + Core.Option.Option_Some + (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_Positive) + (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Int.t_Positive)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Cmp.t_PartialOrd Core.Base.Int.t_HaxInt Core.Base.Int.t_HaxInt = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); + f_partial_cmp_post + = + (fun + (self: Core.Base.Int.t_HaxInt) + (other: Core.Base.Int.t_HaxInt) + (out: Core.Option.t_Option Core.Cmp.t_Ordering) + -> + true); + f_partial_cmp + = + (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> + Core.Option.Option_Some + (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Int.t_HaxInt)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); + f_lt_post + = + (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); + f_lt + = (fun self other -> self < other) + // (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> + // match + // Core.Option.Option_Some + // (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt + // #FStar.Tactics.Typeclasses.solve + // self + // <: + // Core.Base.Int.t_HaxInt) + // (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other + // <: + // Core.Base.Int.t_HaxInt)) + // <: + // Core.Option.t_Option Core.Cmp.t_Ordering + // with + // | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + // | _ -> false) + ; + f_le_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); + f_le_post + = + (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); + f_le + = + (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> + match + Core.Option.Option_Some + (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Int.t_HaxInt)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); + f_gt_post + = + (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); + f_gt + = + (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> + match + Core.Option.Option_Some + (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Int.t_HaxInt)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); + f_ge_post + = + (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); + f_ge + = + fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> + match + Core.Option.Option_Some + (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Int.t_HaxInt)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +let rec impl_4__add (self rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = + match Core.Base.Int.Base_spec.impl_8__match_positive self with + | Core.Base.Int.POSITIVE_XH -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_8__xO Core.Base.Int.Base_spec.impl_8__xH + | Core.Base.Int.POSITIVE_XO q -> Core.Base.Int.Base_spec.impl_8__xI q + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_8__xO (impl_4__succ q <: Core.Base.Int.t_Positive)) + | Core.Base.Int.POSITIVE_XO p -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_8__xI p + | Core.Base.Int.POSITIVE_XO q -> + Core.Base.Int.Base_spec.impl_8__xO (impl_4__add p q <: Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_8__xI (impl_4__add p q <: Core.Base.Int.t_Positive)) + | Core.Base.Int.POSITIVE_XI p -> + match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_8__xO (impl_4__succ p <: Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XO q -> + Core.Base.Int.Base_spec.impl_8__xI (impl_4__add p q <: Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_8__xO (impl_4__add__add_carry p q <: Core.Base.Int.t_Positive) + +and impl_4__add__add_carry (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = + match Core.Base.Int.Base_spec.impl_8__match_positive lhs with + | Core.Base.Int.POSITIVE_XH -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_8__xI Core.Base.Int.Base_spec.impl_8__xH + | Core.Base.Int.POSITIVE_XO q -> + Core.Base.Int.Base_spec.impl_8__xO (impl_4__succ q <: Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_8__xI (impl_4__succ q <: Core.Base.Int.t_Positive)) + | Core.Base.Int.POSITIVE_XO p -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_8__xO (impl_4__succ p <: Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XO q -> + Core.Base.Int.Base_spec.impl_8__xI (impl_4__add p q <: Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_8__xO (impl_4__add__add_carry p q <: Core.Base.Int.t_Positive)) + | Core.Base.Int.POSITIVE_XI p -> + match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_8__xI (impl_4__succ p <: Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XO q -> + Core.Base.Int.Base_spec.impl_8__xO (impl_4__add__add_carry p q <: Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_8__xI (impl_4__add__add_carry p q <: Core.Base.Int.t_Positive) + +let impl_6__add (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_9__match_pos self with + | Core.Base.Int.POS_ZERO -> rhs + | Core.Base.Int.POS_POS p -> + match Core.Base.Int.Base_spec.impl_9__match_pos rhs with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_4__to_int p + | Core.Base.Int.POS_POS q -> + Core.Base.Int.Base_spec.impl_4__to_int (impl_4__add p q <: Core.Base.Int.t_Positive) + +let rec impl_7__sub__sub_binary (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_8__match_positive lhs with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POSITIVE_XO p -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_4__to_int (impl_7__sub__pred_double p + <: + Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XO q -> + impl_7__sub__double_mask (impl_7__sub__sub_binary p q <: Core.Base.Int.t_HaxInt) + | Core.Base.Int.POSITIVE_XI q -> + impl_7__sub__succ_double_mask (impl_7__sub__sub_carry p q <: Core.Base.Int.t_HaxInt)) + | Core.Base.Int.POSITIVE_XI p -> + match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO p + <: + Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XO q -> + impl_7__sub__succ_double_mask (impl_7__sub__sub_binary p q <: Core.Base.Int.t_HaxInt) + | Core.Base.Int.POSITIVE_XI q -> + impl_7__sub__double_mask (impl_7__sub__sub_binary p q <: Core.Base.Int.t_HaxInt) + +and impl_7__sub__sub_carry (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_8__match_positive lhs with + | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POSITIVE_XO p -> + (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> impl_7__sub__double_pred_mask p + | Core.Base.Int.POSITIVE_XO q -> + impl_7__sub__succ_double_mask (impl_7__sub__sub_carry p q <: Core.Base.Int.t_HaxInt) + | Core.Base.Int.POSITIVE_XI q -> + impl_7__sub__double_mask (impl_7__sub__sub_carry p q <: Core.Base.Int.t_HaxInt)) + | Core.Base.Int.POSITIVE_XI p -> + match Core.Base.Int.Base_spec.impl_8__match_positive rhs with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_4__to_int (impl_7__sub__pred_double p <: Core.Base.Int.t_Positive + ) + | Core.Base.Int.POSITIVE_XO q -> + impl_7__sub__double_mask (impl_7__sub__sub_binary p q <: Core.Base.Int.t_HaxInt) + | Core.Base.Int.POSITIVE_XI q -> + impl_7__sub__succ_double_mask (impl_7__sub__sub_carry p q <: Core.Base.Int.t_HaxInt) + +let impl_7__sub (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_9__match_pos self with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POS_POS p -> + match Core.Base.Int.Base_spec.impl_9__match_pos rhs with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_4__to_int p + | Core.Base.Int.POS_POS q -> impl_7__sub__sub_binary p q + +let rec impl_5__mul (self rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = + match Core.Base.Int.Base_spec.impl_8__match_positive self with + | Core.Base.Int.POSITIVE_XH -> rhs + | Core.Base.Int.POSITIVE_XO p -> + Core.Base.Int.Base_spec.impl_8__xO (impl_5__mul p rhs <: Core.Base.Int.t_Positive) + | Core.Base.Int.POSITIVE_XI p -> + impl_4__add (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_Positive) + (Core.Base.Int.Base_spec.impl_8__xO (impl_5__mul p rhs <: Core.Base.Int.t_Positive) + <: + Core.Base.Int.t_Positive) + +let impl_11__mul (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + match Core.Base.Int.Base_spec.impl_9__match_pos self with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POS_POS p -> + match Core.Base.Int.Base_spec.impl_9__match_pos rhs with + | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Int.POS_POS q -> + Core.Base.Int.Base_spec.impl_4__to_int (impl_5__mul p q <: Core.Base.Int.t_Positive) + +let rec impl_10__divmod__divmod_binary (a b: Core.Base.Int.t_Positive) + : (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = + match Core.Base.Int.Base_spec.impl_8__match_positive a with + | Core.Base.Int.POSITIVE_XH -> + (match Core.Base.Int.Base_spec.impl_8__match_positive b with + | Core.Base.Int.POSITIVE_XH -> + Core.Base.Int.Base_spec.impl_9__ONE, Core.Base.Int.Base_spec.impl_9__ZERO + <: + (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) + | Core.Base.Int.POSITIVE_XO q + | Core.Base.Int.POSITIVE_XI q -> + Core.Base.Int.Base_spec.impl_9__ZERO, Core.Base.Int.Base_spec.impl_9__ONE + <: + (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt)) + | Core.Base.Int.POSITIVE_XO a___ -> + let q, r:(Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = + impl_10__divmod__divmod_binary a___ + (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve b + <: + Core.Base.Int.t_Positive) + in + let r___:Core.Base.Int.t_HaxInt = impl_8__double r in + if + (Core.Base.Int.Base_spec.impl_4__to_int (Core.Clone.f_clone #Core.Base.Int.t_Positive + #FStar.Tactics.Typeclasses.solve + b + <: + Core.Base.Int.t_Positive) + <: + Core.Base.Int.t_HaxInt) <=. + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve r___ + <: + Core.Base.Int.t_HaxInt) + then + Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double q <: Core.Base.Int.t_Positive), + impl_7__sub r___ (Core.Base.Int.Base_spec.impl_4__to_int b <: Core.Base.Int.t_HaxInt) + <: + (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) + else impl_8__double q, r___ <: (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) + | Core.Base.Int.POSITIVE_XI a___ -> + let q, r:(Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = + impl_10__divmod__divmod_binary a___ + (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve b + <: + Core.Base.Int.t_Positive) + in + let r___:Core.Base.Int.t_HaxInt = + Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double r <: Core.Base.Int.t_Positive) + in + if + (Core.Base.Int.Base_spec.impl_4__to_int (Core.Clone.f_clone #Core.Base.Int.t_Positive + #FStar.Tactics.Typeclasses.solve + b + <: + Core.Base.Int.t_Positive) + <: + Core.Base.Int.t_HaxInt) <=. + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve r___ + <: + Core.Base.Int.t_HaxInt) + then + Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double q <: Core.Base.Int.t_Positive), + impl_7__sub r___ (Core.Base.Int.Base_spec.impl_4__to_int b <: Core.Base.Int.t_HaxInt) + <: + (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) + else impl_8__double q, r___ <: (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) + +let impl_10__divmod (a b: Core.Base.Int.t_HaxInt) + : (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = + match Core.Base.Int.Base_spec.impl_9__match_pos a with + | Core.Base.Int.POS_ZERO -> + Core.Base.Int.Base_spec.impl_9__ZERO, Core.Base.Int.Base_spec.impl_9__ZERO + <: + (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) + | Core.Base.Int.POS_POS p -> + match Core.Base.Int.Base_spec.impl_9__match_pos b with + | Core.Base.Int.POS_ZERO -> + Core.Base.Int.Base_spec.impl_9__ZERO, Core.Base.Int.Base_spec.impl_4__to_int p + <: + (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) + | Core.Base.Int.POS_POS q -> impl_10__divmod__divmod_binary p q + +let impl_10__div (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + let q, r:(Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = impl_10__divmod self rhs in + q + +let impl_10__rem (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = + if rhs = 0 + then self + else self % rhs + // let q, r:(Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = impl_10__divmod self rhs in + // r + +/////////////////////////// + +let rec lt_is_lt_hax (x y : Core.Base.Int.t_HaxInt) : Lemma (requires x < y) (ensures x <. y) [SMTPat (x <. y)] = () +let rec lt_hax_is_lt (x y : Core.Base.Int.t_HaxInt) : Lemma (requires x <. y) (ensures x < y) [SMTPat (x <. y)] = () + +let eq_is_eq_hax (x y : Core.Base.Int.t_HaxInt) : Lemma (requires x = y) (ensures x =. y) [SMTPat (x =. y)] = () +let eq_hax_is_eq (x y : Core.Base.Int.t_HaxInt) : Lemma (requires x =. y) (ensures x = y) [SMTPat (x =. y)] = () diff --git a/proof-libs/fstar/generated-core/Core.Base.Int.Base_spec.fst b/proof-libs/fstar/generated-core/Core.Base.Int.Base_spec.fst new file mode 100644 index 000000000..528736390 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Int.Base_spec.fst @@ -0,0 +1,146 @@ +module Core.Base.Int.Base_spec +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let (~.) = not + +let impl_9__ONE: Core.Base.Int.t_HaxInt = 1 + +let impl_9__ZERO: Core.Base.Int.t_HaxInt = 0 + +let v_BITS_128_: Core.Base.Int.t_HaxInt = 128 + +let v_BITS_16_: Core.Base.Int.t_HaxInt = 16 + +let v_BITS_32_: Core.Base.Int.t_HaxInt = 32 + +let v_BITS_64_: Core.Base.Int.t_HaxInt = 64 + +let v_BITS_8_: Core.Base.Int.t_HaxInt = 8 + +let v_WORDSIZE_128_: Core.Base.Int.t_HaxInt = pow2 128 + +let v_WORDSIZE_128_SUB_1_: Core.Base.Int.t_HaxInt = pow2 128 - 1 + +let v_WORDSIZE_16_: Core.Base.Int.t_HaxInt = pow2 16 + +let v_WORDSIZE_16_SUB_1_: Core.Base.Int.t_HaxInt = pow2 16 - 1 + +let v_WORDSIZE_32_: Core.Base.Int.t_HaxInt = pow2 32 + +let v_WORDSIZE_32_SUB_1_: Core.Base.Int.t_HaxInt = pow2 32 - 1 + +let v_WORDSIZE_64_: Core.Base.Int.t_HaxInt = pow2 64 + +let v_WORDSIZE_64_SUB_1_: Core.Base.Int.t_HaxInt = pow2 64 - 1 + +let v_WORDSIZE_8_: Core.Base.Int.t_HaxInt = pow2 8 + +let v_WORDSIZE_8_SUB_1_: Core.Base.Int.t_HaxInt = pow2 8 - 1 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Clone.t_Clone Core.Base.Int.t_HaxInt = + { + f_clone_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); + f_clone_post = (fun (self: Core.Base.Int.t_HaxInt) (out: Core.Base.Int.t_HaxInt) -> true); + f_clone + = + fun (self: Core.Base.Int.t_HaxInt) -> self + } + +let impl_7__div2 (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = self / 2 + +let impl_9__is_zero (self: Core.Base.Int.t_HaxInt) : bool = self = 0 + +let impl_9__pred (self: Core.Base.Int.t_HaxInt) + : Prims.Pure Core.Base.Int.t_HaxInt + (requires ~.(impl_9__is_zero self <: bool)) + (fun _ -> Prims.l_True) = self - 1 + +let impl_9__succ (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = self + 1 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Clone.t_Clone Core.Base.Int.t_Positive = + { + f_clone_pre = (fun (self: Core.Base.Int.t_Positive) -> true); + f_clone_post = (fun (self: Core.Base.Int.t_Positive) (out: Core.Base.Int.t_Positive) -> true); + f_clone + = + fun (self: Core.Base.Int.t_Positive) -> self + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Clone.t_Clone Core.Base.Int.t_Unary = + { + f_clone_pre = (fun (self: Core.Base.Int.t_Unary) -> true); + f_clone_post = (fun (self: Core.Base.Int.t_Unary) (out: Core.Base.Int.t_Unary) -> true); + f_clone + = + fun (self: Core.Base.Int.t_Unary) -> self + } + +let impl_4__from_int (x: Core.Base.Int.t_HaxInt{x > 0}) : Core.Base.Int.t_Positive = x + +let impl_4__to_int (self: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = self + +let impl_5__from_int (x: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_Unary = x + +let impl_5__to_int (self: Core.Base.Int.t_Unary) : Core.Base.Int.t_HaxInt = self + +let impl_6__match_unary (self: Core.Base.Int.t_Unary) : Core.Base.Int.t_UNARY = + if self = 0 + then Core.Base.Int.UNARY_ZERO + else Core.Base.Int.UNARY_SUCC (self - 1) + +let impl_8__is_xH (self: Core.Base.Int.t_Positive) : bool = self = 1 + +let impl_8__is_xI (self: Core.Base.Int.t_Positive) : bool = self > 1 && self % 2 = 1 + +let impl_8__is_xO (self: Core.Base.Int.t_Positive) : bool = self > 1 && self % 2 = 0 + +let impl_8__match_positive (self: Core.Base.Int.t_Positive) : Core.Base.Int.t_POSITIVE = + if + impl_8__is_xH (Core.Clone.f_clone #Core.Base.Int.t_Positive + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_Positive) + then Core.Base.Int.POSITIVE_XH <: Core.Base.Int.t_POSITIVE + else + if + impl_8__is_xO (Core.Clone.f_clone #Core.Base.Int.t_Positive + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_Positive) + then + Core.Base.Int.POSITIVE_XO + (impl_4__from_int (impl_7__div2 (impl_4__to_int self <: Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt)) + <: + Core.Base.Int.t_POSITIVE + else + Core.Base.Int.POSITIVE_XI + (impl_4__from_int (impl_7__div2 (impl_4__to_int self <: Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt)) + <: + Core.Base.Int.t_POSITIVE + +let impl_8__xH: Core.Base.Int.t_Positive = 1 + +let impl_8__xI (self: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = self * 2 + 1 + +let impl_8__xO (self: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = self * 2 + +let impl_9__match_pos (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_POS = + if + impl_9__is_zero (Core.Clone.f_clone #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + then Core.Base.Int.POS_ZERO <: Core.Base.Int.t_POS + else Core.Base.Int.POS_POS (impl_4__from_int self) <: Core.Base.Int.t_POS diff --git a/proof-libs/fstar/generated-core/Core.Base.Int.Number_conversion.fst b/proof-libs/fstar/generated-core/Core.Base.Int.Number_conversion.fst new file mode 100644 index 000000000..94ae93bf5 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Int.Number_conversion.fst @@ -0,0 +1,340 @@ +module Core.Base.Int.Number_conversion +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +open Core.Primitive +open Core.Cmp +open Core.Ops.Arith + +let rec impl__from_u128_binary (x: u128 {match x with | C_u128 v -> v.f_v > 0}) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_u128 n -> n.f_v <: nat)) = match x with | C_u128 x -> x.f_v + // if Core.Cmp.f_eq x (pub_u128 1) + // then Core.Base.Int.Base_spec.impl_8__xH + // else + // if Core.Cmp.f_eq (f_rem x (pub_u128 2) <: u128) (pub_u128 0) + // then + // let _ = assume ((match (f_div x (pub_u128 2) <: u128) with | C_u128 n -> n.f_v) < (match x with | C_u128 n -> n.f_v)) in + // Core.Base.Int.Base_spec.impl_8__xO (impl__from_u128_binary (Core.Ops.Arith.f_div x + // (pub_u128 2) + // <: + // u128) + // <: + // Core.Base.Int.t_Positive) + // else + // Core.Base.Int.Base_spec.impl_8__xI (impl__from_u128_binary (Core.Ops.Arith.f_div x + // (pub_u128 2) + // <: + // u128) + // <: + // Core.Base.Int.t_Positive) + +// let rec impl__from_u16_binary (x: u16) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_u16 n -> n.f_v <: nat)) = +// if Core.Cmp.f_eq x (pub_u16 1) +// then Core.Base.Int.Base_spec.impl_8__xH +// else +// if Core.Cmp.f_eq (Core.Ops.Arith.f_rem x (pub_u16 2) <: u16) (pub_u16 0) +// then +// let _ = assume ((match (f_div x (pub_u16 2) <: u16) with | C_u16 n -> n.f_v) < (match x with | C_u16 n -> n.f_v)) in +// Core.Base.Int.Base_spec.impl_8__xO (impl__from_u16_binary (Core.Ops.Arith.f_div x (pub_u16 2) +// <: +// u16) +// <: +// Core.Base.Int.t_Positive) +// else +// Core.Base.Int.Base_spec.impl_8__xI (impl__from_u16_binary (Core.Ops.Arith.f_div x (pub_u16 2) +// <: +// u16) +// <: +// Core.Base.Int.t_Positive) + +// let rec impl__from_u32_binary (x: u32) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_u32 n -> n.f_v <: nat)) = +// if Core.Cmp.f_eq x (pub_u32 1) +// then Core.Base.Int.Base_spec.impl_8__xH +// else +// if Core.Cmp.f_eq (Core.Ops.Arith.f_rem x (pub_u32 2) <: u32) (pub_u32 0) +// then +// let _ = assume ((match (f_div x (pub_u32 2) <: u32) with | C_u32 n -> n.f_v) < (match x with | C_u32 n -> n.f_v)) in +// Core.Base.Int.Base_spec.impl_8__xO (impl__from_u32_binary (Core.Ops.Arith.f_div x (pub_u32 2) +// <: +// u32) +// <: +// Core.Base.Int.t_Positive) +// else +// Core.Base.Int.Base_spec.impl_8__xI (impl__from_u32_binary (Core.Ops.Arith.f_div x (pub_u32 2) +// <: +// u32) +// <: +// Core.Base.Int.t_Positive) + +// let rec impl__from_u64_binary (x: u64) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_u64 n -> n.f_v <: nat)) = +// if Core.Cmp.f_eq x (pub_u64 1) +// then Core.Base.Int.Base_spec.impl_8__xH +// else +// if Core.Cmp.f_eq (Core.Ops.Arith.f_rem x (pub_u64 2) <: u64) (pub_u64 0) +// then +// let _ = assume ((match (f_div x (pub_u64 2) <: u64) with | C_u64 n -> n.f_v) < (match x with | C_u64 n -> n.f_v)) in +// Core.Base.Int.Base_spec.impl_8__xO (impl__from_u64_binary (Core.Ops.Arith.f_div x (pub_u64 2) +// <: +// u64) +// <: +// Core.Base.Int.t_Positive) +// else +// Core.Base.Int.Base_spec.impl_8__xI (impl__from_u64_binary (Core.Ops.Arith.f_div x (pub_u64 2) +// <: +// u64) +// <: +// Core.Base.Int.t_Positive) + + +// let rec impl__from_u8_binary (x: u8) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_u8 n -> n.f_v <: nat)) = +// if Core.Cmp.f_eq x (pub_u8 1) +// then Core.Base.Int.Base_spec.impl_8__xH +// else +// if Core.Cmp.f_eq (Core.Ops.Arith.f_rem x (pub_u8 2) <: u8) (pub_u8 0) +// then +// let _ = assume ((match (f_div x (pub_u8 2) <: u8) with | C_u8 n -> n.f_v) < (match x with | C_u8 n -> n.f_v)) in +// Core.Base.Int.Base_spec.impl_8__xO (impl__from_u8_binary (Core.Ops.Arith.f_div x (pub_u8 2) +// <: +// u8) +// <: +// Core.Base.Int.t_Positive) +// else +// Core.Base.Int.Base_spec.impl_8__xI (impl__from_u8_binary (Core.Ops.Arith.f_div x (pub_u8 2) +// <: +// u8) +// <: +// Core.Base.Int.t_Positive) + +let rec impl__from_usize_binary (x: usize {match x with | C_usize v -> v.f_v > 0}) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_usize n -> n.f_v <: nat)) = match x with | C_usize v -> v.f_v + // if Core.Cmp.f_eq x (sz 1) + // then Core.Base.Int.Base_spec.impl_8__xH + // else + // if Core.Cmp.f_eq (Core.Ops.Arith.f_rem x (sz 2) <: usize) (sz 0) + // then + // let _ = assume ((match (f_div x (sz 2) <: usize) with | C_usize n -> n.f_v) < (match x with | C_usize n -> n.f_v)) in + // Core.Base.Int.Base_spec.impl_8__xO (impl__from_usize_binary (Core.Ops.Arith.f_div x (sz 2) + // <: + // usize) + // <: + // Core.Base.Int.t_Positive) + // else + // Core.Base.Int.Base_spec.impl_8__xI (impl__from_usize_binary (Core.Ops.Arith.f_div x (sz 2) + // <: + // usize) + // <: + // Core.Base.Int.t_Positive) + +let rec impl__to_u128_binary (self: Core.Base.Int.t_Positive) : u128 = + match Core.Base.Int.Base_spec.impl_8__match_positive self with + | Core.Base.Int.POSITIVE_XH -> pub_u128 1 + | Core.Base.Int.POSITIVE_XO p -> + Core.Ops.Arith.f_mul (impl__to_u128_binary p <: u128) (pub_u128 2) + | Core.Base.Int.POSITIVE_XI p -> + Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_u128_binary p <: u128) (pub_u128 2) + <: + u128) + (pub_u128 1) + +let rec impl__to_u16_binary (self: Core.Base.Int.t_Positive) : u16 = + match Core.Base.Int.Base_spec.impl_8__match_positive self with + | Core.Base.Int.POSITIVE_XH -> pub_u16 1 + | Core.Base.Int.POSITIVE_XO p -> Core.Ops.Arith.f_mul (impl__to_u16_binary p <: u16) (pub_u16 2) + | Core.Base.Int.POSITIVE_XI p -> + Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_u16_binary p <: u16) (pub_u16 2) <: u16) (pub_u16 1) + +let rec impl__to_u32_binary (self: Core.Base.Int.t_Positive) : u32 = + match Core.Base.Int.Base_spec.impl_8__match_positive self with + | Core.Base.Int.POSITIVE_XH -> pub_u32 1 + | Core.Base.Int.POSITIVE_XO p -> Core.Ops.Arith.f_mul (impl__to_u32_binary p <: u32) (pub_u32 2) + | Core.Base.Int.POSITIVE_XI p -> + Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_u32_binary p <: u32) (pub_u32 2) <: u32) (pub_u32 1) + +let rec impl__to_u64_binary (self: Core.Base.Int.t_Positive) : u64 = + match Core.Base.Int.Base_spec.impl_8__match_positive self with + | Core.Base.Int.POSITIVE_XH -> pub_u64 1 + | Core.Base.Int.POSITIVE_XO p -> Core.Ops.Arith.f_mul (impl__to_u64_binary p <: u64) (pub_u64 2) + | Core.Base.Int.POSITIVE_XI p -> + Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_u64_binary p <: u64) (pub_u64 2) <: u64) (pub_u64 1) + +let rec impl__to_u8_binary (self: Core.Base.Int.t_Positive) : u8 = + match Core.Base.Int.Base_spec.impl_8__match_positive self with + | Core.Base.Int.POSITIVE_XH -> pub_u8 1 + | Core.Base.Int.POSITIVE_XO p -> Core.Ops.Arith.f_mul (impl__to_u8_binary p <: u8) (pub_u8 2) + | Core.Base.Int.POSITIVE_XI p -> + Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_u8_binary p <: u8) (pub_u8 2) <: u8) (pub_u8 1) + +let rec impl__to_usize_binary (self: Core.Base.Int.t_Positive) : usize = + match Core.Base.Int.Base_spec.impl_8__match_positive self with + | Core.Base.Int.POSITIVE_XH -> sz 1 + | Core.Base.Int.POSITIVE_XO p -> + Core.Ops.Arith.f_mul (impl__to_usize_binary p <: usize) (sz 2) + | Core.Base.Int.POSITIVE_XI p -> + Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_usize_binary p <: usize) (sz 2) + <: + usize) + (sz 1) + +// [@@ FStar.Tactics.Typeclasses.tcinstance] +// let impl_1: Core.Convert.t_From Core.Base.Int.t_HaxInt u8 = +// { +// f_from_pre = (fun (x: u8) -> true); +// f_from_post = (fun (x: u8) (out: Core.Base.Int.t_HaxInt) -> true); +// f_from +// = +// fun (x: u8) -> +// if Core.Cmp.f_eq x (pub_u8 0) +// then Core.Base.Int.Base_spec.impl_9__ZERO +// else +// Core.Base.Int.Base_spec.impl_4__to_int (impl__from_u8_binary x <: Core.Base.Int.t_Positive) +// } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Convert.t_From u8 Core.Base.Int.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: u8) -> true); + f_from + = + fun (x: Core.Base.Int.t_HaxInt) -> + match Core.Base.Int.Base_spec.impl_9__match_pos x with + | Core.Base.Int.POS_ZERO -> pub_u8 0 + | Core.Base.Int.POS_POS p -> impl__to_u8_binary p + } + +// [@@ FStar.Tactics.Typeclasses.tcinstance] +// let impl_3: Core.Convert.t_From Core.Base.Int.t_HaxInt u16 = +// { +// f_from_pre = (fun (x: u16) -> true); +// f_from_post = (fun (x: u16) (out: Core.Base.Int.t_HaxInt) -> true); +// f_from +// = +// fun (x: u16) -> +// if Core.Cmp.f_eq x (pub_u16 0) +// then Core.Base.Int.Base_spec.impl_9__ZERO +// else +// Core.Base.Int.Base_spec.impl_4__to_int (impl__from_u16_binary x <: Core.Base.Int.t_Positive) +// } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Convert.t_From u16 Core.Base.Int.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: u16) -> true); + f_from + = + fun (x: Core.Base.Int.t_HaxInt) -> + match Core.Base.Int.Base_spec.impl_9__match_pos x with + | Core.Base.Int.POS_ZERO -> pub_u16 0 + | Core.Base.Int.POS_POS p -> impl__to_u16_binary p + } + +// [@@ FStar.Tactics.Typeclasses.tcinstance] +// let impl_5: Core.Convert.t_From Core.Base.Int.t_HaxInt u32 = +// { +// f_from_pre = (fun (x: u32) -> true); +// f_from_post = (fun (x: u32) (out: Core.Base.Int.t_HaxInt) -> true); +// f_from +// = +// fun (x: u32) -> +// if Core.Cmp.f_eq x (pub_u32 0) +// then Core.Base.Int.Base_spec.impl_9__ZERO +// else +// Core.Base.Int.Base_spec.impl_4__to_int (impl__from_u32_binary x <: Core.Base.Int.t_Positive) +// } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Convert.t_From u32 Core.Base.Int.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: u32) -> true); + f_from + = + fun (x: Core.Base.Int.t_HaxInt) -> + match Core.Base.Int.Base_spec.impl_9__match_pos x with + | Core.Base.Int.POS_ZERO -> pub_u32 0 + | Core.Base.Int.POS_POS p -> impl__to_u32_binary p + } + +// [@@ FStar.Tactics.Typeclasses.tcinstance] +// let impl_7: Core.Convert.t_From Core.Base.Int.t_HaxInt u64 = +// { +// f_from_pre = (fun (x: u64) -> true); +// f_from_post = (fun (x: u64) (out: Core.Base.Int.t_HaxInt) -> true); +// f_from +// = +// fun (x: u64) -> +// if Core.Cmp.f_eq x (pub_u64 0) +// then Core.Base.Int.Base_spec.impl_9__ZERO +// else +// Core.Base.Int.Base_spec.impl_4__to_int (impl__from_u64_binary x <: Core.Base.Int.t_Positive) +// } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Convert.t_From u64 Core.Base.Int.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: u64) -> true); + f_from + = + fun (x: Core.Base.Int.t_HaxInt) -> + match Core.Base.Int.Base_spec.impl_9__match_pos x with + | Core.Base.Int.POS_ZERO -> pub_u64 0 + | Core.Base.Int.POS_POS p -> impl__to_u64_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Convert.t_From Core.Base.Int.t_HaxInt u128 = + { + f_from_pre = (fun (x: u128) -> true); + f_from_post = (fun (x: u128) (out: Core.Base.Int.t_HaxInt) -> true); + f_from + = + fun (x: u128) -> + if Core.Cmp.f_eq x (pub_u128 0) + then Core.Base.Int.Base_spec.impl_9__ZERO + else + Core.Base.Int.Base_spec.impl_4__to_int (impl__from_u128_binary x <: Core.Base.Int.t_Positive + ) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Convert.t_From u128 Core.Base.Int.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: u128) -> true); + f_from + = + fun (x: Core.Base.Int.t_HaxInt) -> + match Core.Base.Int.Base_spec.impl_9__match_pos x with + | Core.Base.Int.POS_ZERO -> pub_u128 0 + | Core.Base.Int.POS_POS p -> impl__to_u128_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Convert.t_From Core.Base.Int.t_HaxInt usize = + { + f_from_pre = (fun (x: usize) -> true); + f_from_post = (fun (x: usize) (out: Core.Base.Int.t_HaxInt) -> true); + f_from + = + fun (x: usize) -> + if Core.Cmp.f_eq x (sz 0) + then Core.Base.Int.Base_spec.impl_9__ZERO + else + Core.Base.Int.Base_spec.impl_4__to_int (impl__from_usize_binary x + <: + Core.Base.Int.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Convert.t_From usize Core.Base.Int.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: usize) -> true); + f_from + = + fun (x: Core.Base.Int.t_HaxInt) -> + match Core.Base.Int.Base_spec.impl_9__match_pos x with + | Core.Base.Int.POS_ZERO -> sz 0 + | Core.Base.Int.POS_POS p -> impl__to_usize_binary p + } diff --git a/proof-libs/fstar/generated-core/Core.Base.Int.fst b/proof-libs/fstar/generated-core/Core.Base.Int.fst new file mode 100644 index 000000000..aff1e7003 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Int.fst @@ -0,0 +1,23 @@ +module Core.Base.Int +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_HaxInt = Prims.nat + +type t_Positive = Prims.pos + +type t_POS = + | POS_ZERO : t_POS + | POS_POS : t_Positive -> t_POS + +type t_POSITIVE = + | POSITIVE_XH : t_POSITIVE + | POSITIVE_XO : t_Positive -> t_POSITIVE + | POSITIVE_XI : t_Positive -> t_POSITIVE + +type t_Unary = nat + +type t_UNARY = + | UNARY_ZERO : t_UNARY + | UNARY_SUCC : t_Unary -> t_UNARY diff --git a/proof-libs/fstar/generated-core/Core.Base.Seq.Base_impl.fst b/proof-libs/fstar/generated-core/Core.Base.Seq.Base_impl.fst new file mode 100644 index 000000000..3a075841f --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Seq.Base_impl.fst @@ -0,0 +1,221 @@ +module Core.Base.Seq.Base_impl +#set-options "--fuel 1 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let (~.) = not + +open Core.Cmp +open Core.Clone +open Core.Base.Int.Base_impl + +let impl_2__is_empty + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (self: Core.Base.Seq.t_Seq v_T) + : bool = + match Core.Base.Seq.Base_spec.impl_1__match_list #v_T self with + | Core.Base.Seq.LIST_NIL -> true + | Core.Base.Seq.LIST_CONS _ _ -> false + +let impl_2__tl + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: Core.Base.Seq.t_Seq v_T) + : Prims.Pure (Core.Base.Seq.t_Seq v_T) + (requires ~.(impl_2__is_empty #v_T self <: bool)) + (fun _ -> Prims.l_True) = + match Core.Base.Seq.Base_spec.impl_1__match_list #v_T self with + | Core.Base.Seq.LIST_NIL -> Core.Base.Seq.Base_spec.impl_1__NIL + | Core.Base.Seq.LIST_CONS _ tl -> tl + +let impl_2__hd__panic_cold_explicit (_: Prims.unit {False}) : Core.Panicking.t_Never = + Core.Panicking.panic_explicit () + +let impl_2__hd + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: Core.Base.Seq.t_Seq v_T) + : Prims.Pure v_T (requires ~.(impl_2__is_empty #v_T self <: bool)) (fun _ -> Prims.l_True) = + match Core.Base.Seq.Base_spec.impl_1__match_list #v_T self with + | Core.Base.Seq.LIST_NIL -> + Core.Panicking.never_to_any (impl_2__hd__panic_cold_explicit () + <: + Core.Panicking.t_Never) + | Core.Base.Seq.LIST_CONS hd _ -> hd + +let impl_2__set_index__set_index_unary__panic_cold_explicit (_: Prims.unit {False}) + : Core.Panicking.t_Never = Core.Panicking.panic_explicit () + +let rec impl__eq_inner + (#v_T: eqtype // Type0 + ) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: t_PartialEq v_T v_T) + (self other: Core.Base.Seq.t_Seq v_T) + : bool = + match + Core.Base.Seq.Base_spec.impl_1__match_list #v_T + (Core.Base.Seq.Base_spec.impl__clone #v_T self <: Core.Base.Seq.t_Seq v_T) + with + | Core.Base.Seq.LIST_NIL -> + impl_2__is_empty #v_T + (Core.Base.Seq.Base_spec.impl__clone #v_T other <: Core.Base.Seq.t_Seq v_T) + | Core.Base.Seq.LIST_CONS x xs -> + match + Core.Base.Seq.Base_spec.impl_1__match_list #v_T + (Core.Base.Seq.Base_spec.impl__clone #v_T other <: Core.Base.Seq.t_Seq v_T) + with + | Core.Base.Seq.LIST_NIL -> false + | Core.Base.Seq.LIST_CONS y ys -> + // let _ = (f_eq_pre x y) in + // true + x = y && impl__eq_inner #v_T #i1 #i2 xs ys + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1 + (#v_T: eqtype) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Cmp.t_PartialEq v_T v_T) + : Core.Cmp.t_PartialEq (Core.Base.Seq.t_Seq v_T) (Core.Base.Seq.t_Seq v_T) = + { + f_eq_pre = (fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) -> true); + f_eq_post + = + (fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) (out: bool) -> true); + f_eq + = + (fun x y -> x = y) + // (fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) -> + // impl__eq_inner #v_T self other) + ; + f_ne_pre = (fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) -> true); + f_ne_post + = + (fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) (out: bool) -> true); + f_ne + = + fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) -> + ~.(self = other + // impl__eq_inner #v_T self other + <: bool) + } + +let rec impl_2__len + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: Core.Base.Seq.t_Seq v_T) + : Core.Base.Int.t_HaxInt = + match Core.Base.Seq.Base_spec.impl_1__match_list #v_T self with + | Core.Base.Seq.LIST_NIL -> Core.Base.Int.Base_spec.impl_9__ZERO + | Core.Base.Seq.LIST_CONS _ tl -> + Core.Base.Int.Base_spec.impl_9__succ (impl_2__len #v_T tl <: Core.Base.Int.t_HaxInt) + +let rec impl_2__rev_accum + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self accum: Core.Base.Seq.t_Seq v_T) + : Core.Base.Seq.t_Seq v_T = + match Core.Base.Seq.Base_spec.impl_1__match_list #v_T self with + | Core.Base.Seq.LIST_NIL -> accum + | Core.Base.Seq.LIST_CONS hd tl -> + impl_2__rev_accum #v_T + tl + (Core.Base.Seq.Base_spec.impl_1__cons #v_T accum hd <: Core.Base.Seq.t_Seq v_T) + +let impl_2__rev + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: Core.Base.Seq.t_Seq v_T) + : Core.Base.Seq.t_Seq v_T = impl_2__rev_accum #v_T self Core.Base.Seq.Base_spec.impl_1__NIL + +let rec impl_2__get_index__get_index_unary + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (l: Core.Base.Seq.t_Seq v_T) + (i: Core.Base.Int.t_Unary) + : Prims.Pure v_T + (requires i <. (impl_2__len #v_T l <: Core.Base.Int.t_HaxInt)) + (fun _ -> Prims.l_True) = + match Core.Base.Int.Base_spec.impl_6__match_unary i with + | Core.Base.Int.UNARY_ZERO -> + impl_2__hd #v_T l + | Core.Base.Int.UNARY_SUCC n -> + impl_2__get_index__get_index_unary #v_T (impl_2__tl #v_T l <: Core.Base.Seq.t_Seq v_T) n + +let impl_2__get_index + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: Core.Base.Seq.t_Seq v_T) + (i: Core.Base.Int.t_HaxInt) + : Prims.Pure v_T + (requires i <. (impl_2__len #v_T self <: Core.Base.Int.t_HaxInt)) + (fun _ -> Prims.l_True) = + impl_2__get_index__get_index_unary #v_T + self + (Core.Base.Int.Base_spec.impl_5__from_int i <: Core.Base.Int.t_Unary) + +let rec impl_2__repeat__repeat_unary + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (n: Core.Base.Int.t_Unary) + (v: v_T) + : Core.Base.Seq.t_Seq v_T = + match Core.Base.Int.Base_spec.impl_6__match_unary n with + | Core.Base.Int.UNARY_ZERO -> Core.Base.Seq.Base_spec.impl_1__NIL + | Core.Base.Int.UNARY_SUCC m -> + Core.Base.Seq.Base_spec.impl_1__cons #v_T + (impl_2__repeat__repeat_unary #v_T + m + (// let _ = assume (f_clone_pre v) in + // Core.Clone.f_clone #v_T #FStar.Tactics.Typeclasses.solve + v <: v_T) + <: + Core.Base.Seq.t_Seq v_T) + v + +let impl_2__repeat + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (n: Core.Base.Int.t_HaxInt) + (v: v_T) + : Core.Base.Seq.t_Seq v_T = + impl_2__repeat__repeat_unary #v_T + (Core.Base.Int.Base_spec.impl_5__from_int n <: Core.Base.Int.t_Unary) + v + +let rec impl_2__set_index__set_index_unary + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (x: Core.Base.Seq.t_Seq v_T) + (i: Core.Base.Int.t_Unary) + (v: v_T) + : Prims.Pure (Core.Base.Seq.t_Seq v_T) + (requires i <. (impl_2__len #v_T x <: Core.Base.Int.t_HaxInt)) + (fun _ -> Prims.l_True) = + match Core.Base.Seq.Base_spec.impl_1__match_list #v_T x with + | Core.Base.Seq.LIST_NIL -> + Core.Panicking.never_to_any (impl_2__set_index__set_index_unary__panic_cold_explicit () + <: + Core.Panicking.t_Never) + | Core.Base.Seq.LIST_CONS hd tl -> + match Core.Base.Int.Base_spec.impl_6__match_unary i with + | Core.Base.Int.UNARY_ZERO -> Core.Base.Seq.Base_spec.impl_1__cons #v_T tl v + | Core.Base.Int.UNARY_SUCC n -> + Core.Base.Seq.Base_spec.impl_1__cons #v_T + (impl_2__set_index__set_index_unary #v_T tl n v <: Core.Base.Seq.t_Seq v_T) + hd + +let impl_2__set_index + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: Core.Base.Seq.t_Seq v_T) + (i: Core.Base.Int.t_HaxInt) + (v: v_T) + : Prims.Pure (Core.Base.Seq.t_Seq v_T) + (requires i <. (impl_2__len #v_T self <: Core.Base.Int.t_HaxInt)) + (fun _ -> Prims.l_True) = + impl_2__set_index__set_index_unary #v_T + self + (Core.Base.Int.Base_spec.impl_5__from_int i <: Core.Base.Int.t_Unary) + v diff --git a/proof-libs/fstar/generated-core/Core.Base.Seq.Base_spec.fst b/proof-libs/fstar/generated-core/Core.Base.Seq.Base_spec.fst new file mode 100644 index 000000000..9372facaf --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Seq.Base_spec.fst @@ -0,0 +1,29 @@ +module Core.Base.Seq.Base_spec +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let impl__clone + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (self: Core.Base.Seq.t_Seq v_T) + : Core.Base.Seq.t_Seq v_T = self + +let impl_1__NIL (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + : Core.Base.Seq.t_Seq v_T = [] + +let impl_1__cons + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: Core.Base.Seq.t_Seq v_T) + (t: v_T) + : Core.Base.Seq.t_Seq v_T = t :: self + +let impl_1__match_list + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (self: Core.Base.Seq.t_Seq v_T) + : Core.Base.Seq.t_LIST v_T = + match self with + | [] -> Core.Base.Seq.LIST_NIL + | (x :: xs) -> Core.Base.Seq.LIST_CONS x xs diff --git a/proof-libs/fstar/generated-core/Core.Base.Seq.fst b/proof-libs/fstar/generated-core/Core.Base.Seq.fst new file mode 100644 index 000000000..cb2ea67e7 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Seq.fst @@ -0,0 +1,10 @@ +module Core.Base.Seq +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Seq (v_T: Type0) = list v_T + +type t_LIST (v_T: Type0) = + | LIST_NIL : t_LIST v_T + | LIST_CONS : v_T -> t_Seq v_T -> t_LIST v_T diff --git a/proof-libs/fstar/generated-core/Core.Clone.fst b/proof-libs/fstar/generated-core/Core.Clone.fst new file mode 100644 index 000000000..712181f8c --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Clone.fst @@ -0,0 +1,10 @@ +module Core.Clone +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_Clone (v_Self: Type0) = { + f_clone_pre:v_Self -> Type0; + f_clone_post:v_Self -> v_Self -> Type0; + f_clone:x0: v_Self -> Prims.Pure v_Self (f_clone_pre x0) (fun result -> f_clone_post x0 result) +} diff --git a/proof-libs/fstar/generated-core/Core.Cmp.fst b/proof-libs/fstar/generated-core/Core.Cmp.fst new file mode 100644 index 000000000..6a786afc7 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Cmp.fst @@ -0,0 +1,165 @@ +module Core.Cmp +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +////////////////////////////////////////////////////////// + +let ( ~. ) = not + +////////////////////////////////////////////////////////// + +let discriminant_Ordering_Equal = 0y + +let discriminant_Ordering_Greater = 1y + +type t_Ordering = + | Ordering_Less : t_Ordering + | Ordering_Equal : t_Ordering + | Ordering_Greater : t_Ordering + +let impl__Ordering__is_eq (self: t_Ordering) : bool = + match self with + | Ordering_Equal -> true + | _ -> false + +let impl__Ordering__is_gt (self: t_Ordering) : bool = + match self with + | Ordering_Greater -> true + | _ -> false + +let impl__Ordering__is_lt (self: t_Ordering) : bool = + match self with + | Ordering_Less -> true + | _ -> false + +let impl__Ordering__reverse (self: t_Ordering) : t_Ordering = + match self with + | Ordering_Less -> Ordering_Greater <: t_Ordering + | Ordering_Equal -> Ordering_Equal <: t_Ordering + | Ordering_Greater -> Ordering_Less <: t_Ordering + +let discriminant_Ordering_Less = (-1y) + +let t_Ordering_cast_to_repr (x: t_Ordering) = + match x with + | Ordering_Less -> discriminant_Ordering_Less + | Ordering_Equal -> discriminant_Ordering_Equal + | Ordering_Greater -> discriminant_Ordering_Greater + +class t_PartialEq (v_Self: Type0) (v_Rhs: Type0) = { + f_eq_pre:v_Self -> v_Rhs -> Type0; + f_eq_post:v_Self -> v_Rhs -> bool -> Type0; + f_eq:x0: v_Self -> x1: v_Rhs + -> Prims.Pure bool (f_eq_pre x0 x1) (fun result -> f_eq_post x0 x1 result); + f_ne_pre:v_Self -> v_Rhs -> Type0; + f_ne_post:v_Self -> v_Rhs -> bool -> Type0; + f_ne:x0: v_Self -> x1: v_Rhs + -> Prims.Pure bool (f_ne_pre x0 x1) (fun result -> f_ne_post x0 x1 result) +} + +let impl__Ordering__is_ge (self: t_Ordering) : bool = + ~.(match self with + | Ordering_Less -> true + | _ -> false) + +let impl__Ordering__is_le (self: t_Ordering) : bool = + ~.(match self with + | Ordering_Greater -> true + | _ -> false) + +let impl__Ordering__is_ne (self: t_Ordering) : bool = + ~.(match self with + | Ordering_Equal -> true + | _ -> false) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: t_PartialEq t_Ordering t_Ordering = + { + f_eq_pre = (fun (self: t_Ordering) (other: t_Ordering) -> true); + f_eq_post = (fun (self: t_Ordering) (other: t_Ordering) (out: bool) -> true); + f_eq + = + (fun (self: t_Ordering) (other: t_Ordering) -> + match self with + | Ordering_Less -> + (match other with + | Ordering_Less -> true + | _ -> false) + | v_Eq -> + (match other with + | v_Eq -> true + | _ -> false) + | Ordering_Greater -> + match other with + | Ordering_Greater -> true + | _ -> false); + f_ne_pre = (fun (self: t_Ordering) (other: t_Ordering) -> true); + f_ne_post = (fun (self: t_Ordering) (other: t_Ordering) (out: bool) -> true); + f_ne + = + fun (self: t_Ordering) (other: t_Ordering) -> + ~.(match self with + | Ordering_Less -> + (match other with + | Ordering_Less -> true + | _ -> false) + | v_Eq -> + (match other with + | v_Eq -> true + | _ -> false) + | Ordering_Greater -> + match other with + | Ordering_Greater -> true + | _ -> false) + } + +class t_PartialOrd (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_9014672428308350468:t_PartialEq v_Self v_Rhs; + f_partial_cmp_pre:v_Self -> v_Rhs -> Type0; + f_partial_cmp_post:v_Self -> v_Rhs -> Core.Option.t_Option t_Ordering -> Type0; + f_partial_cmp:x0: v_Self -> x1: v_Rhs + -> Prims.Pure (Core.Option.t_Option t_Ordering) + (f_partial_cmp_pre x0 x1) + (fun result -> f_partial_cmp_post x0 x1 result); + f_lt_pre:v_Self -> v_Rhs -> Type0; + f_lt_post:v_Self -> v_Rhs -> bool -> Type0; + f_lt:x0: v_Self -> x1: v_Rhs + -> Prims.Pure bool (f_lt_pre x0 x1) (fun result -> f_lt_post x0 x1 result); + f_le_pre:v_Self -> v_Rhs -> Type0; + f_le_post:v_Self -> v_Rhs -> bool -> Type0; + f_le:x0: v_Self -> x1: v_Rhs + -> Prims.Pure bool (f_le_pre x0 x1) (fun result -> f_le_post x0 x1 result); + f_gt_pre:v_Self -> v_Rhs -> Type0; + f_gt_post:v_Self -> v_Rhs -> bool -> Type0; + f_gt:x0: v_Self -> x1: v_Rhs + -> Prims.Pure bool (f_gt_pre x0 x1) (fun result -> f_gt_post x0 x1 result); + f_ge_pre:v_Self -> v_Rhs -> Type0; + f_ge_post:v_Self -> v_Rhs -> bool -> Type0; + f_ge:x0: v_Self -> x1: v_Rhs + -> Prims.Pure bool (f_ge_pre x0 x1) (fun result -> f_ge_post x0 x1 result) +} + +////////////////////////////////////////////////////////// + +// TODO: Generate file, currently manually written file + +unfold +let (<>.) #a #b {| t_PartialEq a b |} = f_ne #a #b + +unfold +let (=.) #a #b {| t_PartialEq a b |} = f_eq #a #b + +unfold +let ( <. ) #a #b {| t_PartialOrd a b |} = f_lt #a #b + +unfold +let ( <=. ) #a #b {| t_PartialOrd a b |} = f_le #a #b + +unfold +let ( >. ) #a #b {| t_PartialOrd a b |} = f_gt #a #b + +unfold +let ( >=. ) #a #b {| t_PartialOrd a b |} = f_ge #a #b + +////////////////////////////////////////////////////////// diff --git a/proof-libs/fstar/generated-core/Core.Coerce.fst b/proof-libs/fstar/generated-core/Core.Coerce.fst new file mode 100644 index 000000000..c6a11ea30 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Coerce.fst @@ -0,0 +1,19 @@ +module Core.Coerce +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_Concretization (v_Self: Type0) (v_T: Type0) = { + f_concretize_pre:v_Self -> Type0; + f_concretize_post:v_Self -> v_T -> Type0; + f_concretize:x0: v_Self + -> Prims.Pure v_T (f_concretize_pre x0) (fun result -> f_concretize_post x0 result) +} + +class t_Abstraction (v_Self: Type0) = { + f_AbstractType:Type0; + f_lift_pre:v_Self -> Type0; + f_lift_post:v_Self -> f_AbstractType -> Type0; + f_lift:x0: v_Self + -> Prims.Pure f_AbstractType (f_lift_pre x0) (fun result -> f_lift_post x0 result) +} diff --git a/proof-libs/fstar/generated-core/Core.Convert.fst b/proof-libs/fstar/generated-core/Core.Convert.fst new file mode 100644 index 000000000..d899b2903 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Convert.fst @@ -0,0 +1,33 @@ +module Core.Convert +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_From (v_Self: Type0) (v_T: Type0) = { + f_from_pre:v_T -> Type0; + f_from_post:v_T -> v_Self -> Type0; + f_from:x0: v_T -> Prims.Pure v_Self (f_from_pre x0) (fun result -> f_from_post x0 result) +} + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1 (#v_T: Type0) : t_From v_T v_T = + { + f_from_pre = (fun (t: v_T) -> true); + f_from_post = (fun (t: v_T) (out: v_T) -> true); + f_from = fun (t: v_T) -> t + } + +class t_Into (v_Self: Type0) (v_T: Type0) = { + f_into_pre:v_Self -> Type0; + f_into_post:v_Self -> v_T -> Type0; + f_into:x0: v_Self -> Prims.Pure v_T (f_into_pre x0) (fun result -> f_into_post x0 result) +} + +// [@@ FStar.Tactics.Typeclasses.tcinstance] +// let impl (#v_T #v_U: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: t_From v_U v_T) +// : t_Into v_T v_U = +// { +// f_into_pre = (fun (self: v_T) -> true); +// f_into_post = (fun (self: v_T) (out: v_U) -> true); +// f_into = fun (self: v_T) -> f_from #v_U #v_T #FStar.Tactics.Typeclasses.solve self +// } diff --git a/proof-libs/fstar/generated-core/Core.Int.fst b/proof-libs/fstar/generated-core/Core.Int.fst new file mode 100644 index 000000000..413498eaa --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Int.fst @@ -0,0 +1,3568 @@ +module Core.Int +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +open Core.Ops.Arith +open Core.Ops.Bit +open Core.Cmp + +class t_Constants (v_Self: Type0) = { + f_ZERO:v_Self; + f_ONE:v_Self; + f_MIN:v_Self; + f_MAX:v_Self +} + +let impl_21__WORDSIZE: Core.Base.Int.t_HaxInt = Core.Base.Int.Base_spec.v_WORDSIZE_8_ + +let impl_48__WORDSIZE: Core.Base.Int.t_HaxInt = Core.Base.Int.Base_spec.v_WORDSIZE_16_ + +let impl_75__WORDSIZE: Core.Base.Int.t_HaxInt = Core.Base.Int.Base_spec.v_WORDSIZE_32_ + +let impl_102__WORDSIZE: Core.Base.Int.t_HaxInt = Core.Base.Int.Base_spec.v_WORDSIZE_64_ + +let impl_129__WORDSIZE: Core.Base.Int.t_HaxInt = Core.Base.Int.Base_spec.v_WORDSIZE_128_ + +type t_HaxInt_U128 = x:Core.Base.Int.t_HaxInt{x < pow2 128} +type t_U128 = { f_v:t_HaxInt_U128 } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_128: t_Constants t_U128 = + { + f_ZERO = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U128; + f_ONE = { f_v = Core.Base.Int.Base_spec.impl_9__ONE } <: t_U128; + f_MIN = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U128; + f_MAX = { f_v = Core.Base.Int.Base_spec.v_WORDSIZE_128_SUB_1_ } <: t_U128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_135: Core.Clone.t_Clone t_U128 = + { + f_clone_pre = (fun (self: t_U128) -> true); + f_clone_post = (fun (self: t_U128) (out: t_U128) -> true); + f_clone + = + fun (self: t_U128) -> + { f_v = Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_U128 + } + +type t_HaxInt_U16 = x:Core.Base.Int.t_HaxInt{x < pow2 16} +type t_U16 = { f_v:t_HaxInt_U16 } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_47: t_Constants t_U16 = + { + f_ZERO = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U16; + f_ONE = { f_v = Core.Base.Int.Base_spec.impl_9__ONE } <: t_U16; + f_MIN = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U16; + f_MAX = { f_v = Core.Base.Int.Base_spec.v_WORDSIZE_16_SUB_1_ } <: t_U16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_54: Core.Clone.t_Clone t_U16 = + { + f_clone_pre = (fun (self: t_U16) -> true); + f_clone_post = (fun (self: t_U16) (out: t_U16) -> true); + f_clone + = + fun (self: t_U16) -> + { f_v = Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_U16 + } + +type t_HaxInt_U32 = x:Core.Base.Int.t_HaxInt{x < pow2 32} +type t_U32 = { f_v:t_HaxInt_U32 } + +let impl_21__BITS: t_U32 = { f_v = Core.Base.Int.Base_spec.v_BITS_8_ } <: t_U32 + +let impl_48__BITS: t_U32 = { f_v = Core.Base.Int.Base_spec.v_BITS_16_ } <: t_U32 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_74: t_Constants t_U32 = + { + f_ZERO = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U32; + f_ONE = { f_v = Core.Base.Int.Base_spec.impl_9__ONE } <: t_U32; + f_MIN = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U32; + f_MAX = { f_v = Core.Base.Int.Base_spec.v_WORDSIZE_32_SUB_1_ } <: t_U32 + } + +let impl_75__BITS: t_U32 = { f_v = Core.Base.Int.Base_spec.v_BITS_32_ } <: t_U32 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_81: Core.Clone.t_Clone t_U32 = + { + f_clone_pre = (fun (self: t_U32) -> true); + f_clone_post = (fun (self: t_U32) (out: t_U32) -> true); + f_clone + = + fun (self: t_U32) -> + { f_v = Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_U32 + } + +let impl_102__BITS: t_U32 = { f_v = Core.Base.Int.Base_spec.v_BITS_64_ } <: t_U32 + +let impl_129__BITS: t_U32 = { f_v = Core.Base.Int.Base_spec.v_BITS_128_ } <: t_U32 + +type t_HaxInt_U64 = x:Core.Base.Int.t_HaxInt{x < pow2 64} +type t_U64 = { f_v:t_HaxInt_U64 } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_101: t_Constants t_U64 = + { + f_ZERO = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U64; + f_ONE = { f_v = Core.Base.Int.Base_spec.impl_9__ONE } <: t_U64; + f_MIN = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U64; + f_MAX = { f_v = Core.Base.Int.Base_spec.v_WORDSIZE_64_SUB_1_ } <: t_U64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_108: Core.Clone.t_Clone t_U64 = + { + f_clone_pre = (fun (self: t_U64) -> true); + f_clone_post = (fun (self: t_U64) (out: t_U64) -> true); + f_clone + = + fun (self: t_U64) -> + { f_v = Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_U64 + } + +type t_HaxInt_U8 = x:Core.Base.Int.t_HaxInt{x < pow2 8} +type t_U8 = { f_v:t_HaxInt_U8 } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: t_Constants t_U8 = + { + f_ZERO = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U8; + f_ONE = { f_v = Core.Base.Int.Base_spec.impl_9__ONE } <: t_U8; + f_MIN = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U8; + f_MAX = { f_v = Core.Base.Int.Base_spec.v_WORDSIZE_8_SUB_1_ } <: t_U8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Clone.t_Clone t_U8 = + { + f_clone_pre = (fun (self: t_U8) -> true); + f_clone_post = (fun (self: t_U8) (out: t_U8) -> true); + f_clone + = + fun (self: t_U8) -> + { f_v = Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_U8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Coerce.t_Abstraction t_U8 = + { + f_AbstractType = Core.Base.Int.t_HaxInt; + f_lift_pre = (fun (self: t_U8) -> true); + f_lift_post = (fun (self: t_U8) (out: Core.Base.Int.t_HaxInt) -> true); + f_lift = fun (self: t_U8) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Cmp.t_PartialEq t_U8 t_U8 = + { + f_eq_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_eq_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_eq + = + (fun (self: t_U8) (rhs: t_U8) -> + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Int.t_HaxInt) =. + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Int.t_HaxInt)); + f_ne_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_ne_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_ne + = + fun (self: t_U8) (rhs: t_U8) -> + ~.((Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Int.t_HaxInt) =. + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Int.t_HaxInt) + <: + bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Cmp.t_PartialOrd t_U8 t_U8 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_partial_cmp_post + = + (fun (self: t_U8) (rhs: t_U8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U8) (rhs: t_U8) -> + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Int.t_HaxInt)); + f_lt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_lt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_lt + = + (fun (self: t_U8) (rhs: t_U8) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_le_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_le + = + (fun (self: t_U8) (rhs: t_U8) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_gt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_gt + = + (fun (self: t_U8) (rhs: t_U8) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_ge_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_ge + = + fun (self: t_U8) (rhs: t_U8) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_49: Core.Coerce.t_Abstraction t_U16 = + { + f_AbstractType = Core.Base.Int.t_HaxInt; + f_lift_pre = (fun (self: t_U16) -> true); + f_lift_post = (fun (self: t_U16) (out: Core.Base.Int.t_HaxInt) -> true); + f_lift = fun (self: t_U16) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_55: Core.Cmp.t_PartialEq t_U16 t_U16 = + { + f_eq_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_eq_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_eq + = + (fun (self: t_U16) (rhs: t_U16) -> + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Int.t_HaxInt) =. + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Int.t_HaxInt)); + f_ne_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_ne_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_ne + = + fun (self: t_U16) (rhs: t_U16) -> + ~.((Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Int.t_HaxInt) =. + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Int.t_HaxInt) + <: + bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_56: Core.Cmp.t_PartialOrd t_U16 t_U16 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_partial_cmp_post + = + (fun (self: t_U16) (rhs: t_U16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U16) (rhs: t_U16) -> + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Int.t_HaxInt)); + f_lt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_lt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_lt + = + (fun (self: t_U16) (rhs: t_U16) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_le_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_le + = + (fun (self: t_U16) (rhs: t_U16) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_gt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_gt + = + (fun (self: t_U16) (rhs: t_U16) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_ge_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_ge + = + fun (self: t_U16) (rhs: t_U16) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_76: Core.Coerce.t_Abstraction t_U32 = + { + f_AbstractType = Core.Base.Int.t_HaxInt; + f_lift_pre = (fun (self: t_U32) -> true); + f_lift_post = (fun (self: t_U32) (out: Core.Base.Int.t_HaxInt) -> true); + f_lift = fun (self: t_U32) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_82: Core.Cmp.t_PartialEq t_U32 t_U32 = + { + f_eq_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_eq_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_eq + = + (fun (self: t_U32) (rhs: t_U32) -> + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Int.t_HaxInt) =. + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Int.t_HaxInt)); + f_ne_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_ne_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_ne + = + fun (self: t_U32) (rhs: t_U32) -> + ~.((Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Int.t_HaxInt) =. + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Int.t_HaxInt) + <: + bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_83: Core.Cmp.t_PartialOrd t_U32 t_U32 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_partial_cmp_post + = + (fun (self: t_U32) (rhs: t_U32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U32) (rhs: t_U32) -> + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Int.t_HaxInt)); + f_lt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_lt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_lt + = + (fun (self: t_U32) (rhs: t_U32) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_le_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_le + = + (fun (self: t_U32) (rhs: t_U32) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_gt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_gt + = + (fun (self: t_U32) (rhs: t_U32) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_ge_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_ge + = + fun (self: t_U32) (rhs: t_U32) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_103: Core.Coerce.t_Abstraction t_U64 = + { + f_AbstractType = Core.Base.Int.t_HaxInt; + f_lift_pre = (fun (self: t_U64) -> true); + f_lift_post = (fun (self: t_U64) (out: Core.Base.Int.t_HaxInt) -> true); + f_lift = fun (self: t_U64) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_109: Core.Cmp.t_PartialEq t_U64 t_U64 = + { + f_eq_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_eq_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_eq + = + (fun (self: t_U64) (rhs: t_U64) -> + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Int.t_HaxInt) =. + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Int.t_HaxInt)); + f_ne_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_ne_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_ne + = + fun (self: t_U64) (rhs: t_U64) -> + ~.((Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Int.t_HaxInt) =. + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Int.t_HaxInt) + <: + bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_110: Core.Cmp.t_PartialOrd t_U64 t_U64 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_partial_cmp_post + = + (fun (self: t_U64) (rhs: t_U64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U64) (rhs: t_U64) -> + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Int.t_HaxInt)); + f_lt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_lt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_lt + = + (fun (self: t_U64) (rhs: t_U64) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_le_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_le + = + (fun (self: t_U64) (rhs: t_U64) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_gt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_gt + = + (fun (self: t_U64) (rhs: t_U64) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_ge_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_ge + = + fun (self: t_U64) (rhs: t_U64) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_130: Core.Coerce.t_Abstraction t_U128 = + { + f_AbstractType = Core.Base.Int.t_HaxInt; + f_lift_pre = (fun (self: t_U128) -> true); + f_lift_post = (fun (self: t_U128) (out: Core.Base.Int.t_HaxInt) -> true); + f_lift = fun (self: t_U128) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_136: Core.Cmp.t_PartialEq t_U128 t_U128 = + { + f_eq_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_eq_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_eq + = + (fun (self: t_U128) (rhs: t_U128) -> + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Int.t_HaxInt) =. + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Int.t_HaxInt)); + f_ne_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_ne_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_ne + = + fun (self: t_U128) (rhs: t_U128) -> + ~.((Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Int.t_HaxInt) =. + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Int.t_HaxInt) + <: + bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_137: Core.Cmp.t_PartialOrd t_U128 t_U128 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_partial_cmp_post + = + (fun (self: t_U128) (rhs: t_U128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U128) (rhs: t_U128) -> + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Int.t_HaxInt)); + f_lt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_lt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_lt + = + (fun (self: t_U128) (rhs: t_U128) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_le_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_le + = + (fun (self: t_U128) (rhs: t_U128) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_gt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_gt + = + (fun (self: t_U128) (rhs: t_U128) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_ge_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_ge + = + fun (self: t_U128) (rhs: t_U128) -> + match + Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt + #Core.Base.Int.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Int.t_HaxInt) + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Coerce.t_Concretization Core.Base.Int.t_HaxInt t_U8 = + { + f_concretize_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); + f_concretize_post = (fun (self: Core.Base.Int.t_HaxInt) (out: t_U8) -> true); + f_concretize + = + fun (self: Core.Base.Int.t_HaxInt) -> + { f_v = Core.Base.Int.Base_impl.impl_10__rem self Core.Base.Int.Base_spec.v_WORDSIZE_8_ } + <: + t_U8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Convert.t_From t_U8 t_U16 = + { + f_from_pre = (fun (x: t_U16) -> true); + f_from_post = (fun (x: t_U16) (out: t_U8) -> true); + f_from + = + fun (x: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Convert.t_From t_U8 t_U32 = + { + f_from_pre = (fun (x: t_U32) -> true); + f_from_post = (fun (x: t_U32) (out: t_U8) -> true); + f_from + = + fun (x: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Convert.t_From t_U8 t_U64 = + { + f_from_pre = (fun (x: t_U64) -> true); + f_from_post = (fun (x: t_U64) (out: t_U8) -> true); + f_from + = + fun (x: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Convert.t_From t_U8 t_U128 = + { + f_from_pre = (fun (x: t_U128) -> true); + f_from_post = (fun (x: t_U128) (out: t_U8) -> true); + f_from + = + fun (x: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_50: Core.Coerce.t_Concretization Core.Base.Int.t_HaxInt t_U16 = + { + f_concretize_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); + f_concretize_post = (fun (self: Core.Base.Int.t_HaxInt) (out: t_U16) -> true); + f_concretize + = + fun (self: Core.Base.Int.t_HaxInt) -> + { f_v = Core.Base.Int.Base_impl.impl_10__rem self Core.Base.Int.Base_spec.v_WORDSIZE_16_ } + <: + t_U16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Convert.t_From t_U16 t_U8 = + { + f_from_pre = (fun (x: t_U8) -> true); + f_from_post = (fun (x: t_U8) (out: t_U16) -> true); + f_from + = + fun (x: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Convert.t_From t_U16 t_U32 = + { + f_from_pre = (fun (x: t_U32) -> true); + f_from_post = (fun (x: t_U32) (out: t_U16) -> true); + f_from + = + fun (x: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Convert.t_From t_U16 t_U64 = + { + f_from_pre = (fun (x: t_U64) -> true); + f_from_post = (fun (x: t_U64) (out: t_U16) -> true); + f_from + = + fun (x: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Convert.t_From t_U16 t_U128 = + { + f_from_pre = (fun (x: t_U128) -> true); + f_from_post = (fun (x: t_U128) (out: t_U16) -> true); + f_from + = + fun (x: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_77: Core.Coerce.t_Concretization Core.Base.Int.t_HaxInt t_U32 = + { + f_concretize_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); + f_concretize_post = (fun (self: Core.Base.Int.t_HaxInt) (out: t_U32) -> true); + f_concretize + = + fun (self: Core.Base.Int.t_HaxInt) -> + { f_v = Core.Base.Int.Base_impl.impl_10__rem self Core.Base.Int.Base_spec.v_WORDSIZE_32_ } + <: + t_U32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Convert.t_From t_U32 t_U8 = + { + f_from_pre = (fun (x: t_U8) -> true); + f_from_post = (fun (x: t_U8) (out: t_U32) -> true); + f_from + = + fun (x: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Convert.t_From t_U32 t_U16 = + { + f_from_pre = (fun (x: t_U16) -> true); + f_from_post = (fun (x: t_U16) (out: t_U32) -> true); + f_from + = + fun (x: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Convert.t_From t_U32 t_U64 = + { + f_from_pre = (fun (x: t_U64) -> true); + f_from_post = (fun (x: t_U64) (out: t_U32) -> true); + f_from + = + fun (x: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Convert.t_From t_U32 t_U128 = + { + f_from_pre = (fun (x: t_U128) -> true); + f_from_post = (fun (x: t_U128) (out: t_U32) -> true); + f_from + = + fun (x: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_104: Core.Coerce.t_Concretization Core.Base.Int.t_HaxInt t_U64 = + { + f_concretize_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); + f_concretize_post = (fun (self: Core.Base.Int.t_HaxInt) (out: t_U64) -> true); + f_concretize + = + fun (self: Core.Base.Int.t_HaxInt) -> + { f_v = Core.Base.Int.Base_impl.impl_10__rem self Core.Base.Int.Base_spec.v_WORDSIZE_64_ } + <: + t_U64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Convert.t_From t_U64 t_U8 = + { + f_from_pre = (fun (x: t_U8) -> true); + f_from_post = (fun (x: t_U8) (out: t_U64) -> true); + f_from + = + fun (x: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Convert.t_From t_U64 t_U16 = + { + f_from_pre = (fun (x: t_U16) -> true); + f_from_post = (fun (x: t_U16) (out: t_U64) -> true); + f_from + = + fun (x: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Convert.t_From t_U64 t_U32 = + { + f_from_pre = (fun (x: t_U32) -> true); + f_from_post = (fun (x: t_U32) (out: t_U64) -> true); + f_from + = + fun (x: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Convert.t_From t_U64 t_U128 = + { + f_from_pre = (fun (x: t_U128) -> true); + f_from_post = (fun (x: t_U128) (out: t_U64) -> true); + f_from + = + fun (x: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_131: Core.Coerce.t_Concretization Core.Base.Int.t_HaxInt t_U128 = + { + f_concretize_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); + f_concretize_post = (fun (self: Core.Base.Int.t_HaxInt) (out: t_U128) -> true); + f_concretize + = + fun (self: Core.Base.Int.t_HaxInt) -> + { f_v = Core.Base.Int.Base_impl.impl_10__rem self Core.Base.Int.Base_spec.v_WORDSIZE_128_ } + <: + t_U128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Convert.t_From t_U128 t_U8 = + { + f_from_pre = (fun (x: t_U8) -> true); + f_from_post = (fun (x: t_U8) (out: t_U128) -> true); + f_from + = + fun (x: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Convert.t_From t_U128 t_U16 = + { + f_from_pre = (fun (x: t_U16) -> true); + f_from_post = (fun (x: t_U16) (out: t_U128) -> true); + f_from + = + fun (x: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Convert.t_From t_U128 t_U32 = + { + f_from_pre = (fun (x: t_U32) -> true); + f_from_post = (fun (x: t_U32) (out: t_U128) -> true); + f_from + = + fun (x: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Convert.t_From t_U128 t_U64 = + { + f_from_pre = (fun (x: t_U64) -> true); + f_from_post = (fun (x: t_U64) (out: t_U128) -> true); + f_from + = + fun (x: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Ops.Arith.t_Neg t_U8 = + { + f_Output = t_U8; + f_neg_pre = (fun (self: t_U8) -> true); + f_neg_post = (fun (self: t_U8) (out: t_U8) -> true); + f_neg + = + fun (self: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_7__sub Core.Base.Int.Base_spec.v_WORDSIZE_8_ + (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + Core.Base.Int.Base_spec.v_WORDSIZE_8_ + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Ops.Arith.t_Mul t_U8 t_U8 = + { + f_Output = t_U8; + f_mul_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_mul_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_mul + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_11__mul (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Ops.Arith.t_Rem t_U8 t_U8 = + { + f_Output = t_U8; + f_rem_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_rem_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_rem + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Ops.Arith.t_Add t_U8 t_U8 = + { + f_Output = t_U8; + f_add_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_add_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_add + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Ops.Arith.t_Div t_U8 t_U8 = + { + f_Output = t_U8; + f_div_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_div_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_div + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_10__div (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Ops.Bit.t_Shl t_U8 t_U8 = + { + f_Output = t_U8; + f_shl_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_shl_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_shl + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Ops.Bit.t_Shl t_U8 t_U16 = + { + f_Output = t_U8; + f_shl_pre = (fun (self: t_U8) (rhs: t_U16) -> true); + f_shl_post = (fun (self: t_U8) (rhs: t_U16) (out: t_U8) -> true); + f_shl + = + fun (self: t_U8) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Ops.Bit.t_Shl t_U8 t_U32 = + { + f_Output = t_U8; + f_shl_pre = (fun (self: t_U8) (rhs: t_U32) -> true); + f_shl_post = (fun (self: t_U8) (rhs: t_U32) (out: t_U8) -> true); + f_shl + = + fun (self: t_U8) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Ops.Bit.t_Shl t_U8 t_U64 = + { + f_Output = t_U8; + f_shl_pre = (fun (self: t_U8) (rhs: t_U64) -> true); + f_shl_post = (fun (self: t_U8) (rhs: t_U64) (out: t_U8) -> true); + f_shl + = + fun (self: t_U8) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Ops.Bit.t_Shl t_U8 t_U128 = + { + f_Output = t_U8; + f_shl_pre = (fun (self: t_U8) (rhs: t_U128) -> true); + f_shl_post = (fun (self: t_U8) (rhs: t_U128) (out: t_U8) -> true); + f_shl + = + fun (self: t_U8) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Ops.Bit.t_Shr t_U8 t_U8 = + { + f_Output = t_U8; + f_shr_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_shr_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_shr + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Ops.Bit.t_Shr t_U8 t_U16 = + { + f_Output = t_U8; + f_shr_pre = (fun (self: t_U8) (rhs: t_U16) -> true); + f_shr_post = (fun (self: t_U8) (rhs: t_U16) (out: t_U8) -> true); + f_shr + = + fun (self: t_U8) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Ops.Bit.t_Shr t_U8 t_U32 = + { + f_Output = t_U8; + f_shr_pre = (fun (self: t_U8) (rhs: t_U32) -> true); + f_shr_post = (fun (self: t_U8) (rhs: t_U32) (out: t_U8) -> true); + f_shr + = + fun (self: t_U8) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_42: Core.Ops.Bit.t_Shr t_U8 t_U64 = + { + f_Output = t_U8; + f_shr_pre = (fun (self: t_U8) (rhs: t_U64) -> true); + f_shr_post = (fun (self: t_U8) (rhs: t_U64) (out: t_U8) -> true); + f_shr + = + fun (self: t_U8) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_43: Core.Ops.Bit.t_Shr t_U8 t_U128 = + { + f_Output = t_U8; + f_shr_pre = (fun (self: t_U8) (rhs: t_U128) -> true); + f_shr_post = (fun (self: t_U8) (rhs: t_U128) (out: t_U8) -> true); + f_shr + = + fun (self: t_U8) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_44: Core.Ops.Bit.t_BitXor t_U8 t_U8 = + { + f_Output = t_U8; + f_bitxor_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_bitxor_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_bitxor + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_14__bitxor (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_45: Core.Ops.Bit.t_BitAnd t_U8 t_U8 = + { + f_Output = t_U8; + f_bitand_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_bitand_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_bitand + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_15__bitand (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_46: Core.Ops.Bit.t_BitOr t_U8 t_U8 = + { + f_Output = t_U8; + f_bitor_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_bitor_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_bitor + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_16__bitor (Core.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_51: Core.Ops.Arith.t_Neg t_U16 = + { + f_Output = t_U16; + f_neg_pre = (fun (self: t_U16) -> true); + f_neg_post = (fun (self: t_U16) (out: t_U16) -> true); + f_neg + = + fun (self: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_7__sub Core.Base.Int.Base_spec.v_WORDSIZE_16_ + (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + Core.Base.Int.Base_spec.v_WORDSIZE_16_ + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_57: Core.Ops.Arith.t_Mul t_U16 t_U16 = + { + f_Output = t_U16; + f_mul_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_mul_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_mul + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_11__mul (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_58: Core.Ops.Arith.t_Rem t_U16 t_U16 = + { + f_Output = t_U16; + f_rem_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_rem_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_rem + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_59: Core.Ops.Arith.t_Add t_U16 t_U16 = + { + f_Output = t_U16; + f_add_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_add_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_add + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_60: Core.Ops.Arith.t_Div t_U16 t_U16 = + { + f_Output = t_U16; + f_div_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_div_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_div + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_10__div (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_61: Core.Ops.Bit.t_Shl t_U16 t_U8 = + { + f_Output = t_U16; + f_shl_pre = (fun (self: t_U16) (rhs: t_U8) -> true); + f_shl_post = (fun (self: t_U16) (rhs: t_U8) (out: t_U16) -> true); + f_shl + = + fun (self: t_U16) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_62: Core.Ops.Bit.t_Shl t_U16 t_U16 = + { + f_Output = t_U16; + f_shl_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_shl_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_shl + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_63: Core.Ops.Bit.t_Shl t_U16 t_U32 = + { + f_Output = t_U16; + f_shl_pre = (fun (self: t_U16) (rhs: t_U32) -> true); + f_shl_post = (fun (self: t_U16) (rhs: t_U32) (out: t_U16) -> true); + f_shl + = + fun (self: t_U16) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_64: Core.Ops.Bit.t_Shl t_U16 t_U64 = + { + f_Output = t_U16; + f_shl_pre = (fun (self: t_U16) (rhs: t_U64) -> true); + f_shl_post = (fun (self: t_U16) (rhs: t_U64) (out: t_U16) -> true); + f_shl + = + fun (self: t_U16) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_65: Core.Ops.Bit.t_Shl t_U16 t_U128 = + { + f_Output = t_U16; + f_shl_pre = (fun (self: t_U16) (rhs: t_U128) -> true); + f_shl_post = (fun (self: t_U16) (rhs: t_U128) (out: t_U16) -> true); + f_shl + = + fun (self: t_U16) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_66: Core.Ops.Bit.t_Shr t_U16 t_U8 = + { + f_Output = t_U16; + f_shr_pre = (fun (self: t_U16) (rhs: t_U8) -> true); + f_shr_post = (fun (self: t_U16) (rhs: t_U8) (out: t_U16) -> true); + f_shr + = + fun (self: t_U16) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_67: Core.Ops.Bit.t_Shr t_U16 t_U16 = + { + f_Output = t_U16; + f_shr_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_shr_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_shr + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_68: Core.Ops.Bit.t_Shr t_U16 t_U32 = + { + f_Output = t_U16; + f_shr_pre = (fun (self: t_U16) (rhs: t_U32) -> true); + f_shr_post = (fun (self: t_U16) (rhs: t_U32) (out: t_U16) -> true); + f_shr + = + fun (self: t_U16) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_69: Core.Ops.Bit.t_Shr t_U16 t_U64 = + { + f_Output = t_U16; + f_shr_pre = (fun (self: t_U16) (rhs: t_U64) -> true); + f_shr_post = (fun (self: t_U16) (rhs: t_U64) (out: t_U16) -> true); + f_shr + = + fun (self: t_U16) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_70: Core.Ops.Bit.t_Shr t_U16 t_U128 = + { + f_Output = t_U16; + f_shr_pre = (fun (self: t_U16) (rhs: t_U128) -> true); + f_shr_post = (fun (self: t_U16) (rhs: t_U128) (out: t_U16) -> true); + f_shr + = + fun (self: t_U16) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_71: Core.Ops.Bit.t_BitXor t_U16 t_U16 = + { + f_Output = t_U16; + f_bitxor_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_bitxor_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_bitxor + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_14__bitxor (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_72: Core.Ops.Bit.t_BitAnd t_U16 t_U16 = + { + f_Output = t_U16; + f_bitand_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_bitand_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_bitand + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_15__bitand (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_73: Core.Ops.Bit.t_BitOr t_U16 t_U16 = + { + f_Output = t_U16; + f_bitor_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_bitor_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_bitor + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_16__bitor (Core.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_78: Core.Ops.Arith.t_Neg t_U32 = + { + f_Output = t_U32; + f_neg_pre = (fun (self: t_U32) -> true); + f_neg_post = (fun (self: t_U32) (out: t_U32) -> true); + f_neg + = + fun (self: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_7__sub Core.Base.Int.Base_spec.v_WORDSIZE_32_ + (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + Core.Base.Int.Base_spec.v_WORDSIZE_32_ + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_84: Core.Ops.Arith.t_Mul t_U32 t_U32 = + { + f_Output = t_U32; + f_mul_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_mul_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_mul + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_11__mul (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_85: Core.Ops.Arith.t_Rem t_U32 t_U32 = + { + f_Output = t_U32; + f_rem_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_rem_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_rem + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_86: Core.Ops.Arith.t_Add t_U32 t_U32 = + { + f_Output = t_U32; + f_add_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_add_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_add + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_87: Core.Ops.Arith.t_Div t_U32 t_U32 = + { + f_Output = t_U32; + f_div_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_div_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_div + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_10__div (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_88: Core.Ops.Bit.t_Shl t_U32 t_U8 = + { + f_Output = t_U32; + f_shl_pre = (fun (self: t_U32) (rhs: t_U8) -> true); + f_shl_post = (fun (self: t_U32) (rhs: t_U8) (out: t_U32) -> true); + f_shl + = + fun (self: t_U32) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_89: Core.Ops.Bit.t_Shl t_U32 t_U16 = + { + f_Output = t_U32; + f_shl_pre = (fun (self: t_U32) (rhs: t_U16) -> true); + f_shl_post = (fun (self: t_U32) (rhs: t_U16) (out: t_U32) -> true); + f_shl + = + fun (self: t_U32) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_90: Core.Ops.Bit.t_Shl t_U32 t_U32 = + { + f_Output = t_U32; + f_shl_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_shl_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_shl + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_91: Core.Ops.Bit.t_Shl t_U32 t_U64 = + { + f_Output = t_U32; + f_shl_pre = (fun (self: t_U32) (rhs: t_U64) -> true); + f_shl_post = (fun (self: t_U32) (rhs: t_U64) (out: t_U32) -> true); + f_shl + = + fun (self: t_U32) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_92: Core.Ops.Bit.t_Shl t_U32 t_U128 = + { + f_Output = t_U32; + f_shl_pre = (fun (self: t_U32) (rhs: t_U128) -> true); + f_shl_post = (fun (self: t_U32) (rhs: t_U128) (out: t_U32) -> true); + f_shl + = + fun (self: t_U32) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_93: Core.Ops.Bit.t_Shr t_U32 t_U8 = + { + f_Output = t_U32; + f_shr_pre = (fun (self: t_U32) (rhs: t_U8) -> true); + f_shr_post = (fun (self: t_U32) (rhs: t_U8) (out: t_U32) -> true); + f_shr + = + fun (self: t_U32) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_94: Core.Ops.Bit.t_Shr t_U32 t_U16 = + { + f_Output = t_U32; + f_shr_pre = (fun (self: t_U32) (rhs: t_U16) -> true); + f_shr_post = (fun (self: t_U32) (rhs: t_U16) (out: t_U32) -> true); + f_shr + = + fun (self: t_U32) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_95: Core.Ops.Bit.t_Shr t_U32 t_U32 = + { + f_Output = t_U32; + f_shr_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_shr_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_shr + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_96: Core.Ops.Bit.t_Shr t_U32 t_U64 = + { + f_Output = t_U32; + f_shr_pre = (fun (self: t_U32) (rhs: t_U64) -> true); + f_shr_post = (fun (self: t_U32) (rhs: t_U64) (out: t_U32) -> true); + f_shr + = + fun (self: t_U32) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_97: Core.Ops.Bit.t_Shr t_U32 t_U128 = + { + f_Output = t_U32; + f_shr_pre = (fun (self: t_U32) (rhs: t_U128) -> true); + f_shr_post = (fun (self: t_U32) (rhs: t_U128) (out: t_U32) -> true); + f_shr + = + fun (self: t_U32) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_98: Core.Ops.Bit.t_BitXor t_U32 t_U32 = + { + f_Output = t_U32; + f_bitxor_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_bitxor_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_bitxor + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_14__bitxor (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_99: Core.Ops.Bit.t_BitAnd t_U32 t_U32 = + { + f_Output = t_U32; + f_bitand_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_bitand_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_bitand + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_15__bitand (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_100: Core.Ops.Bit.t_BitOr t_U32 t_U32 = + { + f_Output = t_U32; + f_bitor_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_bitor_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_bitor + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_16__bitor (Core.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_105: Core.Ops.Arith.t_Neg t_U64 = + { + f_Output = t_U64; + f_neg_pre = (fun (self: t_U64) -> true); + f_neg_post = (fun (self: t_U64) (out: t_U64) -> true); + f_neg + = + fun (self: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_7__sub Core.Base.Int.Base_spec.v_WORDSIZE_64_ + (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + Core.Base.Int.Base_spec.v_WORDSIZE_64_ + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_111: Core.Ops.Arith.t_Mul t_U64 t_U64 = + { + f_Output = t_U64; + f_mul_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_mul_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_mul + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_11__mul (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_112: Core.Ops.Arith.t_Rem t_U64 t_U64 = + { + f_Output = t_U64; + f_rem_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_rem_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_rem + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_113: Core.Ops.Arith.t_Add t_U64 t_U64 = + { + f_Output = t_U64; + f_add_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_add_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_add + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_114: Core.Ops.Arith.t_Div t_U64 t_U64 = + { + f_Output = t_U64; + f_div_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_div_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_div + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_10__div (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_115: Core.Ops.Bit.t_Shl t_U64 t_U8 = + { + f_Output = t_U64; + f_shl_pre = (fun (self: t_U64) (rhs: t_U8) -> true); + f_shl_post = (fun (self: t_U64) (rhs: t_U8) (out: t_U64) -> true); + f_shl + = + fun (self: t_U64) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_116: Core.Ops.Bit.t_Shl t_U64 t_U16 = + { + f_Output = t_U64; + f_shl_pre = (fun (self: t_U64) (rhs: t_U16) -> true); + f_shl_post = (fun (self: t_U64) (rhs: t_U16) (out: t_U64) -> true); + f_shl + = + fun (self: t_U64) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_117: Core.Ops.Bit.t_Shl t_U64 t_U32 = + { + f_Output = t_U64; + f_shl_pre = (fun (self: t_U64) (rhs: t_U32) -> true); + f_shl_post = (fun (self: t_U64) (rhs: t_U32) (out: t_U64) -> true); + f_shl + = + fun (self: t_U64) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_118: Core.Ops.Bit.t_Shl t_U64 t_U64 = + { + f_Output = t_U64; + f_shl_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_shl_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_shl + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_119: Core.Ops.Bit.t_Shl t_U64 t_U128 = + { + f_Output = t_U64; + f_shl_pre = (fun (self: t_U64) (rhs: t_U128) -> true); + f_shl_post = (fun (self: t_U64) (rhs: t_U128) (out: t_U64) -> true); + f_shl + = + fun (self: t_U64) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_120: Core.Ops.Bit.t_Shr t_U64 t_U8 = + { + f_Output = t_U64; + f_shr_pre = (fun (self: t_U64) (rhs: t_U8) -> true); + f_shr_post = (fun (self: t_U64) (rhs: t_U8) (out: t_U64) -> true); + f_shr + = + fun (self: t_U64) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_121: Core.Ops.Bit.t_Shr t_U64 t_U16 = + { + f_Output = t_U64; + f_shr_pre = (fun (self: t_U64) (rhs: t_U16) -> true); + f_shr_post = (fun (self: t_U64) (rhs: t_U16) (out: t_U64) -> true); + f_shr + = + fun (self: t_U64) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_122: Core.Ops.Bit.t_Shr t_U64 t_U32 = + { + f_Output = t_U64; + f_shr_pre = (fun (self: t_U64) (rhs: t_U32) -> true); + f_shr_post = (fun (self: t_U64) (rhs: t_U32) (out: t_U64) -> true); + f_shr + = + fun (self: t_U64) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_123: Core.Ops.Bit.t_Shr t_U64 t_U64 = + { + f_Output = t_U64; + f_shr_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_shr_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_shr + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_124: Core.Ops.Bit.t_Shr t_U64 t_U128 = + { + f_Output = t_U64; + f_shr_pre = (fun (self: t_U64) (rhs: t_U128) -> true); + f_shr_post = (fun (self: t_U64) (rhs: t_U128) (out: t_U64) -> true); + f_shr + = + fun (self: t_U64) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_125: Core.Ops.Bit.t_BitXor t_U64 t_U64 = + { + f_Output = t_U64; + f_bitxor_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_bitxor_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_bitxor + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_14__bitxor (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_126: Core.Ops.Bit.t_BitAnd t_U64 t_U64 = + { + f_Output = t_U64; + f_bitand_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_bitand_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_bitand + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_15__bitand (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_127: Core.Ops.Bit.t_BitOr t_U64 t_U64 = + { + f_Output = t_U64; + f_bitor_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_bitor_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_bitor + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_16__bitor (Core.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_132: Core.Ops.Arith.t_Neg t_U128 = + { + f_Output = t_U128; + f_neg_pre = (fun (self: t_U128) -> true); + f_neg_post = (fun (self: t_U128) (out: t_U128) -> true); + f_neg + = + fun (self: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_7__sub Core.Base.Int.Base_spec.v_WORDSIZE_128_ + (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + Core.Base.Int.Base_spec.v_WORDSIZE_128_ + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_138: Core.Ops.Arith.t_Mul t_U128 t_U128 = + { + f_Output = t_U128; + f_mul_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_mul_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_mul + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_11__mul (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_139: Core.Ops.Arith.t_Rem t_U128 t_U128 = + { + f_Output = t_U128; + f_rem_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_rem_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_rem + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_140: Core.Ops.Arith.t_Add t_U128 t_U128 = + { + f_Output = t_U128; + f_add_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_add_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_add + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_141: Core.Ops.Arith.t_Div t_U128 t_U128 = + { + f_Output = t_U128; + f_div_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_div_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_div + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_10__div (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_142: Core.Ops.Bit.t_Shl t_U128 t_U8 = + { + f_Output = t_U128; + f_shl_pre = (fun (self: t_U128) (rhs: t_U8) -> true); + f_shl_post = (fun (self: t_U128) (rhs: t_U8) (out: t_U128) -> true); + f_shl + = + fun (self: t_U128) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_143: Core.Ops.Bit.t_Shl t_U128 t_U16 = + { + f_Output = t_U128; + f_shl_pre = (fun (self: t_U128) (rhs: t_U16) -> true); + f_shl_post = (fun (self: t_U128) (rhs: t_U16) (out: t_U128) -> true); + f_shl + = + fun (self: t_U128) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_144: Core.Ops.Bit.t_Shl t_U128 t_U32 = + { + f_Output = t_U128; + f_shl_pre = (fun (self: t_U128) (rhs: t_U32) -> true); + f_shl_post = (fun (self: t_U128) (rhs: t_U32) (out: t_U128) -> true); + f_shl + = + fun (self: t_U128) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_145: Core.Ops.Bit.t_Shl t_U128 t_U64 = + { + f_Output = t_U128; + f_shl_pre = (fun (self: t_U128) (rhs: t_U64) -> true); + f_shl_post = (fun (self: t_U128) (rhs: t_U64) (out: t_U128) -> true); + f_shl + = + fun (self: t_U128) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_146: Core.Ops.Bit.t_Shl t_U128 t_U128 = + { + f_Output = t_U128; + f_shl_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_shl_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_shl + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_147: Core.Ops.Bit.t_Shr t_U128 t_U8 = + { + f_Output = t_U128; + f_shr_pre = (fun (self: t_U128) (rhs: t_U8) -> true); + f_shr_post = (fun (self: t_U128) (rhs: t_U8) (out: t_U128) -> true); + f_shr + = + fun (self: t_U128) (rhs: t_U8) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt + ) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_148: Core.Ops.Bit.t_Shr t_U128 t_U16 = + { + f_Output = t_U128; + f_shr_pre = (fun (self: t_U128) (rhs: t_U16) -> true); + f_shr_post = (fun (self: t_U128) (rhs: t_U16) (out: t_U128) -> true); + f_shr + = + fun (self: t_U128) (rhs: t_U16) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_149: Core.Ops.Bit.t_Shr t_U128 t_U32 = + { + f_Output = t_U128; + f_shr_pre = (fun (self: t_U128) (rhs: t_U32) -> true); + f_shr_post = (fun (self: t_U128) (rhs: t_U32) (out: t_U128) -> true); + f_shr + = + fun (self: t_U128) (rhs: t_U32) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_150: Core.Ops.Bit.t_Shr t_U128 t_U64 = + { + f_Output = t_U128; + f_shr_pre = (fun (self: t_U128) (rhs: t_U64) -> true); + f_shr_post = (fun (self: t_U128) (rhs: t_U64) (out: t_U128) -> true); + f_shr + = + fun (self: t_U128) (rhs: t_U64) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_151: Core.Ops.Bit.t_Shr t_U128 t_U128 = + { + f_Output = t_U128; + f_shr_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_shr_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_shr + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_152: Core.Ops.Bit.t_BitXor t_U128 t_U128 = + { + f_Output = t_U128; + f_bitxor_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_bitxor_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_bitxor + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_14__bitxor (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_153: Core.Ops.Bit.t_BitAnd t_U128 t_U128 = + { + f_Output = t_U128; + f_bitand_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_bitand_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_bitand + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_15__bitand (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_154: Core.Ops.Bit.t_BitOr t_U128 t_U128 = + { + f_Output = t_U128; + f_bitor_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_bitor_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_bitor + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Int.Base_impl.impl_16__bitor (Core.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Int.t_HaxInt) + <: + Core.Base.Int.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Ops.Arith.t_Sub t_U8 t_U8 = + { + f_Output = t_U8; + f_sub_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_sub_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_sub + = + fun (self: t_U8) (rhs: t_U8) -> + self +! (Core.Ops.Arith.f_neg #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Ops.Bit.t_Not t_U8 = + { + f_Output = t_U8; + f_not_pre = (fun (self: t_U8) -> true); + f_not_post = (fun (self: t_U8) (out: t_U8) -> true); + f_not = fun (self: t_U8) -> self ^. (f_MAX <: t_U8) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_52: Core.Ops.Arith.t_Sub t_U16 t_U16 = + { + f_Output = t_U16; + f_sub_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_sub_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_sub + = + fun (self: t_U16) (rhs: t_U16) -> + self +! (Core.Ops.Arith.f_neg #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_53: Core.Ops.Bit.t_Not t_U16 = + { + f_Output = t_U16; + f_not_pre = (fun (self: t_U16) -> true); + f_not_post = (fun (self: t_U16) (out: t_U16) -> true); + f_not = fun (self: t_U16) -> self ^. (f_MAX <: t_U16) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_79: Core.Ops.Arith.t_Sub t_U32 t_U32 = + { + f_Output = t_U32; + f_sub_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_sub_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_sub + = + fun (self: t_U32) (rhs: t_U32) -> + self +! (Core.Ops.Arith.f_neg #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_80: Core.Ops.Bit.t_Not t_U32 = + { + f_Output = t_U32; + f_not_pre = (fun (self: t_U32) -> true); + f_not_post = (fun (self: t_U32) (out: t_U32) -> true); + f_not = fun (self: t_U32) -> self ^. (f_MAX <: t_U32) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_106: Core.Ops.Arith.t_Sub t_U64 t_U64 = + { + f_Output = t_U64; + f_sub_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_sub_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_sub + = + fun (self: t_U64) (rhs: t_U64) -> + self +! (Core.Ops.Arith.f_neg #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_107: Core.Ops.Bit.t_Not t_U64 = + { + f_Output = t_U64; + f_not_pre = (fun (self: t_U64) -> true); + f_not_post = (fun (self: t_U64) (out: t_U64) -> true); + f_not = fun (self: t_U64) -> self ^. (f_MAX <: t_U64) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_133: Core.Ops.Arith.t_Sub t_U128 t_U128 = + { + f_Output = t_U128; + f_sub_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_sub_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_sub + = + fun (self: t_U128) (rhs: t_U128) -> + self +! (Core.Ops.Arith.f_neg #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_134: Core.Ops.Bit.t_Not t_U128 = + { + f_Output = t_U128; + f_not_pre = (fun (self: t_U128) -> true); + f_not_post = (fun (self: t_U128) (out: t_U128) -> true); + f_not = fun (self: t_U128) -> self ^. (f_MAX <: t_U128) + } diff --git a/proof-libs/fstar/generated-core/Core.Intrinsics.fst b/proof-libs/fstar/generated-core/Core.Intrinsics.fst new file mode 100644 index 000000000..8ed4d5e96 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Intrinsics.fst @@ -0,0 +1,343 @@ +module Core.Intrinsics +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +open Core.Cmp +open Core.Ops.Arith + +let unchecked_add_u128 (x y: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + Core.Primitive.C_u128 + ({ + Core.Int.f_v + = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U128 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + } + <: + Core.Int.t_U128) + <: + Core.Primitive.t_u128 + +let unchecked_add_u16 (x y: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + Core.Primitive.C_u16 + ({ + Core.Int.f_v + = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U16 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + } + <: + Core.Int.t_U16) + <: + Core.Primitive.t_u16 + +let unchecked_add_u32 (x y: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Core.Primitive.C_u32 + ({ + Core.Int.f_v + = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U32 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + } + <: + Core.Int.t_U32) + <: + Core.Primitive.t_u32 + +let unchecked_add_u64 (x y: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + Core.Primitive.C_u64 + ({ + Core.Int.f_v + = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + } + <: + Core.Int.t_U64) + <: + Core.Primitive.t_u64 + +let unchecked_add_u8 (x y: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + Core.Primitive.C_u8 + ({ + Core.Int.f_v + = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U8 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + } + <: + Core.Int.t_U8) + <: + Core.Primitive.t_u8 + +let unchecked_add_usize (x y: Core.Primitive.t_usize) : Core.Primitive.t_usize = + Core.Primitive.C_usize + ({ + Core.Int.f_v + = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + } + <: + Core.Int.t_U64) + <: + Core.Primitive.t_usize + +let add_with_overflow_u128 (x y: Core.Primitive.t_u128) : (Core.Primitive.t_u128 & bool) = + let overflow:Core.Base.Int.t_HaxInt = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U128 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + in + let (res: Core.Int.t_U128):Core.Int.t_U128 = + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #Core.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Int.t_HaxInt) + in + (Core.Primitive.C_u128 (Core.Clone.f_clone #Core.Int.t_U128 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_u128), + (Core.Coerce.f_lift #Core.Int.t_U128 #FStar.Tactics.Typeclasses.solve res + <: + Core.Base.Int.t_HaxInt) <. + overflow + <: + (Core.Primitive.t_u128 & bool) + +let add_with_overflow_u16 (x y: Core.Primitive.t_u16) : (Core.Primitive.t_u16 & bool) = + let overflow:Core.Base.Int.t_HaxInt = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U16 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + in + let (res: Core.Int.t_U16):Core.Int.t_U16 = + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #Core.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Int.t_HaxInt) + in + (Core.Primitive.C_u16 (Core.Clone.f_clone #Core.Int.t_U16 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_u16), + (Core.Coerce.f_lift #Core.Int.t_U16 #FStar.Tactics.Typeclasses.solve res <: Core.Base.Int.t_HaxInt + ) <. + overflow + <: + (Core.Primitive.t_u16 & bool) + +let add_with_overflow_u32 (x y: Core.Primitive.t_u32) : (Core.Primitive.t_u32 & bool) = + let overflow:Core.Base.Int.t_HaxInt = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U32 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + in + let (res: Core.Int.t_U32):Core.Int.t_U32 = + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #Core.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Int.t_HaxInt) + in + (Core.Primitive.C_u32 (Core.Clone.f_clone #Core.Int.t_U32 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_u32), + (Core.Coerce.f_lift #Core.Int.t_U32 #FStar.Tactics.Typeclasses.solve res <: Core.Base.Int.t_HaxInt + ) <. + overflow + <: + (Core.Primitive.t_u32 & bool) + +let add_with_overflow_u64 (x y: Core.Primitive.t_u64) : (Core.Primitive.t_u64 & bool) = + let overflow:Core.Base.Int.t_HaxInt = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + in + let (res: Core.Int.t_U64):Core.Int.t_U64 = + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Int.t_HaxInt) + in + (Core.Primitive.C_u64 (Core.Clone.f_clone #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_u64), + (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve res <: Core.Base.Int.t_HaxInt + ) <. + overflow + <: + (Core.Primitive.t_u64 & bool) + +let add_with_overflow_u8 (x y: Core.Primitive.t_u8) : (Core.Primitive.t_u8 & bool) = + let overflow:Core.Base.Int.t_HaxInt = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U8 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + in + let (res: Core.Int.t_U8):Core.Int.t_U8 = + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #Core.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Int.t_HaxInt) + in + (Core.Primitive.C_u8 (Core.Clone.f_clone #Core.Int.t_U8 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_u8), + (Core.Coerce.f_lift #Core.Int.t_U8 #FStar.Tactics.Typeclasses.solve res <: Core.Base.Int.t_HaxInt) <. + overflow + <: + (Core.Primitive.t_u8 & bool) + +let add_with_overflow_usize (x y: Core.Primitive.t_usize) : (Core.Primitive.t_usize & bool) = + let overflow:Core.Base.Int.t_HaxInt = + Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + <: + Core.Base.Int.t_HaxInt) + in + let (res: Core.Int.t_U64):Core.Int.t_U64 = + Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Int.t_HaxInt) + in + (Core.Primitive.C_usize (Core.Clone.f_clone #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_usize), + (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve res <: Core.Base.Int.t_HaxInt + ) <. + overflow + <: + (Core.Primitive.t_usize & bool) + +let wrapping_add_u128 (a b: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + Core.Primitive.C_u128 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u128 + +let wrapping_add_u16 (a b: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + Core.Primitive.C_u16 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u16 + +let wrapping_add_u32 (a b: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Core.Primitive.C_u32 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u32 + +let wrapping_add_u64 (a b: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + Core.Primitive.C_u64 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u64 + +let wrapping_add_u8 (a b: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + Core.Primitive.C_u8 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u8 + +let wrapping_add_usize (a b: Core.Primitive.t_usize) : Core.Primitive.t_usize = + Core.Primitive.C_usize (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_usize + +let wrapping_mul_u128 (a b: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + Core.Primitive.C_u128 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u128 + +let wrapping_mul_u16 (a b: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + Core.Primitive.C_u16 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u16 + +let wrapping_mul_u32 (a b: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Core.Primitive.C_u32 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u32 + +let wrapping_mul_u64 (a b: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + Core.Primitive.C_u64 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u64 + +let wrapping_mul_u8 (a b: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + Core.Primitive.C_u8 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u8 + +let wrapping_mul_usize (a b: Core.Primitive.t_usize) : Core.Primitive.t_usize = + Core.Primitive.C_usize (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_usize + +let wrapping_sub_u128 (a b: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + Core.Primitive.C_u128 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_u128 + +let wrapping_sub_u16 (a b: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + Core.Primitive.C_u16 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_u16 + +let wrapping_sub_u32 (a b: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Core.Primitive.C_u32 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_u32 + +let wrapping_sub_u64 (a b: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + Core.Primitive.C_u64 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_u64 + +let wrapping_sub_u8 (a b: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + Core.Primitive.C_u8 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_u8 + +let wrapping_sub_usize (a b: Core.Primitive.t_usize) : Core.Primitive.t_usize = + Core.Primitive.C_usize (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_usize diff --git a/proof-libs/fstar/generated-core/Core.Marker.fst b/proof-libs/fstar/generated-core/Core.Marker.fst new file mode 100644 index 000000000..c9be62034 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Marker.fst @@ -0,0 +1,12 @@ +module Core.Marker +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_Destruct (v_Self: Type0) = { __marker_trait_t_Destruct:Prims.unit } + +class t_Sized (v_Self: Type0) = { __marker_trait_t_Sized:Prims.unit } + +class t_Copy (v_Self: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_9442900250278684536:Core.Clone.t_Clone v_Self +} diff --git a/proof-libs/fstar/generated-core/Core.Num.fst b/proof-libs/fstar/generated-core/Core.Num.fst new file mode 100644 index 000000000..13466431a --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Num.fst @@ -0,0 +1,200 @@ +module Core.Num +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +open Core.Ops.Arith + +let impl_4__MAX: Core.Primitive.t_u128 = + Core.Primitive.C_u128 Core.Int.f_MAX <: Core.Primitive.t_u128 + +let impl_4__MIN: Core.Primitive.t_u128 = + Core.Primitive.C_u128 Core.Int.f_MIN <: Core.Primitive.t_u128 + +let impl_1__MAX: Core.Primitive.t_u16 = Core.Primitive.C_u16 Core.Int.f_MAX <: Core.Primitive.t_u16 + +let impl_1__MIN: Core.Primitive.t_u16 = Core.Primitive.C_u16 Core.Int.f_MIN <: Core.Primitive.t_u16 + +let impl__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Int.impl_21__BITS <: Core.Primitive.t_u32 + +let impl_1__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Int.impl_48__BITS <: Core.Primitive.t_u32 + +let impl_2__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Int.impl_75__BITS <: Core.Primitive.t_u32 + +let impl_2__MAX: Core.Primitive.t_u32 = Core.Primitive.C_u32 Core.Int.f_MAX <: Core.Primitive.t_u32 + +let impl_2__MIN: Core.Primitive.t_u32 = Core.Primitive.C_u32 Core.Int.f_MIN <: Core.Primitive.t_u32 + +let impl_3__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Int.impl_102__BITS <: Core.Primitive.t_u32 + +let impl_4__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Int.impl_129__BITS <: Core.Primitive.t_u32 + +let impl_5__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Int.impl_102__BITS <: Core.Primitive.t_u32 + +let impl_3__MAX: Core.Primitive.t_u64 = Core.Primitive.C_u64 Core.Int.f_MAX <: Core.Primitive.t_u64 + +let impl_3__MIN: Core.Primitive.t_u64 = Core.Primitive.C_u64 Core.Int.f_MIN <: Core.Primitive.t_u64 + +let impl__MAX: Core.Primitive.t_u8 = Core.Primitive.C_u8 Core.Int.f_MAX <: Core.Primitive.t_u8 + +let impl__MIN: Core.Primitive.t_u8 = Core.Primitive.C_u8 Core.Int.f_MIN <: Core.Primitive.t_u8 + +let impl_5__MAX: Core.Primitive.t_usize = + Core.Primitive.C_usize Core.Int.f_MAX <: Core.Primitive.t_usize + +let impl_5__MIN: Core.Primitive.t_usize = + Core.Primitive.C_usize Core.Int.f_MIN <: Core.Primitive.t_usize + +let impl__overflowing_add (self rhs: Core.Primitive.t_u8) : (Core.Primitive.t_u8 & bool) = + Core.Intrinsics.add_with_overflow_u8 self rhs + +let impl_1__overflowing_add (self rhs: Core.Primitive.t_u16) : (Core.Primitive.t_u16 & bool) = + Core.Intrinsics.add_with_overflow_u16 self rhs + +let impl_2__overflowing_add (self rhs: Core.Primitive.t_u32) : (Core.Primitive.t_u32 & bool) = + Core.Intrinsics.add_with_overflow_u32 self rhs + +let impl_3__overflowing_add (self rhs: Core.Primitive.t_u64) : (Core.Primitive.t_u64 & bool) = + Core.Intrinsics.add_with_overflow_u64 self rhs + +let impl_4__overflowing_add (self rhs: Core.Primitive.t_u128) : (Core.Primitive.t_u128 & bool) = + Core.Intrinsics.add_with_overflow_u128 self rhs + +let impl_5__overflowing_add (self rhs: Core.Primitive.t_usize) : (Core.Primitive.t_usize & bool) = + Core.Intrinsics.add_with_overflow_usize self rhs + +let impl__wrapping_add (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + Core.Intrinsics.wrapping_add_u8 self rhs + +let impl__wrapping_mul (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + Core.Intrinsics.wrapping_mul_u8 self rhs + +let impl_1__wrapping_add (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + Core.Intrinsics.wrapping_add_u16 self rhs + +let impl_1__wrapping_mul (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + Core.Intrinsics.wrapping_mul_u16 self rhs + +let impl_2__wrapping_add (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Core.Intrinsics.wrapping_add_u32 self rhs + +let impl_2__wrapping_mul (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Core.Intrinsics.wrapping_mul_u32 self rhs + +let impl_3__wrapping_add (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + Core.Intrinsics.wrapping_add_u64 self rhs + +let impl_3__wrapping_mul (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + Core.Intrinsics.wrapping_mul_u64 self rhs + +let impl_4__wrapping_add (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + Core.Intrinsics.wrapping_add_u128 self rhs + +let impl_4__wrapping_mul (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + Core.Intrinsics.wrapping_mul_u128 self rhs + +let impl_5__wrapping_add (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = + Core.Intrinsics.wrapping_add_usize self rhs + +let impl_5__wrapping_mul (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = + Core.Intrinsics.wrapping_mul_usize self rhs + +let impl__wrapping_sub (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + Core.Intrinsics.wrapping_sub_u8 self rhs + +let impl__wrapping_neg (self: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + impl__wrapping_sub (Core.Primitive.C_u8 Core.Int.f_ZERO <: Core.Primitive.t_u8) self + +let impl_1__wrapping_sub (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + Core.Intrinsics.wrapping_sub_u16 self rhs + +let impl_1__wrapping_neg (self: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + impl_1__wrapping_sub (Core.Primitive.C_u16 Core.Int.f_ZERO <: Core.Primitive.t_u16) self + +let impl_2__wrapping_sub (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Core.Intrinsics.wrapping_sub_u32 self rhs + +let impl_2__wrapping_neg (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + impl_2__wrapping_sub (Core.Primitive.C_u32 Core.Int.f_ZERO <: Core.Primitive.t_u32) self + +let impl_3__wrapping_sub (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + Core.Intrinsics.wrapping_sub_u64 self rhs + +let impl_3__wrapping_neg (self: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + impl_3__wrapping_sub (Core.Primitive.C_u64 Core.Int.f_ZERO <: Core.Primitive.t_u64) self + +let impl_4__wrapping_sub (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + Core.Intrinsics.wrapping_sub_u128 self rhs + +let impl_4__wrapping_neg (self: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + impl_4__wrapping_sub (Core.Primitive.C_u128 Core.Int.f_ZERO <: Core.Primitive.t_u128) self + +let impl_5__wrapping_sub (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = + Core.Intrinsics.wrapping_sub_usize self rhs + +let impl_5__wrapping_neg (self: Core.Primitive.t_usize) : Core.Primitive.t_usize = + impl_5__wrapping_sub (Core.Primitive.C_usize Core.Int.f_ZERO <: Core.Primitive.t_usize) self + +let impl__wrapping_rem (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self %! rhs + +let impl__wrapping_rem_euclid (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self %! rhs + +let impl__wrapping_div (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self /! rhs + +let impl__wrapping_div_euclid (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self /! rhs + +let impl_1__wrapping_rem (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = self %! rhs + +let impl_1__wrapping_rem_euclid (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + self %! rhs + +let impl_1__wrapping_div (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = self /! rhs + +let impl_1__wrapping_div_euclid (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + self /! rhs + +let impl_2__wrapping_rem (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self %! rhs + +let impl_2__wrapping_rem_euclid (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + self %! rhs + +let impl_2__wrapping_div (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self /! rhs + +let impl_2__wrapping_div_euclid (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + self /! rhs + +let impl_3__wrapping_rem (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self %! rhs + +let impl_3__wrapping_rem_euclid (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + self %! rhs + +let impl_3__wrapping_div (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self /! rhs + +let impl_3__wrapping_div_euclid (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + self /! rhs + +let impl_4__wrapping_rem (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self %! rhs + +let impl_4__wrapping_rem_euclid (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + self %! rhs + +let impl_4__wrapping_div (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self /! rhs + +let impl_4__wrapping_div_euclid (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + self /! rhs + +let impl_5__wrapping_rem (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = self %! rhs + +let impl_5__wrapping_rem_euclid (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = + self %! rhs + +let impl_5__wrapping_div (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = self /! rhs + +let impl_5__wrapping_div_euclid (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = + self /! rhs diff --git a/proof-libs/fstar/generated-core/Core.Ops.Arith.fst b/proof-libs/fstar/generated-core/Core.Ops.Arith.fst new file mode 100644 index 000000000..454c97ceb --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Ops.Arith.fst @@ -0,0 +1,81 @@ +module Core.Ops.Arith +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_Add (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_add_pre:v_Self -> v_Rhs -> Type0; + f_add_post:v_Self -> v_Rhs -> f_Output -> Type0; + f_add:x0: v_Self -> x1: v_Rhs + -> Prims.Pure f_Output (f_add_pre x0 x1) (fun result -> f_add_post x0 x1 result) +} + +class t_Div (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_div_pre:v_Self -> v_Rhs -> Type0; + f_div_post:v_Self -> v_Rhs -> f_Output -> Type0; + f_div:x0: v_Self -> x1: v_Rhs + -> Prims.Pure f_Output (f_div_pre x0 x1) (fun result -> f_div_post x0 x1 result) +} + +class t_Mul (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_mul_pre:v_Self -> v_Rhs -> Type0; + f_mul_post:v_Self -> v_Rhs -> f_Output -> Type0; + f_mul:x0: v_Self -> x1: v_Rhs + -> Prims.Pure f_Output (f_mul_pre x0 x1) (fun result -> f_mul_post x0 x1 result) +} + +class t_Neg (v_Self: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_neg_pre:v_Self -> Type0; + f_neg_post:v_Self -> f_Output -> Type0; + f_neg:x0: v_Self -> Prims.Pure f_Output (f_neg_pre x0) (fun result -> f_neg_post x0 result) +} + +class t_Rem (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_rem_pre:v_Self -> v_Rhs -> Type0; + f_rem_post:v_Self -> v_Rhs -> f_Output -> Type0; + f_rem:x0: v_Self -> x1: v_Rhs + -> Prims.Pure f_Output (f_rem_pre x0 x1) (fun result -> f_rem_post x0 x1 result) +} + +class t_Sub (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_sub_pre:v_Self -> v_Rhs -> Type0; + f_sub_post:v_Self -> v_Rhs -> f_Output -> Type0; + f_sub:x0: v_Self -> x1: v_Rhs + -> Prims.Pure f_Output (f_sub_pre x0 x1) (fun result -> f_sub_post x0 x1 result) +} + +////////////////////////////////////////////////////////// + +// TODO: Generate file, currently manually written file + +unfold +let (+!) #a #b {| t_Add a b |} = f_add #a #b + +unfold +let (/!) #a #b {| t_Div a b |} = f_div #a #b + +unfold +let ( *! ) #a #b {| t_Mul a b |} = f_mul #a #b + +// unfold +// let (~!) #a {| t_Neg a |} = f_neg #a + +unfold +let (%!) #a #b {| t_Rem a b |} = f_rem #a #b + +unfold +let (-!) #a #b {| t_Sub a b |} = f_sub #a #b + +////////////////////////////////////////////////////////// diff --git a/proof-libs/fstar/generated-core/Core.Ops.Bit.fst b/proof-libs/fstar/generated-core/Core.Ops.Bit.fst new file mode 100644 index 000000000..be8219a78 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Ops.Bit.fst @@ -0,0 +1,74 @@ +module Core.Ops.Bit +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_BitAnd (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_bitand_pre:v_Self -> v_Rhs -> Type0; + f_bitand_post:v_Self -> v_Rhs -> f_Output -> Type0; + f_bitand:x0: v_Self -> x1: v_Rhs + -> Prims.Pure f_Output (f_bitand_pre x0 x1) (fun result -> f_bitand_post x0 x1 result) +} + +class t_BitOr (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_bitor_pre:v_Self -> v_Rhs -> Type0; + f_bitor_post:v_Self -> v_Rhs -> f_Output -> Type0; + f_bitor:x0: v_Self -> x1: v_Rhs + -> Prims.Pure f_Output (f_bitor_pre x0 x1) (fun result -> f_bitor_post x0 x1 result) +} + +class t_BitXor (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_bitxor_pre:v_Self -> v_Rhs -> Type0; + f_bitxor_post:v_Self -> v_Rhs -> f_Output -> Type0; + f_bitxor:x0: v_Self -> x1: v_Rhs + -> Prims.Pure f_Output (f_bitxor_pre x0 x1) (fun result -> f_bitxor_post x0 x1 result) +} + +class t_Not (v_Self: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_not_pre:v_Self -> Type0; + f_not_post:v_Self -> f_Output -> Type0; + f_not:x0: v_Self -> Prims.Pure f_Output (f_not_pre x0) (fun result -> f_not_post x0 result) +} + +class t_Shl (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_shl_pre:v_Self -> v_Rhs -> Type0; + f_shl_post:v_Self -> v_Rhs -> f_Output -> Type0; + f_shl:x0: v_Self -> x1: v_Rhs + -> Prims.Pure f_Output (f_shl_pre x0 x1) (fun result -> f_shl_post x0 x1 result) +} + +class t_Shr (v_Self: Type0) (v_Rhs: Type0) = { + [@@@ Tactics.Typeclasses.no_method] + f_Output:Type0; + f_shr_pre:v_Self -> v_Rhs -> Type0; + f_shr_post:v_Self -> v_Rhs -> f_Output -> Type0; + f_shr:x0: v_Self -> x1: v_Rhs + -> Prims.Pure f_Output (f_shr_pre x0 x1) (fun result -> f_shr_post x0 x1 result) +} + +////////////////////////////////////////////////////////// + +// TODO: Generate file, currently manually written file + +unfold +let ( ^. ) #a #b {| t_BitXor a b |} = f_bitxor #a #b +unfold +let ( |. ) #a #b {| t_BitOr a b |} = f_bitor #a #b +unfold +let ( &. ) #a #b {| t_BitAnd a b |} = f_bitand #a #b +unfold +let ( <>! ) #a #b {| t_Shr a b |} = f_shr #a #b + +////////////////////////////////////////////////////////// diff --git a/proof-libs/fstar/generated-core/Core.Ops.Deref.fst b/proof-libs/fstar/generated-core/Core.Ops.Deref.fst new file mode 100644 index 000000000..4d34d7408 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Ops.Deref.fst @@ -0,0 +1,9 @@ +module Core.Ops.Deref +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +/// Indicates that a struct can be used as a method receiver, without the +/// `arbitrary_self_types` feature. This is implemented by stdlib pointer types like `Box`, +/// `Rc`, `&T`, and `Pin

`. +class t_Receiver (v_Self: Type0) = { __marker_trait_t_Receiver:Prims.unit } diff --git a/proof-libs/fstar/generated-core/Core.Option.fst b/proof-libs/fstar/generated-core/Core.Option.fst new file mode 100644 index 000000000..e7b557365 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Option.fst @@ -0,0 +1,8 @@ +module Core.Option +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Option (v_T: Type0) = + | Option_None : t_Option v_T + | Option_Some : v_T -> t_Option v_T diff --git a/proof-libs/fstar/generated-core/Core.Panicking.fst b/proof-libs/fstar/generated-core/Core.Panicking.fst new file mode 100644 index 000000000..36f4dc7ca --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Panicking.fst @@ -0,0 +1,17 @@ +module Core.Panicking +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Never = False + +let never_to_any (#v_T: Type0) (x: t_Never) : v_T = + (match x with ) + +let rec panic (expr: string) + : Prims.Pure t_Never (requires false) (fun _ -> Prims.l_True) = + panic "not yet implemented" + +let panic_explicit (_: Prims.unit) + : Prims.Pure t_Never (requires false) (fun _ -> Prims.l_True) = + panic "not yet implemented" diff --git a/proof-libs/fstar/generated-core/Core.Prelude.fst b/proof-libs/fstar/generated-core/Core.Prelude.fst new file mode 100644 index 000000000..94f2e1547 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Prelude.fst @@ -0,0 +1,4 @@ +module Core.Prelude +#set-options "--fuel 1 --ifuel 1 --z3rlimit 15" + +open Core.Array diff --git a/proof-libs/fstar/generated-core/Core.Primitive.fst b/proof-libs/fstar/generated-core/Core.Primitive.fst new file mode 100644 index 000000000..9c3e73b73 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Primitive.fst @@ -0,0 +1,844 @@ +module Core.Primitive +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +open Core.Cmp +open Core.Ops.Arith +open Core.Ops.Bit + +type t_u128 = | C_u128 : Core.Int.t_U128 -> t_u128 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Clone.t_Clone t_u128 = + { + f_clone_pre = (fun (self: t_u128) -> true); + f_clone_post = (fun (self: t_u128) (out: t_u128) -> true); + f_clone + = + fun (self: t_u128) -> + C_u128 (Core.Clone.f_clone #Core.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Cmp.t_PartialEq t_u128 t_u128 = + { + f_eq_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_eq_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_eq = (fun (self: t_u128) (rhs: t_u128) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_ne_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_ne = fun (self: t_u128) (rhs: t_u128) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Cmp.t_PartialOrd t_u128 t_u128 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_partial_cmp_post + = + (fun (self: t_u128) (rhs: t_u128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_u128) (rhs: t_u128) -> + Core.Cmp.f_partial_cmp #Core.Int.t_U128 + #Core.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_lt_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_lt + = + (fun (self: t_u128) (rhs: t_u128) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U128 + #Core.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_le_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_le + = + (fun (self: t_u128) (rhs: t_u128) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U128 + #Core.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_gt_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_gt + = + (fun (self: t_u128) (rhs: t_u128) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U128 + #Core.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_ge_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_ge + = + fun (self: t_u128) (rhs: t_u128) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U128 + #Core.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +type t_u16 = | C_u16 : Core.Int.t_U16 -> t_u16 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Clone.t_Clone t_u16 = + { + f_clone_pre = (fun (self: t_u16) -> true); + f_clone_post = (fun (self: t_u16) (out: t_u16) -> true); + f_clone + = + fun (self: t_u16) -> + C_u16 (Core.Clone.f_clone #Core.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Cmp.t_PartialEq t_u16 t_u16 = + { + f_eq_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_eq_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_eq = (fun (self: t_u16) (rhs: t_u16) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_ne_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_ne = fun (self: t_u16) (rhs: t_u16) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Cmp.t_PartialOrd t_u16 t_u16 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_partial_cmp_post + = + (fun (self: t_u16) (rhs: t_u16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_u16) (rhs: t_u16) -> + Core.Cmp.f_partial_cmp #Core.Int.t_U16 + #Core.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_lt_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_lt + = + (fun (self: t_u16) (rhs: t_u16) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U16 + #Core.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_le_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_le + = + (fun (self: t_u16) (rhs: t_u16) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U16 + #Core.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_gt_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_gt + = + (fun (self: t_u16) (rhs: t_u16) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U16 + #Core.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_ge_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_ge + = + fun (self: t_u16) (rhs: t_u16) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U16 + #Core.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +type t_u32 = | C_u32 : Core.Int.t_U32 -> t_u32 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Clone.t_Clone t_u32 = + { + f_clone_pre = (fun (self: t_u32) -> true); + f_clone_post = (fun (self: t_u32) (out: t_u32) -> true); + f_clone + = + fun (self: t_u32) -> + C_u32 (Core.Clone.f_clone #Core.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Cmp.t_PartialEq t_u32 t_u32 = + { + f_eq_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_eq_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_eq = (fun (self: t_u32) (rhs: t_u32) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_ne_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_ne = fun (self: t_u32) (rhs: t_u32) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Cmp.t_PartialOrd t_u32 t_u32 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_partial_cmp_post + = + (fun (self: t_u32) (rhs: t_u32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_u32) (rhs: t_u32) -> + Core.Cmp.f_partial_cmp #Core.Int.t_U32 + #Core.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_lt_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_lt + = + (fun (self: t_u32) (rhs: t_u32) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U32 + #Core.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_le_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_le + = + (fun (self: t_u32) (rhs: t_u32) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U32 + #Core.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_gt_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_gt + = + (fun (self: t_u32) (rhs: t_u32) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U32 + #Core.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_ge_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_ge + = + fun (self: t_u32) (rhs: t_u32) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U32 + #Core.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +type t_u64 = | C_u64 : Core.Int.t_U64 -> t_u64 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Clone.t_Clone t_u64 = + { + f_clone_pre = (fun (self: t_u64) -> true); + f_clone_post = (fun (self: t_u64) (out: t_u64) -> true); + f_clone + = + fun (self: t_u64) -> + C_u64 (Core.Clone.f_clone #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Cmp.t_PartialEq t_u64 t_u64 = + { + f_eq_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_eq_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_eq = (fun (self: t_u64) (rhs: t_u64) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_ne_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_ne = fun (self: t_u64) (rhs: t_u64) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Cmp.t_PartialOrd t_u64 t_u64 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_partial_cmp_post + = + (fun (self: t_u64) (rhs: t_u64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_u64) (rhs: t_u64) -> + Core.Cmp.f_partial_cmp #Core.Int.t_U64 + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_lt_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_lt + = + (fun (self: t_u64) (rhs: t_u64) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U64 + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_le_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_le + = + (fun (self: t_u64) (rhs: t_u64) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U64 + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_gt_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_gt + = + (fun (self: t_u64) (rhs: t_u64) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U64 + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_ge_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_ge + = + fun (self: t_u64) (rhs: t_u64) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U64 + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +type t_u8 = | C_u8 : Core.Int.t_U8 -> t_u8 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Clone.t_Clone t_u8 = + { + f_clone_pre = (fun (self: t_u8) -> true); + f_clone_post = (fun (self: t_u8) (out: t_u8) -> true); + f_clone + = + fun (self: t_u8) -> + C_u8 (Core.Clone.f_clone #Core.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Cmp.t_PartialEq t_u8 t_u8 = + { + f_eq_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_eq_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_eq = (fun (self: t_u8) (rhs: t_u8) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_ne_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_ne = fun (self: t_u8) (rhs: t_u8) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Cmp.t_PartialOrd t_u8 t_u8 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_partial_cmp_post + = + (fun (self: t_u8) (rhs: t_u8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_u8) (rhs: t_u8) -> + Core.Cmp.f_partial_cmp #Core.Int.t_U8 + #Core.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_lt_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_lt + = + (fun (self: t_u8) (rhs: t_u8) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U8 + #Core.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_le_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_le + = + (fun (self: t_u8) (rhs: t_u8) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U8 + #Core.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_gt_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_gt + = + (fun (self: t_u8) (rhs: t_u8) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U8 + #Core.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_ge_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_ge + = + fun (self: t_u8) (rhs: t_u8) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U8 + #Core.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +type t_usize = | C_usize : Core.Int.t_U64 -> t_usize + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Clone.t_Clone t_usize = + { + f_clone_pre = (fun (self: t_usize) -> true); + f_clone_post = (fun (self: t_usize) (out: t_usize) -> true); + f_clone + = + fun (self: t_usize) -> + C_usize (Core.Clone.f_clone #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Cmp.t_PartialEq t_usize t_usize = + { + f_eq_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_eq_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_eq = (fun (self: t_usize) (rhs: t_usize) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_ne_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_ne = fun (self: t_usize) (rhs: t_usize) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Cmp.t_PartialOrd t_usize t_usize = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_partial_cmp_post + = + (fun (self: t_usize) (rhs: t_usize) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_usize) (rhs: t_usize) -> + Core.Cmp.f_partial_cmp #Core.Int.t_U64 + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_lt_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_lt + = + (fun (self: t_usize) (rhs: t_usize) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U64 + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_le_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_le + = + (fun (self: t_usize) (rhs: t_usize) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U64 + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_gt_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_gt + = + (fun (self: t_usize) (rhs: t_usize) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U64 + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_ge_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_ge + = + fun (self: t_usize) (rhs: t_usize) -> + match + Core.Cmp.f_partial_cmp #Core.Int.t_U64 + #Core.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Ops.Arith.t_Mul t_u8 t_u8 = + { + f_Output = t_u8; + f_mul_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_mul_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); + f_mul = fun (self: t_u8) (rhs: t_u8) -> C_u8 (self._0 *! rhs._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Ops.Arith.t_Rem t_u8 t_u8 = + { + f_Output = t_u8; + f_rem_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_rem_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); + f_rem = fun (self: t_u8) (rhs: t_u8) -> C_u8 (self._0 %! rhs._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Ops.Arith.t_Add t_u8 t_u8 = + { + f_Output = t_u8; + f_add_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_add_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); + f_add = fun (self: t_u8) (rhs: t_u8) -> C_u8 (self._0 +! rhs._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Ops.Arith.t_Div t_u8 t_u8 = + { + f_Output = t_u8; + f_div_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_div_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); + f_div = fun (self: t_u8) (rhs: t_u8) -> C_u8 (self._0 /! rhs._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Ops.Arith.t_Mul t_u16 t_u16 = + { + f_Output = t_u16; + f_mul_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_mul_post = (fun (self: t_u16) (rhs: t_u16) (out: t_u16) -> true); + f_mul = fun (self: t_u16) (rhs: t_u16) -> C_u16 (self._0 *! rhs._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Ops.Arith.t_Rem t_u16 t_u16 = + { + f_Output = t_u16; + f_rem_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_rem_post = (fun (self: t_u16) (rhs: t_u16) (out: t_u16) -> true); + f_rem = fun (self: t_u16) (rhs: t_u16) -> C_u16 (self._0 %! rhs._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Ops.Arith.t_Add t_u16 t_u16 = + { + f_Output = t_u16; + f_add_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_add_post = (fun (self: t_u16) (rhs: t_u16) (out: t_u16) -> true); + f_add = fun (self: t_u16) (rhs: t_u16) -> C_u16 (self._0 +! rhs._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Ops.Arith.t_Div t_u16 t_u16 = + { + f_Output = t_u16; + f_div_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_div_post = (fun (self: t_u16) (rhs: t_u16) (out: t_u16) -> true); + f_div = fun (self: t_u16) (rhs: t_u16) -> C_u16 (self._0 /! rhs._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Ops.Arith.t_Mul t_u32 t_u32 = + { + f_Output = t_u32; + f_mul_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_mul_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); + f_mul = fun (self: t_u32) (rhs: t_u32) -> C_u32 (self._0 *! rhs._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Ops.Arith.t_Rem t_u32 t_u32 = + { + f_Output = t_u32; + f_rem_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_rem_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); + f_rem = fun (self: t_u32) (rhs: t_u32) -> C_u32 (self._0 %! rhs._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Ops.Arith.t_Add t_u32 t_u32 = + { + f_Output = t_u32; + f_add_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_add_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); + f_add = fun (self: t_u32) (rhs: t_u32) -> C_u32 (self._0 +! rhs._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Ops.Arith.t_Div t_u32 t_u32 = + { + f_Output = t_u32; + f_div_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_div_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); + f_div = fun (self: t_u32) (rhs: t_u32) -> C_u32 (self._0 /! rhs._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Ops.Arith.t_Mul t_u64 t_u64 = + { + f_Output = t_u64; + f_mul_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_mul_post = (fun (self: t_u64) (rhs: t_u64) (out: t_u64) -> true); + f_mul = fun (self: t_u64) (rhs: t_u64) -> C_u64 (self._0 *! rhs._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Ops.Arith.t_Rem t_u64 t_u64 = + { + f_Output = t_u64; + f_rem_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_rem_post = (fun (self: t_u64) (rhs: t_u64) (out: t_u64) -> true); + f_rem = fun (self: t_u64) (rhs: t_u64) -> C_u64 (self._0 %! rhs._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Ops.Arith.t_Add t_u64 t_u64 = + { + f_Output = t_u64; + f_add_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_add_post = (fun (self: t_u64) (rhs: t_u64) (out: t_u64) -> true); + f_add = fun (self: t_u64) (rhs: t_u64) -> C_u64 (self._0 +! rhs._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Ops.Arith.t_Div t_u64 t_u64 = + { + f_Output = t_u64; + f_div_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_div_post = (fun (self: t_u64) (rhs: t_u64) (out: t_u64) -> true); + f_div = fun (self: t_u64) (rhs: t_u64) -> C_u64 (self._0 /! rhs._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Ops.Arith.t_Mul t_u128 t_u128 = + { + f_Output = t_u128; + f_mul_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_mul_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); + f_mul = fun (self: t_u128) (rhs: t_u128) -> C_u128 (self._0 *! rhs._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Ops.Arith.t_Rem t_u128 t_u128 = + { + f_Output = t_u128; + f_rem_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_rem_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); + f_rem = fun (self: t_u128) (rhs: t_u128) -> C_u128 (self._0 %! rhs._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Ops.Arith.t_Add t_u128 t_u128 = + { + f_Output = t_u128; + f_add_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_add_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); + f_add = fun (self: t_u128) (rhs: t_u128) -> C_u128 (self._0 +! rhs._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Ops.Arith.t_Div t_u128 t_u128 = + { + f_Output = t_u128; + f_div_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_div_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); + f_div = fun (self: t_u128) (rhs: t_u128) -> C_u128 (self._0 /! rhs._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Ops.Arith.t_Mul t_usize t_usize = + { + f_Output = t_usize; + f_mul_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_mul_post = (fun (self: t_usize) (rhs: t_usize) (out: t_usize) -> true); + f_mul = fun (self: t_usize) (rhs: t_usize) -> C_usize (self._0 *! rhs._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Ops.Arith.t_Rem t_usize t_usize = + { + f_Output = t_usize; + f_rem_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_rem_post = (fun (self: t_usize) (rhs: t_usize) (out: t_usize) -> true); + f_rem = fun (self: t_usize) (rhs: t_usize) -> C_usize (self._0 %! rhs._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Ops.Arith.t_Add t_usize t_usize = + { + f_Output = t_usize; + f_add_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_add_post = (fun (self: t_usize) (rhs: t_usize) (out: t_usize) -> true); + f_add = fun (self: t_usize) (rhs: t_usize) -> C_usize (self._0 +! rhs._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Ops.Arith.t_Div t_usize t_usize = + { + f_Output = t_usize; + f_div_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_div_post = (fun (self: t_usize) (rhs: t_usize) (out: t_usize) -> true); + f_div = fun (self: t_usize) (rhs: t_usize) -> C_usize (self._0 /! rhs._0) <: t_usize + } + +////////////////////////// + +type u128 = t_u128 +type u64 = t_u64 +type u32 = t_u32 +type u16 = t_u16 +type u8 = t_u8 +type usize = t_usize + +type pub_u128 x = C_u128 { f_v = x } +type pub_u64 x = C_u64 { f_v = x } +type pub_u32 x = C_u32 { f_v = x } +type pub_u16 x = C_u16 { f_v = x } +type pub_u8 x = C_u8 { f_v = x } +type sz x = C_usize { f_v = x } diff --git a/proof-libs/fstar/generated-core/Makefile b/proof-libs/fstar/generated-core/Makefile new file mode 100644 index 000000000..c2b2db6e1 --- /dev/null +++ b/proof-libs/fstar/generated-core/Makefile @@ -0,0 +1,26 @@ +FSTAR_DEFAULT_ARGS= +ifdef FSTAR_HOME + ULIB_ML=$(FSTAR_HOME)/ulib/ml + FSTARLIB_DIR=$(FSTAR_HOME)/lib/fstar/lib +else + FSTAR_PREFIX=$(dir $(shell which fstar.exe))/.. + ULIB_ML=$(FSTAR_PREFIX)/lib/fstar/ml + FSTARLIB_DIR=$(FSTAR_PREFIX)/lib/fstar/lib +endif +FSTARLIB=$(FSTARLIB_DIR)/fstar_lib.cmxa + +# Left as an example if we were to add multiple versions of fstar ulib +# ifeq ($(MEM),HST) +# OCAML_DEFAULT_FLAGS=-predicates hyperstack +# endif + +ifdef FSTAR_HOME + WITH_OCAMLPATH=OCAMLPATH=$(FSTAR_HOME)/lib +else + WITH_OCAMLPATH= +endif +OCAMLOPT_BARE=$(WITH_OCAMLPATH) ocamlfind opt +OCAMLOPT_=$(OCAMLOPT_BARE) -package fstar.lib -linkpkg -g +OCAMLOPT=$(OCAMLOPT_) $(OCAML_DEFAULT_FLAGS) +OCAMLC_=$(WITH_OCAMLPATH) ocamlfind c -package fstar.lib -linkpkg -g +OCAMLC=$(OCAMLC_) $(OCAML_DEFAULT_FLAGS) diff --git a/proof-libs/fstar/generated-core/Prelude.fst b/proof-libs/fstar/generated-core/Prelude.fst new file mode 100644 index 000000000..2c4afaac6 --- /dev/null +++ b/proof-libs/fstar/generated-core/Prelude.fst @@ -0,0 +1,599 @@ +module Prelude +#set-options "--fuel 1 --ifuel 1 --z3rlimit 15" + +open Core.Array +open Core.Primitive +open Core.Base.Int.Number_conversion +open Core.Convert +open Core.Base.Int +open Core.Ops.Arith +open Core.Ops.Bit +// open Core.Num +open Core.Int + +let array_of_list n l : t_Array u8 (sz n) = + { f_v = l } + +let v_RCON: t_Array u8 (sz 15) = + let list = + [(pub_u8 141); (pub_u8 1); (pub_u8 2); (pub_u8 4); (pub_u8 8); (pub_u8 16); (pub_u8 32); (pub_u8 64); (pub_u8 128); (pub_u8 27); (pub_u8 54); (pub_u8 108); (pub_u8 216); (pub_u8 171); (pub_u8 77)] + in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 15); + array_of_list 15 list + +let v_SBOX: t_Array u8 (sz 256) = + let list = + [ + (pub_u8 99); (pub_u8 124); (pub_u8 119); (pub_u8 123); (pub_u8 242); (pub_u8 107); (pub_u8 111); (pub_u8 197); (pub_u8 48); (pub_u8 1); (pub_u8 103); (pub_u8 43); (pub_u8 254); (pub_u8 215); + (pub_u8 171); (pub_u8 118); (pub_u8 202); (pub_u8 130); (pub_u8 201); (pub_u8 125); (pub_u8 250); (pub_u8 89); (pub_u8 71); (pub_u8 240); (pub_u8 173); (pub_u8 212); (pub_u8 162); (pub_u8 175); + (pub_u8 156); (pub_u8 164); (pub_u8 114); (pub_u8 192); (pub_u8 183); (pub_u8 253); (pub_u8 147); (pub_u8 38); (pub_u8 54); (pub_u8 63); (pub_u8 247); (pub_u8 204); (pub_u8 52); (pub_u8 165); + (pub_u8 229); (pub_u8 241); (pub_u8 113); (pub_u8 216); (pub_u8 49); (pub_u8 21); (pub_u8 4); (pub_u8 199); (pub_u8 35); (pub_u8 195); (pub_u8 24); (pub_u8 150); (pub_u8 5); (pub_u8 154); (pub_u8 7); + (pub_u8 18); (pub_u8 128); (pub_u8 226); (pub_u8 235); (pub_u8 39); (pub_u8 178); (pub_u8 117); (pub_u8 9); (pub_u8 131); (pub_u8 44); (pub_u8 26); (pub_u8 27); (pub_u8 110); (pub_u8 90); + (pub_u8 160); (pub_u8 82); (pub_u8 59); (pub_u8 214); (pub_u8 179); (pub_u8 41); (pub_u8 227); (pub_u8 47); (pub_u8 132); (pub_u8 83); (pub_u8 209); (pub_u8 0); (pub_u8 237); (pub_u8 32); + (pub_u8 252); (pub_u8 177); (pub_u8 91); (pub_u8 106); (pub_u8 203); (pub_u8 190); (pub_u8 57); (pub_u8 74); (pub_u8 76); (pub_u8 88); (pub_u8 207); (pub_u8 208); (pub_u8 239); (pub_u8 170); + (pub_u8 251); (pub_u8 67); (pub_u8 77); (pub_u8 51); (pub_u8 133); (pub_u8 69); (pub_u8 249); (pub_u8 2); (pub_u8 127); (pub_u8 80); (pub_u8 60); (pub_u8 159); (pub_u8 168); (pub_u8 81); (pub_u8 163); + (pub_u8 64); (pub_u8 143); (pub_u8 146); (pub_u8 157); (pub_u8 56); (pub_u8 245); (pub_u8 188); (pub_u8 182); (pub_u8 218); (pub_u8 33); (pub_u8 16); (pub_u8 255); (pub_u8 243); (pub_u8 210); + (pub_u8 205); (pub_u8 12); (pub_u8 19); (pub_u8 236); (pub_u8 95); (pub_u8 151); (pub_u8 68); (pub_u8 23); (pub_u8 196); (pub_u8 167); (pub_u8 126); (pub_u8 61); (pub_u8 100); (pub_u8 93); + (pub_u8 25); (pub_u8 115); (pub_u8 96); (pub_u8 129); (pub_u8 79); (pub_u8 220); (pub_u8 34); (pub_u8 42); (pub_u8 144); (pub_u8 136); (pub_u8 70); (pub_u8 238); (pub_u8 184); (pub_u8 20); + (pub_u8 222); (pub_u8 94); (pub_u8 11); (pub_u8 219); (pub_u8 224); (pub_u8 50); (pub_u8 58); (pub_u8 10); (pub_u8 73); (pub_u8 6); (pub_u8 36); (pub_u8 92); (pub_u8 194); (pub_u8 211); (pub_u8 172); + (pub_u8 98); (pub_u8 145); (pub_u8 149); (pub_u8 228); (pub_u8 121); (pub_u8 231); (pub_u8 200); (pub_u8 55); (pub_u8 109); (pub_u8 141); (pub_u8 213); (pub_u8 78); (pub_u8 169); (pub_u8 108); + (pub_u8 86); (pub_u8 244); (pub_u8 234); (pub_u8 101); (pub_u8 122); (pub_u8 174); (pub_u8 8); (pub_u8 186); (pub_u8 120); (pub_u8 37); (pub_u8 46); (pub_u8 28); (pub_u8 166); (pub_u8 180); + (pub_u8 198); (pub_u8 232); (pub_u8 221); (pub_u8 116); (pub_u8 31); (pub_u8 75); (pub_u8 189); (pub_u8 139); (pub_u8 138); (pub_u8 112); (pub_u8 62); (pub_u8 181); (pub_u8 102); (pub_u8 72); + (pub_u8 3); (pub_u8 246); (pub_u8 14); (pub_u8 97); (pub_u8 53); (pub_u8 87); (pub_u8 185); (pub_u8 134); (pub_u8 193); (pub_u8 29); (pub_u8 158); (pub_u8 225); (pub_u8 248); (pub_u8 152); + (pub_u8 17); (pub_u8 105); (pub_u8 217); (pub_u8 142); (pub_u8 148); (pub_u8 155); (pub_u8 30); (pub_u8 135); (pub_u8 233); (pub_u8 206); (pub_u8 85); (pub_u8 40); (pub_u8 223); (pub_u8 140); + (pub_u8 161); (pub_u8 137); (pub_u8 13); (pub_u8 191); (pub_u8 230); (pub_u8 66); (pub_u8 104); (pub_u8 65); (pub_u8 153); (pub_u8 45); (pub_u8 15); (pub_u8 176); (pub_u8 84); (pub_u8 187); + (pub_u8 22) + ] + in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 256); + array_of_list 256 list + +(* Manually added *) +class t_Cast (v_Self: Type0) (v_T: Type0) = { + cast_pre:v_T -> Type0; + cast_post:v_T -> v_Self -> Type0; + cast:x0: v_T -> Prims.Pure v_Self (cast_pre x0) (fun result -> cast_post x0 result) +} + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_cast_u128_u32 : t_Cast u32 u128 = + { + cast_pre = (fun (self: t_u128) -> true); + cast_post = (fun (self: t_u128) (out: t_u32) -> true); + cast + = + fun (self: t_u128) -> C_u32 ({f_v = (match self with C_u128 v -> v.f_v % pow2 32)} <: t_U32) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_cast_u32_u128 : t_Cast u128 u32 = + { + cast_pre = (fun (self: t_u32) -> true); + cast_post = (fun (self: t_u32) (out: t_u128) -> true); + cast + = + fun (self: t_u32) -> C_u128 ({f_v = (match self with C_u32 v -> v.f_v)} <: t_U128) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_cast_u32_u8 : t_Cast u8 u32 = + { + cast_pre = (fun (self: t_u32) -> true); + cast_post = (fun (self: t_u32) (out: t_u8) -> true); + cast + = + fun (self: t_u32) -> C_u8 ({f_v = (match self with C_u32 v -> v.f_v % pow2 8)} <: t_U8) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_cast_u8_u32 : t_Cast u32 u8 = + { + cast_pre = (fun (self: t_u8) -> true); + cast_post = (fun (self: t_u8) (out: t_u32) -> true); + cast + = + fun (self: t_u8) -> C_u32 ({f_v = (match self with C_u8 v -> v.f_v)} <: t_U32) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_cast_u8_usize : t_Cast usize u8 = + { + cast_pre = (fun (self: t_u8) -> true); + cast_post = (fun (self: t_u8) (out: t_usize) -> true); + cast + = + fun (self: t_u8) -> C_usize ({f_v = (match self with C_u8 v -> v.f_v)} <: t_U64) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_shr_u128: Core.Ops.Bit.t_Shr t_u128 t_usize = + { + f_Output = t_u128; + f_shr_pre = (fun (self: t_u128) (rhs: t_usize) -> true); + f_shr_post = (fun (self: t_u128) (rhs: t_usize) (out: t_u128) -> true); + f_shr + = + fun (self: t_u128) (rhs: t_usize) -> C_u128 ((match self with C_u128 v -> v <: t_U128) >>! (match rhs with C_usize v -> v <: t_U64)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_shr_u32_usize: Core.Ops.Bit.t_Shr t_u32 t_usize = + { + f_Output = t_u32; + f_shr_pre = (fun (self: t_u32) (rhs: t_usize) -> true); + f_shr_post = (fun (self: t_u32) (rhs: t_usize) (out: t_u32) -> true); + f_shr + = + fun (self: t_u32) (rhs: t_usize) -> C_u32 ((match self with C_u32 v -> v <: t_U32) >>! (match rhs with C_usize v -> v <: t_U64)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_shr_u8_usize: Core.Ops.Bit.t_Shr t_u8 t_usize = + { + f_Output = t_u8; + f_shr_pre = (fun (self: t_u8) (rhs: t_usize) -> true); + f_shr_post = (fun (self: t_u8) (rhs: t_usize) (out: t_u8) -> true); + f_shr + = + fun (self: t_u8) (rhs: t_usize) -> C_u8 ((match self with C_u8 v -> v <: t_U8) >>! (match rhs with C_usize v -> v <: t_U64)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_shr_u8_u128: Core.Ops.Bit.t_Shr t_u8 t_u128 = + { + f_Output = t_u8; + f_shr_pre = (fun (self: t_u8) (rhs: t_u128) -> true); + f_shr_post = (fun (self: t_u8) (rhs: t_u128) (out: t_u8) -> true); + f_shr + = + fun (self: t_u8) (rhs: t_u128) -> C_u8 ((match self with C_u8 v -> v <: t_U8) >>! (match rhs with C_u128 v -> v <: t_U128)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_u128_u128: Core.Ops.Bit.t_Shl t_u128 t_u128 = + { + f_Output = t_u128; + f_shl_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_shl_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); + f_shl + = + fun (self: t_u128) (rhs: t_u128) -> C_u128 ((match self with C_u128 v -> v <: t_U128) < v <: t_U128)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_u32_u128: Core.Ops.Bit.t_Shl t_u32 t_u128 = + { + f_Output = t_u32; + f_shl_pre = (fun (self: t_u32) (rhs: t_u128) -> true); + f_shl_post = (fun (self: t_u32) (rhs: t_u128) (out: t_u32) -> true); + f_shl + = + fun (self: t_u32) (rhs: t_u128) -> C_u32 ((match self with C_u32 v -> v <: t_U32) < v <: t_U128)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_u8_u128: Core.Ops.Bit.t_Shl t_u8 t_u128 = + { + f_Output = t_u8; + f_shl_pre = (fun (self: t_u8) (rhs: t_u128) -> true); + f_shl_post = (fun (self: t_u8) (rhs: t_u128) (out: t_u8) -> true); + f_shl + = + fun (self: t_u8) (rhs: t_u128) -> C_u8 ((match self with C_u8 v -> v <: t_U8) < v <: t_U128)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_bitor_u128: Core.Ops.Bit.t_BitOr t_u128 t_u128 = + { + f_Output = t_u128; + f_bitor_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_bitor_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); + f_bitor + = + fun (self: t_u128) (rhs: t_u128) -> C_u128 ((match self with C_u128 v -> v <: t_U128) |. (match rhs with C_u128 v -> v <: t_U128)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_bitor_u32: Core.Ops.Bit.t_BitOr t_u32 t_u32 = + { + f_Output = t_u32; + f_bitor_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_bitor_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); + f_bitor + = + fun (self: t_u32) (rhs: t_u32) -> C_u32 ((match self with C_u32 v -> v <: t_U32) |. (match rhs with C_u32 v -> v <: t_U32)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_bitxor_u32: Core.Ops.Bit.t_BitXor t_u32 t_u32 = + { + f_Output = t_u32; + f_bitxor_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_bitxor_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); + f_bitxor + = + fun (self: t_u32) (rhs: t_u32) -> C_u32 ((match self with C_u32 v -> v <: t_U32) ^. (match rhs with C_u32 v -> v <: t_U32)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_bitxor_u128: Core.Ops.Bit.t_BitXor t_u128 t_u128 = + { + f_Output = t_u128; + f_bitxor_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_bitxor_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); + f_bitxor + = + fun (self: t_u128) (rhs: t_u128) -> C_u128 ((match self with C_u128 v -> v <: t_U128) ^. (match rhs with C_u128 v -> v <: t_U128)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_bitxor_u8: Core.Ops.Bit.t_BitXor t_u8 t_u8 = + { + f_Output = t_u8; + f_bitxor_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_bitxor_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); + f_bitxor + = + fun (self: t_u8) (rhs: t_u8) -> C_u8 ((match self with C_u8 v -> v <: t_U8) ^. (match rhs with C_u8 v -> v <: t_U8)) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_bitand_u8: Core.Ops.Bit.t_BitAnd t_u8 t_u8 = + { + f_Output = t_u8; + f_bitand_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_bitand_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); + f_bitand + = + fun (self: t_u8) (rhs: t_u8) -> C_u8 ((match self with C_u8 v -> v <: t_U8) &. (match rhs with C_u8 v -> v <: t_U8)) + } + +(* / Manually added *) + +let index_u32 (s: u128) (i: usize) : u32 = + cast ((s >>! (i *! sz 32 <: usize) <: u128) %! (pub_u128 1 <>! (i *! sz 8 <: usize) <: u32) %! ((pub_u32 1) < v.f_v < 256}) = impl_2__index #u8 (sz 256) (v_SBOX) (sz 255) <: u8 + +let sub0_not (v: u8) = (v_SBOX).[ (cast v <: usize) ] <: u8 +let subi (v: u32) (n: Prims.nat {n < 4}) = sub0_not (index_u8 v (sz n) <: u8) // v_SBOX.[ cast (index_u8 v (sz 0) <: u8) <: usize ] <: u8 + +let subword (v: u32) : u32 = + rebuild_u32 (subi v 0) (subi v 1) (subi v 2) (subi v 3) + // rebuild_u32 (v_SBOX.[ cast (index_u8 v (sz 0) <: u8) <: usize ] <: u8) + // (v_SBOX.[ cast (index_u8 v (sz 1) <: u8) <: usize ] <: u8) + // (v_SBOX.[ cast (index_u8 v (sz 2) <: u8) <: usize ] <: u8) + // (v_SBOX.[ cast (index_u8 v (sz 3) <: u8) <: usize ] <: u8) + +let aeskeygenassist (v1: u128) (v2: u8) : u128 = + let x1:u32 = index_u32 v1 (sz 1) in + let x3:u32 = index_u32 v1 (sz 3) in + let y0:u32 = subword x1 in + let y1:u32 = (rotword y0 <: u32) ^. (cast (v2 <: u8) <: u32) in + let y2:u32 = subword x3 in + let y3:u32 = (rotword y2 <: u32) ^. (cast (v2 <: u8) <: u32) in + rebuild_u128 y0 y1 y2 y3 + +let subbytes (s: u128) : u128 = + rebuild_u128 (subword (index_u32 s (sz 0) <: u32) <: u32) + (subword (index_u32 s (sz 1) <: u32) <: u32) + (subword (index_u32 s (sz 2) <: u32) <: u32) + (subword (index_u32 s (sz 3) <: u32) <: u32) + +let aesenclast (state rkey: u128) : u128 = + let state:u128 = shiftrows state in + let state:u128 = subbytes state in + state ^. rkey + +let vpshufd1 (s: u128) (o: u8) (i: usize) : u32 = + index_u32 (s >>! + (sz 32 *! (cast ((o >>! (sz 2 *! i <: usize) <: u8) %! (pub_u8 4) <: u8) <: usize) <: usize) + <: + u128) + (sz 0) + +let vpshufd (s: u128) (o: u8) : u128 = + let (d1: u32):u32 = vpshufd1 s o (sz 0) in + let (d2: u32):u32 = vpshufd1 s o (sz 1) in + let (d3: u32):u32 = vpshufd1 s o (sz 2) in + let (d4: u32):u32 = vpshufd1 s o (sz 3) in + rebuild_u128 d1 d2 d3 d4 + +let vshufps (s1 s2: u128) (o: u8) : u128 = + let (d1: u32):u32 = vpshufd1 s1 o (sz 0) in + let (d2: u32):u32 = vpshufd1 s1 o (sz 1) in + let (d3: u32):u32 = vpshufd1 s2 o (sz 2) in + let (d4: u32):u32 = vpshufd1 s2 o (sz 3) in + rebuild_u128 d1 d2 d3 d4 + +let key_combine (rkey temp1 temp2: u128) : (u128 & u128) = + let temp1:u128 = vpshufd temp1 (pub_u8 255) in + let temp2:u128 = vshufps temp2 rkey (pub_u8 16) in + let rkey:u128 = rkey ^. temp2 in + let temp2:u128 = vshufps temp2 rkey (pub_u8 140) in + let rkey:u128 = rkey ^. temp2 in + let rkey:u128 = rkey ^. temp1 in + rkey, temp2 <: (u128 & u128) + +let key_expand (rcon: u8) (rkey temp2: u128) : (u128 & u128) = + let temp1:u128 = aeskeygenassist rkey rcon in + key_combine rkey temp1 temp2 + +let xtime (x: u8) : u8 = + let x1:u8 = x <>! (pub_u128 7) in + let x71:u8 = x7 &. (pub_u8 1) in + let x711b:u8 = x71 *! (pub_u8 27) in + x1 ^. x711b + +let mixcolumn (c: usize) (state: u128) : u32 = + let s0:u8 = matrix_index state (sz 0) c in + let s1:u8 = matrix_index state (sz 1) c in + let s2:u8 = matrix_index state (sz 2) c in + let s3:u8 = matrix_index state (sz 3) c in + let tmp:u8 = ((s0 ^. s1 <: u8) ^. s2 <: u8) ^. s3 in + let r0:u8 = (s0 ^. tmp <: u8) ^. (xtime (s0 ^. s1 <: u8) <: u8) in + let r1:u8 = (s1 ^. tmp <: u8) ^. (xtime (s1 ^. s2 <: u8) <: u8) in + let r2:u8 = (s2 ^. tmp <: u8) ^. (xtime (s2 ^. s3 <: u8) <: u8) in + let r3:u8 = (s3 ^. tmp <: u8) ^. (xtime (s3 ^. s0 <: u8) <: u8) in + rebuild_u32 r0 r1 r2 r3 + +let mixcolumns (state: u128) : u128 = + let c0:u32 = mixcolumn (sz 0) state in + let c1:u32 = mixcolumn (sz 1) state in + let c2:u32 = mixcolumn (sz 2) state in + let c3:u32 = mixcolumn (sz 3) state in + rebuild_u128 c0 c1 c2 c3 + +let aesenc (state rkey: u128) : u128 = + let state:u128 = shiftrows state in + let state:u128 = subbytes state in + let state:u128 = mixcolumns state in + state ^. rkey + +type sz_small = x:usize{match x with | C_usize v -> v.f_v < 12} + +open Core.Cmp + +let aes_helper (rkeys: t_Array u128 (sz 12)) (i : Prims.nat {i < 12}) : Lemma (requires (Core.Base.Seq.Base_impl.impl_2__len #u128 rkeys.f_v <: Core.Base.Int.t_HaxInt) = 12) (ensures ((Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve (sz i)) <. (Core.Base.Seq.Base_impl.impl_2__len #u128 rkeys.f_v <: Core.Base.Int.t_HaxInt))) = () + +#set-options "--fuel 100 --ifuel 1 --z3rlimit 15" +let aes_rounds (rkeys: t_Array u128 (sz 12) {(Core.Base.Seq.Base_impl.impl_2__len #u128 rkeys.f_v <: Core.Base.Int.t_HaxInt) = 12} ) (inp: u128) : u128 = + let _ = aes_helper rkeys in + let (state: u128):u128 = inp ^. (rkeys.[ sz 0 <: sz_small ] <: u128) + in + let state:u128 = + (let state:u128 = state in + let state:u128 = ( aes_helper rkeys 1 ; aesenc state (rkeys.[ sz 1 ] <: u128)) in + let state:u128 = ( aes_helper rkeys 2 ; aesenc state (rkeys.[ sz 2 ] <: u128)) in + let state:u128 = ( aes_helper rkeys 3 ; aesenc state (rkeys.[ sz 3 ] <: u128) ) in + let state:u128 = ( aes_helper rkeys 4 ; aesenc state (rkeys.[ sz 4 ] <: u128) ) in + let state:u128 = ( aes_helper rkeys 5 ; aesenc state (rkeys.[ sz 5 ] <: u128) ) in + let state:u128 = ( aes_helper rkeys 6 ; aesenc state (rkeys.[ sz 6 ] <: u128) ) in + let state:u128 = ( aes_helper rkeys 7 ; aesenc state (rkeys.[ sz 7 ] <: u128) ) in + let state:u128 = ( aes_helper rkeys 8 ; aesenc state (rkeys.[ sz 8 ] <: u128) ) in + let state:u128 = ( aes_helper rkeys 9 ; aesenc state (rkeys.[ sz 9 ] <: u128) ) in + let state:u128 = ( aes_helper rkeys 10 ; aesenc state (rkeys.[ sz 10 ] <: u128) ) in + state + ) + + // Rust_primitives.Hax.Folds.fold_range (sz 1) + // (sz 10) + // (fun state temp_1_ -> + // let state:u128 = state in + // let _:usize = temp_1_ in + // true) + // state + // (fun state round -> + // let state:u128 = state in + // let round:usize = round in + // aesenc state (rkeys.[ round ] <: u128) <: u128) + in + aesenclast state (rkeys.[ sz 10 ] <: u128) + +type rkeys_typ = x:t_Array u128 (sz 12){Core.Base.Seq.Base_impl.impl_2__len #u128 x.f_v = 12} + +#set-options "--fuel 1 --ifuel 1 --z3rlimit 15" +let rec new_is_sized_correct (n : Prims.nat{n < 20}) : Lemma (requires true) (ensures (Core.Base.Seq.Base_impl.impl_2__len #u128 (impl_2__new (sz n) (pub_u128 0)).f_v = n)) = + match Core.Base.Seq.Base_spec.impl_1__match_list #u128 ((impl_2__new (sz n) (pub_u128 0)).f_v) with + | Core.Base.Seq.LIST_NIL -> () + | Core.Base.Seq.LIST_CONS _ tl -> + (new_is_sized_correct (n-1)) + // Core.Base.Int.Base_spec.impl_9__succ (Core.Base.Seq.Base_impl.impl_2__len #u128 tl <: Core.Base.Int.t_HaxInt) + +#set-options "--fuel 20 --ifuel 1 --z3rlimit 30" +let rec set_index_is_sized_correct (ms : Prims.nat{ms < 13}) (n : Prims.nat{n < ms}) (rkeys : t_Array u128 (sz ms)) key : Lemma (requires Core.Base.Seq.Base_impl.impl_2__len #u128 rkeys.f_v = ms) (ensures (Core.Base.Seq.Base_impl.impl_2__len #u128 (impl_2__set_index (sz ms) rkeys (sz n) key).f_v = ms)) = + match Core.Base.Seq.Base_spec.impl_1__match_list #u128 (impl_2__set_index (sz ms) rkeys (sz n) key).f_v with + | Core.Base.Seq.LIST_NIL -> () + | Core.Base.Seq.LIST_CONS _ tl -> + if n = 0 + then () + else + (set_index_is_sized_correct (ms-1) (n-1) { f_v = tl } key) + // Core.Base.Int.Base_spec.impl_9__succ (impl_2__len #v_T tl <: Core.Base.Int.t_HaxInt) + +type usize_small = x:usize{match x with | C_usize v -> v.f_v < 12} + +#set-options "--fuel 300 --ifuel 1 --z3rlimit 30 --split_queries always" +let sub_round_i (key, rkeys, temp2:(u128 & rkeys_typ & u128)) (i : Prims.nat{i<12}) : (u128 & rkeys_typ & u128) = + let rkeys:rkeys_typ = + (set_index_is_sized_correct 12 i rkeys key ; impl_2__set_index (sz 12) rkeys (sz i) key) + in + key, rkeys, temp2 + +let round_i (key, rkeys, temp2:(u128 & rkeys_typ & u128)) (i : Prims.nat{i<12}) : (u128 & rkeys_typ & u128) = + let round:usize_small = sz i in + let rcon:u8 = v_RCON.[ round ] in + let key, temp2:(u128 & u128) = key_expand rcon key temp2 in + sub_round_i (key, rkeys, temp2) i + +let keys_expand (key: u128) : rkeys_typ = + let (rkeys: rkeys_typ) = + (new_is_sized_correct 12; impl_2__new (sz 12) (pub_u128 0)) + in + let key:u128 = key in + let rkeys:rkeys_typ = + impl_2__set_index (sz 12) rkeys (sz 0) key + in + let (temp2: u128):u128 = pub_u128 0 in + let key, rkeys, temp2:(u128 & rkeys_typ & u128) = + ( + let temp0 = (key, rkeys, temp2 <: (u128 & rkeys_typ & u128)) in + let temp0 = round_i temp0 1 in + let temp0 = round_i temp0 2 in + let temp0 = round_i temp0 3 in + let temp0 = round_i temp0 4 in + let temp0 = round_i temp0 5 in + let temp0 = round_i temp0 6 in + let temp0 = round_i temp0 7 in + let temp0 = round_i temp0 8 in + let temp0 = round_i temp0 9 in + let temp0 = round_i temp0 10 in + let temp0 = round_i temp0 11 in + temp0 + ) + // Rust_primitives.Hax.Folds.fold_range (sz 1) + // (sz 11) + // (fun temp_0_ temp_1_ -> + // let key, rkeys, temp2:(u128 & t_Array u128 (sz 12) & u128) = temp_0_ in + // let _:usize = temp_1_ in + // true) + // (key, rkeys, temp2 <: (u128 & t_Array u128 (sz 12) & u128)) + // (fun temp_0_ round -> + // let key, rkeys, temp2:(u128 & t_Array u128 (sz 12) & u128) = temp_0_ in + // let round:usize = round in + // let rcon:u8 = v_RCON.[ round ] in + // let key_temp, temp2_temp:(u128 & u128) = key_expand rcon key temp2 in + // let key:u128 = key_temp in + // let temp2:u128 = temp2_temp in + // let rkeys:t_Array u128 (sz 12) = + // Rust_primitives.Hax.Monomorphized_update_at.update_at_usize rkeys round key + // in + // key, rkeys, temp2 <: (u128 & t_Array u128 (sz 12) & u128)) + in + rkeys + +let aes (key inp: u128) : u128 = + let rkeys:rkeys_typ = keys_expand key in + aes_rounds rkeys inp + +//A main program, which sorts a list and prints it before and after +let main () = + let msg = "" in + // let msg = + // let key = pub_u128 0x3c4fcf098815f7aba6d2ae2816157e2b in + // Printf.sprintf "%s vs %s" + // (string_of_int (match (aeskeygenassist key (v_RCON.[sz 1])) with | C_u128 v -> v.f_v)) + // (string_of_int (match (pub_u128 0x01eb848beb848a013424b5e524b5e434) with | C_u128 v -> v.f_v)) + // in + + // let msg = + // let key = pub_u128 0x3c4fcf098815f7aba6d2ae2816157e2b in + // let (lhs, _) = key_combine key (aeskeygenassist key v_RCON.[sz 1]) (pub_u128 0) in + + // let rhs = pub_u128 0x05766c2a3939a323b12c548817fefaa0 in + + // Printf.sprintf "%s\n%s vs %s" msg + // (string_of_int (match lhs with | C_u128 v -> v.f_v)) + // (string_of_int (match rhs with | C_u128 v -> v.f_v)) + // in + +// let msg = +// let inp = pub_u128 0x627a6f6644b109c82b18330a81c3b3e5 in +// let lhs = mixcolumns(inp) in +// let rhs = pub_u128 0x7b5b54657374566563746f725d53475d in + +// Printf.sprintf "%s\nleft: %s\nright: %s\n" msg +// (string_of_int (match lhs with | C_u128 v -> v.f_v)) +// (string_of_int (match rhs with | C_u128 v -> v.f_v)) +// in + + let msg = + let rkey = pub_u128 0x48692853686179295b477565726f6e5d in + let state = pub_u128 0x7b5b54657374566563746f725d53475d in + let lhs = aesenc state rkey in + let rhs = pub_u128 0xa8311c2f9fdba3c58b104b58ded7e595 in + Printf.sprintf "%s\nleft: %s\nright: %s\n" msg + (string_of_int (match lhs with | C_u128 v -> v.f_v)) + (string_of_int (match rhs with | C_u128 v -> v.f_v)) + in + + // let msg = + // let key = pub_u128 0x3c4fcf098815f7aba6d2ae2816157e2b in + // let inp = pub_u128 0x340737e0a29831318d305a88a8f64332 in + // let ctx = pub_u128 0x320b6a19978511dcfb09dc021d842539 in + + // let enc_val = (aes key inp) in + // Printf.sprintf "%s\nAES(Key = %s, Msg = %s) = %s\n vs %s\n" + // msg + // (string_of_int (match key with | C_u128 v -> v.f_v)) + // (string_of_int (match inp with | C_u128 v -> v.f_v)) + // (string_of_int (match enc_val with | C_u128 v -> v.f_v <: nat)) + // (string_of_int (match ctx with | C_u128 v -> v.f_v)) + // in + + FStar.IO.print_string msg + +//Run ``main ()`` when the module loads +#push-options "--warn_error -272" +let _ = main () +#pop-options + +// TO extract: fstar.exe --extract "*" --odir out --codegen OCaml Prelude.fst +// and to run: AESenc: cd out && OCAMLPATH=$FSTAR_HOME/lib ocamlbuild -use-ocamlfind -pkg batteries -pkg fstar.lib Prelude.native && ./Prelude.native From f85d0a3355a47a0dfa3dba5f9b2d1627b559fd28 Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Fri, 22 Nov 2024 13:25:17 +0100 Subject: [PATCH 20/59] Clean generated core --- .../fstar/generated-core/Core.Array.Iter.fst | 9 + .../fstar/generated-core/Core.Array.fst | 164 +- .../fstar/generated-core/Core.Base.Binary.fst | 168 + .../Core.Base.Int.Base_impl.fst | 853 --- .../Core.Base.Int.Base_spec.fst | 146 - .../Core.Base.Int.Number_conversion.fst | 340 - .../fstar/generated-core/Core.Base.Int.fst | 23 - .../Core.Base.Number_conversion.fst | 651 ++ .../fstar/generated-core/Core.Base.Pos.fst | 451 ++ .../Core.Base.Seq.Base_impl.fst | 221 - .../Core.Base.Seq.Base_spec.fst | 29 - .../fstar/generated-core/Core.Base.Seq.fst | 219 +- .../Core.Base.Spec.Binary.Pos.fst | 18 + .../Core.Base.Spec.Binary.Positive.fst | 127 + .../Core.Base.Spec.Constants.fst | 283 + .../generated-core/Core.Base.Spec.Haxint.fst | 98 + .../generated-core/Core.Base.Spec.Seq.fst | 94 + .../generated-core/Core.Base.Spec.Unary.fst | 70 + .../fstar/generated-core/Core.Base.Spec.Z.fst | 19 + .../fstar/generated-core/Core.Base.Z.fst | 400 ++ ...rce.fst => Core.Base_interface.Coerce.fst} | 16 +- .../Core.Base_interface.Int.I128_proofs.fst | 23 + .../Core.Base_interface.Int.I16_proofs.fst | 23 + .../Core.Base_interface.Int.I32_proofs.fst | 23 + .../Core.Base_interface.Int.I64_proofs.fst | 23 + .../Core.Base_interface.Int.I8_proofs.fst | 21 + .../Core.Base_interface.Int.U128_proofs.fst | 187 + .../Core.Base_interface.Int.U16_proofs.fst | 187 + .../Core.Base_interface.Int.U32_proofs.fst | 187 + .../Core.Base_interface.Int.U64_proofs.fst | 187 + .../Core.Base_interface.Int.U8_proofs.fst | 183 + .../Core.Base_interface.Int.fst | 5811 +++++++++++++++++ proof-libs/fstar/generated-core/Core.Cmp.fst | 46 +- .../fstar/generated-core/Core.Convert.fst | 16 +- proof-libs/fstar/generated-core/Core.Int.fst | 3568 ---------- .../fstar/generated-core/Core.Intrinsics.fst | 2569 +++++++- .../fstar/generated-core/Core.Iter.Range.fst | 457 ++ .../Core.Iter.Traits.Collect.fst | 37 + .../Core.Iter.Traits.Exact_size.fst | 16 + .../Core.Iter.Traits.Iterator.fst | 47 + .../Core.Iter.Traits.Marker.fst | 21 + .../fstar/generated-core/Core.Marker.fst | 8 +- proof-libs/fstar/generated-core/Core.Num.fst | 1303 +++- .../Core.Ops.Arith.Impls_for_prims.fst | 1186 ++++ .../fstar/generated-core/Core.Ops.Arith.fst | 30 - .../Core.Ops.Bit.Impls_for_prims.fst | 1796 +++++ .../fstar/generated-core/Core.Ops.Bit.fst | 23 - .../fstar/generated-core/Core.Ops.Deref.fst | 9 - .../generated-core/Core.Ops.Function.fst | 33 + .../fstar/generated-core/Core.Ops.Index.fst | 12 + .../generated-core/Core.Ops.Index_range.fst | 118 + .../fstar/generated-core/Core.Ops.Range.fst | 9 + .../fstar/generated-core/Core.Option.fst | 53 + .../fstar/generated-core/Core.Panicking.fst | 52 +- .../fstar/generated-core/Core.Prelude.fst | 4 - .../Core.Primitive.Number_conversion.fst | 733 +++ .../Core.Primitive.Number_conversion_i.fst | 718 ++ .../fstar/generated-core/Core.Primitive.fst | 984 ++- .../fstar/generated-core/Core.Result.fst | 13 + .../Core.Slice.Index.Private_slice_index.fst | 34 + .../fstar/generated-core/Core.Slice.Index.fst | 71 + .../fstar/generated-core/Core.Slice.Iter.fst | 42 + .../fstar/generated-core/Core.Slice.fst | 33 + proof-libs/fstar/generated-core/Makefile | 26 - proof-libs/fstar/generated-core/Prelude.fst | 599 -- 65 files changed, 19391 insertions(+), 6529 deletions(-) create mode 100644 proof-libs/fstar/generated-core/Core.Array.Iter.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Binary.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Int.Base_impl.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Int.Base_spec.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Int.Number_conversion.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Int.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Pos.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Seq.Base_impl.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Seq.Base_spec.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Pos.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Constants.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Haxint.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Z.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base.Z.fst rename proof-libs/fstar/generated-core/{Core.Coerce.fst => Core.Base_interface.Coerce.fst} (94%) create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.I128_proofs.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.I16_proofs.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.I32_proofs.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.I64_proofs.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.I8_proofs.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst create mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Int.fst create mode 100644 proof-libs/fstar/generated-core/Core.Iter.Range.fst create mode 100644 proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst create mode 100644 proof-libs/fstar/generated-core/Core.Iter.Traits.Exact_size.fst create mode 100644 proof-libs/fstar/generated-core/Core.Iter.Traits.Iterator.fst create mode 100644 proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst create mode 100644 proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst create mode 100644 proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Ops.Deref.fst create mode 100644 proof-libs/fstar/generated-core/Core.Ops.Function.fst create mode 100644 proof-libs/fstar/generated-core/Core.Ops.Index.fst create mode 100644 proof-libs/fstar/generated-core/Core.Ops.Index_range.fst create mode 100644 proof-libs/fstar/generated-core/Core.Ops.Range.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Prelude.fst create mode 100644 proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst create mode 100644 proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst create mode 100644 proof-libs/fstar/generated-core/Core.Result.fst create mode 100644 proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst create mode 100644 proof-libs/fstar/generated-core/Core.Slice.Index.fst create mode 100644 proof-libs/fstar/generated-core/Core.Slice.Iter.fst create mode 100644 proof-libs/fstar/generated-core/Core.Slice.fst delete mode 100644 proof-libs/fstar/generated-core/Makefile delete mode 100644 proof-libs/fstar/generated-core/Prelude.fst diff --git a/proof-libs/fstar/generated-core/Core.Array.Iter.fst b/proof-libs/fstar/generated-core/Core.Array.Iter.fst new file mode 100644 index 000000000..1dd1ec7ca --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Array.Iter.fst @@ -0,0 +1,9 @@ +module Core.Array.Iter +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_IntoIter (v_T: Type0) (v_N: usize) = { + f_data:Core.Primitive.t_Array v_T v_N; + f_alive:Core.Ops.Index_range.t_IndexRange +} diff --git a/proof-libs/fstar/generated-core/Core.Array.fst b/proof-libs/fstar/generated-core/Core.Array.fst index a3008ddd5..5aeb49ad9 100644 --- a/proof-libs/fstar/generated-core/Core.Array.fst +++ b/proof-libs/fstar/generated-core/Core.Array.fst @@ -3,149 +3,67 @@ module Core.Array open Core open FStar.Mul -open Core.Primitive -open Core.Cmp -open Core.Base.Int.Number_conversion - -type t_Array (v_T: eqtype) (v_N: usize) = { f_v:Core.Base.Seq.t_Seq v_T } +type t_TryFromSliceError = | TryFromSliceError : Prims.unit -> t_TryFromSliceError [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl - (#v_T: eqtype) +let impl_2 + (#v_T: Type0) (v_N: usize) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Clone.t_Clone (t_Array v_T v_N) = + : Core.Clone.t_Clone (Core.Primitive.t_Array v_T v_N) = { - f_clone_pre = (fun (self: t_Array v_T v_N) -> true); - f_clone_post = (fun (self: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); + f_clone_pre = (fun (self: Core.Primitive.t_Array v_T v_N) -> true); + f_clone_post + = + (fun (self: Core.Primitive.t_Array v_T v_N) (out: Core.Primitive.t_Array v_T v_N) -> true); f_clone = - fun (self: t_Array v_T v_N) -> - { f_v = Core.Base.Seq.Base_spec.impl__clone #v_T self.f_v } <: t_Array v_T v_N + fun (self: Core.Primitive.t_Array v_T v_N) -> + { + Core.Primitive.f_v + = + Core.Clone.f_clone #(Core.Primitive.t_Slice v_T) + #FStar.Tactics.Typeclasses.solve + self.Core.Primitive.f_v + } + <: + Core.Primitive.t_Array v_T v_N } [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_1 - (#v_T: eqtype) + (#v_T #v_I: Type0) (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Cmp.t_PartialEq v_T v_T) - : Core.Cmp.t_PartialEq (t_Array v_T v_N) (t_Array v_T v_N) = + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (#[FStar.Tactics.Typeclasses.tcresolve ()] + i3: + Core.Ops.Index.t_Index (Core.Primitive.t_Slice v_T) v_I) + : Core.Ops.Index.t_Index (Core.Primitive.t_Array v_T v_N) v_I = { - f_eq_pre = (fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) -> true); - f_eq_post = (fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) (out: bool) -> true); - f_eq + f_Output = i3.f_Output; + f_index_pre = (fun (self: Core.Primitive.t_Array v_T v_N) (index: v_I) -> true); + f_index_post = - (fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) -> - (Core.Base.Seq.Base_spec.impl__clone #v_T self.f_v <: Core.Base.Seq.t_Seq v_T) =. other.f_v); - f_ne_pre = (fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) -> true); - f_ne_post = (fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) (out: bool) -> true); - f_ne + (fun (self: Core.Primitive.t_Array v_T v_N) (index: v_I) (out: i3.f_Output) -> true); + f_index = - fun (self: t_Array v_T v_N) (other: t_Array v_T v_N) -> - ~.((Core.Base.Seq.Base_spec.impl__clone #v_T self.f_v <: Core.Base.Seq.t_Seq v_T) =. other.f_v - <: - bool) + fun (self: Core.Primitive.t_Array v_T v_N) (index: v_I) -> + (Core.Primitive.impl_3__cast #v_T v_N self <: Core.Primitive.t_Slice v_T).[ index ] } -let impl_2__reverse - (#v_T: eqtype) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: t_Array v_T v_N) - : t_Array v_T v_N = - { f_v = Core.Base.Seq.Base_impl.impl_2__rev #v_T self.f_v } <: t_Array v_T v_N - -// let lt_usize_implies_hax_int (x y: usize) -// : Lemma (requires x <. y) -// (ensures -// (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve x -// <: -// Core.Base.Int.t_HaxInt) <. -// (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve y -// <: -// Core.Base.Int.t_HaxInt)) = admit () - -// let lift_usize_equality (x: Core.Base.Int.t_HaxInt) (y: usize) -// : Lemma -// (requires -// x =. -// (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve y -// <: -// Core.Base.Int.t_HaxInt)) -// (ensures -// (Core.Convert.f_from #usize -// #Core.Base.Int.t_HaxInt -// #FStar.Tactics.Typeclasses.solve -// x -// <: -// usize) =. -// y) = admit () - -let impl_2__index - (#v_T: eqtype) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: t_Array v_T v_N) - (i: usize) - : Prims.Pure v_T - (requires - // (Core.Base.Seq.Base_impl.impl_2__len #v_T self.f_v <: Core.Base.Int.t_HaxInt) =. - // (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve v_N - // <: - // Core.Base.Int.t_HaxInt) && - // i <. v_N && - ((Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve i) <. (Core.Base.Seq.Base_impl.impl_2__len #v_T self.f_v <: Core.Base.Int.t_HaxInt))) - (fun _ -> Prims.l_True) = - Core.Base.Seq.Base_impl.impl_2__get_index #v_T - self.f_v - (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve i - <: - Core.Base.Int.t_HaxInt) - -let impl_2__new - (#v_T: eqtype) +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl + (#v_T: Type0) (v_N: usize) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (x: v_T) - : t_Array v_T v_N = + : Core.Convert.t_AsRef (Core.Primitive.t_Array v_T v_N) (Core.Primitive.t_Slice v_T) = { - f_v + f_as_ref_pre = (fun (self: Core.Primitive.t_Array v_T v_N) -> true); + f_as_ref_post = - Core.Base.Seq.Base_impl.impl_2__repeat #v_T - (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve v_N - <: - Core.Base.Int.t_HaxInt) - x - } - <: - t_Array v_T v_N - -let impl_2__set_index - (#v_T: eqtype) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: t_Array v_T v_N) - (i: usize) - (t: v_T) - : Prims.Pure (t_Array v_T v_N) - (requires - // (Core.Base.Seq.Base_impl.impl_2__len #v_T self.f_v <: Core.Base.Int.t_HaxInt) =. - // (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve v_N - // <: - // Core.Base.Int.t_HaxInt) && - // i <. v_N && - ((Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve i) <. (Core.Base.Seq.Base_impl.impl_2__len #v_T self.f_v <: Core.Base.Int.t_HaxInt))) - (fun _ -> Prims.l_True) = - { - f_v + (fun (self: Core.Primitive.t_Array v_T v_N) (out: Core.Primitive.t_Slice v_T) -> true); + f_as_ref = - Core.Base.Seq.Base_impl.impl_2__set_index #v_T - self.f_v - (Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve i - <: - Core.Base.Int.t_HaxInt) - t + fun (self: Core.Primitive.t_Array v_T v_N) -> + self.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] } - <: - t_Array v_T v_N diff --git a/proof-libs/fstar/generated-core/Core.Base.Binary.fst b/proof-libs/fstar/generated-core/Core.Base.Binary.fst new file mode 100644 index 000000000..9d4b38325 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Binary.fst @@ -0,0 +1,168 @@ +module Core.Base.Binary +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let rec positive_cmp__cmp_binary_cont + (x y: Core.Base.Spec.Binary.Positive.t_Positive) + (r: Core.Cmp.t_Ordering) + : Core.Cmp.t_Ordering = + match Core.Base.Spec.Binary.Positive.match_positive x with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + (match Core.Base.Spec.Binary.Positive.match_positive y with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> r + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + (match Core.Base.Spec.Binary.Positive.match_positive y with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> positive_cmp__cmp_binary_cont p q r + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + positive_cmp__cmp_binary_cont p q (Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + match Core.Base.Spec.Binary.Positive.match_positive y with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + positive_cmp__cmp_binary_cont p q (Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> positive_cmp__cmp_binary_cont p q r + +let positive_cmp (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) : Core.Cmp.t_Ordering = + positive_cmp__cmp_binary_cont lhs rhs (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + +let positive_le (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) : bool = + match + Core.Option.Option_Some (positive_cmp lhs rhs) <: Core.Option.t_Option Core.Cmp.t_Ordering + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + +let rec positive_pred_double (s: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Binary.Positive.t_Positive = + match Core.Base.Spec.Binary.Positive.match_positive s with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Binary.Positive.xH + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Core.Base.Spec.Binary.Positive.xI (positive_pred_double p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Core.Base.Spec.Binary.Positive.xI (Core.Base.Spec.Binary.Positive.xO p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let rec positive_succ (s: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Binary.Positive.t_Positive = + match Core.Base.Spec.Binary.Positive.match_positive s with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.xO Core.Base.Spec.Binary.Positive.xH + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> Core.Base.Spec.Binary.Positive.xI q + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.xO (positive_succ q <: Core.Base.Spec.Binary.Positive.t_Positive) + +let positive_add (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Binary.Positive.t_Positive = positive_add__add lhs rhs + +let rec positive_mul (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Binary.Positive.t_Positive = + match Core.Base.Spec.Binary.Positive.match_positive lhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> rhs + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Core.Base.Spec.Binary.Positive.xO (positive_mul p rhs + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + positive_add (Core.Clone.f_clone #Core.Base.Spec.Binary.Positive.t_Positive + #FStar.Tactics.Typeclasses.solve + rhs + <: + Core.Base.Spec.Binary.Positive.t_Positive) + (Core.Base.Spec.Binary.Positive.xO (positive_mul p rhs + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let rec positive_add__add (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Binary.Positive.t_Positive = + match Core.Base.Spec.Binary.Positive.match_positive lhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.xO Core.Base.Spec.Binary.Positive.xH + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> Core.Base.Spec.Binary.Positive.xI q + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.xO (positive_succ q + <: + Core.Base.Spec.Binary.Positive.t_Positive)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Binary.Positive.xI p + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + Core.Base.Spec.Binary.Positive.xO (positive_add__add p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.xI (positive_add__add p q + <: + Core.Base.Spec.Binary.Positive.t_Positive)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.xO (positive_succ p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + Core.Base.Spec.Binary.Positive.xI (positive_add__add p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.xO (positive_add__add_carry p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let rec positive_add__add_carry (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Binary.Positive.t_Positive = + match Core.Base.Spec.Binary.Positive.match_positive lhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.xI Core.Base.Spec.Binary.Positive.xH + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + Core.Base.Spec.Binary.Positive.xO (positive_succ q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.xI (positive_succ q + <: + Core.Base.Spec.Binary.Positive.t_Positive)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.xO (positive_succ p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + Core.Base.Spec.Binary.Positive.xI (positive_add__add p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.xO (positive_add__add_carry p q + <: + Core.Base.Spec.Binary.Positive.t_Positive)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.xI (positive_succ p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + Core.Base.Spec.Binary.Positive.xO (positive_add__add_carry p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.xI (positive_add__add_carry p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) diff --git a/proof-libs/fstar/generated-core/Core.Base.Int.Base_impl.fst b/proof-libs/fstar/generated-core/Core.Base.Int.Base_impl.fst deleted file mode 100644 index 67087a854..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Int.Base_impl.fst +++ /dev/null @@ -1,853 +0,0 @@ -module Core.Base.Int.Base_impl -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -open Core.Cmp - -let impl_7__sub__double_mask (lhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_9__match_pos lhs with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POS_POS p -> - Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO p - <: - Core.Base.Int.t_Positive) - -let impl_7__sub__succ_double_mask (lhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_9__match_pos lhs with - | Core.Base.Int.POS_ZERO -> - Core.Base.Int.Base_spec.impl_4__to_int Core.Base.Int.Base_spec.impl_8__xH - | Core.Base.Int.POS_POS p -> - Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xI p - <: - Core.Base.Int.t_Positive) - -let impl_8__double (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_9__match_pos self with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POS_POS p -> - Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO p - <: - Core.Base.Int.t_Positive) - -let impl_8__half (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_9__match_pos self with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POS_POS n -> - match Core.Base.Int.Base_spec.impl_8__match_positive n with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POSITIVE_XO p -> Core.Base.Int.Base_spec.impl_4__to_int p - | Core.Base.Int.POSITIVE_XI p -> Core.Base.Int.Base_spec.impl_4__to_int p - -let impl_8__succ_double (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_Positive = - match Core.Base.Int.Base_spec.impl_9__match_pos self with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_8__xH - | Core.Base.Int.POS_POS p -> Core.Base.Int.Base_spec.impl_8__xI p - -let rec impl__cmp__cmp_binary_cont (x y: Core.Base.Int.t_Positive) (r: Core.Cmp.t_Ordering) - : Core.Cmp.t_Ordering = - match Core.Base.Int.Base_spec.impl_8__match_positive x with - | Core.Base.Int.POSITIVE_XH -> - (match Core.Base.Int.Base_spec.impl_8__match_positive y with - | Core.Base.Int.POSITIVE_XH -> r - | Core.Base.Int.POSITIVE_XO q - | Core.Base.Int.POSITIVE_XI q -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) - | Core.Base.Int.POSITIVE_XO p -> - (match Core.Base.Int.Base_spec.impl_8__match_positive y with - | Core.Base.Int.POSITIVE_XH -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering - | Core.Base.Int.POSITIVE_XO q -> impl__cmp__cmp_binary_cont p q r - | Core.Base.Int.POSITIVE_XI q -> - impl__cmp__cmp_binary_cont p q (Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering)) - | Core.Base.Int.POSITIVE_XI p -> - match Core.Base.Int.Base_spec.impl_8__match_positive y with - | Core.Base.Int.POSITIVE_XH -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering - | Core.Base.Int.POSITIVE_XO q -> - impl__cmp__cmp_binary_cont p q (Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering) - | Core.Base.Int.POSITIVE_XI q -> impl__cmp__cmp_binary_cont p q r - -let impl__cmp (lhs rhs: Core.Base.Int.t_Positive) : Core.Cmp.t_Ordering = - impl__cmp__cmp_binary_cont lhs rhs (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Cmp.t_PartialEq Core.Base.Int.t_Positive Core.Base.Int.t_Positive = - { - f_eq_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); - f_eq_post - = - (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); - f_eq - = - (fun x y -> x = y) - // (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> - // (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive - // #FStar.Tactics.Typeclasses.solve - // self - // <: - // Core.Base.Int.t_Positive) - // (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other - // <: - // Core.Base.Int.t_Positive) - // <: - // Core.Cmp.t_Ordering) =. - // (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)) - ; - f_ne_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); - f_ne_post - = - (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); - f_ne - = - fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> - ~.((impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_Positive) - (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Int.t_Positive) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - <: - bool) - } - -let impl_2__cmp (lhs rhs: Core.Base.Int.t_HaxInt) : Core.Cmp.t_Ordering = - match Core.Base.Int.Base_spec.impl_9__match_pos lhs with - | Core.Base.Int.POS_ZERO -> - (match Core.Base.Int.Base_spec.impl_9__match_pos rhs with - | Core.Base.Int.POS_ZERO -> Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering - | Core.Base.Int.POS_POS q -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) - | Core.Base.Int.POS_POS p -> - match Core.Base.Int.Base_spec.impl_9__match_pos rhs with - | Core.Base.Int.POS_ZERO -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering - | Core.Base.Int.POS_POS q -> impl__cmp p q - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Cmp.t_PartialEq Core.Base.Int.t_HaxInt Core.Base.Int.t_HaxInt = - { - f_eq_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); - f_eq_post - = - (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); - f_eq - = - (fun x y -> x = y) - // (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> - // (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt - // #FStar.Tactics.Typeclasses.solve - // self - // <: - // Core.Base.Int.t_HaxInt) - // (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other - // <: - // Core.Base.Int.t_HaxInt) - // <: - // Core.Cmp.t_Ordering) =. - // (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)) - ; - f_ne_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); - f_ne_post - = - (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); - f_ne - = - fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> - ~.((impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Int.t_HaxInt) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - <: - bool) - } - -let rec impl_4__succ (self: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = - match Core.Base.Int.Base_spec.impl_8__match_positive self with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_8__xO Core.Base.Int.Base_spec.impl_8__xH - | Core.Base.Int.POSITIVE_XO q -> Core.Base.Int.Base_spec.impl_8__xI q - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_8__xO (impl_4__succ q <: Core.Base.Int.t_Positive) - -let rec impl_7__sub__pred_double (lhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = - match Core.Base.Int.Base_spec.impl_8__match_positive lhs with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_8__xH - | Core.Base.Int.POSITIVE_XO p -> - Core.Base.Int.Base_spec.impl_8__xI (impl_7__sub__pred_double p <: Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI p -> - Core.Base.Int.Base_spec.impl_8__xI (Core.Base.Int.Base_spec.impl_8__xO p - <: - Core.Base.Int.t_Positive) - -let impl_7__sub__double_pred_mask (lhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_8__match_positive lhs with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POSITIVE_XO p -> - Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO (impl_7__sub__pred_double - p - <: - Core.Base.Int.t_Positive) - <: - Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI p -> - Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO (Core.Base.Int.Base_spec.impl_8__xO - p - <: - Core.Base.Int.t_Positive) - <: - Core.Base.Int.t_Positive) - -let rec impl_9__power_of_two (self: Core.Base.Int.t_Unary) : Core.Base.Int.t_Positive = - match Core.Base.Int.Base_spec.impl_6__match_unary self with - | Core.Base.Int.UNARY_ZERO -> Core.Base.Int.Base_spec.impl_8__xH - | Core.Base.Int.UNARY_SUCC x -> - Core.Base.Int.Base_spec.impl_8__xO (impl_9__power_of_two x <: Core.Base.Int.t_Positive) - -let rec impl_12__shl__shl_helper (rhs: Core.Base.Int.t_Unary) (lhs: Core.Base.Int.t_HaxInt) - : Core.Base.Int.t_HaxInt = - if - Core.Base.Int.Base_spec.impl_9__is_zero (Core.Clone.f_clone #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - lhs - <: - Core.Base.Int.t_HaxInt) - then lhs - else - match Core.Base.Int.Base_spec.impl_6__match_unary rhs with - | Core.Base.Int.UNARY_ZERO -> lhs - | Core.Base.Int.UNARY_SUCC n -> - impl_12__shl__shl_helper n (impl_8__double lhs <: Core.Base.Int.t_HaxInt) - -let impl_12__shl (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - impl_12__shl__shl_helper (Core.Base.Int.Base_spec.impl_5__from_int rhs <: Core.Base.Int.t_Unary) - self - -let rec impl_13__shr__shr_helper (rhs: Core.Base.Int.t_Unary) (lhs: Core.Base.Int.t_HaxInt) - : Core.Base.Int.t_HaxInt = - if - Core.Base.Int.Base_spec.impl_9__is_zero (Core.Clone.f_clone #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - lhs - <: - Core.Base.Int.t_HaxInt) - then lhs - else - match Core.Base.Int.Base_spec.impl_6__match_unary rhs with - | Core.Base.Int.UNARY_ZERO -> lhs - | Core.Base.Int.UNARY_SUCC n -> - impl_13__shr__shr_helper n (impl_8__half lhs <: Core.Base.Int.t_HaxInt) - -let impl_13__shr (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - impl_13__shr__shr_helper (Core.Base.Int.Base_spec.impl_5__from_int rhs <: Core.Base.Int.t_Unary) - self - -let rec impl_14__bitxor__bitxor_binary (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_8__match_positive lhs with - | Core.Base.Int.POSITIVE_XH -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POSITIVE_XO q -> - Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xI q - <: - Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO q - <: - Core.Base.Int.t_Positive)) - | Core.Base.Int.POSITIVE_XO p -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xI p - <: - Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XO q -> - impl_8__double (impl_14__bitxor__bitxor_binary p q <: Core.Base.Int.t_HaxInt) - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double (impl_14__bitxor__bitxor_binary p - q - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_Positive)) - | Core.Base.Int.POSITIVE_XI p -> - match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO p - <: - Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XO q -> - Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double (impl_14__bitxor__bitxor_binary p - q - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI q -> - impl_8__double (impl_14__bitxor__bitxor_binary p q <: Core.Base.Int.t_HaxInt) - -let impl_14__bitxor (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_9__match_pos self with - | Core.Base.Int.POS_ZERO -> rhs - | Core.Base.Int.POS_POS p -> - match Core.Base.Int.Base_spec.impl_9__match_pos rhs with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_4__to_int p - | Core.Base.Int.POS_POS q -> impl_14__bitxor__bitxor_binary p q - -let rec impl_15__bitand__bitand_binary (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_8__match_positive lhs with - | Core.Base.Int.POSITIVE_XH -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XO q -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POSITIVE_XI _ - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ONE) - | Core.Base.Int.POSITIVE_XO p -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POSITIVE_XO q - | Core.Base.Int.POSITIVE_XI q -> - impl_8__double (impl_15__bitand__bitand_binary p q <: Core.Base.Int.t_HaxInt)) - | Core.Base.Int.POSITIVE_XI p -> - match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ONE - | Core.Base.Int.POSITIVE_XO q -> - impl_8__double (impl_15__bitand__bitand_binary p q <: Core.Base.Int.t_HaxInt) - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double (impl_15__bitand__bitand_binary p - q - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_Positive) - -let impl_15__bitand (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_9__match_pos self with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POS_POS p -> - match Core.Base.Int.Base_spec.impl_9__match_pos rhs with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POS_POS q -> impl_15__bitand__bitand_binary p q - -let rec impl_16__bitor__bitor_binary (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = - match Core.Base.Int.Base_spec.impl_8__match_positive lhs with - | Core.Base.Int.POSITIVE_XH -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XO q -> Core.Base.Int.Base_spec.impl_8__xI q - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_8__xH - | Core.Base.Int.POSITIVE_XI q -> Core.Base.Int.Base_spec.impl_8__xI q) - | Core.Base.Int.POSITIVE_XO p -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_8__xI p - | Core.Base.Int.POSITIVE_XO q -> - Core.Base.Int.Base_spec.impl_8__xO (impl_16__bitor__bitor_binary p q - <: - Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_8__xI (impl_16__bitor__bitor_binary p q - <: - Core.Base.Int.t_Positive)) - | Core.Base.Int.POSITIVE_XI p -> - match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_8__xI p - | Core.Base.Int.POSITIVE_XO q - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_8__xI (impl_16__bitor__bitor_binary p q - <: - Core.Base.Int.t_Positive) - -let impl_16__bitor (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_9__match_pos self with - | Core.Base.Int.POS_ZERO -> rhs - | Core.Base.Int.POS_POS p -> - match Core.Base.Int.Base_spec.impl_9__match_pos rhs with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_4__to_int p - | Core.Base.Int.POS_POS q -> - Core.Base.Int.Base_spec.impl_4__to_int (impl_16__bitor__bitor_binary p q - <: - Core.Base.Int.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Cmp.t_PartialOrd Core.Base.Int.t_Positive Core.Base.Int.t_Positive = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre - = - (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); - f_partial_cmp_post - = - (fun - (self: Core.Base.Int.t_Positive) - (other: Core.Base.Int.t_Positive) - (out: Core.Option.t_Option Core.Cmp.t_Ordering) - -> - true); - f_partial_cmp - = - (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> - Core.Option.Option_Some - (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_Positive) - (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Int.t_Positive)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); - f_lt_post - = - (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); - f_lt - = - (fun self other -> self < other) - // (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> - // match - // Core.Option.Option_Some - // (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive - // #FStar.Tactics.Typeclasses.solve - // self - // <: - // Core.Base.Int.t_Positive) - // (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other - // <: - // Core.Base.Int.t_Positive)) - // <: - // Core.Option.t_Option Core.Cmp.t_Ordering - // with - // | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - // | _ -> false) - ; - f_le_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); - f_le_post - = - (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); - f_le - = - (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> - match - Core.Option.Option_Some - (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_Positive) - (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Int.t_Positive)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); - f_gt_post - = - (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); - f_gt - = - (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> - match - Core.Option.Option_Some - (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_Positive) - (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Int.t_Positive)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> true); - f_ge_post - = - (fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) (out: bool) -> true); - f_ge - = - fun (self: Core.Base.Int.t_Positive) (other: Core.Base.Int.t_Positive) -> - match - Core.Option.Option_Some - (impl__cmp (Core.Clone.f_clone #Core.Base.Int.t_Positive - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_Positive) - (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Int.t_Positive)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Cmp.t_PartialOrd Core.Base.Int.t_HaxInt Core.Base.Int.t_HaxInt = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); - f_partial_cmp_post - = - (fun - (self: Core.Base.Int.t_HaxInt) - (other: Core.Base.Int.t_HaxInt) - (out: Core.Option.t_Option Core.Cmp.t_Ordering) - -> - true); - f_partial_cmp - = - (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> - Core.Option.Option_Some - (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Int.t_HaxInt)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); - f_lt_post - = - (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); - f_lt - = (fun self other -> self < other) - // (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> - // match - // Core.Option.Option_Some - // (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt - // #FStar.Tactics.Typeclasses.solve - // self - // <: - // Core.Base.Int.t_HaxInt) - // (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other - // <: - // Core.Base.Int.t_HaxInt)) - // <: - // Core.Option.t_Option Core.Cmp.t_Ordering - // with - // | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - // | _ -> false) - ; - f_le_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); - f_le_post - = - (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); - f_le - = - (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> - match - Core.Option.Option_Some - (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Int.t_HaxInt)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); - f_gt_post - = - (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); - f_gt - = - (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> - match - Core.Option.Option_Some - (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Int.t_HaxInt)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> true); - f_ge_post - = - (fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) (out: bool) -> true); - f_ge - = - fun (self: Core.Base.Int.t_HaxInt) (other: Core.Base.Int.t_HaxInt) -> - match - Core.Option.Option_Some - (impl_2__cmp (Core.Clone.f_clone #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Int.t_HaxInt)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -let rec impl_4__add (self rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = - match Core.Base.Int.Base_spec.impl_8__match_positive self with - | Core.Base.Int.POSITIVE_XH -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_8__xO Core.Base.Int.Base_spec.impl_8__xH - | Core.Base.Int.POSITIVE_XO q -> Core.Base.Int.Base_spec.impl_8__xI q - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_8__xO (impl_4__succ q <: Core.Base.Int.t_Positive)) - | Core.Base.Int.POSITIVE_XO p -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_8__xI p - | Core.Base.Int.POSITIVE_XO q -> - Core.Base.Int.Base_spec.impl_8__xO (impl_4__add p q <: Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_8__xI (impl_4__add p q <: Core.Base.Int.t_Positive)) - | Core.Base.Int.POSITIVE_XI p -> - match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_8__xO (impl_4__succ p <: Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XO q -> - Core.Base.Int.Base_spec.impl_8__xI (impl_4__add p q <: Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_8__xO (impl_4__add__add_carry p q <: Core.Base.Int.t_Positive) - -and impl_4__add__add_carry (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = - match Core.Base.Int.Base_spec.impl_8__match_positive lhs with - | Core.Base.Int.POSITIVE_XH -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_8__xI Core.Base.Int.Base_spec.impl_8__xH - | Core.Base.Int.POSITIVE_XO q -> - Core.Base.Int.Base_spec.impl_8__xO (impl_4__succ q <: Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_8__xI (impl_4__succ q <: Core.Base.Int.t_Positive)) - | Core.Base.Int.POSITIVE_XO p -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_8__xO (impl_4__succ p <: Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XO q -> - Core.Base.Int.Base_spec.impl_8__xI (impl_4__add p q <: Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_8__xO (impl_4__add__add_carry p q <: Core.Base.Int.t_Positive)) - | Core.Base.Int.POSITIVE_XI p -> - match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_8__xI (impl_4__succ p <: Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XO q -> - Core.Base.Int.Base_spec.impl_8__xO (impl_4__add__add_carry p q <: Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_8__xI (impl_4__add__add_carry p q <: Core.Base.Int.t_Positive) - -let impl_6__add (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_9__match_pos self with - | Core.Base.Int.POS_ZERO -> rhs - | Core.Base.Int.POS_POS p -> - match Core.Base.Int.Base_spec.impl_9__match_pos rhs with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_4__to_int p - | Core.Base.Int.POS_POS q -> - Core.Base.Int.Base_spec.impl_4__to_int (impl_4__add p q <: Core.Base.Int.t_Positive) - -let rec impl_7__sub__sub_binary (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_8__match_positive lhs with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POSITIVE_XO p -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_4__to_int (impl_7__sub__pred_double p - <: - Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XO q -> - impl_7__sub__double_mask (impl_7__sub__sub_binary p q <: Core.Base.Int.t_HaxInt) - | Core.Base.Int.POSITIVE_XI q -> - impl_7__sub__succ_double_mask (impl_7__sub__sub_carry p q <: Core.Base.Int.t_HaxInt)) - | Core.Base.Int.POSITIVE_XI p -> - match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_4__to_int (Core.Base.Int.Base_spec.impl_8__xO p - <: - Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XO q -> - impl_7__sub__succ_double_mask (impl_7__sub__sub_binary p q <: Core.Base.Int.t_HaxInt) - | Core.Base.Int.POSITIVE_XI q -> - impl_7__sub__double_mask (impl_7__sub__sub_binary p q <: Core.Base.Int.t_HaxInt) - -and impl_7__sub__sub_carry (lhs rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_8__match_positive lhs with - | Core.Base.Int.POSITIVE_XH -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POSITIVE_XO p -> - (match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> impl_7__sub__double_pred_mask p - | Core.Base.Int.POSITIVE_XO q -> - impl_7__sub__succ_double_mask (impl_7__sub__sub_carry p q <: Core.Base.Int.t_HaxInt) - | Core.Base.Int.POSITIVE_XI q -> - impl_7__sub__double_mask (impl_7__sub__sub_carry p q <: Core.Base.Int.t_HaxInt)) - | Core.Base.Int.POSITIVE_XI p -> - match Core.Base.Int.Base_spec.impl_8__match_positive rhs with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_4__to_int (impl_7__sub__pred_double p <: Core.Base.Int.t_Positive - ) - | Core.Base.Int.POSITIVE_XO q -> - impl_7__sub__double_mask (impl_7__sub__sub_binary p q <: Core.Base.Int.t_HaxInt) - | Core.Base.Int.POSITIVE_XI q -> - impl_7__sub__succ_double_mask (impl_7__sub__sub_carry p q <: Core.Base.Int.t_HaxInt) - -let impl_7__sub (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_9__match_pos self with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POS_POS p -> - match Core.Base.Int.Base_spec.impl_9__match_pos rhs with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_4__to_int p - | Core.Base.Int.POS_POS q -> impl_7__sub__sub_binary p q - -let rec impl_5__mul (self rhs: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = - match Core.Base.Int.Base_spec.impl_8__match_positive self with - | Core.Base.Int.POSITIVE_XH -> rhs - | Core.Base.Int.POSITIVE_XO p -> - Core.Base.Int.Base_spec.impl_8__xO (impl_5__mul p rhs <: Core.Base.Int.t_Positive) - | Core.Base.Int.POSITIVE_XI p -> - impl_4__add (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_Positive) - (Core.Base.Int.Base_spec.impl_8__xO (impl_5__mul p rhs <: Core.Base.Int.t_Positive) - <: - Core.Base.Int.t_Positive) - -let impl_11__mul (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - match Core.Base.Int.Base_spec.impl_9__match_pos self with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POS_POS p -> - match Core.Base.Int.Base_spec.impl_9__match_pos rhs with - | Core.Base.Int.POS_ZERO -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Int.POS_POS q -> - Core.Base.Int.Base_spec.impl_4__to_int (impl_5__mul p q <: Core.Base.Int.t_Positive) - -let rec impl_10__divmod__divmod_binary (a b: Core.Base.Int.t_Positive) - : (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = - match Core.Base.Int.Base_spec.impl_8__match_positive a with - | Core.Base.Int.POSITIVE_XH -> - (match Core.Base.Int.Base_spec.impl_8__match_positive b with - | Core.Base.Int.POSITIVE_XH -> - Core.Base.Int.Base_spec.impl_9__ONE, Core.Base.Int.Base_spec.impl_9__ZERO - <: - (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) - | Core.Base.Int.POSITIVE_XO q - | Core.Base.Int.POSITIVE_XI q -> - Core.Base.Int.Base_spec.impl_9__ZERO, Core.Base.Int.Base_spec.impl_9__ONE - <: - (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt)) - | Core.Base.Int.POSITIVE_XO a___ -> - let q, r:(Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = - impl_10__divmod__divmod_binary a___ - (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve b - <: - Core.Base.Int.t_Positive) - in - let r___:Core.Base.Int.t_HaxInt = impl_8__double r in - if - (Core.Base.Int.Base_spec.impl_4__to_int (Core.Clone.f_clone #Core.Base.Int.t_Positive - #FStar.Tactics.Typeclasses.solve - b - <: - Core.Base.Int.t_Positive) - <: - Core.Base.Int.t_HaxInt) <=. - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve r___ - <: - Core.Base.Int.t_HaxInt) - then - Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double q <: Core.Base.Int.t_Positive), - impl_7__sub r___ (Core.Base.Int.Base_spec.impl_4__to_int b <: Core.Base.Int.t_HaxInt) - <: - (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) - else impl_8__double q, r___ <: (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) - | Core.Base.Int.POSITIVE_XI a___ -> - let q, r:(Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = - impl_10__divmod__divmod_binary a___ - (Core.Clone.f_clone #Core.Base.Int.t_Positive #FStar.Tactics.Typeclasses.solve b - <: - Core.Base.Int.t_Positive) - in - let r___:Core.Base.Int.t_HaxInt = - Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double r <: Core.Base.Int.t_Positive) - in - if - (Core.Base.Int.Base_spec.impl_4__to_int (Core.Clone.f_clone #Core.Base.Int.t_Positive - #FStar.Tactics.Typeclasses.solve - b - <: - Core.Base.Int.t_Positive) - <: - Core.Base.Int.t_HaxInt) <=. - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve r___ - <: - Core.Base.Int.t_HaxInt) - then - Core.Base.Int.Base_spec.impl_4__to_int (impl_8__succ_double q <: Core.Base.Int.t_Positive), - impl_7__sub r___ (Core.Base.Int.Base_spec.impl_4__to_int b <: Core.Base.Int.t_HaxInt) - <: - (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) - else impl_8__double q, r___ <: (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) - -let impl_10__divmod (a b: Core.Base.Int.t_HaxInt) - : (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = - match Core.Base.Int.Base_spec.impl_9__match_pos a with - | Core.Base.Int.POS_ZERO -> - Core.Base.Int.Base_spec.impl_9__ZERO, Core.Base.Int.Base_spec.impl_9__ZERO - <: - (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) - | Core.Base.Int.POS_POS p -> - match Core.Base.Int.Base_spec.impl_9__match_pos b with - | Core.Base.Int.POS_ZERO -> - Core.Base.Int.Base_spec.impl_9__ZERO, Core.Base.Int.Base_spec.impl_4__to_int p - <: - (Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) - | Core.Base.Int.POS_POS q -> impl_10__divmod__divmod_binary p q - -let impl_10__div (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - let q, r:(Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = impl_10__divmod self rhs in - q - -let impl_10__rem (self rhs: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = - if rhs = 0 - then self - else self % rhs - // let q, r:(Core.Base.Int.t_HaxInt & Core.Base.Int.t_HaxInt) = impl_10__divmod self rhs in - // r - -/////////////////////////// - -let rec lt_is_lt_hax (x y : Core.Base.Int.t_HaxInt) : Lemma (requires x < y) (ensures x <. y) [SMTPat (x <. y)] = () -let rec lt_hax_is_lt (x y : Core.Base.Int.t_HaxInt) : Lemma (requires x <. y) (ensures x < y) [SMTPat (x <. y)] = () - -let eq_is_eq_hax (x y : Core.Base.Int.t_HaxInt) : Lemma (requires x = y) (ensures x =. y) [SMTPat (x =. y)] = () -let eq_hax_is_eq (x y : Core.Base.Int.t_HaxInt) : Lemma (requires x =. y) (ensures x = y) [SMTPat (x =. y)] = () diff --git a/proof-libs/fstar/generated-core/Core.Base.Int.Base_spec.fst b/proof-libs/fstar/generated-core/Core.Base.Int.Base_spec.fst deleted file mode 100644 index 528736390..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Int.Base_spec.fst +++ /dev/null @@ -1,146 +0,0 @@ -module Core.Base.Int.Base_spec -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let (~.) = not - -let impl_9__ONE: Core.Base.Int.t_HaxInt = 1 - -let impl_9__ZERO: Core.Base.Int.t_HaxInt = 0 - -let v_BITS_128_: Core.Base.Int.t_HaxInt = 128 - -let v_BITS_16_: Core.Base.Int.t_HaxInt = 16 - -let v_BITS_32_: Core.Base.Int.t_HaxInt = 32 - -let v_BITS_64_: Core.Base.Int.t_HaxInt = 64 - -let v_BITS_8_: Core.Base.Int.t_HaxInt = 8 - -let v_WORDSIZE_128_: Core.Base.Int.t_HaxInt = pow2 128 - -let v_WORDSIZE_128_SUB_1_: Core.Base.Int.t_HaxInt = pow2 128 - 1 - -let v_WORDSIZE_16_: Core.Base.Int.t_HaxInt = pow2 16 - -let v_WORDSIZE_16_SUB_1_: Core.Base.Int.t_HaxInt = pow2 16 - 1 - -let v_WORDSIZE_32_: Core.Base.Int.t_HaxInt = pow2 32 - -let v_WORDSIZE_32_SUB_1_: Core.Base.Int.t_HaxInt = pow2 32 - 1 - -let v_WORDSIZE_64_: Core.Base.Int.t_HaxInt = pow2 64 - -let v_WORDSIZE_64_SUB_1_: Core.Base.Int.t_HaxInt = pow2 64 - 1 - -let v_WORDSIZE_8_: Core.Base.Int.t_HaxInt = pow2 8 - -let v_WORDSIZE_8_SUB_1_: Core.Base.Int.t_HaxInt = pow2 8 - 1 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Clone.t_Clone Core.Base.Int.t_HaxInt = - { - f_clone_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); - f_clone_post = (fun (self: Core.Base.Int.t_HaxInt) (out: Core.Base.Int.t_HaxInt) -> true); - f_clone - = - fun (self: Core.Base.Int.t_HaxInt) -> self - } - -let impl_7__div2 (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = self / 2 - -let impl_9__is_zero (self: Core.Base.Int.t_HaxInt) : bool = self = 0 - -let impl_9__pred (self: Core.Base.Int.t_HaxInt) - : Prims.Pure Core.Base.Int.t_HaxInt - (requires ~.(impl_9__is_zero self <: bool)) - (fun _ -> Prims.l_True) = self - 1 - -let impl_9__succ (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_HaxInt = self + 1 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Clone.t_Clone Core.Base.Int.t_Positive = - { - f_clone_pre = (fun (self: Core.Base.Int.t_Positive) -> true); - f_clone_post = (fun (self: Core.Base.Int.t_Positive) (out: Core.Base.Int.t_Positive) -> true); - f_clone - = - fun (self: Core.Base.Int.t_Positive) -> self - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Clone.t_Clone Core.Base.Int.t_Unary = - { - f_clone_pre = (fun (self: Core.Base.Int.t_Unary) -> true); - f_clone_post = (fun (self: Core.Base.Int.t_Unary) (out: Core.Base.Int.t_Unary) -> true); - f_clone - = - fun (self: Core.Base.Int.t_Unary) -> self - } - -let impl_4__from_int (x: Core.Base.Int.t_HaxInt{x > 0}) : Core.Base.Int.t_Positive = x - -let impl_4__to_int (self: Core.Base.Int.t_Positive) : Core.Base.Int.t_HaxInt = self - -let impl_5__from_int (x: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_Unary = x - -let impl_5__to_int (self: Core.Base.Int.t_Unary) : Core.Base.Int.t_HaxInt = self - -let impl_6__match_unary (self: Core.Base.Int.t_Unary) : Core.Base.Int.t_UNARY = - if self = 0 - then Core.Base.Int.UNARY_ZERO - else Core.Base.Int.UNARY_SUCC (self - 1) - -let impl_8__is_xH (self: Core.Base.Int.t_Positive) : bool = self = 1 - -let impl_8__is_xI (self: Core.Base.Int.t_Positive) : bool = self > 1 && self % 2 = 1 - -let impl_8__is_xO (self: Core.Base.Int.t_Positive) : bool = self > 1 && self % 2 = 0 - -let impl_8__match_positive (self: Core.Base.Int.t_Positive) : Core.Base.Int.t_POSITIVE = - if - impl_8__is_xH (Core.Clone.f_clone #Core.Base.Int.t_Positive - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_Positive) - then Core.Base.Int.POSITIVE_XH <: Core.Base.Int.t_POSITIVE - else - if - impl_8__is_xO (Core.Clone.f_clone #Core.Base.Int.t_Positive - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_Positive) - then - Core.Base.Int.POSITIVE_XO - (impl_4__from_int (impl_7__div2 (impl_4__to_int self <: Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt)) - <: - Core.Base.Int.t_POSITIVE - else - Core.Base.Int.POSITIVE_XI - (impl_4__from_int (impl_7__div2 (impl_4__to_int self <: Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt)) - <: - Core.Base.Int.t_POSITIVE - -let impl_8__xH: Core.Base.Int.t_Positive = 1 - -let impl_8__xI (self: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = self * 2 + 1 - -let impl_8__xO (self: Core.Base.Int.t_Positive) : Core.Base.Int.t_Positive = self * 2 - -let impl_9__match_pos (self: Core.Base.Int.t_HaxInt) : Core.Base.Int.t_POS = - if - impl_9__is_zero (Core.Clone.f_clone #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - then Core.Base.Int.POS_ZERO <: Core.Base.Int.t_POS - else Core.Base.Int.POS_POS (impl_4__from_int self) <: Core.Base.Int.t_POS diff --git a/proof-libs/fstar/generated-core/Core.Base.Int.Number_conversion.fst b/proof-libs/fstar/generated-core/Core.Base.Int.Number_conversion.fst deleted file mode 100644 index 94ae93bf5..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Int.Number_conversion.fst +++ /dev/null @@ -1,340 +0,0 @@ -module Core.Base.Int.Number_conversion -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -open Core.Primitive -open Core.Cmp -open Core.Ops.Arith - -let rec impl__from_u128_binary (x: u128 {match x with | C_u128 v -> v.f_v > 0}) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_u128 n -> n.f_v <: nat)) = match x with | C_u128 x -> x.f_v - // if Core.Cmp.f_eq x (pub_u128 1) - // then Core.Base.Int.Base_spec.impl_8__xH - // else - // if Core.Cmp.f_eq (f_rem x (pub_u128 2) <: u128) (pub_u128 0) - // then - // let _ = assume ((match (f_div x (pub_u128 2) <: u128) with | C_u128 n -> n.f_v) < (match x with | C_u128 n -> n.f_v)) in - // Core.Base.Int.Base_spec.impl_8__xO (impl__from_u128_binary (Core.Ops.Arith.f_div x - // (pub_u128 2) - // <: - // u128) - // <: - // Core.Base.Int.t_Positive) - // else - // Core.Base.Int.Base_spec.impl_8__xI (impl__from_u128_binary (Core.Ops.Arith.f_div x - // (pub_u128 2) - // <: - // u128) - // <: - // Core.Base.Int.t_Positive) - -// let rec impl__from_u16_binary (x: u16) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_u16 n -> n.f_v <: nat)) = -// if Core.Cmp.f_eq x (pub_u16 1) -// then Core.Base.Int.Base_spec.impl_8__xH -// else -// if Core.Cmp.f_eq (Core.Ops.Arith.f_rem x (pub_u16 2) <: u16) (pub_u16 0) -// then -// let _ = assume ((match (f_div x (pub_u16 2) <: u16) with | C_u16 n -> n.f_v) < (match x with | C_u16 n -> n.f_v)) in -// Core.Base.Int.Base_spec.impl_8__xO (impl__from_u16_binary (Core.Ops.Arith.f_div x (pub_u16 2) -// <: -// u16) -// <: -// Core.Base.Int.t_Positive) -// else -// Core.Base.Int.Base_spec.impl_8__xI (impl__from_u16_binary (Core.Ops.Arith.f_div x (pub_u16 2) -// <: -// u16) -// <: -// Core.Base.Int.t_Positive) - -// let rec impl__from_u32_binary (x: u32) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_u32 n -> n.f_v <: nat)) = -// if Core.Cmp.f_eq x (pub_u32 1) -// then Core.Base.Int.Base_spec.impl_8__xH -// else -// if Core.Cmp.f_eq (Core.Ops.Arith.f_rem x (pub_u32 2) <: u32) (pub_u32 0) -// then -// let _ = assume ((match (f_div x (pub_u32 2) <: u32) with | C_u32 n -> n.f_v) < (match x with | C_u32 n -> n.f_v)) in -// Core.Base.Int.Base_spec.impl_8__xO (impl__from_u32_binary (Core.Ops.Arith.f_div x (pub_u32 2) -// <: -// u32) -// <: -// Core.Base.Int.t_Positive) -// else -// Core.Base.Int.Base_spec.impl_8__xI (impl__from_u32_binary (Core.Ops.Arith.f_div x (pub_u32 2) -// <: -// u32) -// <: -// Core.Base.Int.t_Positive) - -// let rec impl__from_u64_binary (x: u64) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_u64 n -> n.f_v <: nat)) = -// if Core.Cmp.f_eq x (pub_u64 1) -// then Core.Base.Int.Base_spec.impl_8__xH -// else -// if Core.Cmp.f_eq (Core.Ops.Arith.f_rem x (pub_u64 2) <: u64) (pub_u64 0) -// then -// let _ = assume ((match (f_div x (pub_u64 2) <: u64) with | C_u64 n -> n.f_v) < (match x with | C_u64 n -> n.f_v)) in -// Core.Base.Int.Base_spec.impl_8__xO (impl__from_u64_binary (Core.Ops.Arith.f_div x (pub_u64 2) -// <: -// u64) -// <: -// Core.Base.Int.t_Positive) -// else -// Core.Base.Int.Base_spec.impl_8__xI (impl__from_u64_binary (Core.Ops.Arith.f_div x (pub_u64 2) -// <: -// u64) -// <: -// Core.Base.Int.t_Positive) - - -// let rec impl__from_u8_binary (x: u8) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_u8 n -> n.f_v <: nat)) = -// if Core.Cmp.f_eq x (pub_u8 1) -// then Core.Base.Int.Base_spec.impl_8__xH -// else -// if Core.Cmp.f_eq (Core.Ops.Arith.f_rem x (pub_u8 2) <: u8) (pub_u8 0) -// then -// let _ = assume ((match (f_div x (pub_u8 2) <: u8) with | C_u8 n -> n.f_v) < (match x with | C_u8 n -> n.f_v)) in -// Core.Base.Int.Base_spec.impl_8__xO (impl__from_u8_binary (Core.Ops.Arith.f_div x (pub_u8 2) -// <: -// u8) -// <: -// Core.Base.Int.t_Positive) -// else -// Core.Base.Int.Base_spec.impl_8__xI (impl__from_u8_binary (Core.Ops.Arith.f_div x (pub_u8 2) -// <: -// u8) -// <: -// Core.Base.Int.t_Positive) - -let rec impl__from_usize_binary (x: usize {match x with | C_usize v -> v.f_v > 0}) : Tot Core.Base.Int.t_Positive (decreases (match x with | C_usize n -> n.f_v <: nat)) = match x with | C_usize v -> v.f_v - // if Core.Cmp.f_eq x (sz 1) - // then Core.Base.Int.Base_spec.impl_8__xH - // else - // if Core.Cmp.f_eq (Core.Ops.Arith.f_rem x (sz 2) <: usize) (sz 0) - // then - // let _ = assume ((match (f_div x (sz 2) <: usize) with | C_usize n -> n.f_v) < (match x with | C_usize n -> n.f_v)) in - // Core.Base.Int.Base_spec.impl_8__xO (impl__from_usize_binary (Core.Ops.Arith.f_div x (sz 2) - // <: - // usize) - // <: - // Core.Base.Int.t_Positive) - // else - // Core.Base.Int.Base_spec.impl_8__xI (impl__from_usize_binary (Core.Ops.Arith.f_div x (sz 2) - // <: - // usize) - // <: - // Core.Base.Int.t_Positive) - -let rec impl__to_u128_binary (self: Core.Base.Int.t_Positive) : u128 = - match Core.Base.Int.Base_spec.impl_8__match_positive self with - | Core.Base.Int.POSITIVE_XH -> pub_u128 1 - | Core.Base.Int.POSITIVE_XO p -> - Core.Ops.Arith.f_mul (impl__to_u128_binary p <: u128) (pub_u128 2) - | Core.Base.Int.POSITIVE_XI p -> - Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_u128_binary p <: u128) (pub_u128 2) - <: - u128) - (pub_u128 1) - -let rec impl__to_u16_binary (self: Core.Base.Int.t_Positive) : u16 = - match Core.Base.Int.Base_spec.impl_8__match_positive self with - | Core.Base.Int.POSITIVE_XH -> pub_u16 1 - | Core.Base.Int.POSITIVE_XO p -> Core.Ops.Arith.f_mul (impl__to_u16_binary p <: u16) (pub_u16 2) - | Core.Base.Int.POSITIVE_XI p -> - Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_u16_binary p <: u16) (pub_u16 2) <: u16) (pub_u16 1) - -let rec impl__to_u32_binary (self: Core.Base.Int.t_Positive) : u32 = - match Core.Base.Int.Base_spec.impl_8__match_positive self with - | Core.Base.Int.POSITIVE_XH -> pub_u32 1 - | Core.Base.Int.POSITIVE_XO p -> Core.Ops.Arith.f_mul (impl__to_u32_binary p <: u32) (pub_u32 2) - | Core.Base.Int.POSITIVE_XI p -> - Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_u32_binary p <: u32) (pub_u32 2) <: u32) (pub_u32 1) - -let rec impl__to_u64_binary (self: Core.Base.Int.t_Positive) : u64 = - match Core.Base.Int.Base_spec.impl_8__match_positive self with - | Core.Base.Int.POSITIVE_XH -> pub_u64 1 - | Core.Base.Int.POSITIVE_XO p -> Core.Ops.Arith.f_mul (impl__to_u64_binary p <: u64) (pub_u64 2) - | Core.Base.Int.POSITIVE_XI p -> - Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_u64_binary p <: u64) (pub_u64 2) <: u64) (pub_u64 1) - -let rec impl__to_u8_binary (self: Core.Base.Int.t_Positive) : u8 = - match Core.Base.Int.Base_spec.impl_8__match_positive self with - | Core.Base.Int.POSITIVE_XH -> pub_u8 1 - | Core.Base.Int.POSITIVE_XO p -> Core.Ops.Arith.f_mul (impl__to_u8_binary p <: u8) (pub_u8 2) - | Core.Base.Int.POSITIVE_XI p -> - Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_u8_binary p <: u8) (pub_u8 2) <: u8) (pub_u8 1) - -let rec impl__to_usize_binary (self: Core.Base.Int.t_Positive) : usize = - match Core.Base.Int.Base_spec.impl_8__match_positive self with - | Core.Base.Int.POSITIVE_XH -> sz 1 - | Core.Base.Int.POSITIVE_XO p -> - Core.Ops.Arith.f_mul (impl__to_usize_binary p <: usize) (sz 2) - | Core.Base.Int.POSITIVE_XI p -> - Core.Ops.Arith.f_add (Core.Ops.Arith.f_mul (impl__to_usize_binary p <: usize) (sz 2) - <: - usize) - (sz 1) - -// [@@ FStar.Tactics.Typeclasses.tcinstance] -// let impl_1: Core.Convert.t_From Core.Base.Int.t_HaxInt u8 = -// { -// f_from_pre = (fun (x: u8) -> true); -// f_from_post = (fun (x: u8) (out: Core.Base.Int.t_HaxInt) -> true); -// f_from -// = -// fun (x: u8) -> -// if Core.Cmp.f_eq x (pub_u8 0) -// then Core.Base.Int.Base_spec.impl_9__ZERO -// else -// Core.Base.Int.Base_spec.impl_4__to_int (impl__from_u8_binary x <: Core.Base.Int.t_Positive) -// } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Convert.t_From u8 Core.Base.Int.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: u8) -> true); - f_from - = - fun (x: Core.Base.Int.t_HaxInt) -> - match Core.Base.Int.Base_spec.impl_9__match_pos x with - | Core.Base.Int.POS_ZERO -> pub_u8 0 - | Core.Base.Int.POS_POS p -> impl__to_u8_binary p - } - -// [@@ FStar.Tactics.Typeclasses.tcinstance] -// let impl_3: Core.Convert.t_From Core.Base.Int.t_HaxInt u16 = -// { -// f_from_pre = (fun (x: u16) -> true); -// f_from_post = (fun (x: u16) (out: Core.Base.Int.t_HaxInt) -> true); -// f_from -// = -// fun (x: u16) -> -// if Core.Cmp.f_eq x (pub_u16 0) -// then Core.Base.Int.Base_spec.impl_9__ZERO -// else -// Core.Base.Int.Base_spec.impl_4__to_int (impl__from_u16_binary x <: Core.Base.Int.t_Positive) -// } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Convert.t_From u16 Core.Base.Int.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: u16) -> true); - f_from - = - fun (x: Core.Base.Int.t_HaxInt) -> - match Core.Base.Int.Base_spec.impl_9__match_pos x with - | Core.Base.Int.POS_ZERO -> pub_u16 0 - | Core.Base.Int.POS_POS p -> impl__to_u16_binary p - } - -// [@@ FStar.Tactics.Typeclasses.tcinstance] -// let impl_5: Core.Convert.t_From Core.Base.Int.t_HaxInt u32 = -// { -// f_from_pre = (fun (x: u32) -> true); -// f_from_post = (fun (x: u32) (out: Core.Base.Int.t_HaxInt) -> true); -// f_from -// = -// fun (x: u32) -> -// if Core.Cmp.f_eq x (pub_u32 0) -// then Core.Base.Int.Base_spec.impl_9__ZERO -// else -// Core.Base.Int.Base_spec.impl_4__to_int (impl__from_u32_binary x <: Core.Base.Int.t_Positive) -// } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Convert.t_From u32 Core.Base.Int.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: u32) -> true); - f_from - = - fun (x: Core.Base.Int.t_HaxInt) -> - match Core.Base.Int.Base_spec.impl_9__match_pos x with - | Core.Base.Int.POS_ZERO -> pub_u32 0 - | Core.Base.Int.POS_POS p -> impl__to_u32_binary p - } - -// [@@ FStar.Tactics.Typeclasses.tcinstance] -// let impl_7: Core.Convert.t_From Core.Base.Int.t_HaxInt u64 = -// { -// f_from_pre = (fun (x: u64) -> true); -// f_from_post = (fun (x: u64) (out: Core.Base.Int.t_HaxInt) -> true); -// f_from -// = -// fun (x: u64) -> -// if Core.Cmp.f_eq x (pub_u64 0) -// then Core.Base.Int.Base_spec.impl_9__ZERO -// else -// Core.Base.Int.Base_spec.impl_4__to_int (impl__from_u64_binary x <: Core.Base.Int.t_Positive) -// } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Convert.t_From u64 Core.Base.Int.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: u64) -> true); - f_from - = - fun (x: Core.Base.Int.t_HaxInt) -> - match Core.Base.Int.Base_spec.impl_9__match_pos x with - | Core.Base.Int.POS_ZERO -> pub_u64 0 - | Core.Base.Int.POS_POS p -> impl__to_u64_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Convert.t_From Core.Base.Int.t_HaxInt u128 = - { - f_from_pre = (fun (x: u128) -> true); - f_from_post = (fun (x: u128) (out: Core.Base.Int.t_HaxInt) -> true); - f_from - = - fun (x: u128) -> - if Core.Cmp.f_eq x (pub_u128 0) - then Core.Base.Int.Base_spec.impl_9__ZERO - else - Core.Base.Int.Base_spec.impl_4__to_int (impl__from_u128_binary x <: Core.Base.Int.t_Positive - ) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Convert.t_From u128 Core.Base.Int.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: u128) -> true); - f_from - = - fun (x: Core.Base.Int.t_HaxInt) -> - match Core.Base.Int.Base_spec.impl_9__match_pos x with - | Core.Base.Int.POS_ZERO -> pub_u128 0 - | Core.Base.Int.POS_POS p -> impl__to_u128_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Convert.t_From Core.Base.Int.t_HaxInt usize = - { - f_from_pre = (fun (x: usize) -> true); - f_from_post = (fun (x: usize) (out: Core.Base.Int.t_HaxInt) -> true); - f_from - = - fun (x: usize) -> - if Core.Cmp.f_eq x (sz 0) - then Core.Base.Int.Base_spec.impl_9__ZERO - else - Core.Base.Int.Base_spec.impl_4__to_int (impl__from_usize_binary x - <: - Core.Base.Int.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Convert.t_From usize Core.Base.Int.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Int.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Int.t_HaxInt) (out: usize) -> true); - f_from - = - fun (x: Core.Base.Int.t_HaxInt) -> - match Core.Base.Int.Base_spec.impl_9__match_pos x with - | Core.Base.Int.POS_ZERO -> sz 0 - | Core.Base.Int.POS_POS p -> impl__to_usize_binary p - } diff --git a/proof-libs/fstar/generated-core/Core.Base.Int.fst b/proof-libs/fstar/generated-core/Core.Base.Int.fst deleted file mode 100644 index aff1e7003..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Int.fst +++ /dev/null @@ -1,23 +0,0 @@ -module Core.Base.Int -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_HaxInt = Prims.nat - -type t_Positive = Prims.pos - -type t_POS = - | POS_ZERO : t_POS - | POS_POS : t_Positive -> t_POS - -type t_POSITIVE = - | POSITIVE_XH : t_POSITIVE - | POSITIVE_XO : t_Positive -> t_POSITIVE - | POSITIVE_XI : t_Positive -> t_POSITIVE - -type t_Unary = nat - -type t_UNARY = - | UNARY_ZERO : t_UNARY - | UNARY_SUCC : t_Unary -> t_UNARY diff --git a/proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst b/proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst new file mode 100644 index 000000000..74e412d50 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst @@ -0,0 +1,651 @@ +module Core.Base.Number_conversion +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let rec impl_24__from_u128_binary (x: u128) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.U128.ne x (pub_u128 0)) + (fun _ -> Prims.l_True) = + if Rust_primitives.U128.eq x (pub_u128 1) + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.U128.eq (Rust_primitives.U128.rem x (pub_u128 2) <: u128) (pub_u128 0) + then + Core.Base.Spec.Binary.Positive.xO (impl_24__from_u128_binary (Rust_primitives.U128.div x + (pub_u128 2) + <: + u128) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (impl_24__from_u128_binary (Rust_primitives.U128.div x + (pub_u128 2) + <: + u128) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u128 = + { + f_from_pre = (fun (x: u128) -> true); + f_from_post = (fun (x: u128) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: u128) -> + if Rust_primitives.U128.eq x (pub_u128 0) + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_u128_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Convert.t_From Core.Base.Spec.Z.t_Z i128 = + { + f_from_pre = (fun (x: i128) -> true); + f_from_post = (fun (x: i128) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: i128) -> + match Core.Cmp.f_cmp #i128 #FStar.Tactics.Typeclasses.solve x (pub_i128 0) with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG + (impl_24__from_u128_binary (Core.Num.impl__i128__unsigned_abs x <: u128)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS + (impl_24__from_u128_binary (Core.Num.impl__i128__unsigned_abs x <: u128)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec impl_24__from_u16_binary (x: u16) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.U16.ne x 0us) + (fun _ -> Prims.l_True) = + if Rust_primitives.U16.eq x 1us + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.U16.eq (Rust_primitives.U16.rem x 2us <: u16) 0us + then + Core.Base.Spec.Binary.Positive.xO (impl_24__from_u16_binary (Rust_primitives.U16.div x 2us + <: + u16) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (impl_24__from_u16_binary (Rust_primitives.U16.div x 2us + <: + u16) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u16 = + { + f_from_pre = (fun (x: u16) -> true); + f_from_post = (fun (x: u16) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: u16) -> + if Rust_primitives.U16.eq x 0us + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_u16_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Convert.t_From Core.Base.Spec.Z.t_Z i16 = + { + f_from_pre = (fun (x: i16) -> true); + f_from_post = (fun (x: i16) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: i16) -> + match Core.Cmp.f_cmp #i16 #FStar.Tactics.Typeclasses.solve x 0s with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG + (impl_24__from_u16_binary (Core.Num.impl__i16__unsigned_abs x <: u16)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS + (impl_24__from_u16_binary (Core.Num.impl__i16__unsigned_abs x <: u16)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec impl_24__from_u32_binary (x: u32) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.U32.ne x 0ul) + (fun _ -> Prims.l_True) = + if Rust_primitives.U32.eq x 1ul + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.U32.eq (Rust_primitives.U32.rem x 2ul <: u32) 0ul + then + Core.Base.Spec.Binary.Positive.xO (impl_24__from_u32_binary (Rust_primitives.U32.div x 2ul + <: + u32) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (impl_24__from_u32_binary (Rust_primitives.U32.div x 2ul + <: + u32) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u32 = + { + f_from_pre = (fun (x: u32) -> true); + f_from_post = (fun (x: u32) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: u32) -> + if Rust_primitives.U32.eq x 0ul + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_u32_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Convert.t_From Core.Base.Spec.Z.t_Z i32 = + { + f_from_pre = (fun (x: i32) -> true); + f_from_post = (fun (x: i32) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: i32) -> + match Core.Cmp.f_cmp #i32 #FStar.Tactics.Typeclasses.solve x 0l with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG + (impl_24__from_u32_binary (Core.Num.impl__i32__unsigned_abs x <: u32)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS + (impl_24__from_u32_binary (Core.Num.impl__i32__unsigned_abs x <: u32)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec impl_24__from_u64_binary (x: u64) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.U64.ne x 0uL) + (fun _ -> Prims.l_True) = + if Rust_primitives.U64.eq x 1uL + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.U64.eq (Rust_primitives.U64.rem x 2uL <: u64) 0uL + then + Core.Base.Spec.Binary.Positive.xO (impl_24__from_u64_binary (Rust_primitives.U64.div x 2uL + <: + u64) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (impl_24__from_u64_binary (Rust_primitives.U64.div x 2uL + <: + u64) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u64 = + { + f_from_pre = (fun (x: u64) -> true); + f_from_post = (fun (x: u64) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: u64) -> + if Rust_primitives.U64.eq x 0uL + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_u64_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Convert.t_From Core.Base.Spec.Z.t_Z i64 = + { + f_from_pre = (fun (x: i64) -> true); + f_from_post = (fun (x: i64) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: i64) -> + match Core.Cmp.f_cmp #i64 #FStar.Tactics.Typeclasses.solve x 0L with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG + (impl_24__from_u64_binary (Core.Num.impl__i64__unsigned_abs x <: u64)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS + (impl_24__from_u64_binary (Core.Num.impl__i64__unsigned_abs x <: u64)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec impl_24__from_u8_binary (x: u8) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.U8.ne x 0uy) + (fun _ -> Prims.l_True) = + if Rust_primitives.U8.eq x 1uy + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.U8.eq (Rust_primitives.U8.rem x 2uy <: u8) 0uy + then + Core.Base.Spec.Binary.Positive.xO (impl_24__from_u8_binary (Rust_primitives.U8.div x 2uy <: u8 + ) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (impl_24__from_u8_binary (Rust_primitives.U8.div x 2uy <: u8 + ) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u8 = + { + f_from_pre = (fun (x: u8) -> true); + f_from_post = (fun (x: u8) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: u8) -> + if Rust_primitives.U8.eq x 0uy + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_u8_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Convert.t_From Core.Base.Spec.Z.t_Z i8 = + { + f_from_pre = (fun (x: i8) -> true); + f_from_post = (fun (x: i8) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: i8) -> + match Core.Cmp.f_cmp #i8 #FStar.Tactics.Typeclasses.solve x 0y with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG (impl_24__from_u8_binary (Core.Num.impl__i8__unsigned_abs x <: u8)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS (impl_24__from_u8_binary (Core.Num.impl__i8__unsigned_abs x <: u8)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec impl_24__from_usize_binary (x: usize) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.Usize.ne x (sz 0)) + (fun _ -> Prims.l_True) = + if Rust_primitives.Usize.eq x (sz 1) + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.Usize.eq (Rust_primitives.Usize.rem x (sz 2) <: usize) (sz 0) + then + Core.Base.Spec.Binary.Positive.xO (impl_24__from_usize_binary (Rust_primitives.Usize.div x + (sz 2) + <: + usize) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (impl_24__from_usize_binary (Rust_primitives.Usize.div x + (sz 2) + <: + usize) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt usize = + { + f_from_pre = (fun (x: usize) -> true); + f_from_post = (fun (x: usize) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: usize) -> + if Rust_primitives.Usize.eq x (sz 0) + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_usize_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Convert.t_From Core.Base.Spec.Z.t_Z isize = + { + f_from_pre = (fun (x: isize) -> true); + f_from_post = (fun (x: isize) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: isize) -> + match Core.Cmp.f_cmp #isize #FStar.Tactics.Typeclasses.solve x (isz 0) with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG + (impl_24__from_usize_binary (Core.Num.impl__isize__unsigned_abs x <: usize)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS + (impl_24__from_usize_binary (Core.Num.impl__isize__unsigned_abs x <: usize)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec impl_24__to_u128_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u128 = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> pub_u128 1 + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.U128.mul (impl_24__to_u128_binary p <: u128) (pub_u128 2) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.U128.add (Rust_primitives.U128.mul (impl_24__to_u128_binary p <: u128) + (pub_u128 2) + <: + u128) + (pub_u128 1) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Convert.t_From u128 Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u128) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> pub_u128 0 + | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_u128_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Convert.t_From i128 Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i128) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.I128.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U128.sub (impl_24__to_u128_binary + x + <: + u128) + (pub_u128 1) + <: + u128) + <: + i128) + <: + i128) + (pub_i128 1) + | Core.Base.Spec.Z.Z_ZERO -> pub_i128 0 + | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_u128_binary x <: u128) <: i128 + } + +let rec impl_24__to_u16_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u16 = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1us + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.U16.mul (impl_24__to_u16_binary p <: u16) 2us + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.U16.add (Rust_primitives.U16.mul (impl_24__to_u16_binary p <: u16) 2us <: u16) + 1us + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Convert.t_From u16 Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u16) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0us + | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_u16_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Convert.t_From i16 Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i16) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.I16.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U16.sub (impl_24__to_u16_binary + x + <: + u16) + 1us + <: + u16) + <: + i16) + <: + i16) + 1s + | Core.Base.Spec.Z.Z_ZERO -> 0s + | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_u16_binary x <: u16) <: i16 + } + +let rec impl_24__to_u32_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u32 = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1ul + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.U32.mul (impl_24__to_u32_binary p <: u32) 2ul + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.U32.add (Rust_primitives.U32.mul (impl_24__to_u32_binary p <: u32) 2ul <: u32) + 1ul + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Convert.t_From u32 Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u32) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0ul + | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_u32_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Convert.t_From i32 Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i32) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.I32.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U32.sub (impl_24__to_u32_binary + x + <: + u32) + 1ul + <: + u32) + <: + i32) + <: + i32) + 1l + | Core.Base.Spec.Z.Z_ZERO -> 0l + | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_u32_binary x <: u32) <: i32 + } + +let rec impl_24__to_u64_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u64 = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1uL + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.U64.mul (impl_24__to_u64_binary p <: u64) 2uL + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.U64.add (Rust_primitives.U64.mul (impl_24__to_u64_binary p <: u64) 2uL <: u64) + 1uL + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Convert.t_From u64 Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u64) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0uL + | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_u64_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Convert.t_From i64 Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i64) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.I64.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U64.sub (impl_24__to_u64_binary + x + <: + u64) + 1uL + <: + u64) + <: + i64) + <: + i64) + 1L + | Core.Base.Spec.Z.Z_ZERO -> 0L + | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_u64_binary x <: u64) <: i64 + } + +let rec impl_24__to_u8_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u8 = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1uy + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.U8.mul (impl_24__to_u8_binary p <: u8) 2uy + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.U8.add (Rust_primitives.U8.mul (impl_24__to_u8_binary p <: u8) 2uy <: u8) 1uy + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Convert.t_From u8 Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u8) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0uy + | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_u8_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Convert.t_From i8 Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i8) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.I8.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U8.sub (impl_24__to_u8_binary + x + <: + u8) + 1uy + <: + u8) + <: + i8) + <: + i8) + 1y + | Core.Base.Spec.Z.Z_ZERO -> 0y + | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_u8_binary x <: u8) <: i8 + } + +let rec impl_24__to_usize_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : usize = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> sz 1 + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.Usize.mul (impl_24__to_usize_binary p <: usize) (sz 2) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.Usize.add (Rust_primitives.Usize.mul (impl_24__to_usize_binary p <: usize) + (sz 2) + <: + usize) + (sz 1) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Convert.t_From usize Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: usize) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> sz 0 + | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_usize_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Convert.t_From isize Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: isize) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.Isize.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.Usize.sub (impl_24__to_usize_binary + x + <: + usize) + (sz 1) + <: + usize) + <: + isize) + <: + isize) + (isz 1) + | Core.Base.Spec.Z.Z_ZERO -> isz 0 + | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_usize_binary x <: usize) <: isize + } diff --git a/proof-libs/fstar/generated-core/Core.Base.Pos.fst b/proof-libs/fstar/generated-core/Core.Base.Pos.fst new file mode 100644 index 000000000..d162b8707 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Pos.fst @@ -0,0 +1,451 @@ +module Core.Base.Pos +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let haxint_shr__half (s: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos s with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Pos.POS_POS n -> + match Core.Base.Spec.Binary.Positive.match_positive n with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Core.Base.Spec.Binary.Positive.positive_to_int p + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Core.Base.Spec.Binary.Positive.positive_to_int p + +let haxint_sub__succ_double_mask (lhs: Core.Base.Spec.Haxint.t_HaxInt) + : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> + Core.Base.Spec.Binary.Positive.positive_to_int Core.Base.Spec.Binary.Positive.xH + | Core.Base.Spec.Binary.Pos.POS_POS p -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xI p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let haxint_succ_double (s: Core.Base.Spec.Haxint.t_HaxInt) + : Core.Base.Spec.Binary.Positive.t_Positive = + match Core.Base.Spec.Binary.Pos.match_pos s with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.xH + | Core.Base.Spec.Binary.Pos.POS_POS p -> Core.Base.Spec.Binary.Positive.xI p + +let haxint_double (s: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos s with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Pos.POS_POS p -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let haxint_sub__double_mask (lhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Pos.POS_POS p -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let rec bitand_binary (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Positive.match_positive lhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Positive.POSITIVE_XI _ + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ONE) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + haxint_double (bitand_binary p q <: Core.Base.Spec.Haxint.t_HaxInt)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ONE + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + haxint_double (bitand_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double (bitand_binary p q + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let rec bitor_binary (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Binary.Positive.t_Positive = + match Core.Base.Spec.Binary.Positive.match_positive lhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> Core.Base.Spec.Binary.Positive.xI q + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Binary.Positive.xH + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> Core.Base.Spec.Binary.Positive.xI q) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Binary.Positive.xI p + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + Core.Base.Spec.Binary.Positive.xO (bitor_binary p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.xI (bitor_binary p q + <: + Core.Base.Spec.Binary.Positive.t_Positive)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Binary.Positive.xI p + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.xI (bitor_binary p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let haxint_bitand (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Pos.POS_POS p -> + match Core.Base.Spec.Binary.Pos.match_pos rhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Pos.POS_POS q -> bitand_binary p q + +let haxint_bitor (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> rhs + | Core.Base.Spec.Binary.Pos.POS_POS p -> + match Core.Base.Spec.Binary.Pos.match_pos rhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.positive_to_int p + | Core.Base.Spec.Binary.Pos.POS_POS q -> + Core.Base.Spec.Binary.Positive.positive_to_int (bitor_binary p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let rec haxint_bitxor__bitxor_binary (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Positive.match_positive lhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xI q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO q + <: + Core.Base.Spec.Binary.Positive.t_Positive)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xI p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + haxint_double (haxint_bitxor__bitxor_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double (haxint_bitxor__bitxor_binary + p + q + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Binary.Positive.t_Positive)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double (haxint_bitxor__bitxor_binary + p + q + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + haxint_double (haxint_bitxor__bitxor_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) + +let haxint_bitxor (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> rhs + | Core.Base.Spec.Binary.Pos.POS_POS p -> + match Core.Base.Spec.Binary.Pos.match_pos rhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.positive_to_int p + | Core.Base.Spec.Binary.Pos.POS_POS q -> haxint_bitxor__bitxor_binary p q + +let haxint_cmp (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Cmp.t_Ordering = + match Core.Base.Spec.Binary.Pos.match_pos lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> + (match Core.Base.Spec.Binary.Pos.match_pos rhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering + | Core.Base.Spec.Binary.Pos.POS_POS q -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) + | Core.Base.Spec.Binary.Pos.POS_POS p -> + match Core.Base.Spec.Binary.Pos.match_pos rhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering + | Core.Base.Spec.Binary.Pos.POS_POS q -> Core.Base.Binary.positive_cmp p q + +let haxint_le (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : bool = + match + Core.Option.Option_Some (haxint_cmp lhs rhs) <: Core.Option.t_Option Core.Cmp.t_Ordering + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + +let haxint_lt (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : bool = + match + Core.Option.Option_Some (haxint_cmp lhs rhs) <: Core.Option.t_Option Core.Cmp.t_Ordering + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false + +let rec haxint_shl__shl_helper + (rhs: Core.Base.Spec.Unary.t_Unary) + (lhs: Core.Base.Spec.Haxint.t_HaxInt) + : Core.Base.Spec.Haxint.t_HaxInt = + if + Core.Base.Spec.Haxint.is_zero (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + lhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + then lhs + else + match Core.Base.Spec.Unary.match_unary rhs with + | Core.Base.Spec.Unary.UNARY_ZERO -> lhs + | Core.Base.Spec.Unary.UNARY_SUCC n -> + haxint_shl__shl_helper n (haxint_double lhs <: Core.Base.Spec.Haxint.t_HaxInt) + +let haxint_shl (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + haxint_shl__shl_helper (Core.Base.Spec.Unary.unary_from_int rhs <: Core.Base.Spec.Unary.t_Unary) + lhs + +let rec haxint_shr__shr_helper + (rhs: Core.Base.Spec.Unary.t_Unary) + (lhs: Core.Base.Spec.Haxint.t_HaxInt) + : Core.Base.Spec.Haxint.t_HaxInt = + if + Core.Base.Spec.Haxint.is_zero (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + lhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + then lhs + else + match Core.Base.Spec.Unary.match_unary rhs with + | Core.Base.Spec.Unary.UNARY_ZERO -> lhs + | Core.Base.Spec.Unary.UNARY_SUCC n -> + haxint_shr__shr_helper n (haxint_shr__half lhs <: Core.Base.Spec.Haxint.t_HaxInt) + +let haxint_shr (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + haxint_shr__shr_helper (Core.Base.Spec.Unary.unary_from_int rhs <: Core.Base.Spec.Unary.t_Unary) + lhs + +let haxint_sub__double_pred_mask (lhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Positive.match_positive lhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO (Core.Base.Binary.positive_pred_double + p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO (Core.Base.Spec.Binary.Positive.xO + p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let rec power_of_two (s: Core.Base.Spec.Unary.t_Unary) : Core.Base.Spec.Binary.Positive.t_Positive = + match Core.Base.Spec.Unary.match_unary s with + | Core.Base.Spec.Unary.UNARY_ZERO -> Core.Base.Spec.Binary.Positive.xH + | Core.Base.Spec.Unary.UNARY_SUCC x -> + Core.Base.Spec.Binary.Positive.xO (power_of_two x <: Core.Base.Spec.Binary.Positive.t_Positive) + +let haxint_add (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> rhs + | Core.Base.Spec.Binary.Pos.POS_POS p -> + match Core.Base.Spec.Binary.Pos.match_pos rhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.positive_to_int p + | Core.Base.Spec.Binary.Pos.POS_POS q -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Binary.positive_add p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let haxint_sub (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Pos.POS_POS p -> + match Core.Base.Spec.Binary.Pos.match_pos rhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.positive_to_int p + | Core.Base.Spec.Binary.Pos.POS_POS q -> haxint_sub__sub_binary p q + +let rec haxint_divmod__divmod_binary (a b: Core.Base.Spec.Binary.Positive.t_Positive) + : (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = + match Core.Base.Spec.Binary.Positive.match_positive a with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + (match Core.Base.Spec.Binary.Positive.match_positive b with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Haxint.v_HaxInt_ONE, Core.Base.Spec.Haxint.v_HaxInt_ZERO + <: + (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Haxint.v_HaxInt_ZERO, Core.Base.Spec.Haxint.v_HaxInt_ONE + <: + (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO a___ -> + let q, r:(Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = + haxint_divmod__divmod_binary a___ + (Core.Clone.f_clone #Core.Base.Spec.Binary.Positive.t_Positive + #FStar.Tactics.Typeclasses.solve + b + <: + Core.Base.Spec.Binary.Positive.t_Positive) + in + let r___:Core.Base.Spec.Haxint.t_HaxInt = haxint_double r in + if + haxint_le (Core.Base.Spec.Binary.Positive.positive_to_int (Core.Clone.f_clone #Core.Base.Spec.Binary.Positive.t_Positive + #FStar.Tactics.Typeclasses.solve + b + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve r___ + <: + Core.Base.Spec.Haxint.t_HaxInt) + then + Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double q + <: + Core.Base.Spec.Binary.Positive.t_Positive), + haxint_sub r___ + (Core.Base.Spec.Binary.Positive.positive_to_int b <: Core.Base.Spec.Haxint.t_HaxInt) + <: + (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) + else haxint_double q, r___ <: (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI a___ -> + let q, r:(Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = + haxint_divmod__divmod_binary a___ + (Core.Clone.f_clone #Core.Base.Spec.Binary.Positive.t_Positive + #FStar.Tactics.Typeclasses.solve + b + <: + Core.Base.Spec.Binary.Positive.t_Positive) + in + let r___:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double r + <: + Core.Base.Spec.Binary.Positive.t_Positive) + in + if + haxint_le (Core.Base.Spec.Binary.Positive.positive_to_int (Core.Clone.f_clone #Core.Base.Spec.Binary.Positive.t_Positive + #FStar.Tactics.Typeclasses.solve + b + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve r___ + <: + Core.Base.Spec.Haxint.t_HaxInt) + then + Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double q + <: + Core.Base.Spec.Binary.Positive.t_Positive), + haxint_sub r___ + (Core.Base.Spec.Binary.Positive.positive_to_int b <: Core.Base.Spec.Haxint.t_HaxInt) + <: + (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) + else haxint_double q, r___ <: (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) + +let haxint_divmod (a b: Core.Base.Spec.Haxint.t_HaxInt) + : (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = + match Core.Base.Spec.Binary.Pos.match_pos a with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> + Core.Base.Spec.Haxint.v_HaxInt_ZERO, Core.Base.Spec.Haxint.v_HaxInt_ZERO + <: + (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) + | Core.Base.Spec.Binary.Pos.POS_POS p -> + match Core.Base.Spec.Binary.Pos.match_pos b with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> + Core.Base.Spec.Haxint.v_HaxInt_ZERO, Core.Base.Spec.Binary.Positive.positive_to_int p + <: + (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) + | Core.Base.Spec.Binary.Pos.POS_POS q -> haxint_divmod__divmod_binary p q + +let haxint_div (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + let q, _:(Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = + haxint_divmod lhs rhs + in + q + +let haxint_mul (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Pos.POS_POS p -> + match Core.Base.Spec.Binary.Pos.match_pos rhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Pos.POS_POS q -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Binary.positive_mul p q + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +let haxint_rem (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + let _, r:(Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = + haxint_divmod lhs rhs + in + r + +let rec haxint_sub__sub_binary (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Positive.match_positive lhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Binary.positive_pred_double p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + haxint_sub__double_mask (haxint_sub__sub_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + haxint_sub__succ_double_mask (haxint_sub__sub_carry p q <: Core.Base.Spec.Haxint.t_HaxInt)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + haxint_sub__succ_double_mask (haxint_sub__sub_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + haxint_sub__double_mask (haxint_sub__sub_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) + +let rec haxint_sub__sub_carry (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Positive.match_positive lhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> haxint_sub__double_pred_mask p + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + haxint_sub__succ_double_mask (haxint_sub__sub_carry p q <: Core.Base.Spec.Haxint.t_HaxInt) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + haxint_sub__double_mask (haxint_sub__sub_carry p q <: Core.Base.Spec.Haxint.t_HaxInt)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Binary.positive_pred_double p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + haxint_sub__double_mask (haxint_sub__sub_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + haxint_sub__succ_double_mask (haxint_sub__sub_carry p q <: Core.Base.Spec.Haxint.t_HaxInt) diff --git a/proof-libs/fstar/generated-core/Core.Base.Seq.Base_impl.fst b/proof-libs/fstar/generated-core/Core.Base.Seq.Base_impl.fst deleted file mode 100644 index 3a075841f..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Seq.Base_impl.fst +++ /dev/null @@ -1,221 +0,0 @@ -module Core.Base.Seq.Base_impl -#set-options "--fuel 1 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let (~.) = not - -open Core.Cmp -open Core.Clone -open Core.Base.Int.Base_impl - -let impl_2__is_empty - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (self: Core.Base.Seq.t_Seq v_T) - : bool = - match Core.Base.Seq.Base_spec.impl_1__match_list #v_T self with - | Core.Base.Seq.LIST_NIL -> true - | Core.Base.Seq.LIST_CONS _ _ -> false - -let impl_2__tl - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: Core.Base.Seq.t_Seq v_T) - : Prims.Pure (Core.Base.Seq.t_Seq v_T) - (requires ~.(impl_2__is_empty #v_T self <: bool)) - (fun _ -> Prims.l_True) = - match Core.Base.Seq.Base_spec.impl_1__match_list #v_T self with - | Core.Base.Seq.LIST_NIL -> Core.Base.Seq.Base_spec.impl_1__NIL - | Core.Base.Seq.LIST_CONS _ tl -> tl - -let impl_2__hd__panic_cold_explicit (_: Prims.unit {False}) : Core.Panicking.t_Never = - Core.Panicking.panic_explicit () - -let impl_2__hd - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: Core.Base.Seq.t_Seq v_T) - : Prims.Pure v_T (requires ~.(impl_2__is_empty #v_T self <: bool)) (fun _ -> Prims.l_True) = - match Core.Base.Seq.Base_spec.impl_1__match_list #v_T self with - | Core.Base.Seq.LIST_NIL -> - Core.Panicking.never_to_any (impl_2__hd__panic_cold_explicit () - <: - Core.Panicking.t_Never) - | Core.Base.Seq.LIST_CONS hd _ -> hd - -let impl_2__set_index__set_index_unary__panic_cold_explicit (_: Prims.unit {False}) - : Core.Panicking.t_Never = Core.Panicking.panic_explicit () - -let rec impl__eq_inner - (#v_T: eqtype // Type0 - ) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: t_PartialEq v_T v_T) - (self other: Core.Base.Seq.t_Seq v_T) - : bool = - match - Core.Base.Seq.Base_spec.impl_1__match_list #v_T - (Core.Base.Seq.Base_spec.impl__clone #v_T self <: Core.Base.Seq.t_Seq v_T) - with - | Core.Base.Seq.LIST_NIL -> - impl_2__is_empty #v_T - (Core.Base.Seq.Base_spec.impl__clone #v_T other <: Core.Base.Seq.t_Seq v_T) - | Core.Base.Seq.LIST_CONS x xs -> - match - Core.Base.Seq.Base_spec.impl_1__match_list #v_T - (Core.Base.Seq.Base_spec.impl__clone #v_T other <: Core.Base.Seq.t_Seq v_T) - with - | Core.Base.Seq.LIST_NIL -> false - | Core.Base.Seq.LIST_CONS y ys -> - // let _ = (f_eq_pre x y) in - // true - x = y && impl__eq_inner #v_T #i1 #i2 xs ys - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1 - (#v_T: eqtype) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Cmp.t_PartialEq v_T v_T) - : Core.Cmp.t_PartialEq (Core.Base.Seq.t_Seq v_T) (Core.Base.Seq.t_Seq v_T) = - { - f_eq_pre = (fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) -> true); - f_eq_post - = - (fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) (out: bool) -> true); - f_eq - = - (fun x y -> x = y) - // (fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) -> - // impl__eq_inner #v_T self other) - ; - f_ne_pre = (fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) -> true); - f_ne_post - = - (fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) (out: bool) -> true); - f_ne - = - fun (self: Core.Base.Seq.t_Seq v_T) (other: Core.Base.Seq.t_Seq v_T) -> - ~.(self = other - // impl__eq_inner #v_T self other - <: bool) - } - -let rec impl_2__len - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: Core.Base.Seq.t_Seq v_T) - : Core.Base.Int.t_HaxInt = - match Core.Base.Seq.Base_spec.impl_1__match_list #v_T self with - | Core.Base.Seq.LIST_NIL -> Core.Base.Int.Base_spec.impl_9__ZERO - | Core.Base.Seq.LIST_CONS _ tl -> - Core.Base.Int.Base_spec.impl_9__succ (impl_2__len #v_T tl <: Core.Base.Int.t_HaxInt) - -let rec impl_2__rev_accum - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self accum: Core.Base.Seq.t_Seq v_T) - : Core.Base.Seq.t_Seq v_T = - match Core.Base.Seq.Base_spec.impl_1__match_list #v_T self with - | Core.Base.Seq.LIST_NIL -> accum - | Core.Base.Seq.LIST_CONS hd tl -> - impl_2__rev_accum #v_T - tl - (Core.Base.Seq.Base_spec.impl_1__cons #v_T accum hd <: Core.Base.Seq.t_Seq v_T) - -let impl_2__rev - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: Core.Base.Seq.t_Seq v_T) - : Core.Base.Seq.t_Seq v_T = impl_2__rev_accum #v_T self Core.Base.Seq.Base_spec.impl_1__NIL - -let rec impl_2__get_index__get_index_unary - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (l: Core.Base.Seq.t_Seq v_T) - (i: Core.Base.Int.t_Unary) - : Prims.Pure v_T - (requires i <. (impl_2__len #v_T l <: Core.Base.Int.t_HaxInt)) - (fun _ -> Prims.l_True) = - match Core.Base.Int.Base_spec.impl_6__match_unary i with - | Core.Base.Int.UNARY_ZERO -> - impl_2__hd #v_T l - | Core.Base.Int.UNARY_SUCC n -> - impl_2__get_index__get_index_unary #v_T (impl_2__tl #v_T l <: Core.Base.Seq.t_Seq v_T) n - -let impl_2__get_index - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: Core.Base.Seq.t_Seq v_T) - (i: Core.Base.Int.t_HaxInt) - : Prims.Pure v_T - (requires i <. (impl_2__len #v_T self <: Core.Base.Int.t_HaxInt)) - (fun _ -> Prims.l_True) = - impl_2__get_index__get_index_unary #v_T - self - (Core.Base.Int.Base_spec.impl_5__from_int i <: Core.Base.Int.t_Unary) - -let rec impl_2__repeat__repeat_unary - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (n: Core.Base.Int.t_Unary) - (v: v_T) - : Core.Base.Seq.t_Seq v_T = - match Core.Base.Int.Base_spec.impl_6__match_unary n with - | Core.Base.Int.UNARY_ZERO -> Core.Base.Seq.Base_spec.impl_1__NIL - | Core.Base.Int.UNARY_SUCC m -> - Core.Base.Seq.Base_spec.impl_1__cons #v_T - (impl_2__repeat__repeat_unary #v_T - m - (// let _ = assume (f_clone_pre v) in - // Core.Clone.f_clone #v_T #FStar.Tactics.Typeclasses.solve - v <: v_T) - <: - Core.Base.Seq.t_Seq v_T) - v - -let impl_2__repeat - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (n: Core.Base.Int.t_HaxInt) - (v: v_T) - : Core.Base.Seq.t_Seq v_T = - impl_2__repeat__repeat_unary #v_T - (Core.Base.Int.Base_spec.impl_5__from_int n <: Core.Base.Int.t_Unary) - v - -let rec impl_2__set_index__set_index_unary - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (x: Core.Base.Seq.t_Seq v_T) - (i: Core.Base.Int.t_Unary) - (v: v_T) - : Prims.Pure (Core.Base.Seq.t_Seq v_T) - (requires i <. (impl_2__len #v_T x <: Core.Base.Int.t_HaxInt)) - (fun _ -> Prims.l_True) = - match Core.Base.Seq.Base_spec.impl_1__match_list #v_T x with - | Core.Base.Seq.LIST_NIL -> - Core.Panicking.never_to_any (impl_2__set_index__set_index_unary__panic_cold_explicit () - <: - Core.Panicking.t_Never) - | Core.Base.Seq.LIST_CONS hd tl -> - match Core.Base.Int.Base_spec.impl_6__match_unary i with - | Core.Base.Int.UNARY_ZERO -> Core.Base.Seq.Base_spec.impl_1__cons #v_T tl v - | Core.Base.Int.UNARY_SUCC n -> - Core.Base.Seq.Base_spec.impl_1__cons #v_T - (impl_2__set_index__set_index_unary #v_T tl n v <: Core.Base.Seq.t_Seq v_T) - hd - -let impl_2__set_index - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: Core.Base.Seq.t_Seq v_T) - (i: Core.Base.Int.t_HaxInt) - (v: v_T) - : Prims.Pure (Core.Base.Seq.t_Seq v_T) - (requires i <. (impl_2__len #v_T self <: Core.Base.Int.t_HaxInt)) - (fun _ -> Prims.l_True) = - impl_2__set_index__set_index_unary #v_T - self - (Core.Base.Int.Base_spec.impl_5__from_int i <: Core.Base.Int.t_Unary) - v diff --git a/proof-libs/fstar/generated-core/Core.Base.Seq.Base_spec.fst b/proof-libs/fstar/generated-core/Core.Base.Seq.Base_spec.fst deleted file mode 100644 index 9372facaf..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Seq.Base_spec.fst +++ /dev/null @@ -1,29 +0,0 @@ -module Core.Base.Seq.Base_spec -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let impl__clone - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (self: Core.Base.Seq.t_Seq v_T) - : Core.Base.Seq.t_Seq v_T = self - -let impl_1__NIL (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - : Core.Base.Seq.t_Seq v_T = [] - -let impl_1__cons - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: Core.Base.Seq.t_Seq v_T) - (t: v_T) - : Core.Base.Seq.t_Seq v_T = t :: self - -let impl_1__match_list - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (self: Core.Base.Seq.t_Seq v_T) - : Core.Base.Seq.t_LIST v_T = - match self with - | [] -> Core.Base.Seq.LIST_NIL - | (x :: xs) -> Core.Base.Seq.LIST_CONS x xs diff --git a/proof-libs/fstar/generated-core/Core.Base.Seq.fst b/proof-libs/fstar/generated-core/Core.Base.Seq.fst index cb2ea67e7..776254ea5 100644 --- a/proof-libs/fstar/generated-core/Core.Base.Seq.fst +++ b/proof-libs/fstar/generated-core/Core.Base.Seq.fst @@ -3,8 +3,219 @@ module Core.Base.Seq open Core open FStar.Mul -type t_Seq (v_T: Type0) = list v_T +let hd__panic_cold_explicit (_: Prims.unit) : Rust_primitives.Hax.t_Never = + Core.Panicking.panic_explicit () -type t_LIST (v_T: Type0) = - | LIST_NIL : t_LIST v_T - | LIST_CONS : v_T -> t_Seq v_T -> t_LIST v_T +let set_index__set_index_unary__panic_cold_explicit (_: Prims.unit) : Rust_primitives.Hax.t_Never = + Core.Panicking.panic_explicit () + +let hd + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: Core.Base.Spec.Seq.t_Seq v_T) + : Prims.Pure v_T (requires ~.(is_empty #v_T s <: bool)) (fun _ -> Prims.l_True) = + match Core.Base.Spec.Seq.match_list #v_T s with + | Core.Base.Spec.Seq.LIST_NIL -> + Rust_primitives.Hax.never_to_any (hd__panic_cold_explicit () <: Rust_primitives.Hax.t_Never) + | Core.Base.Spec.Seq.LIST_CONS hd _ -> hd + +let is_empty + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: Core.Base.Spec.Seq.t_Seq v_T) + : bool = + match Core.Base.Spec.Seq.match_list #v_T s with + | Core.Base.Spec.Seq.LIST_NIL -> true + | Core.Base.Spec.Seq.LIST_CONS _ _ -> false + +let tl + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: Core.Base.Spec.Seq.t_Seq v_T) + : Prims.Pure (Core.Base.Spec.Seq.t_Seq v_T) + (requires ~.(is_empty #v_T s <: bool)) + (fun _ -> Prims.l_True) = + match Core.Base.Spec.Seq.match_list #v_T s with + | Core.Base.Spec.Seq.LIST_NIL -> Core.Base.Spec.Seq.nil #v_T () + | Core.Base.Spec.Seq.LIST_CONS _ tl -> tl + +let rec eq_inner + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Cmp.t_PartialEq v_T v_T) + (s other: Core.Base.Spec.Seq.t_Seq v_T) + : bool = + match + Core.Base.Spec.Seq.match_list #v_T + (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve s + <: + Core.Base.Spec.Seq.t_Seq v_T) + with + | Core.Base.Spec.Seq.LIST_NIL -> + is_empty #v_T + (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Spec.Seq.t_Seq v_T) + | Core.Base.Spec.Seq.LIST_CONS x xs -> + match + Core.Base.Spec.Seq.match_list #v_T + (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Spec.Seq.t_Seq v_T) + with + | Core.Base.Spec.Seq.LIST_NIL -> false + | Core.Base.Spec.Seq.LIST_CONS y ys -> x =. y && eq_inner #v_T xs ys + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Cmp.t_PartialEq v_T v_T) + : Core.Cmp.t_PartialEq (Core.Base.Spec.Seq.t_Seq v_T) (Core.Base.Spec.Seq.t_Seq v_T) = + { + f_eq_pre + = + (fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) -> true); + f_eq_post + = + (fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) (out: bool) -> + true); + f_eq + = + (fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) -> + eq_inner #v_T + (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve self + <: + Core.Base.Spec.Seq.t_Seq v_T) + (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Spec.Seq.t_Seq v_T)); + f_ne_pre + = + (fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) -> true); + f_ne_post + = + (fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) (out: bool) -> + true); + f_ne + = + fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) -> + ~.(eq_inner #v_T + (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve self + <: + Core.Base.Spec.Seq.t_Seq v_T) + (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve other + <: + Core.Base.Spec.Seq.t_Seq v_T) + <: + bool) + } + +let rec get_index__get_index_unary + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (l: Core.Base.Spec.Seq.t_Seq v_T) + (i: Core.Base.Spec.Unary.t_Unary) + : v_T = + match Core.Base.Spec.Unary.match_unary i with + | Core.Base.Spec.Unary.UNARY_ZERO -> hd #v_T l + | Core.Base.Spec.Unary.UNARY_SUCC n -> + get_index__get_index_unary #v_T (tl #v_T l <: Core.Base.Spec.Seq.t_Seq v_T) n + +let get_index + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: Core.Base.Spec.Seq.t_Seq v_T) + (i: Core.Base.Spec.Haxint.t_HaxInt) + : v_T = + get_index__get_index_unary #v_T + s + (Core.Base.Spec.Unary.unary_from_int i <: Core.Base.Spec.Unary.t_Unary) + +let rec len + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: Core.Base.Spec.Seq.t_Seq v_T) + : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Seq.match_list #v_T s with + | Core.Base.Spec.Seq.LIST_NIL -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Seq.LIST_CONS _ tl -> + Core.Base.Spec.Haxint.succ (len #v_T tl <: Core.Base.Spec.Haxint.t_HaxInt) + +let rec repeat__repeat_unary + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (n: Core.Base.Spec.Unary.t_Unary) + (v: v_T) + : Core.Base.Spec.Seq.t_Seq v_T = + match Core.Base.Spec.Unary.match_unary n with + | Core.Base.Spec.Unary.UNARY_ZERO -> Core.Base.Spec.Seq.nil #v_T () + | Core.Base.Spec.Unary.UNARY_SUCC m -> + Core.Base.Spec.Seq.cons #v_T + (repeat__repeat_unary #v_T + m + (Core.Clone.f_clone #v_T #FStar.Tactics.Typeclasses.solve v <: v_T) + <: + Core.Base.Spec.Seq.t_Seq v_T) + v + +let repeat + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (n: Core.Base.Spec.Haxint.t_HaxInt) + (v: v_T) + : Core.Base.Spec.Seq.t_Seq v_T = + repeat__repeat_unary #v_T + (Core.Base.Spec.Unary.unary_from_int n <: Core.Base.Spec.Unary.t_Unary) + v + +let rec rev__rev_accum + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s accum: Core.Base.Spec.Seq.t_Seq v_T) + : Core.Base.Spec.Seq.t_Seq v_T = + match Core.Base.Spec.Seq.match_list #v_T s with + | Core.Base.Spec.Seq.LIST_NIL -> accum + | Core.Base.Spec.Seq.LIST_CONS hd tl -> + rev__rev_accum #v_T tl (Core.Base.Spec.Seq.cons #v_T accum hd <: Core.Base.Spec.Seq.t_Seq v_T) + +let rev + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: Core.Base.Spec.Seq.t_Seq v_T) + : Core.Base.Spec.Seq.t_Seq v_T = + rev__rev_accum #v_T s (Core.Base.Spec.Seq.nil #v_T () <: Core.Base.Spec.Seq.t_Seq v_T) + +let rec set_index__set_index_unary + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (x: Core.Base.Spec.Seq.t_Seq v_T) + (i: Core.Base.Spec.Unary.t_Unary) + (v: v_T) + : Core.Base.Spec.Seq.t_Seq v_T = + match Core.Base.Spec.Seq.match_list #v_T x with + | Core.Base.Spec.Seq.LIST_NIL -> + Rust_primitives.Hax.never_to_any (set_index__set_index_unary__panic_cold_explicit () + <: + Rust_primitives.Hax.t_Never) + | Core.Base.Spec.Seq.LIST_CONS hd tl -> + match Core.Base.Spec.Unary.match_unary i with + | Core.Base.Spec.Unary.UNARY_ZERO -> Core.Base.Spec.Seq.cons #v_T tl v + | Core.Base.Spec.Unary.UNARY_SUCC n -> + Core.Base.Spec.Seq.cons #v_T + (set_index__set_index_unary #v_T tl n v <: Core.Base.Spec.Seq.t_Seq v_T) + hd + +let set_index + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: Core.Base.Spec.Seq.t_Seq v_T) + (i: Core.Base.Spec.Haxint.t_HaxInt) + (v: v_T) + : Prims.Pure (Core.Base.Spec.Seq.t_Seq v_T) + (requires Core.Base.Pos.haxint_lt i (len #v_T s <: Core.Base.Spec.Haxint.t_HaxInt)) + (fun _ -> Prims.l_True) = + set_index__set_index_unary #v_T + s + (Core.Base.Spec.Unary.unary_from_int i <: Core.Base.Spec.Unary.t_Unary) + v diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Pos.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Pos.fst new file mode 100644 index 000000000..11e9e7ee6 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Pos.fst @@ -0,0 +1,18 @@ +module Core.Base.Spec.Binary.Pos +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_POS = + | POS_ZERO : t_POS + | POS_POS : Core.Base.Spec.Binary.Positive.t_Positive -> t_POS + +let match_pos (s: Core.Base.Spec.Haxint.t_HaxInt) : t_POS = + if + Core.Base.Spec.Haxint.is_zero (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + s + <: + Core.Base.Spec.Haxint.t_HaxInt) + then POS_ZERO <: t_POS + else POS_POS (Core.Base.Spec.Binary.Positive.positive_from_int s) <: t_POS diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst new file mode 100644 index 000000000..aa92324dc --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst @@ -0,0 +1,127 @@ +module Core.Base.Spec.Binary.Positive +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Positive = | Positive : Core.Base.Spec.Haxint.t_HaxInt -> t_Positive + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Clone.t_Clone t_Positive = + { + f_clone_pre = (fun (self: t_Positive) -> true); + f_clone_post = (fun (self: t_Positive) (out: t_Positive) -> true); + f_clone + = + fun (self: t_Positive) -> + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + } + +type t_POSITIVE = + | POSITIVE_XH : t_POSITIVE + | POSITIVE_XO : t_Positive -> t_POSITIVE + | POSITIVE_XI : t_Positive -> t_POSITIVE + +let match_positive__is_xH (s: t_Positive) : bool = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + +let match_positive__is_xI (s: t_Positive) : bool = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + +let match_positive__is_xO (s: t_Positive) : bool = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + +let positive_from_int (x: Core.Base.Spec.Haxint.t_HaxInt) : t_Positive = Positive x <: t_Positive + +let positive_to_int (s: t_Positive) : Core.Base.Spec.Haxint.t_HaxInt = s._0 + +let match_positive (s: t_Positive) : t_POSITIVE = + if + match_positive__is_xH (Core.Clone.f_clone #t_Positive #FStar.Tactics.Typeclasses.solve s + <: + t_Positive) + then POSITIVE_XH <: t_POSITIVE + else + if + match_positive__is_xO (Core.Clone.f_clone #t_Positive #FStar.Tactics.Typeclasses.solve s + <: + t_Positive) + then + POSITIVE_XO + (positive_from_int (Core.Base.Spec.Haxint.div2 (positive_to_int s + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt)) + <: + t_POSITIVE + else + POSITIVE_XI + (positive_from_int (Core.Base.Spec.Haxint.div2 (positive_to_int s + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt)) + <: + t_POSITIVE + +let xH: t_Positive = Positive Core.Base.Spec.Haxint.v_HaxInt_ONE <: t_Positive + +let xI (s: t_Positive) : t_Positive = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + +let xO (s: t_Positive) : t_Positive = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Constants.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Constants.fst new file mode 100644 index 000000000..acd066282 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Spec.Constants.fst @@ -0,0 +1,283 @@ +module Core.Base.Spec.Constants +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let v_BITS_128_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [128uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_BITS_16_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [16uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_BITS_32_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [32uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_BITS_64_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [64uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_BITS_8_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [8uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_128_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = + [0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 1uy] + in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 17); + Rust_primitives.Hax.array_of_list 17 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_128_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = + [ + 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; + 255uy; 255uy; 255uy; 255uy + ] + in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 16); + Rust_primitives.Hax.array_of_list 16 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_16_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [0uy; 0uy; 1uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 3); + Rust_primitives.Hax.array_of_list 3 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_16_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [255uy; 255uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); + Rust_primitives.Hax.array_of_list 2 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_32_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [0uy; 0uy; 0uy; 0uy; 1uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 5); + Rust_primitives.Hax.array_of_list 5 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_32_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [255uy; 255uy; 255uy; 255uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 4); + Rust_primitives.Hax.array_of_list 4 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_4_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [128uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_4_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [127uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_64_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 1uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 9); + Rust_primitives.Hax.array_of_list 9 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_64_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 8); + Rust_primitives.Hax.array_of_list 8 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_8_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [0uy; 1uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); + Rust_primitives.Hax.array_of_list 2 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt + +let v_WORDSIZE_8_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = + { + Core.Base.Spec.Haxint.f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [255uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + Core.Base.Spec.Haxint.t_HaxInt diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Haxint.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Haxint.fst new file mode 100644 index 000000000..905782d89 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Spec.Haxint.fst @@ -0,0 +1,98 @@ +module Core.Base.Spec.Haxint +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_HaxInt = { f_v:Alloc.Borrow.t_Cow (t_Slice u8) } + +let v_HaxInt_ONE: t_HaxInt = + { + f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [1uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + t_HaxInt + +let v_HaxInt_TWO: t_HaxInt = + { + f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list = [2uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + t_HaxInt + +let v_HaxInt_ZERO: t_HaxInt = + { + f_v + = + Alloc.Borrow.Cow_Borrowed + ((let list:Prims.list u8 = [] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 0); + Rust_primitives.Hax.array_of_list 0 list) + <: + t_Slice u8) + <: + Alloc.Borrow.t_Cow (t_Slice u8) + } + <: + t_HaxInt + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Clone.t_Clone t_HaxInt = + { + f_clone_pre = (fun (self: t_HaxInt) -> true); + f_clone_post = (fun (self: t_HaxInt) (out: t_HaxInt) -> true); + f_clone + = + fun (self: t_HaxInt) -> + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + } + +let div2 (s: t_HaxInt) : t_HaxInt = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + +let is_zero (s: t_HaxInt) : bool = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst new file mode 100644 index 000000000..35d672a0c --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst @@ -0,0 +1,94 @@ +module Core.Base.Spec.Seq +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Seq (v_T: Type0) = { f_v:Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Clone.t_Clone (t_Seq v_T) = + { + f_clone_pre = (fun (self: t_Seq v_T) -> true); + f_clone_post = (fun (self: t_Seq v_T) (out: t_Seq v_T) -> true); + f_clone + = + fun (self: t_Seq v_T) -> + { + f_v + = + Core.Clone.f_clone #(Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global) + #FStar.Tactics.Typeclasses.solve + self.f_v + } + <: + t_Seq v_T + } + +type t_LIST (v_T: Type0) = + | LIST_NIL : t_LIST v_T + | LIST_CONS : v_T -> t_Seq v_T -> t_LIST v_T + +let nil + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (_: Prims.unit) + : t_Seq v_T = { f_v = Alloc.Vec.impl__new #v_T () } <: t_Seq v_T + +let cons + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: t_Seq v_T) + (t: v_T) + : t_Seq v_T = + { + f_v + = + Alloc.Slice.impl__concat #(t_Slice v_T) + #v_T + ((let list = + [ + (let list = [t] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list).[ Core.Ops.Range.RangeFull + <: + Core.Ops.Range.t_RangeFull ]; + s.f_v.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] + ] + in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); + Rust_primitives.Hax.array_of_list 2 list) + <: + t_Slice (t_Slice v_T)) + } + <: + t_Seq v_T + +let match_list + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: t_Seq v_T) + : t_LIST v_T = + if + Rust_primitives.Usize.eq (Alloc.Vec.impl_1__len #v_T #Alloc.Alloc.t_Global s.f_v <: usize) + (sz 0) + then LIST_NIL <: t_LIST v_T + else + LIST_CONS (Core.Clone.f_clone #v_T #FStar.Tactics.Typeclasses.solve (s.f_v.[ sz 0 ] <: v_T)) + ({ + f_v + = + Alloc.Slice.impl__concat #(t_Slice v_T) + #v_T + ((let list = + [s.f_v.[ { Core.Ops.Range.f_start = sz 1 } <: Core.Ops.Range.t_RangeFrom usize ]] + in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice (t_Slice v_T)) + } + <: + t_Seq v_T) + <: + t_LIST v_T diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst new file mode 100644 index 000000000..0f02c995b --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst @@ -0,0 +1,70 @@ +module Core.Base.Spec.Unary +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Unary = | Unary : Core.Base.Spec.Haxint.t_HaxInt -> t_Unary + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Clone.t_Clone t_Unary = + { + f_clone_pre = (fun (self: t_Unary) -> true); + f_clone_post = (fun (self: t_Unary) (out: t_Unary) -> true); + f_clone + = + fun (self: t_Unary) -> + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + } + +type t_UNARY = + | UNARY_ZERO : t_UNARY + | UNARY_SUCC : t_Unary -> t_UNARY + +let pred (x: t_Unary) : t_Unary = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + +let succ (x: t_Unary) : t_Unary = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + +let unary_from_int (x: Core.Base.Spec.Haxint.t_HaxInt) : t_Unary = Unary x <: t_Unary + +let unary_to_int (s: t_Unary) : Core.Base.Spec.Haxint.t_HaxInt = s._0 + +let match_unary (s: t_Unary) : t_UNARY = + if + Core.Base.Spec.Haxint.is_zero (unary_to_int (Core.Clone.f_clone #t_Unary + #FStar.Tactics.Typeclasses.solve + s + <: + t_Unary) + <: + Core.Base.Spec.Haxint.t_HaxInt) + then UNARY_ZERO <: t_UNARY + else UNARY_SUCC (pred s) <: t_UNARY diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Z.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Z.fst new file mode 100644 index 000000000..c7c717bdf --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Spec.Z.fst @@ -0,0 +1,19 @@ +module Core.Base.Spec.Z +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Z = + | Z_NEG : Core.Base.Spec.Binary.Positive.t_Positive -> t_Z + | Z_ZERO : t_Z + | Z_POS : Core.Base.Spec.Binary.Positive.t_Positive -> t_Z + +let v_Z_ONE: t_Z = Z_POS Core.Base.Spec.Binary.Positive.xH <: t_Z + +let v_Z_TWO: t_Z = + Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Haxint.v_HaxInt_TWO + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + t_Z diff --git a/proof-libs/fstar/generated-core/Core.Base.Z.fst b/proof-libs/fstar/generated-core/Core.Base.Z.fst new file mode 100644 index 000000000..e7edf06b7 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base.Z.fst @@ -0,0 +1,400 @@ +module Core.Base.Z +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let z_add__z_double (s: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + match s with + | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS p -> + Core.Base.Spec.Z.Z_POS (Core.Base.Spec.Binary.Positive.xO p) <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_NEG p -> + Core.Base.Spec.Z.Z_NEG (Core.Base.Spec.Binary.Positive.xO p) <: Core.Base.Spec.Z.t_Z + +let z_bitor__haxint_ldiff__n_double (x: Core.Base.Spec.Binary.Pos.t_POS) + : Core.Base.Spec.Binary.Pos.t_POS = + match x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> + Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Pos.POS_POS p -> + Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Spec.Binary.Positive.xO p) + <: + Core.Base.Spec.Binary.Pos.t_POS + +let z_bitor__haxint_ldiff__n_succ_double (x: Core.Base.Spec.Binary.Pos.t_POS) + : Core.Base.Spec.Binary.Pos.t_POS = + match x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> + Core.Base.Spec.Binary.Pos.POS_POS Core.Base.Spec.Binary.Positive.xH + <: + Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Pos.POS_POS p -> + Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Spec.Binary.Positive.xI p) + <: + Core.Base.Spec.Binary.Pos.t_POS + +let z_bitor__n_succ (x: Core.Base.Spec.Binary.Pos.t_POS) : Core.Base.Spec.Binary.Positive.t_Positive = + match x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.xH + | Core.Base.Spec.Binary.Pos.POS_POS p -> + Core.Base.Spec.Binary.Positive.positive_from_int (Core.Base.Spec.Haxint.succ (Core.Base.Spec.Binary.Positive.positive_to_int + p + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + +let z_neg (x: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + match x with + | Core.Base.Spec.Z.Z_NEG p -> Core.Base.Spec.Z.Z_POS p <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS p -> Core.Base.Spec.Z.Z_NEG p <: Core.Base.Spec.Z.t_Z + +let z_add__z_pred_double (s: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + match s with + | Core.Base.Spec.Z.Z_ZERO -> + Core.Base.Spec.Z.Z_NEG Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS p -> + Core.Base.Spec.Z.Z_POS (Core.Base.Binary.positive_pred_double p) <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_NEG p -> + Core.Base.Spec.Z.Z_NEG (Core.Base.Spec.Binary.Positive.xI p) <: Core.Base.Spec.Z.t_Z + +let z_add__z_succ_double (s: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + match s with + | Core.Base.Spec.Z.Z_ZERO -> + Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS p -> + Core.Base.Spec.Z.Z_POS (Core.Base.Spec.Binary.Positive.xI p) <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_NEG p -> + Core.Base.Spec.Z.Z_NEG (Core.Base.Binary.positive_pred_double p) <: Core.Base.Spec.Z.t_Z + +let rec z_bitor__haxint_ldiff__positive_ldiff (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Binary.Pos.t_POS = + match Core.Base.Spec.Binary.Positive.match_positive lhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Positive.POSITIVE_XO _ -> + Core.Base.Spec.Binary.Pos.POS_POS Core.Base.Spec.Binary.Positive.xH + <: + Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Positive.POSITIVE_XI _ -> + Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + (match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Spec.Binary.Positive.xO p) + <: + Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q + <: + Core.Base.Spec.Binary.Pos.t_POS) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q + <: + Core.Base.Spec.Binary.Pos.t_POS)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + match Core.Base.Spec.Binary.Positive.match_positive rhs with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Spec.Binary.Positive.xO p) + <: + Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + z_bitor__haxint_ldiff__n_succ_double (z_bitor__haxint_ldiff__positive_ldiff p q + <: + Core.Base.Spec.Binary.Pos.t_POS) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q + <: + Core.Base.Spec.Binary.Pos.t_POS) + +let z_bitor__haxint_ldiff (lhs rhs: Core.Base.Spec.Binary.Pos.t_POS) + : Core.Base.Spec.Binary.Pos.t_POS = + match lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> + Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Pos.POS_POS p -> + match rhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> + Core.Base.Spec.Binary.Pos.POS_POS p <: Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Pos.POS_POS q -> z_bitor__haxint_ldiff__positive_ldiff p q + +let z_bitor__n_and (lhs rhs: Core.Base.Spec.Binary.Pos.t_POS) : Core.Base.Spec.Binary.Pos.t_POS = + match lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> + Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Pos.POS_POS p -> + match rhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> + Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Pos.POS_POS q -> + Core.Base.Spec.Binary.Pos.POS_POS + (Core.Base.Spec.Binary.Positive.positive_from_int (Core.Base.Pos.bitand_binary p q + <: + Core.Base.Spec.Haxint.t_HaxInt)) + <: + Core.Base.Spec.Binary.Pos.t_POS + +let z_bitor__positive_pred_N (x: Core.Base.Spec.Binary.Positive.t_Positive) + : Core.Base.Spec.Binary.Pos.t_POS = + match Core.Base.Spec.Binary.Positive.match_positive x with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Spec.Binary.Positive.xO p) + <: + Core.Base.Spec.Binary.Pos.t_POS + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Binary.positive_pred_double p) + <: + Core.Base.Spec.Binary.Pos.t_POS + +let z_bitor (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + match lhs with + | Core.Base.Spec.Z.Z_ZERO -> rhs + | Core.Base.Spec.Z.Z_POS x -> + (match rhs with + | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_POS x <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS y -> + Core.Base.Spec.Z.Z_POS (Core.Base.Pos.bitor_binary x y) <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_NEG y -> + Core.Base.Spec.Z.Z_NEG + (z_bitor__n_succ (z_bitor__haxint_ldiff (z_bitor__positive_pred_N y + <: + Core.Base.Spec.Binary.Pos.t_POS) + (Core.Base.Spec.Binary.Pos.POS_POS x <: Core.Base.Spec.Binary.Pos.t_POS) + <: + Core.Base.Spec.Binary.Pos.t_POS)) + <: + Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Z.Z_NEG x -> + match rhs with + | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_NEG x <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS y -> + Core.Base.Spec.Z.Z_NEG + (z_bitor__n_succ (z_bitor__haxint_ldiff (z_bitor__positive_pred_N x + <: + Core.Base.Spec.Binary.Pos.t_POS) + (Core.Base.Spec.Binary.Pos.POS_POS y <: Core.Base.Spec.Binary.Pos.t_POS) + <: + Core.Base.Spec.Binary.Pos.t_POS)) + <: + Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_NEG y -> + Core.Base.Spec.Z.Z_NEG + (z_bitor__n_succ (z_bitor__n_and (z_bitor__positive_pred_N x + <: + Core.Base.Spec.Binary.Pos.t_POS) + (z_bitor__positive_pred_N y <: Core.Base.Spec.Binary.Pos.t_POS) + <: + Core.Base.Spec.Binary.Pos.t_POS)) + <: + Core.Base.Spec.Z.t_Z + +let z_cmp (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Cmp.t_Ordering = + match lhs with + | Core.Base.Spec.Z.Z_NEG p -> + (match rhs with + | Core.Base.Spec.Z.Z_NEG q -> + (match Core.Base.Binary.positive_cmp p q with + | Core.Cmp.Ordering_Equal -> Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering + | Core.Cmp.Ordering_Less -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering + | Core.Cmp.Ordering_Greater -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) + | _ -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) + | Core.Base.Spec.Z.Z_ZERO -> + (match rhs with + | Core.Base.Spec.Z.Z_ZERO -> Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering + | Core.Base.Spec.Z.Z_POS _ -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering + | Core.Base.Spec.Z.Z_NEG _ -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering) + | Core.Base.Spec.Z.Z_POS p -> + match rhs with + | Core.Base.Spec.Z.Z_POS q -> Core.Base.Binary.positive_cmp p q + | _ -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering + +let z_le (lhs rhs: Core.Base.Spec.Z.t_Z) : bool = + match Core.Option.Option_Some (z_cmp lhs rhs) <: Core.Option.t_Option Core.Cmp.t_Ordering with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + +let z_lt (lhs rhs: Core.Base.Spec.Z.t_Z) : bool = + match Core.Option.Option_Some (z_cmp lhs rhs) <: Core.Option.t_Option Core.Cmp.t_Ordering with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false + +let rec z_add__pos_z_sub (x y: Core.Base.Spec.Binary.Positive.t_Positive) : Core.Base.Spec.Z.t_Z = + match Core.Base.Spec.Binary.Positive.match_positive x with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + (match Core.Base.Spec.Binary.Positive.match_positive y with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + Core.Base.Spec.Z.Z_NEG (Core.Base.Binary.positive_pred_double q) <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + Core.Base.Spec.Z.Z_NEG (Core.Base.Spec.Binary.Positive.xO q) <: Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + (match Core.Base.Spec.Binary.Positive.match_positive y with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Z.Z_POS (Core.Base.Binary.positive_pred_double p) <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + z_add__z_double (z_add__pos_z_sub p q <: Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + z_add__z_pred_double (z_add__pos_z_sub p q <: Core.Base.Spec.Z.t_Z)) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + match Core.Base.Spec.Binary.Positive.match_positive y with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + Core.Base.Spec.Z.Z_POS (Core.Base.Spec.Binary.Positive.xO p) <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> + z_add__z_succ_double (z_add__pos_z_sub p q <: Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> + z_add__z_double (z_add__pos_z_sub p q <: Core.Base.Spec.Z.t_Z) + +let z_add (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + match lhs with + | Core.Base.Spec.Z.Z_NEG p -> + (match rhs with + | Core.Base.Spec.Z.Z_NEG q -> + Core.Base.Spec.Z.Z_NEG (Core.Base.Binary.positive_add p q) <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_NEG p <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS q -> z_add__pos_z_sub q p) + | Core.Base.Spec.Z.Z_ZERO -> rhs + | Core.Base.Spec.Z.Z_POS p -> + match rhs with + | Core.Base.Spec.Z.Z_NEG q -> z_add__pos_z_sub p q + | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_POS p <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS q -> + Core.Base.Spec.Z.Z_POS (Core.Base.Binary.positive_add p q) <: Core.Base.Spec.Z.t_Z + +let z_sub (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + z_add lhs (z_neg rhs <: Core.Base.Spec.Z.t_Z) + +let z_mul (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + match lhs with + | Core.Base.Spec.Z.Z_NEG p -> + (match rhs with + | Core.Base.Spec.Z.Z_NEG q -> + Core.Base.Spec.Z.Z_POS (Core.Base.Binary.positive_mul p q) <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS q -> + Core.Base.Spec.Z.Z_NEG (Core.Base.Binary.positive_mul p q) <: Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS p -> + match rhs with + | Core.Base.Spec.Z.Z_NEG q -> + Core.Base.Spec.Z.Z_NEG (Core.Base.Binary.positive_mul p q) <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS q -> + Core.Base.Spec.Z.Z_POS (Core.Base.Binary.positive_mul p q) <: Core.Base.Spec.Z.t_Z + +let rec pos_div_eucl (a: Core.Base.Spec.Binary.Positive.t_Positive) (b: Core.Base.Spec.Z.t_Z) + : (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = + match Core.Base.Spec.Binary.Positive.match_positive a with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> + if + z_le Core.Base.Spec.Z.v_Z_TWO + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b + <: + Core.Base.Spec.Z.t_Z) + then + (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z), Core.Base.Spec.Z.v_Z_ONE + <: + (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + else + Core.Base.Spec.Z.v_Z_ONE, (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z) + <: + (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + let q, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = + pos_div_eucl p + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b + <: + Core.Base.Spec.Z.t_Z) + in + let r___:Core.Base.Spec.Z.t_Z = z_mul Core.Base.Spec.Z.v_Z_TWO r in + if + z_lt (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve r___ + <: + Core.Base.Spec.Z.t_Z) + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b + <: + Core.Base.Spec.Z.t_Z) + then z_mul Core.Base.Spec.Z.v_Z_TWO q, r___ <: (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + else + z_add (z_mul Core.Base.Spec.Z.v_Z_TWO q <: Core.Base.Spec.Z.t_Z) Core.Base.Spec.Z.v_Z_ONE, + z_sub r___ b + <: + (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + let q, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = + pos_div_eucl p + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b + <: + Core.Base.Spec.Z.t_Z) + in + let r___:Core.Base.Spec.Z.t_Z = + z_add (z_mul Core.Base.Spec.Z.v_Z_TWO r <: Core.Base.Spec.Z.t_Z) Core.Base.Spec.Z.v_Z_ONE + in + if + z_lt (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve r___ + <: + Core.Base.Spec.Z.t_Z) + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b + <: + Core.Base.Spec.Z.t_Z) + then z_mul Core.Base.Spec.Z.v_Z_TWO q, r___ <: (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + else + z_add (z_mul Core.Base.Spec.Z.v_Z_TWO q <: Core.Base.Spec.Z.t_Z) Core.Base.Spec.Z.v_Z_ONE, + z_sub r___ b + <: + (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + +let z_divmod (a b: Core.Base.Spec.Z.t_Z) : (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = + match a with + | Core.Base.Spec.Z.Z_ZERO -> + (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z), + (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z) + <: + (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Z.Z_POS a___ -> + (match Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b with + | Core.Base.Spec.Z.Z_ZERO -> + (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z), + (Core.Base.Spec.Z.Z_POS a___ <: Core.Base.Spec.Z.t_Z) + <: + (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Z.Z_POS b___ -> pos_div_eucl a___ b + | Core.Base.Spec.Z.Z_NEG b___ -> + let q, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = + pos_div_eucl a___ (Core.Base.Spec.Z.Z_POS b___ <: Core.Base.Spec.Z.t_Z) + in + z_neg q, r <: (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z)) + | Core.Base.Spec.Z.Z_NEG a___ -> + match Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b with + | Core.Base.Spec.Z.Z_ZERO -> + (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z), + (Core.Base.Spec.Z.Z_NEG a___ <: Core.Base.Spec.Z.t_Z) + <: + (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Z.Z_POS _ -> + let q, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = + pos_div_eucl a___ + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b + <: + Core.Base.Spec.Z.t_Z) + in + z_neg q, z_neg r <: (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + | Core.Base.Spec.Z.Z_NEG b___ -> + let q, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = + pos_div_eucl a___ (Core.Base.Spec.Z.Z_POS b___ <: Core.Base.Spec.Z.t_Z) + in + q, z_neg r <: (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) + +let z_div (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + let q, _:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = z_divmod lhs rhs in + q + +let z_rem (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + let _, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = z_divmod lhs rhs in + r diff --git a/proof-libs/fstar/generated-core/Core.Coerce.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst similarity index 94% rename from proof-libs/fstar/generated-core/Core.Coerce.fst rename to proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst index c6a11ea30..250730625 100644 --- a/proof-libs/fstar/generated-core/Core.Coerce.fst +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst @@ -1,15 +1,8 @@ -module Core.Coerce +module Core.Base_interface.Coerce #set-options "--fuel 0 --ifuel 1 --z3rlimit 15" open Core open FStar.Mul -class t_Concretization (v_Self: Type0) (v_T: Type0) = { - f_concretize_pre:v_Self -> Type0; - f_concretize_post:v_Self -> v_T -> Type0; - f_concretize:x0: v_Self - -> Prims.Pure v_T (f_concretize_pre x0) (fun result -> f_concretize_post x0 result) -} - class t_Abstraction (v_Self: Type0) = { f_AbstractType:Type0; f_lift_pre:v_Self -> Type0; @@ -17,3 +10,10 @@ class t_Abstraction (v_Self: Type0) = { f_lift:x0: v_Self -> Prims.Pure f_AbstractType (f_lift_pre x0) (fun result -> f_lift_post x0 result) } + +class t_Concretization (v_Self: Type0) (v_T: Type0) = { + f_concretize_pre:v_Self -> Type0; + f_concretize_post:v_Self -> v_T -> Type0; + f_concretize:x0: v_Self + -> Prims.Pure v_T (f_concretize_pre x0) (fun result -> f_concretize_post x0 result) +} diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I128_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I128_proofs.fst new file mode 100644 index 000000000..344da15c6 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I128_proofs.fst @@ -0,0 +1,23 @@ +module Core.Base_interface.Int.I128_proofs +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let abstract_concretize_cancel (x: Core.Base_interface.Int.t_I128) + : Lemma Prims.l_True + (ensures + (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_I128) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base_interface.Int.t_I128) =. + x) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I16_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I16_proofs.fst new file mode 100644 index 000000000..70d5516d0 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I16_proofs.fst @@ -0,0 +1,23 @@ +module Core.Base_interface.Int.I16_proofs +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let abstract_concretize_cancel (x: Core.Base_interface.Int.t_I16) + : Lemma Prims.l_True + (ensures + (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_I16) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base_interface.Int.t_I16) =. + x) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I32_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I32_proofs.fst new file mode 100644 index 000000000..257939043 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I32_proofs.fst @@ -0,0 +1,23 @@ +module Core.Base_interface.Int.I32_proofs +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let abstract_concretize_cancel (x: Core.Base_interface.Int.t_I32) + : Lemma Prims.l_True + (ensures + (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_I32) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base_interface.Int.t_I32) =. + x) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I64_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I64_proofs.fst new file mode 100644 index 000000000..b7c952144 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I64_proofs.fst @@ -0,0 +1,23 @@ +module Core.Base_interface.Int.I64_proofs +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let abstract_concretize_cancel (x: Core.Base_interface.Int.t_I64) + : Lemma Prims.l_True + (ensures + (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_I64) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base_interface.Int.t_I64) =. + x) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I8_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I8_proofs.fst new file mode 100644 index 000000000..93f2caac1 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I8_proofs.fst @@ -0,0 +1,21 @@ +module Core.Base_interface.Int.I8_proofs +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let abstract_concretize_cancel (x: Core.Base_interface.Int.t_I8) + : Lemma Prims.l_True + (ensures + (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_I8) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base_interface.Int.t_I8) =. + x) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst new file mode 100644 index 000000000..46c880bb7 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst @@ -0,0 +1,187 @@ +module Core.Base_interface.Int.U128_proofs +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let abstract_concretize_cancel (x: Core.Base_interface.Int.t_U128) + : Lemma Prims.l_True + (ensures + (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base_interface.Int.t_U128) =. + x) = () + +let mod_add (x y z: Core.Base_interface.Int.t_U128) + : Lemma Prims.l_True + (ensures + Core.Base.Pos.haxint_le Core.Base.Spec.Constants.v_WORDSIZE_128_ + (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + y + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U128) +! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) =. + (((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) +! + (y %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) %! + z + <: + Core.Base_interface.Int.t_U128)) = () + +let mod_mul (x y z: Core.Base_interface.Int.t_U128) + : Lemma Prims.l_True + (ensures + Core.Base.Pos.haxint_lt Core.Base.Spec.Constants.v_WORDSIZE_128_ + (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + y + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U128) *! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) =. + ((((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + z + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) *! + y + <: + Core.Base_interface.Int.t_U128) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) %! + z + <: + Core.Base_interface.Int.t_U128)) = () + +let mod_one (x: Core.Base_interface.Int.t_U128) + : Lemma Prims.l_True + (ensures + (x %! Core.Base_interface.Int.f_ONE <: Core.Base_interface.Int.t_U128) =. + Core.Base_interface.Int.f_ZERO) = () + +let mod_sub (x y z: Core.Base_interface.Int.t_U128) + : Lemma Prims.l_True + (ensures + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U128) <. + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U128) || + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U128) <=. + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U128) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U128) -! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) =. + (((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) -! + (y %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) %! + z + <: + Core.Base_interface.Int.t_U128)) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst new file mode 100644 index 000000000..490134128 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst @@ -0,0 +1,187 @@ +module Core.Base_interface.Int.U16_proofs +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let abstract_concretize_cancel (x: Core.Base_interface.Int.t_U16) + : Lemma Prims.l_True + (ensures + (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base_interface.Int.t_U16) =. + x) = () + +let mod_add (x y z: Core.Base_interface.Int.t_U16) + : Lemma Prims.l_True + (ensures + Core.Base.Pos.haxint_le Core.Base.Spec.Constants.v_WORDSIZE_16_ + (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + y + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U16) +! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) =. + (((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) +! + (y %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) %! + z + <: + Core.Base_interface.Int.t_U16)) = () + +let mod_mul (x y z: Core.Base_interface.Int.t_U16) + : Lemma Prims.l_True + (ensures + Core.Base.Pos.haxint_lt Core.Base.Spec.Constants.v_WORDSIZE_16_ + (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + y + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U16) *! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) =. + ((((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + z + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) *! + y + <: + Core.Base_interface.Int.t_U16) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) %! + z + <: + Core.Base_interface.Int.t_U16)) = () + +let mod_one (x: Core.Base_interface.Int.t_U16) + : Lemma Prims.l_True + (ensures + (x %! Core.Base_interface.Int.f_ONE <: Core.Base_interface.Int.t_U16) =. + Core.Base_interface.Int.f_ZERO) = () + +let mod_sub (x y z: Core.Base_interface.Int.t_U16) + : Lemma Prims.l_True + (ensures + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U16) <. + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U16) || + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U16) <=. + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U16) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U16) -! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) =. + (((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) -! + (y %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) %! + z + <: + Core.Base_interface.Int.t_U16)) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst new file mode 100644 index 000000000..e6d45b9dd --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst @@ -0,0 +1,187 @@ +module Core.Base_interface.Int.U32_proofs +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let abstract_concretize_cancel (x: Core.Base_interface.Int.t_U32) + : Lemma Prims.l_True + (ensures + (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base_interface.Int.t_U32) =. + x) = () + +let mod_add (x y z: Core.Base_interface.Int.t_U32) + : Lemma Prims.l_True + (ensures + Core.Base.Pos.haxint_le Core.Base.Spec.Constants.v_WORDSIZE_32_ + (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + y + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U32) +! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) =. + (((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) +! + (y %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) %! + z + <: + Core.Base_interface.Int.t_U32)) = () + +let mod_mul (x y z: Core.Base_interface.Int.t_U32) + : Lemma Prims.l_True + (ensures + Core.Base.Pos.haxint_lt Core.Base.Spec.Constants.v_WORDSIZE_32_ + (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + y + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U32) *! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) =. + ((((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + z + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) *! + y + <: + Core.Base_interface.Int.t_U32) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) %! + z + <: + Core.Base_interface.Int.t_U32)) = () + +let mod_one (x: Core.Base_interface.Int.t_U32) + : Lemma Prims.l_True + (ensures + (x %! Core.Base_interface.Int.f_ONE <: Core.Base_interface.Int.t_U32) =. + Core.Base_interface.Int.f_ZERO) = () + +let mod_sub (x y z: Core.Base_interface.Int.t_U32) + : Lemma Prims.l_True + (ensures + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U32) <. + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U32) || + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U32) <=. + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U32) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U32) -! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) =. + (((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) -! + (y %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) %! + z + <: + Core.Base_interface.Int.t_U32)) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst new file mode 100644 index 000000000..40b746075 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst @@ -0,0 +1,187 @@ +module Core.Base_interface.Int.U64_proofs +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let abstract_concretize_cancel (x: Core.Base_interface.Int.t_U64) + : Lemma Prims.l_True + (ensures + (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base_interface.Int.t_U64) =. + x) = () + +let mod_add (x y z: Core.Base_interface.Int.t_U64) + : Lemma Prims.l_True + (ensures + Core.Base.Pos.haxint_le Core.Base.Spec.Constants.v_WORDSIZE_64_ + (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U64) +! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) =. + (((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) +! + (y %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) %! + z + <: + Core.Base_interface.Int.t_U64)) = () + +let mod_mul (x y z: Core.Base_interface.Int.t_U64) + : Lemma Prims.l_True + (ensures + Core.Base.Pos.haxint_lt Core.Base.Spec.Constants.v_WORDSIZE_64_ + (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U64) *! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) =. + ((((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + z + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) *! + y + <: + Core.Base_interface.Int.t_U64) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) %! + z + <: + Core.Base_interface.Int.t_U64)) = () + +let mod_one (x: Core.Base_interface.Int.t_U64) + : Lemma Prims.l_True + (ensures + (x %! Core.Base_interface.Int.f_ONE <: Core.Base_interface.Int.t_U64) =. + Core.Base_interface.Int.f_ZERO) = () + +let mod_sub (x y z: Core.Base_interface.Int.t_U64) + : Lemma Prims.l_True + (ensures + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U64) <. + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U64) || + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U64) <=. + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U64) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U64) -! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) =. + (((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) -! + (y %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) %! + z + <: + Core.Base_interface.Int.t_U64)) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst new file mode 100644 index 000000000..a562a9589 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst @@ -0,0 +1,183 @@ +module Core.Base_interface.Int.U8_proofs +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let abstract_concretize_cancel (x: Core.Base_interface.Int.t_U8) + : Lemma Prims.l_True + (ensures + (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base_interface.Int.t_U8) =. + x) = () + +let mod_add (x y z: Core.Base_interface.Int.t_U8) + : Lemma Prims.l_True + (ensures + Core.Base.Pos.haxint_le Core.Base.Spec.Constants.v_WORDSIZE_8_ + (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + y + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U8) +! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) =. + (((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) +! + (y %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) %! + z + <: + Core.Base_interface.Int.t_U8)) = () + +let mod_mul (x y z: Core.Base_interface.Int.t_U8) + : Lemma Prims.l_True + (ensures + Core.Base.Pos.haxint_lt Core.Base.Spec.Constants.v_WORDSIZE_8_ + (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + y + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U8) *! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) =. + ((((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) *! + y + <: + Core.Base_interface.Int.t_U8) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) %! + z + <: + Core.Base_interface.Int.t_U8)) = () + +let mod_one (x: Core.Base_interface.Int.t_U8) + : Lemma Prims.l_True + (ensures + (x %! Core.Base_interface.Int.f_ONE <: Core.Base_interface.Int.t_U8) =. + Core.Base_interface.Int.f_ZERO) = () + +let mod_sub (x y z: Core.Base_interface.Int.t_U8) + : Lemma Prims.l_True + (ensures + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U8) <. + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U8) || + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U8) <=. + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U8) || + (((Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base_interface.Int.t_U8) -! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve y + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) =. + (((x %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) -! + (y %! + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) %! + z + <: + Core.Base_interface.Int.t_U8)) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.fst new file mode 100644 index 000000000..a3b35a54b --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.fst @@ -0,0 +1,5811 @@ +module Core.Base_interface.Int +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_Constants (v_Self: Type0) = { + f_ZERO:v_Self; + f_ONE:v_Self; + f_MIN:v_Self; + f_MAX:v_Self +} + +let impl_41__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_128_ + +let impl_55__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_64_ + +let impl_69__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_32_ + +let impl_83__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_16_ + +let impl_97__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_8_ + +let impl_111__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_128_ + +let impl_138__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_64_ + +let impl_165__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_32_ + +let impl_192__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_16_ + +let impl_219__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_8_ + +type t_U128 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_110: t_Constants t_U128 = + { + f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U128; + f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U128; + f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U128; + f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_128_SUB_1_ } <: t_U128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_134: Core.Clone.t_Clone t_U128 = + { + f_clone_pre = (fun (self: t_U128) -> true); + f_clone_post = (fun (self: t_U128) (out: t_U128) -> true); + f_clone + = + fun (self: t_U128) -> + { + f_v + = + Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v + } + <: + t_U128 + } + +type t_U16 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_191: t_Constants t_U16 = + { + f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U16; + f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U16; + f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U16; + f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_16_SUB_1_ } <: t_U16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_215: Core.Clone.t_Clone t_U16 = + { + f_clone_pre = (fun (self: t_U16) -> true); + f_clone_post = (fun (self: t_U16) (out: t_U16) -> true); + f_clone + = + fun (self: t_U16) -> + { + f_v + = + Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v + } + <: + t_U16 + } + +type t_U32 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } + +let impl_41__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_128_ } <: t_U32 + +let impl_55__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_64_ } <: t_U32 + +let impl_69__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_32_ } <: t_U32 + +let impl_83__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_16_ } <: t_U32 + +let impl_97__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_8_ } <: t_U32 + +let impl_111__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_128_ } <: t_U32 + +let impl_138__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_64_ } <: t_U32 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_164: t_Constants t_U32 = + { + f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U32; + f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U32; + f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U32; + f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_32_SUB_1_ } <: t_U32 + } + +let impl_165__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_32_ } <: t_U32 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_188: Core.Clone.t_Clone t_U32 = + { + f_clone_pre = (fun (self: t_U32) -> true); + f_clone_post = (fun (self: t_U32) (out: t_U32) -> true); + f_clone + = + fun (self: t_U32) -> + { + f_v + = + Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v + } + <: + t_U32 + } + +let impl_192__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_16_ } <: t_U32 + +let impl_219__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_8_ } <: t_U32 + +type t_U64 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_137: t_Constants t_U64 = + { + f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U64; + f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U64; + f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U64; + f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_64_SUB_1_ } <: t_U64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_161: Core.Clone.t_Clone t_U64 = + { + f_clone_pre = (fun (self: t_U64) -> true); + f_clone_post = (fun (self: t_U64) (out: t_U64) -> true); + f_clone + = + fun (self: t_U64) -> + { + f_v + = + Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v + } + <: + t_U64 + } + +type t_U8 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_218: t_Constants t_U8 = + { + f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U8; + f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U8; + f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U8; + f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_8_SUB_1_ } <: t_U8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_242: Core.Clone.t_Clone t_U8 = + { + f_clone_pre = (fun (self: t_U8) -> true); + f_clone_post = (fun (self: t_U8) (out: t_U8) -> true); + f_clone + = + fun (self: t_U8) -> + { + f_v + = + Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v + } + <: + t_U8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_112: Core.Base_interface.Coerce.t_Abstraction t_U128 = + { + f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; + f_lift_pre = (fun (self: t_U128) -> true); + f_lift_post = (fun (self: t_U128) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_lift = fun (self: t_U128) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_135: Core.Cmp.t_PartialEq t_U128 t_U128 = + { + f_eq_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_eq_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_eq + = + (fun (self: t_U128) (rhs: t_U128) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_ne_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_ne + = + fun (self: t_U128) (rhs: t_U128) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_136: Core.Cmp.t_PartialOrd t_U128 t_U128 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_partial_cmp_post + = + (fun (self: t_U128) (rhs: t_U128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U128) (rhs: t_U128) -> + Core.Option.Option_Some + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_lt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_lt + = + (fun (self: t_U128) (rhs: t_U128) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_le_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_le + = + (fun (self: t_U128) (rhs: t_U128) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_gt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_gt + = + (fun (self: t_U128) (rhs: t_U128) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_ge_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); + f_ge + = + fun (self: t_U128) (rhs: t_U128) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_139: Core.Base_interface.Coerce.t_Abstraction t_U64 = + { + f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; + f_lift_pre = (fun (self: t_U64) -> true); + f_lift_post = (fun (self: t_U64) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_lift = fun (self: t_U64) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_162: Core.Cmp.t_PartialEq t_U64 t_U64 = + { + f_eq_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_eq_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_eq + = + (fun (self: t_U64) (rhs: t_U64) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_ne_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_ne + = + fun (self: t_U64) (rhs: t_U64) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_163: Core.Cmp.t_PartialOrd t_U64 t_U64 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_partial_cmp_post + = + (fun (self: t_U64) (rhs: t_U64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U64) (rhs: t_U64) -> + Core.Option.Option_Some + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_lt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_lt + = + (fun (self: t_U64) (rhs: t_U64) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_le_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_le + = + (fun (self: t_U64) (rhs: t_U64) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_gt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_gt + = + (fun (self: t_U64) (rhs: t_U64) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_ge_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); + f_ge + = + fun (self: t_U64) (rhs: t_U64) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_166: Core.Base_interface.Coerce.t_Abstraction t_U32 = + { + f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; + f_lift_pre = (fun (self: t_U32) -> true); + f_lift_post = (fun (self: t_U32) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_lift = fun (self: t_U32) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_189: Core.Cmp.t_PartialEq t_U32 t_U32 = + { + f_eq_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_eq_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_eq + = + (fun (self: t_U32) (rhs: t_U32) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_ne_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_ne + = + fun (self: t_U32) (rhs: t_U32) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_190: Core.Cmp.t_PartialOrd t_U32 t_U32 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_partial_cmp_post + = + (fun (self: t_U32) (rhs: t_U32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U32) (rhs: t_U32) -> + Core.Option.Option_Some + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_lt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_lt + = + (fun (self: t_U32) (rhs: t_U32) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_le_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_le + = + (fun (self: t_U32) (rhs: t_U32) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_gt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_gt + = + (fun (self: t_U32) (rhs: t_U32) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_ge_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_ge + = + fun (self: t_U32) (rhs: t_U32) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_193: Core.Base_interface.Coerce.t_Abstraction t_U16 = + { + f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; + f_lift_pre = (fun (self: t_U16) -> true); + f_lift_post = (fun (self: t_U16) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_lift = fun (self: t_U16) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_216: Core.Cmp.t_PartialEq t_U16 t_U16 = + { + f_eq_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_eq_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_eq + = + (fun (self: t_U16) (rhs: t_U16) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_ne_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_ne + = + fun (self: t_U16) (rhs: t_U16) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_217: Core.Cmp.t_PartialOrd t_U16 t_U16 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_partial_cmp_post + = + (fun (self: t_U16) (rhs: t_U16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U16) (rhs: t_U16) -> + Core.Option.Option_Some + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_lt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_lt + = + (fun (self: t_U16) (rhs: t_U16) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_le_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_le + = + (fun (self: t_U16) (rhs: t_U16) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_gt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_gt + = + (fun (self: t_U16) (rhs: t_U16) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_ge_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_ge + = + fun (self: t_U16) (rhs: t_U16) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_220: Core.Base_interface.Coerce.t_Abstraction t_U8 = + { + f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; + f_lift_pre = (fun (self: t_U8) -> true); + f_lift_post = (fun (self: t_U8) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_lift = fun (self: t_U8) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_243: Core.Cmp.t_PartialEq t_U8 t_U8 = + { + f_eq_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_eq_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_eq + = + (fun (self: t_U8) (rhs: t_U8) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_ne_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_ne + = + fun (self: t_U8) (rhs: t_U8) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_244: Core.Cmp.t_PartialOrd t_U8 t_U8 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_partial_cmp_post + = + (fun (self: t_U8) (rhs: t_U8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U8) (rhs: t_U8) -> + Core.Option.Option_Some + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_lt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_lt + = + (fun (self: t_U8) (rhs: t_U8) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_le_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_le + = + (fun (self: t_U8) (rhs: t_U8) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_gt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_gt + = + (fun (self: t_U8) (rhs: t_U8) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_ge_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_ge + = + fun (self: t_U8) (rhs: t_U8) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false + } + +type t_I128 = { f_v:Core.Base.Spec.Z.t_Z } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: t_Constants t_I128 = + { + f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I128; + f_ONE + = + { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } + <: + t_I128; + f_MIN + = + { + f_v + = + Core.Base.Spec.Z.Z_NEG + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_64_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I128; + f_MAX + = + { + f_v + = + Core.Base.Spec.Z.Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_64_SUB_1_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_43: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I128 = + { + f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I128) -> true); + f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_51: Core.Clone.t_Clone t_I128 = + { + f_clone_pre = (fun (self: t_I128) -> true); + f_clone_post = (fun (self: t_I128) (out: t_I128) -> true); + f_clone + = + fun (self: t_I128) -> + { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_I128 + } + +type t_I16 = { f_v:Core.Base.Spec.Z.t_Z } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_82: t_Constants t_I16 = + { + f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I16; + f_ONE + = + { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } + <: + t_I16; + f_MIN + = + { + f_v + = + Core.Base.Spec.Z.Z_NEG + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_8_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I16; + f_MAX + = + { + f_v + = + Core.Base.Spec.Z.Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_8_SUB_1_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_85: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I16 = + { + f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I16) -> true); + f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_93: Core.Clone.t_Clone t_I16 = + { + f_clone_pre = (fun (self: t_I16) -> true); + f_clone_post = (fun (self: t_I16) (out: t_I16) -> true); + f_clone + = + fun (self: t_I16) -> + { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_I16 + } + +type t_I32 = { f_v:Core.Base.Spec.Z.t_Z } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_68: t_Constants t_I32 = + { + f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I32; + f_ONE + = + { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } + <: + t_I32; + f_MIN + = + { + f_v + = + Core.Base.Spec.Z.Z_NEG + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_16_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I32; + f_MAX + = + { + f_v + = + Core.Base.Spec.Z.Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_16_SUB_1_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_71: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I32 = + { + f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I32) -> true); + f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_79: Core.Clone.t_Clone t_I32 = + { + f_clone_pre = (fun (self: t_I32) -> true); + f_clone_post = (fun (self: t_I32) (out: t_I32) -> true); + f_clone + = + fun (self: t_I32) -> + { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_I32 + } + +type t_I64 = { f_v:Core.Base.Spec.Z.t_Z } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_54: t_Constants t_I64 = + { + f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I64; + f_ONE + = + { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } + <: + t_I64; + f_MIN + = + { + f_v + = + Core.Base.Spec.Z.Z_NEG + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_32_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I64; + f_MAX + = + { + f_v + = + Core.Base.Spec.Z.Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_32_SUB_1_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_57: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I64 = + { + f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I64) -> true); + f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_65: Core.Clone.t_Clone t_I64 = + { + f_clone_pre = (fun (self: t_I64) -> true); + f_clone_post = (fun (self: t_I64) (out: t_I64) -> true); + f_clone + = + fun (self: t_I64) -> + { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_I64 + } + +type t_I8 = { f_v:Core.Base.Spec.Z.t_Z } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_96: t_Constants t_I8 = + { + f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I8; + f_ONE + = + { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } + <: + t_I8; + f_MIN + = + { + f_v + = + Core.Base.Spec.Z.Z_NEG + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_4_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I8; + f_MAX + = + { + f_v + = + Core.Base.Spec.Z.Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_4_SUB_1_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_99: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I8 = + { + f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I8) -> true); + f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_107: Core.Clone.t_Clone t_I8 = + { + f_clone_pre = (fun (self: t_I8) -> true); + f_clone_post = (fun (self: t_I8) (out: t_I8) -> true); + f_clone + = + fun (self: t_I8) -> + { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_I8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_42: Core.Base_interface.Coerce.t_Abstraction t_I128 = + { + f_AbstractType = Core.Base.Spec.Z.t_Z; + f_lift_pre = (fun (self: t_I128) -> true); + f_lift_post = (fun (self: t_I128) (out: Core.Base.Spec.Z.t_Z) -> true); + f_lift = fun (self: t_I128) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Convert.t_From t_I8 t_I128 = + { + f_from_pre = (fun (x: t_I128) -> true); + f_from_post = (fun (x: t_I128) (out: t_I8) -> true); + f_from + = + fun (x: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Convert.t_From t_I16 t_I128 = + { + f_from_pre = (fun (x: t_I128) -> true); + f_from_post = (fun (x: t_I128) (out: t_I16) -> true); + f_from + = + fun (x: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Convert.t_From t_I32 t_I128 = + { + f_from_pre = (fun (x: t_I128) -> true); + f_from_post = (fun (x: t_I128) (out: t_I32) -> true); + f_from + = + fun (x: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Convert.t_From t_I64 t_I128 = + { + f_from_pre = (fun (x: t_I128) -> true); + f_from_post = (fun (x: t_I128) (out: t_I64) -> true); + f_from + = + fun (x: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_52: Core.Cmp.t_PartialEq t_I128 t_I128 = + { + f_eq_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_eq_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_eq + = + (fun (self: t_I128) (rhs: t_I128) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_ne_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_ne + = + fun (self: t_I128) (rhs: t_I128) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_53: Core.Cmp.t_PartialOrd t_I128 t_I128 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_partial_cmp_post + = + (fun (self: t_I128) (rhs: t_I128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_I128) (rhs: t_I128) -> + Core.Option.Option_Some + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + <: + Core.Base.Spec.Z.t_Z)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_lt_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_lt + = + (fun (self: t_I128) (rhs: t_I128) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_le_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_le + = + (fun (self: t_I128) (rhs: t_I128) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_gt_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_gt + = + (fun (self: t_I128) (rhs: t_I128) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_ge_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_ge + = + fun (self: t_I128) (rhs: t_I128) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_56: Core.Base_interface.Coerce.t_Abstraction t_I64 = + { + f_AbstractType = Core.Base.Spec.Z.t_Z; + f_lift_pre = (fun (self: t_I64) -> true); + f_lift_post = (fun (self: t_I64) (out: Core.Base.Spec.Z.t_Z) -> true); + f_lift = fun (self: t_I64) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Convert.t_From t_I8 t_I64 = + { + f_from_pre = (fun (x: t_I64) -> true); + f_from_post = (fun (x: t_I64) (out: t_I8) -> true); + f_from + = + fun (x: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Convert.t_From t_I16 t_I64 = + { + f_from_pre = (fun (x: t_I64) -> true); + f_from_post = (fun (x: t_I64) (out: t_I16) -> true); + f_from + = + fun (x: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Convert.t_From t_I32 t_I64 = + { + f_from_pre = (fun (x: t_I64) -> true); + f_from_post = (fun (x: t_I64) (out: t_I32) -> true); + f_from + = + fun (x: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Convert.t_From t_I128 t_I64 = + { + f_from_pre = (fun (x: t_I64) -> true); + f_from_post = (fun (x: t_I64) (out: t_I128) -> true); + f_from + = + fun (x: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_66: Core.Cmp.t_PartialEq t_I64 t_I64 = + { + f_eq_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_eq_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_eq + = + (fun (self: t_I64) (rhs: t_I64) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_ne_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_ne + = + fun (self: t_I64) (rhs: t_I64) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_67: Core.Cmp.t_PartialOrd t_I64 t_I64 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_partial_cmp_post + = + (fun (self: t_I64) (rhs: t_I64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_I64) (rhs: t_I64) -> + Core.Option.Option_Some + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + <: + Core.Base.Spec.Z.t_Z)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_lt_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_lt + = + (fun (self: t_I64) (rhs: t_I64) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_le_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_le + = + (fun (self: t_I64) (rhs: t_I64) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_gt_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_gt + = + (fun (self: t_I64) (rhs: t_I64) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_ge_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_ge + = + fun (self: t_I64) (rhs: t_I64) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_70: Core.Base_interface.Coerce.t_Abstraction t_I32 = + { + f_AbstractType = Core.Base.Spec.Z.t_Z; + f_lift_pre = (fun (self: t_I32) -> true); + f_lift_post = (fun (self: t_I32) (out: Core.Base.Spec.Z.t_Z) -> true); + f_lift = fun (self: t_I32) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Convert.t_From t_I8 t_I32 = + { + f_from_pre = (fun (x: t_I32) -> true); + f_from_post = (fun (x: t_I32) (out: t_I8) -> true); + f_from + = + fun (x: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Convert.t_From t_I16 t_I32 = + { + f_from_pre = (fun (x: t_I32) -> true); + f_from_post = (fun (x: t_I32) (out: t_I16) -> true); + f_from + = + fun (x: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Convert.t_From t_I64 t_I32 = + { + f_from_pre = (fun (x: t_I32) -> true); + f_from_post = (fun (x: t_I32) (out: t_I64) -> true); + f_from + = + fun (x: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Convert.t_From t_I128 t_I32 = + { + f_from_pre = (fun (x: t_I32) -> true); + f_from_post = (fun (x: t_I32) (out: t_I128) -> true); + f_from + = + fun (x: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_80: Core.Cmp.t_PartialEq t_I32 t_I32 = + { + f_eq_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_eq_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_eq + = + (fun (self: t_I32) (rhs: t_I32) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_ne_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_ne + = + fun (self: t_I32) (rhs: t_I32) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_81: Core.Cmp.t_PartialOrd t_I32 t_I32 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_partial_cmp_post + = + (fun (self: t_I32) (rhs: t_I32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_I32) (rhs: t_I32) -> + Core.Option.Option_Some + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + <: + Core.Base.Spec.Z.t_Z)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_lt_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_lt + = + (fun (self: t_I32) (rhs: t_I32) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_le_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_le + = + (fun (self: t_I32) (rhs: t_I32) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_gt_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_gt + = + (fun (self: t_I32) (rhs: t_I32) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_ge_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_ge + = + fun (self: t_I32) (rhs: t_I32) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_84: Core.Base_interface.Coerce.t_Abstraction t_I16 = + { + f_AbstractType = Core.Base.Spec.Z.t_Z; + f_lift_pre = (fun (self: t_I16) -> true); + f_lift_post = (fun (self: t_I16) (out: Core.Base.Spec.Z.t_Z) -> true); + f_lift = fun (self: t_I16) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Convert.t_From t_I8 t_I16 = + { + f_from_pre = (fun (x: t_I16) -> true); + f_from_post = (fun (x: t_I16) (out: t_I8) -> true); + f_from + = + fun (x: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Convert.t_From t_I32 t_I16 = + { + f_from_pre = (fun (x: t_I16) -> true); + f_from_post = (fun (x: t_I16) (out: t_I32) -> true); + f_from + = + fun (x: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Convert.t_From t_I64 t_I16 = + { + f_from_pre = (fun (x: t_I16) -> true); + f_from_post = (fun (x: t_I16) (out: t_I64) -> true); + f_from + = + fun (x: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Convert.t_From t_I128 t_I16 = + { + f_from_pre = (fun (x: t_I16) -> true); + f_from_post = (fun (x: t_I16) (out: t_I128) -> true); + f_from + = + fun (x: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_94: Core.Cmp.t_PartialEq t_I16 t_I16 = + { + f_eq_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_eq_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_eq + = + (fun (self: t_I16) (rhs: t_I16) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_ne_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_ne + = + fun (self: t_I16) (rhs: t_I16) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_95: Core.Cmp.t_PartialOrd t_I16 t_I16 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_partial_cmp_post + = + (fun (self: t_I16) (rhs: t_I16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_I16) (rhs: t_I16) -> + Core.Option.Option_Some + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_lt_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_lt + = + (fun (self: t_I16) (rhs: t_I16) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_le_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_le + = + (fun (self: t_I16) (rhs: t_I16) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_gt_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_gt + = + (fun (self: t_I16) (rhs: t_I16) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_ge_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_ge + = + fun (self: t_I16) (rhs: t_I16) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_98: Core.Base_interface.Coerce.t_Abstraction t_I8 = + { + f_AbstractType = Core.Base.Spec.Z.t_Z; + f_lift_pre = (fun (self: t_I8) -> true); + f_lift_post = (fun (self: t_I8) (out: Core.Base.Spec.Z.t_Z) -> true); + f_lift = fun (self: t_I8) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Convert.t_From t_I16 t_I8 = + { + f_from_pre = (fun (x: t_I8) -> true); + f_from_post = (fun (x: t_I8) (out: t_I16) -> true); + f_from + = + fun (x: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Convert.t_From t_I32 t_I8 = + { + f_from_pre = (fun (x: t_I8) -> true); + f_from_post = (fun (x: t_I8) (out: t_I32) -> true); + f_from + = + fun (x: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Convert.t_From t_I64 t_I8 = + { + f_from_pre = (fun (x: t_I8) -> true); + f_from_post = (fun (x: t_I8) (out: t_I64) -> true); + f_from + = + fun (x: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Convert.t_From t_I128 t_I8 = + { + f_from_pre = (fun (x: t_I8) -> true); + f_from_post = (fun (x: t_I8) (out: t_I128) -> true); + f_from + = + fun (x: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_108: Core.Cmp.t_PartialEq t_I8 t_I8 = + { + f_eq_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_eq_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_eq + = + (fun (self: t_I8) (rhs: t_I8) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_ne_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_ne + = + fun (self: t_I8) (rhs: t_I8) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_109: Core.Cmp.t_PartialOrd t_I8 t_I8 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_partial_cmp_post + = + (fun (self: t_I8) (rhs: t_I8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_I8) (rhs: t_I8) -> + Core.Option.Option_Some + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + <: + Core.Base.Spec.Z.t_Z)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_lt_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_lt + = + (fun (self: t_I8) (rhs: t_I8) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_le_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_le + = + (fun (self: t_I8) (rhs: t_I8) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_gt_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_gt + = + (fun (self: t_I8) (rhs: t_I8) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_ge_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_ge + = + fun (self: t_I8) (rhs: t_I8) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_46: Core.Ops.Arith.t_Add t_I128 t_I128 = + { + f_Output = t_I128; + f_add_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_add_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); + f_add + = + fun (self: t_I128) (rhs: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_48: Core.Ops.Arith.t_Neg t_I128 = + { + f_Output = t_I128; + f_neg_pre = (fun (self: t_I128) -> true); + f_neg_post = (fun (self: t_I128) (out: t_I128) -> true); + f_neg + = + fun (self: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_49: Core.Ops.Arith.t_Sub t_I128 t_I128 = + { + f_Output = t_I128; + f_sub_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_sub_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); + f_sub + = + fun (self: t_I128) (rhs: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_50: Core.Ops.Bit.t_BitOr t_I128 t_I128 = + { + f_Output = t_I128; + f_bitor_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_bitor_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); + f_bitor + = + fun (self: t_I128) (rhs: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_60: Core.Ops.Arith.t_Add t_I64 t_I64 = + { + f_Output = t_I64; + f_add_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_add_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); + f_add + = + fun (self: t_I64) (rhs: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_62: Core.Ops.Arith.t_Neg t_I64 = + { + f_Output = t_I64; + f_neg_pre = (fun (self: t_I64) -> true); + f_neg_post = (fun (self: t_I64) (out: t_I64) -> true); + f_neg + = + fun (self: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_63: Core.Ops.Arith.t_Sub t_I64 t_I64 = + { + f_Output = t_I64; + f_sub_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_sub_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); + f_sub + = + fun (self: t_I64) (rhs: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_64: Core.Ops.Bit.t_BitOr t_I64 t_I64 = + { + f_Output = t_I64; + f_bitor_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_bitor_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); + f_bitor + = + fun (self: t_I64) (rhs: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_74: Core.Ops.Arith.t_Add t_I32 t_I32 = + { + f_Output = t_I32; + f_add_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_add_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); + f_add + = + fun (self: t_I32) (rhs: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_76: Core.Ops.Arith.t_Neg t_I32 = + { + f_Output = t_I32; + f_neg_pre = (fun (self: t_I32) -> true); + f_neg_post = (fun (self: t_I32) (out: t_I32) -> true); + f_neg + = + fun (self: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_77: Core.Ops.Arith.t_Sub t_I32 t_I32 = + { + f_Output = t_I32; + f_sub_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_sub_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); + f_sub + = + fun (self: t_I32) (rhs: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_78: Core.Ops.Bit.t_BitOr t_I32 t_I32 = + { + f_Output = t_I32; + f_bitor_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_bitor_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); + f_bitor + = + fun (self: t_I32) (rhs: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_88: Core.Ops.Arith.t_Add t_I16 t_I16 = + { + f_Output = t_I16; + f_add_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_add_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); + f_add + = + fun (self: t_I16) (rhs: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_90: Core.Ops.Arith.t_Neg t_I16 = + { + f_Output = t_I16; + f_neg_pre = (fun (self: t_I16) -> true); + f_neg_post = (fun (self: t_I16) (out: t_I16) -> true); + f_neg + = + fun (self: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_91: Core.Ops.Arith.t_Sub t_I16 t_I16 = + { + f_Output = t_I16; + f_sub_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_sub_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); + f_sub + = + fun (self: t_I16) (rhs: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_92: Core.Ops.Bit.t_BitOr t_I16 t_I16 = + { + f_Output = t_I16; + f_bitor_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_bitor_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); + f_bitor + = + fun (self: t_I16) (rhs: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_102: Core.Ops.Arith.t_Add t_I8 t_I8 = + { + f_Output = t_I8; + f_add_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_add_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); + f_add + = + fun (self: t_I8) (rhs: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_104: Core.Ops.Arith.t_Neg t_I8 = + { + f_Output = t_I8; + f_neg_pre = (fun (self: t_I8) -> true); + f_neg_post = (fun (self: t_I8) (out: t_I8) -> true); + f_neg + = + fun (self: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_105: Core.Ops.Arith.t_Sub t_I8 t_I8 = + { + f_Output = t_I8; + f_sub_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_sub_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); + f_sub + = + fun (self: t_I8) (rhs: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_106: Core.Ops.Bit.t_BitOr t_I8 t_I8 = + { + f_Output = t_I8; + f_bitor_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_bitor_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); + f_bitor + = + fun (self: t_I8) (rhs: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_113: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U128 = + { + f_concretize_pre = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) (out: t_U128) -> true); + f_concretize + = + fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> + { f_v = Core.Base.Pos.haxint_rem self Core.Base.Spec.Constants.v_WORDSIZE_128_ } <: t_U128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Convert.t_From t_U128 t_U8 = + { + f_from_pre = (fun (x: t_U8) -> true); + f_from_post = (fun (x: t_U8) (out: t_U128) -> true); + f_from + = + fun (x: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Convert.t_From t_U128 t_U16 = + { + f_from_pre = (fun (x: t_U16) -> true); + f_from_post = (fun (x: t_U16) (out: t_U128) -> true); + f_from + = + fun (x: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Convert.t_From t_U128 t_U32 = + { + f_from_pre = (fun (x: t_U32) -> true); + f_from_post = (fun (x: t_U32) (out: t_U128) -> true); + f_from + = + fun (x: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Convert.t_From t_U128 t_U64 = + { + f_from_pre = (fun (x: t_U64) -> true); + f_from_post = (fun (x: t_U64) (out: t_U128) -> true); + f_from + = + fun (x: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_140: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U64 = + { + f_concretize_pre = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) (out: t_U64) -> true); + f_concretize + = + fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> + { f_v = Core.Base.Pos.haxint_rem self Core.Base.Spec.Constants.v_WORDSIZE_64_ } <: t_U64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Convert.t_From t_U64 t_U8 = + { + f_from_pre = (fun (x: t_U8) -> true); + f_from_post = (fun (x: t_U8) (out: t_U64) -> true); + f_from + = + fun (x: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Convert.t_From t_U64 t_U16 = + { + f_from_pre = (fun (x: t_U16) -> true); + f_from_post = (fun (x: t_U16) (out: t_U64) -> true); + f_from + = + fun (x: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Convert.t_From t_U64 t_U32 = + { + f_from_pre = (fun (x: t_U32) -> true); + f_from_post = (fun (x: t_U32) (out: t_U64) -> true); + f_from + = + fun (x: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Convert.t_From t_U64 t_U128 = + { + f_from_pre = (fun (x: t_U128) -> true); + f_from_post = (fun (x: t_U128) (out: t_U64) -> true); + f_from + = + fun (x: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_167: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U32 = + { + f_concretize_pre = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) (out: t_U32) -> true); + f_concretize + = + fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> + { f_v = Core.Base.Pos.haxint_rem self Core.Base.Spec.Constants.v_WORDSIZE_32_ } <: t_U32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Convert.t_From t_U32 t_U8 = + { + f_from_pre = (fun (x: t_U8) -> true); + f_from_post = (fun (x: t_U8) (out: t_U32) -> true); + f_from + = + fun (x: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Convert.t_From t_U32 t_U16 = + { + f_from_pre = (fun (x: t_U16) -> true); + f_from_post = (fun (x: t_U16) (out: t_U32) -> true); + f_from + = + fun (x: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Convert.t_From t_U32 t_U64 = + { + f_from_pre = (fun (x: t_U64) -> true); + f_from_post = (fun (x: t_U64) (out: t_U32) -> true); + f_from + = + fun (x: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Convert.t_From t_U32 t_U128 = + { + f_from_pre = (fun (x: t_U128) -> true); + f_from_post = (fun (x: t_U128) (out: t_U32) -> true); + f_from + = + fun (x: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_194: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U16 = + { + f_concretize_pre = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) (out: t_U16) -> true); + f_concretize + = + fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> + { f_v = Core.Base.Pos.haxint_rem self Core.Base.Spec.Constants.v_WORDSIZE_16_ } <: t_U16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Convert.t_From t_U16 t_U8 = + { + f_from_pre = (fun (x: t_U8) -> true); + f_from_post = (fun (x: t_U8) (out: t_U16) -> true); + f_from + = + fun (x: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Convert.t_From t_U16 t_U32 = + { + f_from_pre = (fun (x: t_U32) -> true); + f_from_post = (fun (x: t_U32) (out: t_U16) -> true); + f_from + = + fun (x: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Convert.t_From t_U16 t_U64 = + { + f_from_pre = (fun (x: t_U64) -> true); + f_from_post = (fun (x: t_U64) (out: t_U16) -> true); + f_from + = + fun (x: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Convert.t_From t_U16 t_U128 = + { + f_from_pre = (fun (x: t_U128) -> true); + f_from_post = (fun (x: t_U128) (out: t_U16) -> true); + f_from + = + fun (x: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_221: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U8 = + { + f_concretize_pre = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) (out: t_U8) -> true); + f_concretize + = + fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> + { f_v = Core.Base.Pos.haxint_rem self Core.Base.Spec.Constants.v_WORDSIZE_8_ } <: t_U8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Convert.t_From t_U8 t_U16 = + { + f_from_pre = (fun (x: t_U16) -> true); + f_from_post = (fun (x: t_U16) (out: t_U8) -> true); + f_from + = + fun (x: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Convert.t_From t_U8 t_U32 = + { + f_from_pre = (fun (x: t_U32) -> true); + f_from_post = (fun (x: t_U32) (out: t_U8) -> true); + f_from + = + fun (x: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Convert.t_From t_U8 t_U64 = + { + f_from_pre = (fun (x: t_U64) -> true); + f_from_post = (fun (x: t_U64) (out: t_U8) -> true); + f_from + = + fun (x: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Convert.t_From t_U8 t_U128 = + { + f_from_pre = (fun (x: t_U128) -> true); + f_from_post = (fun (x: t_U128) (out: t_U8) -> true); + f_from + = + fun (x: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_44: Core.Ops.Arith.t_Mul t_I128 t_I128 = + { + f_Output = t_I128; + f_mul_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_mul_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); + f_mul + = + fun (self: t_I128) (rhs: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_mul (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_58: Core.Ops.Arith.t_Mul t_I64 t_I64 = + { + f_Output = t_I64; + f_mul_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_mul_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); + f_mul + = + fun (self: t_I64) (rhs: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_mul (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_72: Core.Ops.Arith.t_Mul t_I32 t_I32 = + { + f_Output = t_I32; + f_mul_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_mul_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); + f_mul + = + fun (self: t_I32) (rhs: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_mul (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_86: Core.Ops.Arith.t_Mul t_I16 t_I16 = + { + f_Output = t_I16; + f_mul_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_mul_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); + f_mul + = + fun (self: t_I16) (rhs: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_mul (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_100: Core.Ops.Arith.t_Mul t_I8 t_I8 = + { + f_Output = t_I8; + f_mul_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_mul_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); + f_mul + = + fun (self: t_I8) (rhs: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_mul (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_114: Core.Ops.Arith.t_Neg t_U128 = + { + f_Output = t_U128; + f_neg_pre = (fun (self: t_U128) -> true); + f_neg_post = (fun (self: t_U128) (out: t_U128) -> true); + f_neg + = + fun (self: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_sub Core.Base.Spec.Constants.v_WORDSIZE_128_ + (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Constants.v_WORDSIZE_128_ + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_117: Core.Ops.Arith.t_Mul t_U128 t_U128 = + { + f_Output = t_U128; + f_mul_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_mul_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_mul + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_118: Core.Ops.Arith.t_Rem t_U128 t_U128 = + { + f_Output = t_U128; + f_rem_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_rem_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_rem + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_119: Core.Ops.Arith.t_Add t_U128 t_U128 = + { + f_Output = t_U128; + f_add_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_add_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_add + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_120: Core.Ops.Arith.t_Div t_U128 t_U128 = + { + f_Output = t_U128; + f_div_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_div_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_div + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_121: Core.Ops.Bit.t_Shl t_U128 t_U8 = + { + f_Output = t_U128; + f_shl_pre = (fun (self: t_U128) (rhs: t_U8) -> true); + f_shl_post = (fun (self: t_U128) (rhs: t_U8) (out: t_U128) -> true); + f_shl + = + fun (self: t_U128) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_122: Core.Ops.Bit.t_Shl t_U128 t_U16 = + { + f_Output = t_U128; + f_shl_pre = (fun (self: t_U128) (rhs: t_U16) -> true); + f_shl_post = (fun (self: t_U128) (rhs: t_U16) (out: t_U128) -> true); + f_shl + = + fun (self: t_U128) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_123: Core.Ops.Bit.t_Shl t_U128 t_U32 = + { + f_Output = t_U128; + f_shl_pre = (fun (self: t_U128) (rhs: t_U32) -> true); + f_shl_post = (fun (self: t_U128) (rhs: t_U32) (out: t_U128) -> true); + f_shl + = + fun (self: t_U128) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_124: Core.Ops.Bit.t_Shl t_U128 t_U64 = + { + f_Output = t_U128; + f_shl_pre = (fun (self: t_U128) (rhs: t_U64) -> true); + f_shl_post = (fun (self: t_U128) (rhs: t_U64) (out: t_U128) -> true); + f_shl + = + fun (self: t_U128) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_125: Core.Ops.Bit.t_Shl t_U128 t_U128 = + { + f_Output = t_U128; + f_shl_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_shl_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_shl + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_126: Core.Ops.Bit.t_Shr t_U128 t_U8 = + { + f_Output = t_U128; + f_shr_pre = (fun (self: t_U128) (rhs: t_U8) -> true); + f_shr_post = (fun (self: t_U128) (rhs: t_U8) (out: t_U128) -> true); + f_shr + = + fun (self: t_U128) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_127: Core.Ops.Bit.t_Shr t_U128 t_U16 = + { + f_Output = t_U128; + f_shr_pre = (fun (self: t_U128) (rhs: t_U16) -> true); + f_shr_post = (fun (self: t_U128) (rhs: t_U16) (out: t_U128) -> true); + f_shr + = + fun (self: t_U128) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_128: Core.Ops.Bit.t_Shr t_U128 t_U32 = + { + f_Output = t_U128; + f_shr_pre = (fun (self: t_U128) (rhs: t_U32) -> true); + f_shr_post = (fun (self: t_U128) (rhs: t_U32) (out: t_U128) -> true); + f_shr + = + fun (self: t_U128) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_129: Core.Ops.Bit.t_Shr t_U128 t_U64 = + { + f_Output = t_U128; + f_shr_pre = (fun (self: t_U128) (rhs: t_U64) -> true); + f_shr_post = (fun (self: t_U128) (rhs: t_U64) (out: t_U128) -> true); + f_shr + = + fun (self: t_U128) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_130: Core.Ops.Bit.t_Shr t_U128 t_U128 = + { + f_Output = t_U128; + f_shr_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_shr_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_shr + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_131: Core.Ops.Bit.t_BitXor t_U128 t_U128 = + { + f_Output = t_U128; + f_bitxor_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_bitxor_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_bitxor + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitxor (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_132: Core.Ops.Bit.t_BitAnd t_U128 t_U128 = + { + f_Output = t_U128; + f_bitand_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_bitand_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_bitand + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitand (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_133: Core.Ops.Bit.t_BitOr t_U128 t_U128 = + { + f_Output = t_U128; + f_bitor_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_bitor_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_bitor + = + fun (self: t_U128) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitor (Core.Base_interface.Coerce.f_lift #t_U128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_141: Core.Ops.Arith.t_Neg t_U64 = + { + f_Output = t_U64; + f_neg_pre = (fun (self: t_U64) -> true); + f_neg_post = (fun (self: t_U64) (out: t_U64) -> true); + f_neg + = + fun (self: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_sub Core.Base.Spec.Constants.v_WORDSIZE_64_ + (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Constants.v_WORDSIZE_64_ + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_144: Core.Ops.Arith.t_Mul t_U64 t_U64 = + { + f_Output = t_U64; + f_mul_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_mul_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_mul + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_145: Core.Ops.Arith.t_Rem t_U64 t_U64 = + { + f_Output = t_U64; + f_rem_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_rem_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_rem + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_146: Core.Ops.Arith.t_Add t_U64 t_U64 = + { + f_Output = t_U64; + f_add_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_add_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_add + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_147: Core.Ops.Arith.t_Div t_U64 t_U64 = + { + f_Output = t_U64; + f_div_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_div_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_div + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_148: Core.Ops.Bit.t_Shl t_U64 t_U8 = + { + f_Output = t_U64; + f_shl_pre = (fun (self: t_U64) (rhs: t_U8) -> true); + f_shl_post = (fun (self: t_U64) (rhs: t_U8) (out: t_U64) -> true); + f_shl + = + fun (self: t_U64) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_149: Core.Ops.Bit.t_Shl t_U64 t_U16 = + { + f_Output = t_U64; + f_shl_pre = (fun (self: t_U64) (rhs: t_U16) -> true); + f_shl_post = (fun (self: t_U64) (rhs: t_U16) (out: t_U64) -> true); + f_shl + = + fun (self: t_U64) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_150: Core.Ops.Bit.t_Shl t_U64 t_U32 = + { + f_Output = t_U64; + f_shl_pre = (fun (self: t_U64) (rhs: t_U32) -> true); + f_shl_post = (fun (self: t_U64) (rhs: t_U32) (out: t_U64) -> true); + f_shl + = + fun (self: t_U64) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_151: Core.Ops.Bit.t_Shl t_U64 t_U64 = + { + f_Output = t_U64; + f_shl_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_shl_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_shl + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_152: Core.Ops.Bit.t_Shl t_U64 t_U128 = + { + f_Output = t_U64; + f_shl_pre = (fun (self: t_U64) (rhs: t_U128) -> true); + f_shl_post = (fun (self: t_U64) (rhs: t_U128) (out: t_U64) -> true); + f_shl + = + fun (self: t_U64) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_153: Core.Ops.Bit.t_Shr t_U64 t_U8 = + { + f_Output = t_U64; + f_shr_pre = (fun (self: t_U64) (rhs: t_U8) -> true); + f_shr_post = (fun (self: t_U64) (rhs: t_U8) (out: t_U64) -> true); + f_shr + = + fun (self: t_U64) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_154: Core.Ops.Bit.t_Shr t_U64 t_U16 = + { + f_Output = t_U64; + f_shr_pre = (fun (self: t_U64) (rhs: t_U16) -> true); + f_shr_post = (fun (self: t_U64) (rhs: t_U16) (out: t_U64) -> true); + f_shr + = + fun (self: t_U64) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_155: Core.Ops.Bit.t_Shr t_U64 t_U32 = + { + f_Output = t_U64; + f_shr_pre = (fun (self: t_U64) (rhs: t_U32) -> true); + f_shr_post = (fun (self: t_U64) (rhs: t_U32) (out: t_U64) -> true); + f_shr + = + fun (self: t_U64) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_156: Core.Ops.Bit.t_Shr t_U64 t_U64 = + { + f_Output = t_U64; + f_shr_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_shr_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_shr + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_157: Core.Ops.Bit.t_Shr t_U64 t_U128 = + { + f_Output = t_U64; + f_shr_pre = (fun (self: t_U64) (rhs: t_U128) -> true); + f_shr_post = (fun (self: t_U64) (rhs: t_U128) (out: t_U64) -> true); + f_shr + = + fun (self: t_U64) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_158: Core.Ops.Bit.t_BitXor t_U64 t_U64 = + { + f_Output = t_U64; + f_bitxor_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_bitxor_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_bitxor + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitxor (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_159: Core.Ops.Bit.t_BitAnd t_U64 t_U64 = + { + f_Output = t_U64; + f_bitand_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_bitand_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_bitand + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitand (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_160: Core.Ops.Bit.t_BitOr t_U64 t_U64 = + { + f_Output = t_U64; + f_bitor_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_bitor_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_bitor + = + fun (self: t_U64) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitor (Core.Base_interface.Coerce.f_lift #t_U64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_168: Core.Ops.Arith.t_Neg t_U32 = + { + f_Output = t_U32; + f_neg_pre = (fun (self: t_U32) -> true); + f_neg_post = (fun (self: t_U32) (out: t_U32) -> true); + f_neg + = + fun (self: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_sub Core.Base.Spec.Constants.v_WORDSIZE_32_ + (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Constants.v_WORDSIZE_32_ + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_171: Core.Ops.Arith.t_Mul t_U32 t_U32 = + { + f_Output = t_U32; + f_mul_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_mul_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_mul + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_172: Core.Ops.Arith.t_Rem t_U32 t_U32 = + { + f_Output = t_U32; + f_rem_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_rem_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_rem + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_173: Core.Ops.Arith.t_Add t_U32 t_U32 = + { + f_Output = t_U32; + f_add_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_add_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_add + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_174: Core.Ops.Arith.t_Div t_U32 t_U32 = + { + f_Output = t_U32; + f_div_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_div_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_div + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_175: Core.Ops.Bit.t_Shl t_U32 t_U8 = + { + f_Output = t_U32; + f_shl_pre = (fun (self: t_U32) (rhs: t_U8) -> true); + f_shl_post = (fun (self: t_U32) (rhs: t_U8) (out: t_U32) -> true); + f_shl + = + fun (self: t_U32) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_176: Core.Ops.Bit.t_Shl t_U32 t_U16 = + { + f_Output = t_U32; + f_shl_pre = (fun (self: t_U32) (rhs: t_U16) -> true); + f_shl_post = (fun (self: t_U32) (rhs: t_U16) (out: t_U32) -> true); + f_shl + = + fun (self: t_U32) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_177: Core.Ops.Bit.t_Shl t_U32 t_U32 = + { + f_Output = t_U32; + f_shl_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_shl_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_shl + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_178: Core.Ops.Bit.t_Shl t_U32 t_U64 = + { + f_Output = t_U32; + f_shl_pre = (fun (self: t_U32) (rhs: t_U64) -> true); + f_shl_post = (fun (self: t_U32) (rhs: t_U64) (out: t_U32) -> true); + f_shl + = + fun (self: t_U32) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_179: Core.Ops.Bit.t_Shl t_U32 t_U128 = + { + f_Output = t_U32; + f_shl_pre = (fun (self: t_U32) (rhs: t_U128) -> true); + f_shl_post = (fun (self: t_U32) (rhs: t_U128) (out: t_U32) -> true); + f_shl + = + fun (self: t_U32) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_180: Core.Ops.Bit.t_Shr t_U32 t_U8 = + { + f_Output = t_U32; + f_shr_pre = (fun (self: t_U32) (rhs: t_U8) -> true); + f_shr_post = (fun (self: t_U32) (rhs: t_U8) (out: t_U32) -> true); + f_shr + = + fun (self: t_U32) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_181: Core.Ops.Bit.t_Shr t_U32 t_U16 = + { + f_Output = t_U32; + f_shr_pre = (fun (self: t_U32) (rhs: t_U16) -> true); + f_shr_post = (fun (self: t_U32) (rhs: t_U16) (out: t_U32) -> true); + f_shr + = + fun (self: t_U32) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_182: Core.Ops.Bit.t_Shr t_U32 t_U32 = + { + f_Output = t_U32; + f_shr_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_shr_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_shr + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_183: Core.Ops.Bit.t_Shr t_U32 t_U64 = + { + f_Output = t_U32; + f_shr_pre = (fun (self: t_U32) (rhs: t_U64) -> true); + f_shr_post = (fun (self: t_U32) (rhs: t_U64) (out: t_U32) -> true); + f_shr + = + fun (self: t_U32) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_184: Core.Ops.Bit.t_Shr t_U32 t_U128 = + { + f_Output = t_U32; + f_shr_pre = (fun (self: t_U32) (rhs: t_U128) -> true); + f_shr_post = (fun (self: t_U32) (rhs: t_U128) (out: t_U32) -> true); + f_shr + = + fun (self: t_U32) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_185: Core.Ops.Bit.t_BitXor t_U32 t_U32 = + { + f_Output = t_U32; + f_bitxor_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_bitxor_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_bitxor + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitxor (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_186: Core.Ops.Bit.t_BitAnd t_U32 t_U32 = + { + f_Output = t_U32; + f_bitand_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_bitand_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_bitand + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitand (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_187: Core.Ops.Bit.t_BitOr t_U32 t_U32 = + { + f_Output = t_U32; + f_bitor_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_bitor_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_bitor + = + fun (self: t_U32) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitor (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_195: Core.Ops.Arith.t_Neg t_U16 = + { + f_Output = t_U16; + f_neg_pre = (fun (self: t_U16) -> true); + f_neg_post = (fun (self: t_U16) (out: t_U16) -> true); + f_neg + = + fun (self: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_sub Core.Base.Spec.Constants.v_WORDSIZE_16_ + (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Constants.v_WORDSIZE_16_ + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_198: Core.Ops.Arith.t_Mul t_U16 t_U16 = + { + f_Output = t_U16; + f_mul_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_mul_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_mul + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_199: Core.Ops.Arith.t_Rem t_U16 t_U16 = + { + f_Output = t_U16; + f_rem_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_rem_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_rem + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_200: Core.Ops.Arith.t_Add t_U16 t_U16 = + { + f_Output = t_U16; + f_add_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_add_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_add + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_201: Core.Ops.Arith.t_Div t_U16 t_U16 = + { + f_Output = t_U16; + f_div_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_div_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_div + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_202: Core.Ops.Bit.t_Shl t_U16 t_U8 = + { + f_Output = t_U16; + f_shl_pre = (fun (self: t_U16) (rhs: t_U8) -> true); + f_shl_post = (fun (self: t_U16) (rhs: t_U8) (out: t_U16) -> true); + f_shl + = + fun (self: t_U16) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_203: Core.Ops.Bit.t_Shl t_U16 t_U16 = + { + f_Output = t_U16; + f_shl_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_shl_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_shl + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_204: Core.Ops.Bit.t_Shl t_U16 t_U32 = + { + f_Output = t_U16; + f_shl_pre = (fun (self: t_U16) (rhs: t_U32) -> true); + f_shl_post = (fun (self: t_U16) (rhs: t_U32) (out: t_U16) -> true); + f_shl + = + fun (self: t_U16) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_205: Core.Ops.Bit.t_Shl t_U16 t_U64 = + { + f_Output = t_U16; + f_shl_pre = (fun (self: t_U16) (rhs: t_U64) -> true); + f_shl_post = (fun (self: t_U16) (rhs: t_U64) (out: t_U16) -> true); + f_shl + = + fun (self: t_U16) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_206: Core.Ops.Bit.t_Shl t_U16 t_U128 = + { + f_Output = t_U16; + f_shl_pre = (fun (self: t_U16) (rhs: t_U128) -> true); + f_shl_post = (fun (self: t_U16) (rhs: t_U128) (out: t_U16) -> true); + f_shl + = + fun (self: t_U16) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_207: Core.Ops.Bit.t_Shr t_U16 t_U8 = + { + f_Output = t_U16; + f_shr_pre = (fun (self: t_U16) (rhs: t_U8) -> true); + f_shr_post = (fun (self: t_U16) (rhs: t_U8) (out: t_U16) -> true); + f_shr + = + fun (self: t_U16) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_208: Core.Ops.Bit.t_Shr t_U16 t_U16 = + { + f_Output = t_U16; + f_shr_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_shr_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_shr + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_209: Core.Ops.Bit.t_Shr t_U16 t_U32 = + { + f_Output = t_U16; + f_shr_pre = (fun (self: t_U16) (rhs: t_U32) -> true); + f_shr_post = (fun (self: t_U16) (rhs: t_U32) (out: t_U16) -> true); + f_shr + = + fun (self: t_U16) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_210: Core.Ops.Bit.t_Shr t_U16 t_U64 = + { + f_Output = t_U16; + f_shr_pre = (fun (self: t_U16) (rhs: t_U64) -> true); + f_shr_post = (fun (self: t_U16) (rhs: t_U64) (out: t_U16) -> true); + f_shr + = + fun (self: t_U16) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_211: Core.Ops.Bit.t_Shr t_U16 t_U128 = + { + f_Output = t_U16; + f_shr_pre = (fun (self: t_U16) (rhs: t_U128) -> true); + f_shr_post = (fun (self: t_U16) (rhs: t_U128) (out: t_U16) -> true); + f_shr + = + fun (self: t_U16) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_212: Core.Ops.Bit.t_BitXor t_U16 t_U16 = + { + f_Output = t_U16; + f_bitxor_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_bitxor_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_bitxor + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitxor (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_213: Core.Ops.Bit.t_BitAnd t_U16 t_U16 = + { + f_Output = t_U16; + f_bitand_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_bitand_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_bitand + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitand (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_214: Core.Ops.Bit.t_BitOr t_U16 t_U16 = + { + f_Output = t_U16; + f_bitor_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_bitor_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_bitor + = + fun (self: t_U16) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitor (Core.Base_interface.Coerce.f_lift #t_U16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_222: Core.Ops.Arith.t_Neg t_U8 = + { + f_Output = t_U8; + f_neg_pre = (fun (self: t_U8) -> true); + f_neg_post = (fun (self: t_U8) (out: t_U8) -> true); + f_neg + = + fun (self: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_sub Core.Base.Spec.Constants.v_WORDSIZE_8_ + (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Constants.v_WORDSIZE_8_ + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_225: Core.Ops.Arith.t_Mul t_U8 t_U8 = + { + f_Output = t_U8; + f_mul_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_mul_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_mul + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_226: Core.Ops.Arith.t_Rem t_U8 t_U8 = + { + f_Output = t_U8; + f_rem_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_rem_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_rem + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_227: Core.Ops.Arith.t_Add t_U8 t_U8 = + { + f_Output = t_U8; + f_add_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_add_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_add + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_228: Core.Ops.Arith.t_Div t_U8 t_U8 = + { + f_Output = t_U8; + f_div_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_div_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_div + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_229: Core.Ops.Bit.t_Shl t_U8 t_U8 = + { + f_Output = t_U8; + f_shl_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_shl_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_shl + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_230: Core.Ops.Bit.t_Shl t_U8 t_U16 = + { + f_Output = t_U8; + f_shl_pre = (fun (self: t_U8) (rhs: t_U16) -> true); + f_shl_post = (fun (self: t_U8) (rhs: t_U16) (out: t_U8) -> true); + f_shl + = + fun (self: t_U8) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_231: Core.Ops.Bit.t_Shl t_U8 t_U32 = + { + f_Output = t_U8; + f_shl_pre = (fun (self: t_U8) (rhs: t_U32) -> true); + f_shl_post = (fun (self: t_U8) (rhs: t_U32) (out: t_U8) -> true); + f_shl + = + fun (self: t_U8) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_232: Core.Ops.Bit.t_Shl t_U8 t_U64 = + { + f_Output = t_U8; + f_shl_pre = (fun (self: t_U8) (rhs: t_U64) -> true); + f_shl_post = (fun (self: t_U8) (rhs: t_U64) (out: t_U8) -> true); + f_shl + = + fun (self: t_U8) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_233: Core.Ops.Bit.t_Shl t_U8 t_U128 = + { + f_Output = t_U8; + f_shl_pre = (fun (self: t_U8) (rhs: t_U128) -> true); + f_shl_post = (fun (self: t_U8) (rhs: t_U128) (out: t_U8) -> true); + f_shl + = + fun (self: t_U8) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_234: Core.Ops.Bit.t_Shr t_U8 t_U8 = + { + f_Output = t_U8; + f_shr_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_shr_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_shr + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_235: Core.Ops.Bit.t_Shr t_U8 t_U16 = + { + f_Output = t_U8; + f_shr_pre = (fun (self: t_U8) (rhs: t_U16) -> true); + f_shr_post = (fun (self: t_U8) (rhs: t_U16) (out: t_U8) -> true); + f_shr + = + fun (self: t_U8) (rhs: t_U16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_236: Core.Ops.Bit.t_Shr t_U8 t_U32 = + { + f_Output = t_U8; + f_shr_pre = (fun (self: t_U8) (rhs: t_U32) -> true); + f_shr_post = (fun (self: t_U8) (rhs: t_U32) (out: t_U8) -> true); + f_shr + = + fun (self: t_U8) (rhs: t_U32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_237: Core.Ops.Bit.t_Shr t_U8 t_U64 = + { + f_Output = t_U8; + f_shr_pre = (fun (self: t_U8) (rhs: t_U64) -> true); + f_shr_post = (fun (self: t_U8) (rhs: t_U64) (out: t_U8) -> true); + f_shr + = + fun (self: t_U8) (rhs: t_U64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_238: Core.Ops.Bit.t_Shr t_U8 t_U128 = + { + f_Output = t_U8; + f_shr_pre = (fun (self: t_U8) (rhs: t_U128) -> true); + f_shr_post = (fun (self: t_U8) (rhs: t_U128) (out: t_U8) -> true); + f_shr + = + fun (self: t_U8) (rhs: t_U128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_239: Core.Ops.Bit.t_BitXor t_U8 t_U8 = + { + f_Output = t_U8; + f_bitxor_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_bitxor_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_bitxor + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitxor (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_240: Core.Ops.Bit.t_BitAnd t_U8 t_U8 = + { + f_Output = t_U8; + f_bitand_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_bitand_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_bitand + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitand (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_241: Core.Ops.Bit.t_BitOr t_U8 t_U8 = + { + f_Output = t_U8; + f_bitor_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_bitor_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_bitor + = + fun (self: t_U8) (rhs: t_U8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Pos.haxint_bitor (Core.Base_interface.Coerce.f_lift #t_U8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_45: Core.Ops.Arith.t_Rem t_I128 t_I128 = + { + f_Output = t_I128; + f_rem_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_rem_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); + f_rem + = + fun (self: t_I128) (rhs: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_rem (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_47: Core.Ops.Arith.t_Div t_I128 t_I128 = + { + f_Output = t_I128; + f_div_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_div_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); + f_div + = + fun (self: t_I128) (rhs: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_59: Core.Ops.Arith.t_Rem t_I64 t_I64 = + { + f_Output = t_I64; + f_rem_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_rem_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); + f_rem + = + fun (self: t_I64) (rhs: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_rem (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_61: Core.Ops.Arith.t_Div t_I64 t_I64 = + { + f_Output = t_I64; + f_div_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_div_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); + f_div + = + fun (self: t_I64) (rhs: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_73: Core.Ops.Arith.t_Rem t_I32 t_I32 = + { + f_Output = t_I32; + f_rem_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_rem_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); + f_rem + = + fun (self: t_I32) (rhs: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_rem (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_75: Core.Ops.Arith.t_Div t_I32 t_I32 = + { + f_Output = t_I32; + f_div_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_div_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); + f_div + = + fun (self: t_I32) (rhs: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_87: Core.Ops.Arith.t_Rem t_I16 t_I16 = + { + f_Output = t_I16; + f_rem_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_rem_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); + f_rem + = + fun (self: t_I16) (rhs: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_rem (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_89: Core.Ops.Arith.t_Div t_I16 t_I16 = + { + f_Output = t_I16; + f_div_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_div_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); + f_div + = + fun (self: t_I16) (rhs: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_101: Core.Ops.Arith.t_Rem t_I8 t_I8 = + { + f_Output = t_I8; + f_rem_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_rem_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); + f_rem + = + fun (self: t_I8) (rhs: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_rem (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_103: Core.Ops.Arith.t_Div t_I8 t_I8 = + { + f_Output = t_I8; + f_div_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_div_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); + f_div + = + fun (self: t_I8) (rhs: t_I8) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #t_I8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_115: Core.Ops.Arith.t_Sub t_U128 t_U128 = + { + f_Output = t_U128; + f_sub_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_sub_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); + f_sub + = + fun (self: t_U128) (rhs: t_U128) -> + self +! (Core.Ops.Arith.f_neg #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_116: Core.Ops.Bit.t_Not t_U128 = + { + f_Output = t_U128; + f_not_pre = (fun (self: t_U128) -> true); + f_not_post = (fun (self: t_U128) (out: t_U128) -> true); + f_not = fun (self: t_U128) -> self ^. f_MAX + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_142: Core.Ops.Arith.t_Sub t_U64 t_U64 = + { + f_Output = t_U64; + f_sub_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_sub_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); + f_sub + = + fun (self: t_U64) (rhs: t_U64) -> + self +! (Core.Ops.Arith.f_neg #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_143: Core.Ops.Bit.t_Not t_U64 = + { + f_Output = t_U64; + f_not_pre = (fun (self: t_U64) -> true); + f_not_post = (fun (self: t_U64) (out: t_U64) -> true); + f_not = fun (self: t_U64) -> self ^. f_MAX + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_169: Core.Ops.Arith.t_Sub t_U32 t_U32 = + { + f_Output = t_U32; + f_sub_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_sub_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); + f_sub + = + fun (self: t_U32) (rhs: t_U32) -> + self +! (Core.Ops.Arith.f_neg #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_170: Core.Ops.Bit.t_Not t_U32 = + { + f_Output = t_U32; + f_not_pre = (fun (self: t_U32) -> true); + f_not_post = (fun (self: t_U32) (out: t_U32) -> true); + f_not = fun (self: t_U32) -> self ^. f_MAX + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_196: Core.Ops.Arith.t_Sub t_U16 t_U16 = + { + f_Output = t_U16; + f_sub_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_sub_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); + f_sub + = + fun (self: t_U16) (rhs: t_U16) -> + self +! (Core.Ops.Arith.f_neg #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_197: Core.Ops.Bit.t_Not t_U16 = + { + f_Output = t_U16; + f_not_pre = (fun (self: t_U16) -> true); + f_not_post = (fun (self: t_U16) (out: t_U16) -> true); + f_not = fun (self: t_U16) -> self ^. f_MAX + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_223: Core.Ops.Arith.t_Sub t_U8 t_U8 = + { + f_Output = t_U8; + f_sub_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_sub_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); + f_sub + = + fun (self: t_U8) (rhs: t_U8) -> + self +! (Core.Ops.Arith.f_neg #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_224: Core.Ops.Bit.t_Not t_U8 = + { + f_Output = t_U8; + f_not_pre = (fun (self: t_U8) -> true); + f_not_post = (fun (self: t_U8) (out: t_U8) -> true); + f_not = fun (self: t_U8) -> self ^. f_MAX + } diff --git a/proof-libs/fstar/generated-core/Core.Cmp.fst b/proof-libs/fstar/generated-core/Core.Cmp.fst index 6a786afc7..8d576fc51 100644 --- a/proof-libs/fstar/generated-core/Core.Cmp.fst +++ b/proof-libs/fstar/generated-core/Core.Cmp.fst @@ -3,15 +3,9 @@ module Core.Cmp open Core open FStar.Mul -////////////////////////////////////////////////////////// +let discriminant_Ordering_Equal: i8 = 0y -let ( ~. ) = not - -////////////////////////////////////////////////////////// - -let discriminant_Ordering_Equal = 0y - -let discriminant_Ordering_Greater = 1y +let discriminant_Ordering_Greater: i8 = 1y type t_Ordering = | Ordering_Less : t_Ordering @@ -39,9 +33,9 @@ let impl__Ordering__reverse (self: t_Ordering) : t_Ordering = | Ordering_Equal -> Ordering_Equal <: t_Ordering | Ordering_Greater -> Ordering_Less <: t_Ordering -let discriminant_Ordering_Less = (-1y) +let discriminant_Ordering_Less: i8 = (-1y) -let t_Ordering_cast_to_repr (x: t_Ordering) = +let t_Ordering_cast_to_repr (x: t_Ordering) : i8 = match x with | Ordering_Less -> discriminant_Ordering_Less | Ordering_Equal -> discriminant_Ordering_Equal @@ -86,9 +80,9 @@ let impl_1: t_PartialEq t_Ordering t_Ordering = (match other with | Ordering_Less -> true | _ -> false) - | v_Eq -> + | Ordering_Equal -> (match other with - | v_Eq -> true + | Ordering_Equal -> true | _ -> false) | Ordering_Greater -> match other with @@ -104,9 +98,9 @@ let impl_1: t_PartialEq t_Ordering t_Ordering = (match other with | Ordering_Less -> true | _ -> false) - | v_Eq -> + | Ordering_Equal -> (match other with - | v_Eq -> true + | Ordering_Equal -> true | _ -> false) | Ordering_Greater -> match other with @@ -139,27 +133,3 @@ class t_PartialOrd (v_Self: Type0) (v_Rhs: Type0) = { f_ge:x0: v_Self -> x1: v_Rhs -> Prims.Pure bool (f_ge_pre x0 x1) (fun result -> f_ge_post x0 x1 result) } - -////////////////////////////////////////////////////////// - -// TODO: Generate file, currently manually written file - -unfold -let (<>.) #a #b {| t_PartialEq a b |} = f_ne #a #b - -unfold -let (=.) #a #b {| t_PartialEq a b |} = f_eq #a #b - -unfold -let ( <. ) #a #b {| t_PartialOrd a b |} = f_lt #a #b - -unfold -let ( <=. ) #a #b {| t_PartialOrd a b |} = f_le #a #b - -unfold -let ( >. ) #a #b {| t_PartialOrd a b |} = f_gt #a #b - -unfold -let ( >=. ) #a #b {| t_PartialOrd a b |} = f_ge #a #b - -////////////////////////////////////////////////////////// diff --git a/proof-libs/fstar/generated-core/Core.Convert.fst b/proof-libs/fstar/generated-core/Core.Convert.fst index d899b2903..1262e975d 100644 --- a/proof-libs/fstar/generated-core/Core.Convert.fst +++ b/proof-libs/fstar/generated-core/Core.Convert.fst @@ -23,11 +23,11 @@ class t_Into (v_Self: Type0) (v_T: Type0) = { f_into:x0: v_Self -> Prims.Pure v_T (f_into_pre x0) (fun result -> f_into_post x0 result) } -// [@@ FStar.Tactics.Typeclasses.tcinstance] -// let impl (#v_T #v_U: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: t_From v_U v_T) -// : t_Into v_T v_U = -// { -// f_into_pre = (fun (self: v_T) -> true); -// f_into_post = (fun (self: v_T) (out: v_U) -> true); -// f_into = fun (self: v_T) -> f_from #v_U #v_T #FStar.Tactics.Typeclasses.solve self -// } +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl (#v_T #v_U: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: t_From v_U v_T) + : t_Into v_T v_U = + { + f_into_pre = (fun (self: v_T) -> true); + f_into_post = (fun (self: v_T) (out: v_U) -> true); + f_into = fun (self: v_T) -> f_from #v_U #v_T #FStar.Tactics.Typeclasses.solve self + } diff --git a/proof-libs/fstar/generated-core/Core.Int.fst b/proof-libs/fstar/generated-core/Core.Int.fst deleted file mode 100644 index 413498eaa..000000000 --- a/proof-libs/fstar/generated-core/Core.Int.fst +++ /dev/null @@ -1,3568 +0,0 @@ -module Core.Int -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -open Core.Ops.Arith -open Core.Ops.Bit -open Core.Cmp - -class t_Constants (v_Self: Type0) = { - f_ZERO:v_Self; - f_ONE:v_Self; - f_MIN:v_Self; - f_MAX:v_Self -} - -let impl_21__WORDSIZE: Core.Base.Int.t_HaxInt = Core.Base.Int.Base_spec.v_WORDSIZE_8_ - -let impl_48__WORDSIZE: Core.Base.Int.t_HaxInt = Core.Base.Int.Base_spec.v_WORDSIZE_16_ - -let impl_75__WORDSIZE: Core.Base.Int.t_HaxInt = Core.Base.Int.Base_spec.v_WORDSIZE_32_ - -let impl_102__WORDSIZE: Core.Base.Int.t_HaxInt = Core.Base.Int.Base_spec.v_WORDSIZE_64_ - -let impl_129__WORDSIZE: Core.Base.Int.t_HaxInt = Core.Base.Int.Base_spec.v_WORDSIZE_128_ - -type t_HaxInt_U128 = x:Core.Base.Int.t_HaxInt{x < pow2 128} -type t_U128 = { f_v:t_HaxInt_U128 } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_128: t_Constants t_U128 = - { - f_ZERO = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U128; - f_ONE = { f_v = Core.Base.Int.Base_spec.impl_9__ONE } <: t_U128; - f_MIN = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U128; - f_MAX = { f_v = Core.Base.Int.Base_spec.v_WORDSIZE_128_SUB_1_ } <: t_U128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_135: Core.Clone.t_Clone t_U128 = - { - f_clone_pre = (fun (self: t_U128) -> true); - f_clone_post = (fun (self: t_U128) (out: t_U128) -> true); - f_clone - = - fun (self: t_U128) -> - { f_v = Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_U128 - } - -type t_HaxInt_U16 = x:Core.Base.Int.t_HaxInt{x < pow2 16} -type t_U16 = { f_v:t_HaxInt_U16 } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_47: t_Constants t_U16 = - { - f_ZERO = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U16; - f_ONE = { f_v = Core.Base.Int.Base_spec.impl_9__ONE } <: t_U16; - f_MIN = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U16; - f_MAX = { f_v = Core.Base.Int.Base_spec.v_WORDSIZE_16_SUB_1_ } <: t_U16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_54: Core.Clone.t_Clone t_U16 = - { - f_clone_pre = (fun (self: t_U16) -> true); - f_clone_post = (fun (self: t_U16) (out: t_U16) -> true); - f_clone - = - fun (self: t_U16) -> - { f_v = Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_U16 - } - -type t_HaxInt_U32 = x:Core.Base.Int.t_HaxInt{x < pow2 32} -type t_U32 = { f_v:t_HaxInt_U32 } - -let impl_21__BITS: t_U32 = { f_v = Core.Base.Int.Base_spec.v_BITS_8_ } <: t_U32 - -let impl_48__BITS: t_U32 = { f_v = Core.Base.Int.Base_spec.v_BITS_16_ } <: t_U32 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_74: t_Constants t_U32 = - { - f_ZERO = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U32; - f_ONE = { f_v = Core.Base.Int.Base_spec.impl_9__ONE } <: t_U32; - f_MIN = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U32; - f_MAX = { f_v = Core.Base.Int.Base_spec.v_WORDSIZE_32_SUB_1_ } <: t_U32 - } - -let impl_75__BITS: t_U32 = { f_v = Core.Base.Int.Base_spec.v_BITS_32_ } <: t_U32 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_81: Core.Clone.t_Clone t_U32 = - { - f_clone_pre = (fun (self: t_U32) -> true); - f_clone_post = (fun (self: t_U32) (out: t_U32) -> true); - f_clone - = - fun (self: t_U32) -> - { f_v = Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_U32 - } - -let impl_102__BITS: t_U32 = { f_v = Core.Base.Int.Base_spec.v_BITS_64_ } <: t_U32 - -let impl_129__BITS: t_U32 = { f_v = Core.Base.Int.Base_spec.v_BITS_128_ } <: t_U32 - -type t_HaxInt_U64 = x:Core.Base.Int.t_HaxInt{x < pow2 64} -type t_U64 = { f_v:t_HaxInt_U64 } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_101: t_Constants t_U64 = - { - f_ZERO = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U64; - f_ONE = { f_v = Core.Base.Int.Base_spec.impl_9__ONE } <: t_U64; - f_MIN = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U64; - f_MAX = { f_v = Core.Base.Int.Base_spec.v_WORDSIZE_64_SUB_1_ } <: t_U64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_108: Core.Clone.t_Clone t_U64 = - { - f_clone_pre = (fun (self: t_U64) -> true); - f_clone_post = (fun (self: t_U64) (out: t_U64) -> true); - f_clone - = - fun (self: t_U64) -> - { f_v = Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_U64 - } - -type t_HaxInt_U8 = x:Core.Base.Int.t_HaxInt{x < pow2 8} -type t_U8 = { f_v:t_HaxInt_U8 } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: t_Constants t_U8 = - { - f_ZERO = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U8; - f_ONE = { f_v = Core.Base.Int.Base_spec.impl_9__ONE } <: t_U8; - f_MIN = { f_v = Core.Base.Int.Base_spec.impl_9__ZERO } <: t_U8; - f_MAX = { f_v = Core.Base.Int.Base_spec.v_WORDSIZE_8_SUB_1_ } <: t_U8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Clone.t_Clone t_U8 = - { - f_clone_pre = (fun (self: t_U8) -> true); - f_clone_post = (fun (self: t_U8) (out: t_U8) -> true); - f_clone - = - fun (self: t_U8) -> - { f_v = Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_U8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Coerce.t_Abstraction t_U8 = - { - f_AbstractType = Core.Base.Int.t_HaxInt; - f_lift_pre = (fun (self: t_U8) -> true); - f_lift_post = (fun (self: t_U8) (out: Core.Base.Int.t_HaxInt) -> true); - f_lift = fun (self: t_U8) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Cmp.t_PartialEq t_U8 t_U8 = - { - f_eq_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_eq_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_eq - = - (fun (self: t_U8) (rhs: t_U8) -> - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Int.t_HaxInt) =. - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Int.t_HaxInt)); - f_ne_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_ne_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_ne - = - fun (self: t_U8) (rhs: t_U8) -> - ~.((Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Int.t_HaxInt) =. - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Int.t_HaxInt) - <: - bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Cmp.t_PartialOrd t_U8 t_U8 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_partial_cmp_post - = - (fun (self: t_U8) (rhs: t_U8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_U8) (rhs: t_U8) -> - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Int.t_HaxInt)); - f_lt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_lt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_lt - = - (fun (self: t_U8) (rhs: t_U8) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_le_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_le - = - (fun (self: t_U8) (rhs: t_U8) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_gt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_gt - = - (fun (self: t_U8) (rhs: t_U8) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_ge_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_ge - = - fun (self: t_U8) (rhs: t_U8) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_49: Core.Coerce.t_Abstraction t_U16 = - { - f_AbstractType = Core.Base.Int.t_HaxInt; - f_lift_pre = (fun (self: t_U16) -> true); - f_lift_post = (fun (self: t_U16) (out: Core.Base.Int.t_HaxInt) -> true); - f_lift = fun (self: t_U16) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_55: Core.Cmp.t_PartialEq t_U16 t_U16 = - { - f_eq_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_eq_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_eq - = - (fun (self: t_U16) (rhs: t_U16) -> - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Int.t_HaxInt) =. - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Int.t_HaxInt)); - f_ne_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_ne_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_ne - = - fun (self: t_U16) (rhs: t_U16) -> - ~.((Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Int.t_HaxInt) =. - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Int.t_HaxInt) - <: - bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_56: Core.Cmp.t_PartialOrd t_U16 t_U16 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_partial_cmp_post - = - (fun (self: t_U16) (rhs: t_U16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_U16) (rhs: t_U16) -> - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Int.t_HaxInt)); - f_lt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_lt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_lt - = - (fun (self: t_U16) (rhs: t_U16) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_le_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_le - = - (fun (self: t_U16) (rhs: t_U16) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_gt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_gt - = - (fun (self: t_U16) (rhs: t_U16) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_ge_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_ge - = - fun (self: t_U16) (rhs: t_U16) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_76: Core.Coerce.t_Abstraction t_U32 = - { - f_AbstractType = Core.Base.Int.t_HaxInt; - f_lift_pre = (fun (self: t_U32) -> true); - f_lift_post = (fun (self: t_U32) (out: Core.Base.Int.t_HaxInt) -> true); - f_lift = fun (self: t_U32) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_82: Core.Cmp.t_PartialEq t_U32 t_U32 = - { - f_eq_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_eq_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_eq - = - (fun (self: t_U32) (rhs: t_U32) -> - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Int.t_HaxInt) =. - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Int.t_HaxInt)); - f_ne_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_ne_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_ne - = - fun (self: t_U32) (rhs: t_U32) -> - ~.((Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Int.t_HaxInt) =. - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Int.t_HaxInt) - <: - bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_83: Core.Cmp.t_PartialOrd t_U32 t_U32 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_partial_cmp_post - = - (fun (self: t_U32) (rhs: t_U32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_U32) (rhs: t_U32) -> - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Int.t_HaxInt)); - f_lt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_lt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_lt - = - (fun (self: t_U32) (rhs: t_U32) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_le_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_le - = - (fun (self: t_U32) (rhs: t_U32) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_gt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_gt - = - (fun (self: t_U32) (rhs: t_U32) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_ge_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_ge - = - fun (self: t_U32) (rhs: t_U32) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_103: Core.Coerce.t_Abstraction t_U64 = - { - f_AbstractType = Core.Base.Int.t_HaxInt; - f_lift_pre = (fun (self: t_U64) -> true); - f_lift_post = (fun (self: t_U64) (out: Core.Base.Int.t_HaxInt) -> true); - f_lift = fun (self: t_U64) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_109: Core.Cmp.t_PartialEq t_U64 t_U64 = - { - f_eq_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_eq_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_eq - = - (fun (self: t_U64) (rhs: t_U64) -> - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Int.t_HaxInt) =. - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Int.t_HaxInt)); - f_ne_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_ne_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_ne - = - fun (self: t_U64) (rhs: t_U64) -> - ~.((Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Int.t_HaxInt) =. - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Int.t_HaxInt) - <: - bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_110: Core.Cmp.t_PartialOrd t_U64 t_U64 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_partial_cmp_post - = - (fun (self: t_U64) (rhs: t_U64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_U64) (rhs: t_U64) -> - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Int.t_HaxInt)); - f_lt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_lt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_lt - = - (fun (self: t_U64) (rhs: t_U64) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_le_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_le - = - (fun (self: t_U64) (rhs: t_U64) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_gt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_gt - = - (fun (self: t_U64) (rhs: t_U64) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_ge_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_ge - = - fun (self: t_U64) (rhs: t_U64) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_130: Core.Coerce.t_Abstraction t_U128 = - { - f_AbstractType = Core.Base.Int.t_HaxInt; - f_lift_pre = (fun (self: t_U128) -> true); - f_lift_post = (fun (self: t_U128) (out: Core.Base.Int.t_HaxInt) -> true); - f_lift = fun (self: t_U128) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_136: Core.Cmp.t_PartialEq t_U128 t_U128 = - { - f_eq_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_eq_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_eq - = - (fun (self: t_U128) (rhs: t_U128) -> - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Int.t_HaxInt) =. - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Int.t_HaxInt)); - f_ne_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_ne_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_ne - = - fun (self: t_U128) (rhs: t_U128) -> - ~.((Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Int.t_HaxInt) =. - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Int.t_HaxInt) - <: - bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_137: Core.Cmp.t_PartialOrd t_U128 t_U128 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_partial_cmp_post - = - (fun (self: t_U128) (rhs: t_U128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_U128) (rhs: t_U128) -> - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Int.t_HaxInt)); - f_lt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_lt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_lt - = - (fun (self: t_U128) (rhs: t_U128) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_le_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_le - = - (fun (self: t_U128) (rhs: t_U128) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_gt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_gt - = - (fun (self: t_U128) (rhs: t_U128) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_ge_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_ge - = - fun (self: t_U128) (rhs: t_U128) -> - match - Core.Cmp.f_partial_cmp #Core.Base.Int.t_HaxInt - #Core.Base.Int.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Int.t_HaxInt) - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Coerce.t_Concretization Core.Base.Int.t_HaxInt t_U8 = - { - f_concretize_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); - f_concretize_post = (fun (self: Core.Base.Int.t_HaxInt) (out: t_U8) -> true); - f_concretize - = - fun (self: Core.Base.Int.t_HaxInt) -> - { f_v = Core.Base.Int.Base_impl.impl_10__rem self Core.Base.Int.Base_spec.v_WORDSIZE_8_ } - <: - t_U8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Convert.t_From t_U8 t_U16 = - { - f_from_pre = (fun (x: t_U16) -> true); - f_from_post = (fun (x: t_U16) (out: t_U8) -> true); - f_from - = - fun (x: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Convert.t_From t_U8 t_U32 = - { - f_from_pre = (fun (x: t_U32) -> true); - f_from_post = (fun (x: t_U32) (out: t_U8) -> true); - f_from - = - fun (x: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Convert.t_From t_U8 t_U64 = - { - f_from_pre = (fun (x: t_U64) -> true); - f_from_post = (fun (x: t_U64) (out: t_U8) -> true); - f_from - = - fun (x: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Convert.t_From t_U8 t_U128 = - { - f_from_pre = (fun (x: t_U128) -> true); - f_from_post = (fun (x: t_U128) (out: t_U8) -> true); - f_from - = - fun (x: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_50: Core.Coerce.t_Concretization Core.Base.Int.t_HaxInt t_U16 = - { - f_concretize_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); - f_concretize_post = (fun (self: Core.Base.Int.t_HaxInt) (out: t_U16) -> true); - f_concretize - = - fun (self: Core.Base.Int.t_HaxInt) -> - { f_v = Core.Base.Int.Base_impl.impl_10__rem self Core.Base.Int.Base_spec.v_WORDSIZE_16_ } - <: - t_U16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Convert.t_From t_U16 t_U8 = - { - f_from_pre = (fun (x: t_U8) -> true); - f_from_post = (fun (x: t_U8) (out: t_U16) -> true); - f_from - = - fun (x: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Convert.t_From t_U16 t_U32 = - { - f_from_pre = (fun (x: t_U32) -> true); - f_from_post = (fun (x: t_U32) (out: t_U16) -> true); - f_from - = - fun (x: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Convert.t_From t_U16 t_U64 = - { - f_from_pre = (fun (x: t_U64) -> true); - f_from_post = (fun (x: t_U64) (out: t_U16) -> true); - f_from - = - fun (x: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Convert.t_From t_U16 t_U128 = - { - f_from_pre = (fun (x: t_U128) -> true); - f_from_post = (fun (x: t_U128) (out: t_U16) -> true); - f_from - = - fun (x: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_77: Core.Coerce.t_Concretization Core.Base.Int.t_HaxInt t_U32 = - { - f_concretize_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); - f_concretize_post = (fun (self: Core.Base.Int.t_HaxInt) (out: t_U32) -> true); - f_concretize - = - fun (self: Core.Base.Int.t_HaxInt) -> - { f_v = Core.Base.Int.Base_impl.impl_10__rem self Core.Base.Int.Base_spec.v_WORDSIZE_32_ } - <: - t_U32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Convert.t_From t_U32 t_U8 = - { - f_from_pre = (fun (x: t_U8) -> true); - f_from_post = (fun (x: t_U8) (out: t_U32) -> true); - f_from - = - fun (x: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Convert.t_From t_U32 t_U16 = - { - f_from_pre = (fun (x: t_U16) -> true); - f_from_post = (fun (x: t_U16) (out: t_U32) -> true); - f_from - = - fun (x: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Convert.t_From t_U32 t_U64 = - { - f_from_pre = (fun (x: t_U64) -> true); - f_from_post = (fun (x: t_U64) (out: t_U32) -> true); - f_from - = - fun (x: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Convert.t_From t_U32 t_U128 = - { - f_from_pre = (fun (x: t_U128) -> true); - f_from_post = (fun (x: t_U128) (out: t_U32) -> true); - f_from - = - fun (x: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_104: Core.Coerce.t_Concretization Core.Base.Int.t_HaxInt t_U64 = - { - f_concretize_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); - f_concretize_post = (fun (self: Core.Base.Int.t_HaxInt) (out: t_U64) -> true); - f_concretize - = - fun (self: Core.Base.Int.t_HaxInt) -> - { f_v = Core.Base.Int.Base_impl.impl_10__rem self Core.Base.Int.Base_spec.v_WORDSIZE_64_ } - <: - t_U64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Convert.t_From t_U64 t_U8 = - { - f_from_pre = (fun (x: t_U8) -> true); - f_from_post = (fun (x: t_U8) (out: t_U64) -> true); - f_from - = - fun (x: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Convert.t_From t_U64 t_U16 = - { - f_from_pre = (fun (x: t_U16) -> true); - f_from_post = (fun (x: t_U16) (out: t_U64) -> true); - f_from - = - fun (x: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Convert.t_From t_U64 t_U32 = - { - f_from_pre = (fun (x: t_U32) -> true); - f_from_post = (fun (x: t_U32) (out: t_U64) -> true); - f_from - = - fun (x: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Convert.t_From t_U64 t_U128 = - { - f_from_pre = (fun (x: t_U128) -> true); - f_from_post = (fun (x: t_U128) (out: t_U64) -> true); - f_from - = - fun (x: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_131: Core.Coerce.t_Concretization Core.Base.Int.t_HaxInt t_U128 = - { - f_concretize_pre = (fun (self: Core.Base.Int.t_HaxInt) -> true); - f_concretize_post = (fun (self: Core.Base.Int.t_HaxInt) (out: t_U128) -> true); - f_concretize - = - fun (self: Core.Base.Int.t_HaxInt) -> - { f_v = Core.Base.Int.Base_impl.impl_10__rem self Core.Base.Int.Base_spec.v_WORDSIZE_128_ } - <: - t_U128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Convert.t_From t_U128 t_U8 = - { - f_from_pre = (fun (x: t_U8) -> true); - f_from_post = (fun (x: t_U8) (out: t_U128) -> true); - f_from - = - fun (x: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Convert.t_From t_U128 t_U16 = - { - f_from_pre = (fun (x: t_U16) -> true); - f_from_post = (fun (x: t_U16) (out: t_U128) -> true); - f_from - = - fun (x: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Convert.t_From t_U128 t_U32 = - { - f_from_pre = (fun (x: t_U32) -> true); - f_from_post = (fun (x: t_U32) (out: t_U128) -> true); - f_from - = - fun (x: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Convert.t_From t_U128 t_U64 = - { - f_from_pre = (fun (x: t_U64) -> true); - f_from_post = (fun (x: t_U64) (out: t_U128) -> true); - f_from - = - fun (x: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Ops.Arith.t_Neg t_U8 = - { - f_Output = t_U8; - f_neg_pre = (fun (self: t_U8) -> true); - f_neg_post = (fun (self: t_U8) (out: t_U8) -> true); - f_neg - = - fun (self: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_7__sub Core.Base.Int.Base_spec.v_WORDSIZE_8_ - (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - Core.Base.Int.Base_spec.v_WORDSIZE_8_ - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Ops.Arith.t_Mul t_U8 t_U8 = - { - f_Output = t_U8; - f_mul_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_mul_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_mul - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_11__mul (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Ops.Arith.t_Rem t_U8 t_U8 = - { - f_Output = t_U8; - f_rem_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_rem_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_rem - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Ops.Arith.t_Add t_U8 t_U8 = - { - f_Output = t_U8; - f_add_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_add_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_add - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Ops.Arith.t_Div t_U8 t_U8 = - { - f_Output = t_U8; - f_div_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_div_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_div - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_10__div (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Ops.Bit.t_Shl t_U8 t_U8 = - { - f_Output = t_U8; - f_shl_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_shl_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_shl - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Ops.Bit.t_Shl t_U8 t_U16 = - { - f_Output = t_U8; - f_shl_pre = (fun (self: t_U8) (rhs: t_U16) -> true); - f_shl_post = (fun (self: t_U8) (rhs: t_U16) (out: t_U8) -> true); - f_shl - = - fun (self: t_U8) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Ops.Bit.t_Shl t_U8 t_U32 = - { - f_Output = t_U8; - f_shl_pre = (fun (self: t_U8) (rhs: t_U32) -> true); - f_shl_post = (fun (self: t_U8) (rhs: t_U32) (out: t_U8) -> true); - f_shl - = - fun (self: t_U8) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Ops.Bit.t_Shl t_U8 t_U64 = - { - f_Output = t_U8; - f_shl_pre = (fun (self: t_U8) (rhs: t_U64) -> true); - f_shl_post = (fun (self: t_U8) (rhs: t_U64) (out: t_U8) -> true); - f_shl - = - fun (self: t_U8) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Ops.Bit.t_Shl t_U8 t_U128 = - { - f_Output = t_U8; - f_shl_pre = (fun (self: t_U8) (rhs: t_U128) -> true); - f_shl_post = (fun (self: t_U8) (rhs: t_U128) (out: t_U8) -> true); - f_shl - = - fun (self: t_U8) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Ops.Bit.t_Shr t_U8 t_U8 = - { - f_Output = t_U8; - f_shr_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_shr_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_shr - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Ops.Bit.t_Shr t_U8 t_U16 = - { - f_Output = t_U8; - f_shr_pre = (fun (self: t_U8) (rhs: t_U16) -> true); - f_shr_post = (fun (self: t_U8) (rhs: t_U16) (out: t_U8) -> true); - f_shr - = - fun (self: t_U8) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Ops.Bit.t_Shr t_U8 t_U32 = - { - f_Output = t_U8; - f_shr_pre = (fun (self: t_U8) (rhs: t_U32) -> true); - f_shr_post = (fun (self: t_U8) (rhs: t_U32) (out: t_U8) -> true); - f_shr - = - fun (self: t_U8) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_42: Core.Ops.Bit.t_Shr t_U8 t_U64 = - { - f_Output = t_U8; - f_shr_pre = (fun (self: t_U8) (rhs: t_U64) -> true); - f_shr_post = (fun (self: t_U8) (rhs: t_U64) (out: t_U8) -> true); - f_shr - = - fun (self: t_U8) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_43: Core.Ops.Bit.t_Shr t_U8 t_U128 = - { - f_Output = t_U8; - f_shr_pre = (fun (self: t_U8) (rhs: t_U128) -> true); - f_shr_post = (fun (self: t_U8) (rhs: t_U128) (out: t_U8) -> true); - f_shr - = - fun (self: t_U8) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_44: Core.Ops.Bit.t_BitXor t_U8 t_U8 = - { - f_Output = t_U8; - f_bitxor_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_bitxor_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_bitxor - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_14__bitxor (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_45: Core.Ops.Bit.t_BitAnd t_U8 t_U8 = - { - f_Output = t_U8; - f_bitand_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_bitand_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_bitand - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_15__bitand (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_46: Core.Ops.Bit.t_BitOr t_U8 t_U8 = - { - f_Output = t_U8; - f_bitor_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_bitor_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_bitor - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_16__bitor (Core.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_51: Core.Ops.Arith.t_Neg t_U16 = - { - f_Output = t_U16; - f_neg_pre = (fun (self: t_U16) -> true); - f_neg_post = (fun (self: t_U16) (out: t_U16) -> true); - f_neg - = - fun (self: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_7__sub Core.Base.Int.Base_spec.v_WORDSIZE_16_ - (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - Core.Base.Int.Base_spec.v_WORDSIZE_16_ - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_57: Core.Ops.Arith.t_Mul t_U16 t_U16 = - { - f_Output = t_U16; - f_mul_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_mul_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_mul - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_11__mul (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_58: Core.Ops.Arith.t_Rem t_U16 t_U16 = - { - f_Output = t_U16; - f_rem_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_rem_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_rem - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_59: Core.Ops.Arith.t_Add t_U16 t_U16 = - { - f_Output = t_U16; - f_add_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_add_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_add - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_60: Core.Ops.Arith.t_Div t_U16 t_U16 = - { - f_Output = t_U16; - f_div_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_div_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_div - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_10__div (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_61: Core.Ops.Bit.t_Shl t_U16 t_U8 = - { - f_Output = t_U16; - f_shl_pre = (fun (self: t_U16) (rhs: t_U8) -> true); - f_shl_post = (fun (self: t_U16) (rhs: t_U8) (out: t_U16) -> true); - f_shl - = - fun (self: t_U16) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_62: Core.Ops.Bit.t_Shl t_U16 t_U16 = - { - f_Output = t_U16; - f_shl_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_shl_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_shl - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_63: Core.Ops.Bit.t_Shl t_U16 t_U32 = - { - f_Output = t_U16; - f_shl_pre = (fun (self: t_U16) (rhs: t_U32) -> true); - f_shl_post = (fun (self: t_U16) (rhs: t_U32) (out: t_U16) -> true); - f_shl - = - fun (self: t_U16) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_64: Core.Ops.Bit.t_Shl t_U16 t_U64 = - { - f_Output = t_U16; - f_shl_pre = (fun (self: t_U16) (rhs: t_U64) -> true); - f_shl_post = (fun (self: t_U16) (rhs: t_U64) (out: t_U16) -> true); - f_shl - = - fun (self: t_U16) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_65: Core.Ops.Bit.t_Shl t_U16 t_U128 = - { - f_Output = t_U16; - f_shl_pre = (fun (self: t_U16) (rhs: t_U128) -> true); - f_shl_post = (fun (self: t_U16) (rhs: t_U128) (out: t_U16) -> true); - f_shl - = - fun (self: t_U16) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_66: Core.Ops.Bit.t_Shr t_U16 t_U8 = - { - f_Output = t_U16; - f_shr_pre = (fun (self: t_U16) (rhs: t_U8) -> true); - f_shr_post = (fun (self: t_U16) (rhs: t_U8) (out: t_U16) -> true); - f_shr - = - fun (self: t_U16) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_67: Core.Ops.Bit.t_Shr t_U16 t_U16 = - { - f_Output = t_U16; - f_shr_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_shr_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_shr - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_68: Core.Ops.Bit.t_Shr t_U16 t_U32 = - { - f_Output = t_U16; - f_shr_pre = (fun (self: t_U16) (rhs: t_U32) -> true); - f_shr_post = (fun (self: t_U16) (rhs: t_U32) (out: t_U16) -> true); - f_shr - = - fun (self: t_U16) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_69: Core.Ops.Bit.t_Shr t_U16 t_U64 = - { - f_Output = t_U16; - f_shr_pre = (fun (self: t_U16) (rhs: t_U64) -> true); - f_shr_post = (fun (self: t_U16) (rhs: t_U64) (out: t_U16) -> true); - f_shr - = - fun (self: t_U16) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_70: Core.Ops.Bit.t_Shr t_U16 t_U128 = - { - f_Output = t_U16; - f_shr_pre = (fun (self: t_U16) (rhs: t_U128) -> true); - f_shr_post = (fun (self: t_U16) (rhs: t_U128) (out: t_U16) -> true); - f_shr - = - fun (self: t_U16) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_71: Core.Ops.Bit.t_BitXor t_U16 t_U16 = - { - f_Output = t_U16; - f_bitxor_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_bitxor_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_bitxor - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_14__bitxor (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_72: Core.Ops.Bit.t_BitAnd t_U16 t_U16 = - { - f_Output = t_U16; - f_bitand_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_bitand_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_bitand - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_15__bitand (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_73: Core.Ops.Bit.t_BitOr t_U16 t_U16 = - { - f_Output = t_U16; - f_bitor_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_bitor_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_bitor - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_16__bitor (Core.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_78: Core.Ops.Arith.t_Neg t_U32 = - { - f_Output = t_U32; - f_neg_pre = (fun (self: t_U32) -> true); - f_neg_post = (fun (self: t_U32) (out: t_U32) -> true); - f_neg - = - fun (self: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_7__sub Core.Base.Int.Base_spec.v_WORDSIZE_32_ - (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - Core.Base.Int.Base_spec.v_WORDSIZE_32_ - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_84: Core.Ops.Arith.t_Mul t_U32 t_U32 = - { - f_Output = t_U32; - f_mul_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_mul_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_mul - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_11__mul (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_85: Core.Ops.Arith.t_Rem t_U32 t_U32 = - { - f_Output = t_U32; - f_rem_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_rem_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_rem - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_86: Core.Ops.Arith.t_Add t_U32 t_U32 = - { - f_Output = t_U32; - f_add_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_add_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_add - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_87: Core.Ops.Arith.t_Div t_U32 t_U32 = - { - f_Output = t_U32; - f_div_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_div_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_div - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_10__div (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_88: Core.Ops.Bit.t_Shl t_U32 t_U8 = - { - f_Output = t_U32; - f_shl_pre = (fun (self: t_U32) (rhs: t_U8) -> true); - f_shl_post = (fun (self: t_U32) (rhs: t_U8) (out: t_U32) -> true); - f_shl - = - fun (self: t_U32) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_89: Core.Ops.Bit.t_Shl t_U32 t_U16 = - { - f_Output = t_U32; - f_shl_pre = (fun (self: t_U32) (rhs: t_U16) -> true); - f_shl_post = (fun (self: t_U32) (rhs: t_U16) (out: t_U32) -> true); - f_shl - = - fun (self: t_U32) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_90: Core.Ops.Bit.t_Shl t_U32 t_U32 = - { - f_Output = t_U32; - f_shl_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_shl_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_shl - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_91: Core.Ops.Bit.t_Shl t_U32 t_U64 = - { - f_Output = t_U32; - f_shl_pre = (fun (self: t_U32) (rhs: t_U64) -> true); - f_shl_post = (fun (self: t_U32) (rhs: t_U64) (out: t_U32) -> true); - f_shl - = - fun (self: t_U32) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_92: Core.Ops.Bit.t_Shl t_U32 t_U128 = - { - f_Output = t_U32; - f_shl_pre = (fun (self: t_U32) (rhs: t_U128) -> true); - f_shl_post = (fun (self: t_U32) (rhs: t_U128) (out: t_U32) -> true); - f_shl - = - fun (self: t_U32) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_93: Core.Ops.Bit.t_Shr t_U32 t_U8 = - { - f_Output = t_U32; - f_shr_pre = (fun (self: t_U32) (rhs: t_U8) -> true); - f_shr_post = (fun (self: t_U32) (rhs: t_U8) (out: t_U32) -> true); - f_shr - = - fun (self: t_U32) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_94: Core.Ops.Bit.t_Shr t_U32 t_U16 = - { - f_Output = t_U32; - f_shr_pre = (fun (self: t_U32) (rhs: t_U16) -> true); - f_shr_post = (fun (self: t_U32) (rhs: t_U16) (out: t_U32) -> true); - f_shr - = - fun (self: t_U32) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_95: Core.Ops.Bit.t_Shr t_U32 t_U32 = - { - f_Output = t_U32; - f_shr_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_shr_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_shr - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_96: Core.Ops.Bit.t_Shr t_U32 t_U64 = - { - f_Output = t_U32; - f_shr_pre = (fun (self: t_U32) (rhs: t_U64) -> true); - f_shr_post = (fun (self: t_U32) (rhs: t_U64) (out: t_U32) -> true); - f_shr - = - fun (self: t_U32) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_97: Core.Ops.Bit.t_Shr t_U32 t_U128 = - { - f_Output = t_U32; - f_shr_pre = (fun (self: t_U32) (rhs: t_U128) -> true); - f_shr_post = (fun (self: t_U32) (rhs: t_U128) (out: t_U32) -> true); - f_shr - = - fun (self: t_U32) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_98: Core.Ops.Bit.t_BitXor t_U32 t_U32 = - { - f_Output = t_U32; - f_bitxor_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_bitxor_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_bitxor - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_14__bitxor (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_99: Core.Ops.Bit.t_BitAnd t_U32 t_U32 = - { - f_Output = t_U32; - f_bitand_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_bitand_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_bitand - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_15__bitand (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_100: Core.Ops.Bit.t_BitOr t_U32 t_U32 = - { - f_Output = t_U32; - f_bitor_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_bitor_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_bitor - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_16__bitor (Core.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_105: Core.Ops.Arith.t_Neg t_U64 = - { - f_Output = t_U64; - f_neg_pre = (fun (self: t_U64) -> true); - f_neg_post = (fun (self: t_U64) (out: t_U64) -> true); - f_neg - = - fun (self: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_7__sub Core.Base.Int.Base_spec.v_WORDSIZE_64_ - (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - Core.Base.Int.Base_spec.v_WORDSIZE_64_ - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_111: Core.Ops.Arith.t_Mul t_U64 t_U64 = - { - f_Output = t_U64; - f_mul_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_mul_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_mul - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_11__mul (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_112: Core.Ops.Arith.t_Rem t_U64 t_U64 = - { - f_Output = t_U64; - f_rem_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_rem_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_rem - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_113: Core.Ops.Arith.t_Add t_U64 t_U64 = - { - f_Output = t_U64; - f_add_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_add_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_add - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_114: Core.Ops.Arith.t_Div t_U64 t_U64 = - { - f_Output = t_U64; - f_div_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_div_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_div - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_10__div (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_115: Core.Ops.Bit.t_Shl t_U64 t_U8 = - { - f_Output = t_U64; - f_shl_pre = (fun (self: t_U64) (rhs: t_U8) -> true); - f_shl_post = (fun (self: t_U64) (rhs: t_U8) (out: t_U64) -> true); - f_shl - = - fun (self: t_U64) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_116: Core.Ops.Bit.t_Shl t_U64 t_U16 = - { - f_Output = t_U64; - f_shl_pre = (fun (self: t_U64) (rhs: t_U16) -> true); - f_shl_post = (fun (self: t_U64) (rhs: t_U16) (out: t_U64) -> true); - f_shl - = - fun (self: t_U64) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_117: Core.Ops.Bit.t_Shl t_U64 t_U32 = - { - f_Output = t_U64; - f_shl_pre = (fun (self: t_U64) (rhs: t_U32) -> true); - f_shl_post = (fun (self: t_U64) (rhs: t_U32) (out: t_U64) -> true); - f_shl - = - fun (self: t_U64) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_118: Core.Ops.Bit.t_Shl t_U64 t_U64 = - { - f_Output = t_U64; - f_shl_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_shl_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_shl - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_119: Core.Ops.Bit.t_Shl t_U64 t_U128 = - { - f_Output = t_U64; - f_shl_pre = (fun (self: t_U64) (rhs: t_U128) -> true); - f_shl_post = (fun (self: t_U64) (rhs: t_U128) (out: t_U64) -> true); - f_shl - = - fun (self: t_U64) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_120: Core.Ops.Bit.t_Shr t_U64 t_U8 = - { - f_Output = t_U64; - f_shr_pre = (fun (self: t_U64) (rhs: t_U8) -> true); - f_shr_post = (fun (self: t_U64) (rhs: t_U8) (out: t_U64) -> true); - f_shr - = - fun (self: t_U64) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_121: Core.Ops.Bit.t_Shr t_U64 t_U16 = - { - f_Output = t_U64; - f_shr_pre = (fun (self: t_U64) (rhs: t_U16) -> true); - f_shr_post = (fun (self: t_U64) (rhs: t_U16) (out: t_U64) -> true); - f_shr - = - fun (self: t_U64) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_122: Core.Ops.Bit.t_Shr t_U64 t_U32 = - { - f_Output = t_U64; - f_shr_pre = (fun (self: t_U64) (rhs: t_U32) -> true); - f_shr_post = (fun (self: t_U64) (rhs: t_U32) (out: t_U64) -> true); - f_shr - = - fun (self: t_U64) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_123: Core.Ops.Bit.t_Shr t_U64 t_U64 = - { - f_Output = t_U64; - f_shr_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_shr_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_shr - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_124: Core.Ops.Bit.t_Shr t_U64 t_U128 = - { - f_Output = t_U64; - f_shr_pre = (fun (self: t_U64) (rhs: t_U128) -> true); - f_shr_post = (fun (self: t_U64) (rhs: t_U128) (out: t_U64) -> true); - f_shr - = - fun (self: t_U64) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_125: Core.Ops.Bit.t_BitXor t_U64 t_U64 = - { - f_Output = t_U64; - f_bitxor_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_bitxor_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_bitxor - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_14__bitxor (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_126: Core.Ops.Bit.t_BitAnd t_U64 t_U64 = - { - f_Output = t_U64; - f_bitand_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_bitand_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_bitand - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_15__bitand (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_127: Core.Ops.Bit.t_BitOr t_U64 t_U64 = - { - f_Output = t_U64; - f_bitor_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_bitor_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_bitor - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_16__bitor (Core.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_132: Core.Ops.Arith.t_Neg t_U128 = - { - f_Output = t_U128; - f_neg_pre = (fun (self: t_U128) -> true); - f_neg_post = (fun (self: t_U128) (out: t_U128) -> true); - f_neg - = - fun (self: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_7__sub Core.Base.Int.Base_spec.v_WORDSIZE_128_ - (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - Core.Base.Int.Base_spec.v_WORDSIZE_128_ - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_138: Core.Ops.Arith.t_Mul t_U128 t_U128 = - { - f_Output = t_U128; - f_mul_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_mul_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_mul - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_11__mul (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_139: Core.Ops.Arith.t_Rem t_U128 t_U128 = - { - f_Output = t_U128; - f_rem_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_rem_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_rem - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_10__rem (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_140: Core.Ops.Arith.t_Add t_U128 t_U128 = - { - f_Output = t_U128; - f_add_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_add_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_add - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_141: Core.Ops.Arith.t_Div t_U128 t_U128 = - { - f_Output = t_U128; - f_div_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_div_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_div - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_10__div (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_142: Core.Ops.Bit.t_Shl t_U128 t_U8 = - { - f_Output = t_U128; - f_shl_pre = (fun (self: t_U128) (rhs: t_U8) -> true); - f_shl_post = (fun (self: t_U128) (rhs: t_U8) (out: t_U128) -> true); - f_shl - = - fun (self: t_U128) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_143: Core.Ops.Bit.t_Shl t_U128 t_U16 = - { - f_Output = t_U128; - f_shl_pre = (fun (self: t_U128) (rhs: t_U16) -> true); - f_shl_post = (fun (self: t_U128) (rhs: t_U16) (out: t_U128) -> true); - f_shl - = - fun (self: t_U128) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_144: Core.Ops.Bit.t_Shl t_U128 t_U32 = - { - f_Output = t_U128; - f_shl_pre = (fun (self: t_U128) (rhs: t_U32) -> true); - f_shl_post = (fun (self: t_U128) (rhs: t_U32) (out: t_U128) -> true); - f_shl - = - fun (self: t_U128) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_145: Core.Ops.Bit.t_Shl t_U128 t_U64 = - { - f_Output = t_U128; - f_shl_pre = (fun (self: t_U128) (rhs: t_U64) -> true); - f_shl_post = (fun (self: t_U128) (rhs: t_U64) (out: t_U128) -> true); - f_shl - = - fun (self: t_U128) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_146: Core.Ops.Bit.t_Shl t_U128 t_U128 = - { - f_Output = t_U128; - f_shl_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_shl_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_shl - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_12__shl (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_147: Core.Ops.Bit.t_Shr t_U128 t_U8 = - { - f_Output = t_U128; - f_shr_pre = (fun (self: t_U128) (rhs: t_U8) -> true); - f_shr_post = (fun (self: t_U128) (rhs: t_U8) (out: t_U128) -> true); - f_shr - = - fun (self: t_U128) (rhs: t_U8) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Int.t_HaxInt - ) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_148: Core.Ops.Bit.t_Shr t_U128 t_U16 = - { - f_Output = t_U128; - f_shr_pre = (fun (self: t_U128) (rhs: t_U16) -> true); - f_shr_post = (fun (self: t_U128) (rhs: t_U16) (out: t_U128) -> true); - f_shr - = - fun (self: t_U128) (rhs: t_U16) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_149: Core.Ops.Bit.t_Shr t_U128 t_U32 = - { - f_Output = t_U128; - f_shr_pre = (fun (self: t_U128) (rhs: t_U32) -> true); - f_shr_post = (fun (self: t_U128) (rhs: t_U32) (out: t_U128) -> true); - f_shr - = - fun (self: t_U128) (rhs: t_U32) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_150: Core.Ops.Bit.t_Shr t_U128 t_U64 = - { - f_Output = t_U128; - f_shr_pre = (fun (self: t_U128) (rhs: t_U64) -> true); - f_shr_post = (fun (self: t_U128) (rhs: t_U64) (out: t_U128) -> true); - f_shr - = - fun (self: t_U128) (rhs: t_U64) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_151: Core.Ops.Bit.t_Shr t_U128 t_U128 = - { - f_Output = t_U128; - f_shr_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_shr_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_shr - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_13__shr (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_152: Core.Ops.Bit.t_BitXor t_U128 t_U128 = - { - f_Output = t_U128; - f_bitxor_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_bitxor_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_bitxor - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_14__bitxor (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_153: Core.Ops.Bit.t_BitAnd t_U128 t_U128 = - { - f_Output = t_U128; - f_bitand_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_bitand_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_bitand - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_15__bitand (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_154: Core.Ops.Bit.t_BitOr t_U128 t_U128 = - { - f_Output = t_U128; - f_bitor_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_bitor_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_bitor - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Int.Base_impl.impl_16__bitor (Core.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Int.t_HaxInt) - <: - Core.Base.Int.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Ops.Arith.t_Sub t_U8 t_U8 = - { - f_Output = t_U8; - f_sub_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_sub_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_sub - = - fun (self: t_U8) (rhs: t_U8) -> - self +! (Core.Ops.Arith.f_neg #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Ops.Bit.t_Not t_U8 = - { - f_Output = t_U8; - f_not_pre = (fun (self: t_U8) -> true); - f_not_post = (fun (self: t_U8) (out: t_U8) -> true); - f_not = fun (self: t_U8) -> self ^. (f_MAX <: t_U8) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_52: Core.Ops.Arith.t_Sub t_U16 t_U16 = - { - f_Output = t_U16; - f_sub_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_sub_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_sub - = - fun (self: t_U16) (rhs: t_U16) -> - self +! (Core.Ops.Arith.f_neg #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_53: Core.Ops.Bit.t_Not t_U16 = - { - f_Output = t_U16; - f_not_pre = (fun (self: t_U16) -> true); - f_not_post = (fun (self: t_U16) (out: t_U16) -> true); - f_not = fun (self: t_U16) -> self ^. (f_MAX <: t_U16) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_79: Core.Ops.Arith.t_Sub t_U32 t_U32 = - { - f_Output = t_U32; - f_sub_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_sub_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_sub - = - fun (self: t_U32) (rhs: t_U32) -> - self +! (Core.Ops.Arith.f_neg #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_80: Core.Ops.Bit.t_Not t_U32 = - { - f_Output = t_U32; - f_not_pre = (fun (self: t_U32) -> true); - f_not_post = (fun (self: t_U32) (out: t_U32) -> true); - f_not = fun (self: t_U32) -> self ^. (f_MAX <: t_U32) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_106: Core.Ops.Arith.t_Sub t_U64 t_U64 = - { - f_Output = t_U64; - f_sub_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_sub_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_sub - = - fun (self: t_U64) (rhs: t_U64) -> - self +! (Core.Ops.Arith.f_neg #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_107: Core.Ops.Bit.t_Not t_U64 = - { - f_Output = t_U64; - f_not_pre = (fun (self: t_U64) -> true); - f_not_post = (fun (self: t_U64) (out: t_U64) -> true); - f_not = fun (self: t_U64) -> self ^. (f_MAX <: t_U64) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_133: Core.Ops.Arith.t_Sub t_U128 t_U128 = - { - f_Output = t_U128; - f_sub_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_sub_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_sub - = - fun (self: t_U128) (rhs: t_U128) -> - self +! (Core.Ops.Arith.f_neg #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_134: Core.Ops.Bit.t_Not t_U128 = - { - f_Output = t_U128; - f_not_pre = (fun (self: t_U128) -> true); - f_not_post = (fun (self: t_U128) (out: t_U128) -> true); - f_not = fun (self: t_U128) -> self ^. (f_MAX <: t_U128) - } diff --git a/proof-libs/fstar/generated-core/Core.Intrinsics.fst b/proof-libs/fstar/generated-core/Core.Intrinsics.fst index 8ed4d5e96..36850a54a 100644 --- a/proof-libs/fstar/generated-core/Core.Intrinsics.fst +++ b/proof-libs/fstar/generated-core/Core.Intrinsics.fst @@ -3,291 +3,954 @@ module Core.Intrinsics open Core open FStar.Mul -open Core.Cmp -open Core.Ops.Arith - let unchecked_add_u128 (x y: Core.Primitive.t_u128) : Core.Primitive.t_u128 = Core.Primitive.C_u128 ({ - Core.Int.f_v + Core.Base_interface.Int.f_v = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U128 + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U128 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) } <: - Core.Int.t_U128) + Core.Base_interface.Int.t_U128) <: Core.Primitive.t_u128 let unchecked_add_u16 (x y: Core.Primitive.t_u16) : Core.Primitive.t_u16 = Core.Primitive.C_u16 ({ - Core.Int.f_v + Core.Base_interface.Int.f_v = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U16 + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U16 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) } <: - Core.Int.t_U16) + Core.Base_interface.Int.t_U16) <: Core.Primitive.t_u16 let unchecked_add_u32 (x y: Core.Primitive.t_u32) : Core.Primitive.t_u32 = Core.Primitive.C_u32 ({ - Core.Int.f_v + Core.Base_interface.Int.f_v = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U32 + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U32 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) } <: - Core.Int.t_U32) + Core.Base_interface.Int.t_U32) <: Core.Primitive.t_u32 let unchecked_add_u64 (x y: Core.Primitive.t_u64) : Core.Primitive.t_u64 = Core.Primitive.C_u64 ({ - Core.Int.f_v + Core.Base_interface.Int.f_v = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U64 + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) } <: - Core.Int.t_U64) + Core.Base_interface.Int.t_U64) <: Core.Primitive.t_u64 let unchecked_add_u8 (x y: Core.Primitive.t_u8) : Core.Primitive.t_u8 = Core.Primitive.C_u8 ({ - Core.Int.f_v + Core.Base_interface.Int.f_v = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U8 + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U8 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) } <: - Core.Int.t_U8) + Core.Base_interface.Int.t_U8) <: Core.Primitive.t_u8 let unchecked_add_usize (x y: Core.Primitive.t_usize) : Core.Primitive.t_usize = Core.Primitive.C_usize ({ - Core.Int.f_v + Core.Base_interface.Int.f_v = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U64 + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) } <: - Core.Int.t_U64) + Core.Base_interface.Int.t_U64) <: Core.Primitive.t_usize +let add_with_overflow_i128 (x y: Core.Primitive.t_i128) : (Core.Primitive.t_i128 & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I128):Core.Base_interface.Int.t_I128 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (Core.Primitive.C_i128 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I128 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_i128), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (Core.Primitive.t_i128 & bool) + +let unchecked_add_i128 (x y: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + Core.Primitive.C_i128 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I128) + <: + Core.Primitive.t_i128 + +let add_with_overflow_i16 (x y: Core.Primitive.t_i16) : (Core.Primitive.t_i16 & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I16):Core.Base_interface.Int.t_I16 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (Core.Primitive.C_i16 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I16 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_i16), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (Core.Primitive.t_i16 & bool) + +let unchecked_add_i16 (x y: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + Core.Primitive.C_i16 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I16) + <: + Core.Primitive.t_i16 + +let add_with_overflow_i32 (x y: Core.Primitive.t_i32) : (Core.Primitive.t_i32 & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I32):Core.Base_interface.Int.t_I32 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (Core.Primitive.C_i32 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I32 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_i32), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (Core.Primitive.t_i32 & bool) + +let unchecked_add_i32 (x y: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + Core.Primitive.C_i32 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I32) + <: + Core.Primitive.t_i32 + +let add_with_overflow_i64 (x y: Core.Primitive.t_i64) : (Core.Primitive.t_i64 & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I64):Core.Base_interface.Int.t_I64 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (Core.Primitive.C_i64 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_i64), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (Core.Primitive.t_i64 & bool) + +let unchecked_add_i64 (x y: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + Core.Primitive.C_i64 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I64) + <: + Core.Primitive.t_i64 + +let add_with_overflow_i8 (x y: Core.Primitive.t_i8) : (Core.Primitive.t_i8 & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I8):Core.Base_interface.Int.t_I8 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (Core.Primitive.C_i8 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_i8), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (Core.Primitive.t_i8 & bool) + +let unchecked_add_i8 (x y: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + Core.Primitive.C_i8 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I8) + <: + Core.Primitive.t_i8 + +let add_with_overflow_isize (x y: Core.Primitive.t_isize) : (Core.Primitive.t_isize & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I64):Core.Base_interface.Int.t_I64 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (Core.Primitive.C_isize + (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve res) + <: + Core.Primitive.t_isize), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (Core.Primitive.t_isize & bool) + +let unchecked_add_isize (x y: Core.Primitive.t_isize) : Core.Primitive.t_isize = + Core.Primitive.C_isize + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I64) + <: + Core.Primitive.t_isize + let add_with_overflow_u128 (x y: Core.Primitive.t_u128) : (Core.Primitive.t_u128 & bool) = - let overflow:Core.Base.Int.t_HaxInt = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U128 + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U128 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - let (res: Core.Int.t_U128):Core.Int.t_U128 = - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #Core.Int.t_U128 + let (res: Core.Base_interface.Int.t_U128):Core.Base_interface.Int.t_U128 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - (Core.Primitive.C_u128 (Core.Clone.f_clone #Core.Int.t_U128 #FStar.Tactics.Typeclasses.solve res) + (Core.Primitive.C_u128 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve res) <: Core.Primitive.t_u128), - (Core.Coerce.f_lift #Core.Int.t_U128 #FStar.Tactics.Typeclasses.solve res - <: - Core.Base.Int.t_HaxInt) <. - overflow + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow <: (Core.Primitive.t_u128 & bool) let add_with_overflow_u16 (x y: Core.Primitive.t_u16) : (Core.Primitive.t_u16 & bool) = - let overflow:Core.Base.Int.t_HaxInt = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U16 + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U16 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - let (res: Core.Int.t_U16):Core.Int.t_U16 = - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #Core.Int.t_U16 + let (res: Core.Base_interface.Int.t_U16):Core.Base_interface.Int.t_U16 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - (Core.Primitive.C_u16 (Core.Clone.f_clone #Core.Int.t_U16 #FStar.Tactics.Typeclasses.solve res) + (Core.Primitive.C_u16 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve res) <: Core.Primitive.t_u16), - (Core.Coerce.f_lift #Core.Int.t_U16 #FStar.Tactics.Typeclasses.solve res <: Core.Base.Int.t_HaxInt - ) <. - overflow + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow <: (Core.Primitive.t_u16 & bool) let add_with_overflow_u32 (x y: Core.Primitive.t_u32) : (Core.Primitive.t_u32 & bool) = - let overflow:Core.Base.Int.t_HaxInt = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U32 + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U32 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - let (res: Core.Int.t_U32):Core.Int.t_U32 = - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #Core.Int.t_U32 + let (res: Core.Base_interface.Int.t_U32):Core.Base_interface.Int.t_U32 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - (Core.Primitive.C_u32 (Core.Clone.f_clone #Core.Int.t_U32 #FStar.Tactics.Typeclasses.solve res) + (Core.Primitive.C_u32 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve res) <: Core.Primitive.t_u32), - (Core.Coerce.f_lift #Core.Int.t_U32 #FStar.Tactics.Typeclasses.solve res <: Core.Base.Int.t_HaxInt - ) <. - overflow + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow <: (Core.Primitive.t_u32 & bool) let add_with_overflow_u64 (x y: Core.Primitive.t_u64) : (Core.Primitive.t_u64 & bool) = - let overflow:Core.Base.Int.t_HaxInt = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U64 + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - let (res: Core.Int.t_U64):Core.Int.t_U64 = - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #Core.Int.t_U64 + let (res: Core.Base_interface.Int.t_U64):Core.Base_interface.Int.t_U64 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - (Core.Primitive.C_u64 (Core.Clone.f_clone #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) + (Core.Primitive.C_u64 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) <: Core.Primitive.t_u64), - (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve res <: Core.Base.Int.t_HaxInt - ) <. - overflow + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow <: (Core.Primitive.t_u64 & bool) let add_with_overflow_u8 (x y: Core.Primitive.t_u8) : (Core.Primitive.t_u8 & bool) = - let overflow:Core.Base.Int.t_HaxInt = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U8 + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U8 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - let (res: Core.Int.t_U8):Core.Int.t_U8 = - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #Core.Int.t_U8 + let (res: Core.Base_interface.Int.t_U8):Core.Base_interface.Int.t_U8 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - (Core.Primitive.C_u8 (Core.Clone.f_clone #Core.Int.t_U8 #FStar.Tactics.Typeclasses.solve res) + (Core.Primitive.C_u8 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve res) <: Core.Primitive.t_u8), - (Core.Coerce.f_lift #Core.Int.t_U8 #FStar.Tactics.Typeclasses.solve res <: Core.Base.Int.t_HaxInt) <. - overflow + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow <: (Core.Primitive.t_u8 & bool) let add_with_overflow_usize (x y: Core.Primitive.t_usize) : (Core.Primitive.t_usize & bool) = - let overflow:Core.Base.Int.t_HaxInt = - Core.Base.Int.Base_impl.impl_6__add (Core.Coerce.f_lift #Core.Int.t_U64 + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) - (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve y.Core.Primitive._0 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - let (res: Core.Int.t_U64):Core.Int.t_U64 = - Core.Coerce.f_concretize #Core.Base.Int.t_HaxInt - #Core.Int.t_U64 + let (res: Core.Base_interface.Int.t_U64):Core.Base_interface.Int.t_U64 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Int.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow <: - Core.Base.Int.t_HaxInt) + Core.Base.Spec.Haxint.t_HaxInt) in - (Core.Primitive.C_usize (Core.Clone.f_clone #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) + (Core.Primitive.C_usize + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) <: Core.Primitive.t_usize), - (Core.Coerce.f_lift #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve res <: Core.Base.Int.t_HaxInt - ) <. - overflow + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow <: (Core.Primitive.t_usize & bool) +let unchecked_div_u128 (x y: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + Core.Primitive.C_u128 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U128) + <: + Core.Primitive.t_u128 + +let unchecked_div_u16 (x y: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + Core.Primitive.C_u16 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U16) + <: + Core.Primitive.t_u16 + +let unchecked_div_u32 (x y: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Core.Primitive.C_u32 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U32) + <: + Core.Primitive.t_u32 + +let unchecked_div_u64 (x y: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + Core.Primitive.C_u64 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U64) + <: + Core.Primitive.t_u64 + +let unchecked_div_u8 (x y: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + Core.Primitive.C_u8 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U8) + <: + Core.Primitive.t_u8 + +let unchecked_div_usize (x y: Core.Primitive.t_usize) : Core.Primitive.t_usize = + Core.Primitive.C_usize + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U64) + <: + Core.Primitive.t_usize + +let wrapping_add_i128 (a b: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + Core.Primitive.C_i128 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_i128 + +let wrapping_add_i16 (a b: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + Core.Primitive.C_i16 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_i16 + +let wrapping_add_i32 (a b: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + Core.Primitive.C_i32 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_i32 + +let wrapping_add_i64 (a b: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + Core.Primitive.C_i64 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_i64 + +let wrapping_add_i8 (a b: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + Core.Primitive.C_i8 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_i8 + +let wrapping_add_isize (a b: Core.Primitive.t_isize) : Core.Primitive.t_isize = + Core.Primitive.C_isize (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_isize + +let wrapping_sub_i128 (a b: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + Core.Primitive.C_i128 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_i128 + +let wrapping_sub_i16 (a b: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + Core.Primitive.C_i16 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_i16 + +let wrapping_sub_i32 (a b: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + Core.Primitive.C_i32 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_i32 + +let wrapping_sub_i64 (a b: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + Core.Primitive.C_i64 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_i64 + +let wrapping_sub_i8 (a b: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + Core.Primitive.C_i8 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_i8 + +let wrapping_sub_isize (a b: Core.Primitive.t_isize) : Core.Primitive.t_isize = + Core.Primitive.C_isize (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_isize + +let unchecked_div_i128 (x y: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + Core.Primitive.C_i128 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I128) + <: + Core.Primitive.t_i128 + +let unchecked_div_i16 (x y: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + Core.Primitive.C_i16 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I16) + <: + Core.Primitive.t_i16 + +let unchecked_div_i32 (x y: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + Core.Primitive.C_i32 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I32) + <: + Core.Primitive.t_i32 + +let unchecked_div_i64 (x y: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + Core.Primitive.C_i64 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I64) + <: + Core.Primitive.t_i64 + +let unchecked_div_i8 (x y: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + Core.Primitive.C_i8 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I8) + <: + Core.Primitive.t_i8 + +let unchecked_div_isize (x y: Core.Primitive.t_isize) : Core.Primitive.t_isize = + Core.Primitive.C_isize + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y.Core.Primitive._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I64) + <: + Core.Primitive.t_isize + let wrapping_add_u128 (a b: Core.Primitive.t_u128) : Core.Primitive.t_u128 = Core.Primitive.C_u128 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u128 @@ -306,6 +969,24 @@ let wrapping_add_u8 (a b: Core.Primitive.t_u8) : Core.Primitive.t_u8 = let wrapping_add_usize (a b: Core.Primitive.t_usize) : Core.Primitive.t_usize = Core.Primitive.C_usize (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_usize +let wrapping_mul_i128 (a b: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + Core.Primitive.C_i128 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_i128 + +let wrapping_mul_i16 (a b: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + Core.Primitive.C_i16 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_i16 + +let wrapping_mul_i32 (a b: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + Core.Primitive.C_i32 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_i32 + +let wrapping_mul_i64 (a b: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + Core.Primitive.C_i64 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_i64 + +let wrapping_mul_i8 (a b: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + Core.Primitive.C_i8 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_i8 + +let wrapping_mul_isize (a b: Core.Primitive.t_isize) : Core.Primitive.t_isize = + Core.Primitive.C_isize (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_isize + let wrapping_mul_u128 (a b: Core.Primitive.t_u128) : Core.Primitive.t_u128 = Core.Primitive.C_u128 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u128 @@ -341,3 +1022,1645 @@ let wrapping_sub_u8 (a b: Core.Primitive.t_u8) : Core.Primitive.t_u8 = let wrapping_sub_usize (a b: Core.Primitive.t_usize) : Core.Primitive.t_usize = Core.Primitive.C_usize (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_usize + +let rotate_left_u128 (x: Core.Primitive.t_u128) (shift: Core.Primitive.t_u32) + : Core.Primitive.t_u128 = + let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_10__BITS in + let (left: Core.Primitive.t_u128):Core.Primitive.t_u128 = + (Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u128) <>! + (Core.Num.impl_10__BITS -! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + left |. right + +let rotate_left_u16 (x: Core.Primitive.t_u16) (shift: Core.Primitive.t_u32) : Core.Primitive.t_u16 = + let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_7__BITS in + let (left: Core.Primitive.t_u16):Core.Primitive.t_u16 = + (Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u16) <>! + (Core.Num.impl_7__BITS -! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + left |. right + +let rotate_left_u32 (x shift: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_8__BITS in + let (left: Core.Primitive.t_u32):Core.Primitive.t_u32 = + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u32) <>! + (Core.Num.impl_8__BITS -! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + left |. right + +let rotate_left_u64 (x: Core.Primitive.t_u64) (shift: Core.Primitive.t_u32) : Core.Primitive.t_u64 = + let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_9__BITS in + let (left: Core.Primitive.t_u64):Core.Primitive.t_u64 = + (Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u64) <>! + (Core.Num.impl_9__BITS -! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + left |. right + +let rotate_left_u8 (x: Core.Primitive.t_u8) (shift: Core.Primitive.t_u32) : Core.Primitive.t_u8 = + let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_6__BITS in + let (left: Core.Primitive.t_u8):Core.Primitive.t_u8 = + (Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u8) <>! + (Core.Num.impl_6__BITS -! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + left |. right + +let rotate_left_usize (x: Core.Primitive.t_usize) (shift: Core.Primitive.t_u32) + : Core.Primitive.t_usize = + let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_11__BITS in + let (left: Core.Primitive.t_usize):Core.Primitive.t_usize = + (Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_usize) <>! + (Core.Num.impl_11__BITS -! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + left |. right + +let rotate_right_u128 (x: Core.Primitive.t_u128) (shift: Core.Primitive.t_u32) + : Core.Primitive.t_u128 = + let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_10__BITS in + let (left: Core.Primitive.t_u128):Core.Primitive.t_u128 = + (Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u128) >>! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + in + let (right: Core.Primitive.t_u128):Core.Primitive.t_u128 = + (Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u128) <>! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + in + let (right: Core.Primitive.t_u16):Core.Primitive.t_u16 = + (Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u16) <>! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + in + let (right: Core.Primitive.t_u32):Core.Primitive.t_u32 = + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u32) <>! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + in + let (right: Core.Primitive.t_u64):Core.Primitive.t_u64 = + (Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u64) <>! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + in + let (right: Core.Primitive.t_u8):Core.Primitive.t_u8 = + (Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u8) <>! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift + <: + Core.Primitive.t_u32) + in + let (right: Core.Primitive.t_usize):Core.Primitive.t_usize = + (Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_usize) < + let count:Core.Primitive.t_u128 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u128 = count in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u128):Core.Primitive.t_u128 = + Core.Convert.f_into #Core.Primitive.t_u128 + #Core.Primitive.t_u128 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u128) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u128) &. + (Core.Convert.f_into #u128 + #Core.Primitive.t_u128 + #FStar.Tactics.Typeclasses.solve + (pub_u128 1) + <: + Core.Primitive.t_u128) + <: + Core.Primitive.t_u128) + in + let count:Core.Primitive.t_u128 = + (count < + let count:Core.Primitive.t_u16 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u16 = count in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u16):Core.Primitive.t_u16 = + Core.Convert.f_into #Core.Primitive.t_u16 + #Core.Primitive.t_u16 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u16) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u16) &. + (Core.Convert.f_into #u16 #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve 1us + <: + Core.Primitive.t_u16) + <: + Core.Primitive.t_u16) + in + let count:Core.Primitive.t_u16 = + (count < + let count:Core.Primitive.t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u32 = count in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u32) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) &. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + let count:Core.Primitive.t_u32 = + (count < + let count:Core.Primitive.t_u64 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u64 = count in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u64):Core.Primitive.t_u64 = + Core.Convert.f_into #Core.Primitive.t_u64 + #Core.Primitive.t_u64 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u64) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u64) &. + (Core.Convert.f_into #u64 #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve 1uL + <: + Core.Primitive.t_u64) + <: + Core.Primitive.t_u64) + in + let count:Core.Primitive.t_u64 = + (count < + let count:Core.Primitive.t_u8 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u8 = count in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u8):Core.Primitive.t_u8 = + Core.Convert.f_into #Core.Primitive.t_u8 + #Core.Primitive.t_u8 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u8) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u8) &. + (Core.Convert.f_into #u8 #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve 1uy + <: + Core.Primitive.t_u8) + <: + Core.Primitive.t_u8) + in + let count:Core.Primitive.t_u8 = + (count < + let count:Core.Primitive.t_usize = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_usize = count in + let i:u32 = i in + let (low_bit: Core.Primitive.t_usize):Core.Primitive.t_usize = + Core.Convert.f_into #Core.Primitive.t_usize + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_usize) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_usize) &. + (Core.Convert.f_into #usize + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + (sz 1) + <: + Core.Primitive.t_usize) + <: + Core.Primitive.t_usize) + in + let count:Core.Primitive.t_usize = + (count < + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u128 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u128) <>! + (Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (Core.Num.impl_10__BITS -! + (Core.Convert.f_into #u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + 1ul + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u128) + in + if + high_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let ctlz_u16 (x: Core.Primitive.t_u16) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_7__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u16 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u16) <>! + (Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (Core.Num.impl_7__BITS -! + (Core.Convert.f_into #u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + 1ul + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u16) + in + if + high_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let ctlz_u32 (x: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_8__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u32) <>! + (Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (Core.Num.impl_8__BITS -! + (Core.Convert.f_into #u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + 1ul + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + if + high_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let ctlz_u64 (x: Core.Primitive.t_u64) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_9__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u64 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u64) <>! + (Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (Core.Num.impl_9__BITS -! + (Core.Convert.f_into #u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + 1ul + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u64) + in + if + high_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let ctlz_u8 (x: Core.Primitive.t_u8) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_6__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u8 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u8) <>! + (Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (Core.Num.impl_6__BITS -! + (Core.Convert.f_into #u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + 1ul + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u8) + in + if + high_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let ctlz_usize (x: Core.Primitive.t_usize) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_11__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_usize + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_usize) <>! + (Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (Core.Num.impl_11__BITS -! + (Core.Convert.f_into #u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + 1ul + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_usize) + in + if + high_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let ctpop_u128 (x: Core.Primitive.t_u128) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let count:Core.Primitive.t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_10__BITS + <: + u32) + (fun count temp_1_ -> + let count:Core.Primitive.t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #Core.Primitive.t_u128 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u128) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u128) &. + (Core.Convert.f_into #u128 + #Core.Primitive.t_u128 + #FStar.Tactics.Typeclasses.solve + (pub_u128 1) + <: + Core.Primitive.t_u128) + <: + Core.Primitive.t_u128) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + count + +let ctpop_u16 (x: Core.Primitive.t_u16) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let count:Core.Primitive.t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_7__BITS + <: + u32) + (fun count temp_1_ -> + let count:Core.Primitive.t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #Core.Primitive.t_u16 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u16) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u16) &. + (Core.Convert.f_into #u16 #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve 1us + <: + Core.Primitive.t_u16) + <: + Core.Primitive.t_u16) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + count + +let ctpop_u32 (x: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let count:Core.Primitive.t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_8__BITS + <: + u32) + (fun count temp_1_ -> + let count:Core.Primitive.t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u32) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) &. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + count + +let ctpop_u64 (x: Core.Primitive.t_u64) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let count:Core.Primitive.t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_9__BITS + <: + u32) + (fun count temp_1_ -> + let count:Core.Primitive.t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #Core.Primitive.t_u64 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u64) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u64) &. + (Core.Convert.f_into #u64 #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve 1uL + <: + Core.Primitive.t_u64) + <: + Core.Primitive.t_u64) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + count + +let ctpop_u8 (x: Core.Primitive.t_u8) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let count:Core.Primitive.t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_6__BITS + <: + u32) + (fun count temp_1_ -> + let count:Core.Primitive.t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #Core.Primitive.t_u8 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u8) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u8) &. + (Core.Convert.f_into #u8 #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve 1uy + <: + Core.Primitive.t_u8) + <: + Core.Primitive.t_u8) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + count + +let ctpop_usize (x: Core.Primitive.t_usize) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let count:Core.Primitive.t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_11__BITS + <: + u32) + (fun count temp_1_ -> + let count:Core.Primitive.t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:Core.Primitive.t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #Core.Primitive.t_usize + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_usize) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_usize) &. + (Core.Convert.f_into #usize + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + (sz 1) + <: + Core.Primitive.t_usize) + <: + Core.Primitive.t_usize) + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + count + +let cttz_u128 (x: Core.Primitive.t_u128) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_10__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u128 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u128) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u128) &. + (Core.Convert.f_into #u128 + #Core.Primitive.t_u128 + #FStar.Tactics.Typeclasses.solve + (pub_u128 1) + <: + Core.Primitive.t_u128) + <: + Core.Primitive.t_u128) + in + if + low_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let cttz_u16 (x: Core.Primitive.t_u16) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_7__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u16 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u16) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u16) &. + (Core.Convert.f_into #u16 #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve 1us + <: + Core.Primitive.t_u16) + <: + Core.Primitive.t_u16) + in + if + low_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let cttz_u32 (x: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_8__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u32) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) &. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32) + in + if + low_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let cttz_u64 (x: Core.Primitive.t_u64) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_9__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u64 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u64) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u64) &. + (Core.Convert.f_into #u64 #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve 1uL + <: + Core.Primitive.t_u64) + <: + Core.Primitive.t_u64) + in + if + low_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let cttz_u8 (x: Core.Primitive.t_u8) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_6__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u8 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_u8) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u8) &. + (Core.Convert.f_into #u8 #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve 1uy + <: + Core.Primitive.t_u8) + <: + Core.Primitive.t_u8) + in + if + low_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count + +let cttz_usize (x: Core.Primitive.t_usize) : Core.Primitive.t_u32 = + let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + in + let done:bool = false in + let count, done:(Core.Primitive.t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #Core.Primitive.t_u32 + #u32 + #FStar.Tactics.Typeclasses.solve + Core.Num.impl_11__BITS + <: + u32) + (fun temp_0_ temp_1_ -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (Core.Primitive.t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_usize + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x + <: + Core.Primitive.t_usize) >>! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_usize) &. + (Core.Convert.f_into #usize + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + (sz 1) + <: + Core.Primitive.t_usize) + <: + Core.Primitive.t_usize) + in + if + low_bit =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) || + done + then + let done:bool = true in + count, done <: (Core.Primitive.t_u32 & bool) + else + let count:Core.Primitive.t_u32 = + count +! + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul + <: + Core.Primitive.t_u32) + in + count, done <: (Core.Primitive.t_u32 & bool)) + in + count diff --git a/proof-libs/fstar/generated-core/Core.Iter.Range.fst b/proof-libs/fstar/generated-core/Core.Iter.Range.fst new file mode 100644 index 000000000..918c25bf3 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Iter.Range.fst @@ -0,0 +1,457 @@ +module Core.Iter.Range +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_RangeIteratorImpl (v_Self: Type0) = { + f_Item:Type0; + f_spec_next_pre:v_Self -> Type0; + f_spec_next_post:v_Self -> (v_Self & Core.Option.t_Option f_Item) -> Type0; + f_spec_next:x0: v_Self + -> Prims.Pure (v_Self & Core.Option.t_Option f_Item) + (f_spec_next_pre x0) + (fun result -> f_spec_next_post x0 result) +} + +class t_Step (v_Self: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_9442900250278684536:Core.Clone.t_Clone v_Self; + [@@@ FStar.Tactics.Typeclasses.no_method]_super_12866954522599331834:Core.Cmp.t_PartialOrd v_Self + v_Self; + f_steps_between_pre:v_Self -> v_Self -> Type0; + f_steps_between_post:v_Self -> v_Self -> Core.Option.t_Option Core.Primitive.t_usize -> Type0; + f_steps_between:x0: v_Self -> x1: v_Self + -> Prims.Pure (Core.Option.t_Option Core.Primitive.t_usize) + (f_steps_between_pre x0 x1) + (fun result -> f_steps_between_post x0 x1 result); + f_forward_checked_pre:v_Self -> Core.Primitive.t_usize -> Type0; + f_forward_checked_post:v_Self -> Core.Primitive.t_usize -> Core.Option.t_Option v_Self -> Type0; + f_forward_checked:x0: v_Self -> x1: Core.Primitive.t_usize + -> Prims.Pure (Core.Option.t_Option v_Self) + (f_forward_checked_pre x0 x1) + (fun result -> f_forward_checked_post x0 x1 result) +} + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl (#v_A: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Step v_A) + : t_RangeIteratorImpl (Core.Ops.Range.t_Range v_A) = + { + f_Item = v_A; + f_spec_next_pre = (fun (self: Core.Ops.Range.t_Range v_A) -> true); + f_spec_next_post + = + (fun + (self: Core.Ops.Range.t_Range v_A) + (out: (Core.Ops.Range.t_Range v_A & Core.Option.t_Option v_A)) + -> + true); + f_spec_next + = + fun (self: Core.Ops.Range.t_Range v_A) -> + let hax_temp_output:Core.Option.t_Option v_A = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + in + self, hax_temp_output <: (Core.Ops.Range.t_Range v_A & Core.Option.t_Option v_A) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1 (#v_A: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Step v_A) + : Core.Iter.Traits.Iterator.t_Iterator (Core.Ops.Range.t_Range v_A) = + { + f_Item = v_A; + f_next_pre = (fun (self: Core.Ops.Range.t_Range v_A) -> true); + f_next_post + = + (fun + (self: Core.Ops.Range.t_Range v_A) + (out: (Core.Ops.Range.t_Range v_A & Core.Option.t_Option v_A)) + -> + true); + f_next + = + (fun (self: Core.Ops.Range.t_Range v_A) -> + let hax_temp_output:Core.Option.t_Option v_A = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + in + self, hax_temp_output <: (Core.Ops.Range.t_Range v_A & Core.Option.t_Option v_A)); + f_size_hint_pre = (fun (self: Core.Ops.Range.t_Range v_A) -> true); + f_size_hint_post + = + (fun (self: Core.Ops.Range.t_Range v_A) (out: (usize & Core.Option.t_Option usize)) -> true); + f_size_hint + = + fun (self: Core.Ops.Range.t_Range v_A) -> + if self.Core.Ops.Range.f_start <. self.Core.Ops.Range.f_end + then + let hint:Core.Option.t_Option Core.Primitive.t_usize = + f_steps_between #v_A + #FStar.Tactics.Typeclasses.solve + self.Core.Ops.Range.f_start + self.Core.Ops.Range.f_end + in + sz 0, (Core.Option.Option_Some (sz 0) <: Core.Option.t_Option usize) + <: + (usize & Core.Option.t_Option usize) + else + sz 0, (Core.Option.Option_Some (sz 0) <: Core.Option.t_Option usize) + <: + (usize & Core.Option.t_Option usize) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: t_Step Core.Primitive.t_u8 = + { + _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; + _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; + f_steps_between_pre = (fun (start: Core.Primitive.t_u8) (v_end: Core.Primitive.t_u8) -> true); + f_steps_between_post + = + (fun + (start: Core.Primitive.t_u8) + (v_end: Core.Primitive.t_u8) + (out: Core.Option.t_Option Core.Primitive.t_usize) + -> + true); + f_steps_between + = + (fun (start: Core.Primitive.t_u8) (v_end: Core.Primitive.t_u8) -> + if start <=. v_end + then + Core.Option.Option_Some + (Core.Convert.f_into #Core.Primitive.t_u8 + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + ((Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve v_end + <: + Core.Primitive.t_u8) -! + (Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve start + <: + Core.Primitive.t_u8) + <: + Core.Primitive.t_u8)) + <: + Core.Option.t_Option Core.Primitive.t_usize + else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); + f_forward_checked_pre = (fun (start: Core.Primitive.t_u8) (n: Core.Primitive.t_usize) -> true); + f_forward_checked_post + = + (fun + (start: Core.Primitive.t_u8) + (n: Core.Primitive.t_usize) + (out: Core.Option.t_Option Core.Primitive.t_u8) + -> + true); + f_forward_checked + = + fun (start: Core.Primitive.t_u8) (n: Core.Primitive.t_usize) -> + match + Core.Convert.f_try_from #Core.Primitive.t_u8 + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + n + with + | Core.Result.Result_Ok n -> Core.Num.impl_6__checked_add start n + | Core.Result.Result_Err _ -> + Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: t_Step Core.Primitive.t_u16 = + { + _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; + _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; + f_steps_between_pre = (fun (start: Core.Primitive.t_u16) (v_end: Core.Primitive.t_u16) -> true); + f_steps_between_post + = + (fun + (start: Core.Primitive.t_u16) + (v_end: Core.Primitive.t_u16) + (out: Core.Option.t_Option Core.Primitive.t_usize) + -> + true); + f_steps_between + = + (fun (start: Core.Primitive.t_u16) (v_end: Core.Primitive.t_u16) -> + if start <=. v_end + then + Core.Option.Option_Some + (Core.Convert.f_into #Core.Primitive.t_u16 + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + ((Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve v_end + <: + Core.Primitive.t_u16) -! + (Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve start + <: + Core.Primitive.t_u16) + <: + Core.Primitive.t_u16)) + <: + Core.Option.t_Option Core.Primitive.t_usize + else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); + f_forward_checked_pre = (fun (start: Core.Primitive.t_u16) (n: Core.Primitive.t_usize) -> true); + f_forward_checked_post + = + (fun + (start: Core.Primitive.t_u16) + (n: Core.Primitive.t_usize) + (out: Core.Option.t_Option Core.Primitive.t_u16) + -> + true); + f_forward_checked + = + fun (start: Core.Primitive.t_u16) (n: Core.Primitive.t_usize) -> + match + Core.Convert.f_try_from #Core.Primitive.t_u16 + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + n + with + | Core.Result.Result_Ok n -> Core.Num.impl_7__checked_add start n + | Core.Result.Result_Err _ -> + Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: t_Step Core.Primitive.t_u32 = + { + _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; + _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; + f_steps_between_pre = (fun (start: Core.Primitive.t_u32) (v_end: Core.Primitive.t_u32) -> true); + f_steps_between_post + = + (fun + (start: Core.Primitive.t_u32) + (v_end: Core.Primitive.t_u32) + (out: Core.Option.t_Option Core.Primitive.t_usize) + -> + true); + f_steps_between + = + (fun (start: Core.Primitive.t_u32) (v_end: Core.Primitive.t_u32) -> + if start <=. v_end + then + Core.Option.Option_Some + (Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + ((Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve v_end + <: + Core.Primitive.t_u32) -! + (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve start + <: + Core.Primitive.t_u32) + <: + Core.Primitive.t_u32)) + <: + Core.Option.t_Option Core.Primitive.t_usize + else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); + f_forward_checked_pre = (fun (start: Core.Primitive.t_u32) (n: Core.Primitive.t_usize) -> true); + f_forward_checked_post + = + (fun + (start: Core.Primitive.t_u32) + (n: Core.Primitive.t_usize) + (out: Core.Option.t_Option Core.Primitive.t_u32) + -> + true); + f_forward_checked + = + fun (start: Core.Primitive.t_u32) (n: Core.Primitive.t_usize) -> + match + Core.Convert.f_try_from #Core.Primitive.t_u32 + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + n + with + | Core.Result.Result_Ok n -> Core.Num.impl_8__checked_add start n + | Core.Result.Result_Err _ -> + Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: t_Step Core.Primitive.t_u64 = + { + _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; + _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; + f_steps_between_pre = (fun (start: Core.Primitive.t_u64) (v_end: Core.Primitive.t_u64) -> true); + f_steps_between_post + = + (fun + (start: Core.Primitive.t_u64) + (v_end: Core.Primitive.t_u64) + (out: Core.Option.t_Option Core.Primitive.t_usize) + -> + true); + f_steps_between + = + (fun (start: Core.Primitive.t_u64) (v_end: Core.Primitive.t_u64) -> + if start <=. v_end + then + Core.Option.Option_Some + (Core.Convert.f_into #Core.Primitive.t_u64 + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + ((Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve v_end + <: + Core.Primitive.t_u64) -! + (Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve start + <: + Core.Primitive.t_u64) + <: + Core.Primitive.t_u64)) + <: + Core.Option.t_Option Core.Primitive.t_usize + else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); + f_forward_checked_pre = (fun (start: Core.Primitive.t_u64) (n: Core.Primitive.t_usize) -> true); + f_forward_checked_post + = + (fun + (start: Core.Primitive.t_u64) + (n: Core.Primitive.t_usize) + (out: Core.Option.t_Option Core.Primitive.t_u64) + -> + true); + f_forward_checked + = + fun (start: Core.Primitive.t_u64) (n: Core.Primitive.t_usize) -> + match + Core.Convert.f_try_from #Core.Primitive.t_u64 + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + n + with + | Core.Result.Result_Ok n -> Core.Num.impl_9__checked_add start n + | Core.Result.Result_Err _ -> + Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: t_Step Core.Primitive.t_u128 = + { + _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; + _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; + f_steps_between_pre + = + (fun (start: Core.Primitive.t_u128) (v_end: Core.Primitive.t_u128) -> true); + f_steps_between_post + = + (fun + (start: Core.Primitive.t_u128) + (v_end: Core.Primitive.t_u128) + (out: Core.Option.t_Option Core.Primitive.t_usize) + -> + true); + f_steps_between + = + (fun (start: Core.Primitive.t_u128) (v_end: Core.Primitive.t_u128) -> + if start <=. v_end + then + Core.Result.impl__ok #Core.Primitive.t_usize + #Core.Convert.t_Infallible + (Core.Convert.f_try_from #Core.Primitive.t_usize + #Core.Primitive.t_u128 + #FStar.Tactics.Typeclasses.solve + ((Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve v_end + <: + Core.Primitive.t_u128) -! + (Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve start + <: + Core.Primitive.t_u128) + <: + Core.Primitive.t_u128) + <: + Core.Result.t_Result Core.Primitive.t_usize Core.Convert.t_Infallible) + else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); + f_forward_checked_pre = (fun (start: Core.Primitive.t_u128) (n: Core.Primitive.t_usize) -> true); + f_forward_checked_post + = + (fun + (start: Core.Primitive.t_u128) + (n: Core.Primitive.t_usize) + (out: Core.Option.t_Option Core.Primitive.t_u128) + -> + true); + f_forward_checked + = + fun (start: Core.Primitive.t_u128) (n: Core.Primitive.t_usize) -> + Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: t_Step Core.Primitive.t_usize = + { + _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; + _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; + f_steps_between_pre + = + (fun (start: Core.Primitive.t_usize) (v_end: Core.Primitive.t_usize) -> true); + f_steps_between_post + = + (fun + (start: Core.Primitive.t_usize) + (v_end: Core.Primitive.t_usize) + (out: Core.Option.t_Option Core.Primitive.t_usize) + -> + true); + f_steps_between + = + (fun (start: Core.Primitive.t_usize) (v_end: Core.Primitive.t_usize) -> + if start <=. v_end + then + Core.Option.Option_Some + (Core.Convert.f_into #Core.Primitive.t_usize + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + ((Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve v_end + <: + Core.Primitive.t_usize) -! + (Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve start + <: + Core.Primitive.t_usize) + <: + Core.Primitive.t_usize)) + <: + Core.Option.t_Option Core.Primitive.t_usize + else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); + f_forward_checked_pre + = + (fun (start: Core.Primitive.t_usize) (n: Core.Primitive.t_usize) -> true); + f_forward_checked_post + = + (fun + (start: Core.Primitive.t_usize) + (n: Core.Primitive.t_usize) + (out: Core.Option.t_Option Core.Primitive.t_usize) + -> + true); + f_forward_checked + = + fun (start: Core.Primitive.t_usize) (n: Core.Primitive.t_usize) -> + match + Core.Convert.f_try_from #Core.Primitive.t_usize + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + n + with + | Core.Result.Result_Ok n -> Core.Num.impl_11__checked_add start n + | Core.Result.Result_Err _ -> + Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize + } diff --git a/proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst b/proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst new file mode 100644 index 000000000..0f9aeaf5b --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst @@ -0,0 +1,37 @@ +module Core.Iter.Traits.Collect +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_IntoIterator (v_Self: Type0) = { + f_Item:Type0; + f_IntoIter:Type0; + f_IntoIter_11554253487815790481:Core.Iter.Traits.Iterator.t_Iterator f_IntoIter; + f_into_iter_pre:v_Self -> Type0; + f_into_iter_post:v_Self -> f_IntoIter -> Type0; + f_into_iter:x0: v_Self + -> Prims.Pure f_IntoIter (f_into_iter_pre x0) (fun result -> f_into_iter_post x0 result) +} + +class t_FromIterator (v_Self: Type0) (v_A: Type0) = { + f_from_iter_pre:#v_T: Type0 -> {| i1: t_IntoIterator v_T |} -> v_T -> Type0; + f_from_iter_post:#v_T: Type0 -> {| i1: t_IntoIterator v_T |} -> v_T -> v_Self -> Type0; + f_from_iter:#v_T: Type0 -> {| i1: t_IntoIterator v_T |} -> x0: v_T + -> Prims.Pure v_Self + (f_from_iter_pre #v_T #i1 x0) + (fun result -> f_from_iter_post #v_T #i1 x0 result) +} + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl + (#v_I: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Iter.Traits.Iterator.t_Iterator v_I) + : t_IntoIterator v_I = + { + f_Item = i1.f_Item; + f_IntoIter = v_I; + f_IntoIter_11554253487815790481 = FStar.Tactics.Typeclasses.solve; + f_into_iter_pre = (fun (self: v_I) -> true); + f_into_iter_post = (fun (self: v_I) (out: v_I) -> true); + f_into_iter = fun (self: v_I) -> self + } diff --git a/proof-libs/fstar/generated-core/Core.Iter.Traits.Exact_size.fst b/proof-libs/fstar/generated-core/Core.Iter.Traits.Exact_size.fst new file mode 100644 index 000000000..6454d73cb --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Iter.Traits.Exact_size.fst @@ -0,0 +1,16 @@ +module Core.Iter.Traits.Exact_size +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_ExactSizeIterator (v_Self: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_15444444506782437531:Core.Iter.Traits.Iterator.t_Iterator + v_Self; + f_len_pre:v_Self -> Type0; + f_len_post:v_Self -> usize -> Type0; + f_len:x0: v_Self -> Prims.Pure usize (f_len_pre x0) (fun result -> f_len_post x0 result); + f_is_empty_pre:v_Self -> Type0; + f_is_empty_post:v_Self -> bool -> Type0; + f_is_empty:x0: v_Self + -> Prims.Pure bool (f_is_empty_pre x0) (fun result -> f_is_empty_post x0 result) +} diff --git a/proof-libs/fstar/generated-core/Core.Iter.Traits.Iterator.fst b/proof-libs/fstar/generated-core/Core.Iter.Traits.Iterator.fst new file mode 100644 index 000000000..786522b38 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Iter.Traits.Iterator.fst @@ -0,0 +1,47 @@ +module Core.Iter.Traits.Iterator +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_Iterator (v_Self: Type0) = { + f_Item:Type0; + f_next_pre:v_Self -> Type0; + f_next_post:v_Self -> (v_Self & Core.Option.t_Option f_Item) -> Type0; + f_next:x0: v_Self + -> Prims.Pure (v_Self & Core.Option.t_Option f_Item) + (f_next_pre x0) + (fun result -> f_next_post x0 result); + f_size_hint_pre:v_Self -> Type0; + f_size_hint_post:v_Self -> (usize & Core.Option.t_Option usize) -> Type0; + f_size_hint:x0: v_Self + -> Prims.Pure (usize & Core.Option.t_Option usize) + (f_size_hint_pre x0) + (fun result -> f_size_hint_post x0 result); + f_fold_pre: + #v_B: Type0 -> + #v_F: Type0 -> + {| i4: Core.Ops.Function.t_FnMut v_F (v_B & f_Item) |} -> + v_Self -> + v_B -> + v_F + -> Type0; + f_fold_post: + #v_B: Type0 -> + #v_F: Type0 -> + {| i4: Core.Ops.Function.t_FnMut v_F (v_B & f_Item) |} -> + v_Self -> + v_B -> + v_F -> + v_B + -> Type0; + f_fold: + #v_B: Type0 -> + #v_F: Type0 -> + {| i4: Core.Ops.Function.t_FnMut v_F (v_B & f_Item) |} -> + x0: v_Self -> + x1: v_B -> + x2: v_F + -> Prims.Pure v_B + (f_fold_pre #v_B #v_F #i4 x0 x1 x2) + (fun result -> f_fold_post #v_B #v_F #i4 x0 x1 x2 result) +} diff --git a/proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst b/proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst new file mode 100644 index 000000000..88ab37d62 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst @@ -0,0 +1,21 @@ +module Core.Iter.Traits.Marker +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_TrustedFused (v_Self: Type0) = { __marker_trait_t_TrustedFused:Prims.unit } + +class t_FusedIterator (v_Self: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_15444444506782437531:Core.Iter.Traits.Iterator.t_Iterator + v_Self +} + +class t_TrustedLen (v_Self: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_15444444506782437531:Core.Iter.Traits.Iterator.t_Iterator + v_Self +} + +class t_TrustedStep (v_Self: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_13722385431118852294:Core.Iter.Range.t_Step v_Self; + [@@@ FStar.Tactics.Typeclasses.no_method]_super_11581440318597584651:Core.Marker.t_Copy v_Self +} diff --git a/proof-libs/fstar/generated-core/Core.Marker.fst b/proof-libs/fstar/generated-core/Core.Marker.fst index c9be62034..4c409c9a9 100644 --- a/proof-libs/fstar/generated-core/Core.Marker.fst +++ b/proof-libs/fstar/generated-core/Core.Marker.fst @@ -3,10 +3,12 @@ module Core.Marker open Core open FStar.Mul +class t_Copy (v_Self: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_9442900250278684536:Core.Clone.t_Clone v_Self +} + class t_Destruct (v_Self: Type0) = { __marker_trait_t_Destruct:Prims.unit } class t_Sized (v_Self: Type0) = { __marker_trait_t_Sized:Prims.unit } -class t_Copy (v_Self: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_9442900250278684536:Core.Clone.t_Clone v_Self -} +class t_Tuple (v_Self: Type0) = { __marker_trait_t_Tuple:Prims.unit } diff --git a/proof-libs/fstar/generated-core/Core.Num.fst b/proof-libs/fstar/generated-core/Core.Num.fst index 13466431a..0ea0d9393 100644 --- a/proof-libs/fstar/generated-core/Core.Num.fst +++ b/proof-libs/fstar/generated-core/Core.Num.fst @@ -3,198 +3,1311 @@ module Core.Num open Core open FStar.Mul -open Core.Ops.Arith +let impl_10__MAX: Core.Primitive.t_u128 = + Core.Primitive.C_u128 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_u128 -let impl_4__MAX: Core.Primitive.t_u128 = - Core.Primitive.C_u128 Core.Int.f_MAX <: Core.Primitive.t_u128 +let impl_10__MIN: Core.Primitive.t_u128 = + Core.Primitive.C_u128 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_u128 -let impl_4__MIN: Core.Primitive.t_u128 = - Core.Primitive.C_u128 Core.Int.f_MIN <: Core.Primitive.t_u128 +let impl_10__from_le (x: Core.Primitive.t_u128) : Core.Primitive.t_u128 = x -let impl_1__MAX: Core.Primitive.t_u16 = Core.Primitive.C_u16 Core.Int.f_MAX <: Core.Primitive.t_u16 +let impl_10__to_le (self: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self -let impl_1__MIN: Core.Primitive.t_u16 = Core.Primitive.C_u16 Core.Int.f_MIN <: Core.Primitive.t_u16 +let impl_7__MAX: Core.Primitive.t_u16 = + Core.Primitive.C_u16 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_u16 -let impl__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Int.impl_21__BITS <: Core.Primitive.t_u32 +let impl_7__MIN: Core.Primitive.t_u16 = + Core.Primitive.C_u16 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_u16 -let impl_1__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Int.impl_48__BITS <: Core.Primitive.t_u32 +let impl_7__from_le (x: Core.Primitive.t_u16) : Core.Primitive.t_u16 = x -let impl_2__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Int.impl_75__BITS <: Core.Primitive.t_u32 +let impl_7__to_le (self: Core.Primitive.t_u16) : Core.Primitive.t_u16 = self -let impl_2__MAX: Core.Primitive.t_u32 = Core.Primitive.C_u32 Core.Int.f_MAX <: Core.Primitive.t_u32 +let impl__i8__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_97__BITS <: Core.Primitive.t_u32 -let impl_2__MIN: Core.Primitive.t_u32 = Core.Primitive.C_u32 Core.Int.f_MIN <: Core.Primitive.t_u32 +let impl__i16__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_83__BITS <: Core.Primitive.t_u32 -let impl_3__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Int.impl_102__BITS <: Core.Primitive.t_u32 +let impl__i32__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_69__BITS <: Core.Primitive.t_u32 -let impl_4__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Int.impl_129__BITS <: Core.Primitive.t_u32 +let impl__i64__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_55__BITS <: Core.Primitive.t_u32 -let impl_5__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Int.impl_102__BITS <: Core.Primitive.t_u32 +let impl__i128__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_41__BITS <: Core.Primitive.t_u32 -let impl_3__MAX: Core.Primitive.t_u64 = Core.Primitive.C_u64 Core.Int.f_MAX <: Core.Primitive.t_u64 +let impl__isize__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_55__BITS <: Core.Primitive.t_u32 -let impl_3__MIN: Core.Primitive.t_u64 = Core.Primitive.C_u64 Core.Int.f_MIN <: Core.Primitive.t_u64 +let impl_6__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_219__BITS <: Core.Primitive.t_u32 -let impl__MAX: Core.Primitive.t_u8 = Core.Primitive.C_u8 Core.Int.f_MAX <: Core.Primitive.t_u8 +let impl_7__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_192__BITS <: Core.Primitive.t_u32 -let impl__MIN: Core.Primitive.t_u8 = Core.Primitive.C_u8 Core.Int.f_MIN <: Core.Primitive.t_u8 +let impl_8__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_165__BITS <: Core.Primitive.t_u32 -let impl_5__MAX: Core.Primitive.t_usize = - Core.Primitive.C_usize Core.Int.f_MAX <: Core.Primitive.t_usize +let impl_8__MAX: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_u32 -let impl_5__MIN: Core.Primitive.t_usize = - Core.Primitive.C_usize Core.Int.f_MIN <: Core.Primitive.t_usize +let impl_8__MIN: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_u32 -let impl__overflowing_add (self rhs: Core.Primitive.t_u8) : (Core.Primitive.t_u8 & bool) = +let impl_8__from_le (x: Core.Primitive.t_u32) : Core.Primitive.t_u32 = x + +let impl_8__to_le (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self + +let impl_9__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_138__BITS <: Core.Primitive.t_u32 + +let impl_10__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_111__BITS <: Core.Primitive.t_u32 + +let impl_11__BITS: Core.Primitive.t_u32 = + Core.Primitive.C_u32 Core.Base_interface.Int.impl_138__BITS <: Core.Primitive.t_u32 + +let impl_9__MAX: Core.Primitive.t_u64 = + Core.Primitive.C_u64 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_u64 + +let impl_9__MIN: Core.Primitive.t_u64 = + Core.Primitive.C_u64 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_u64 + +let impl_9__from_le (x: Core.Primitive.t_u64) : Core.Primitive.t_u64 = x + +let impl_9__to_le (self: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self + +let impl_6__MAX: Core.Primitive.t_u8 = + Core.Primitive.C_u8 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_u8 + +let impl_6__MIN: Core.Primitive.t_u8 = + Core.Primitive.C_u8 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_u8 + +let impl_6__from_le (x: Core.Primitive.t_u8) : Core.Primitive.t_u8 = x + +let impl_6__to_le (self: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self + +let impl_11__MAX: Core.Primitive.t_usize = + Core.Primitive.C_usize Core.Base_interface.Int.f_MAX <: Core.Primitive.t_usize + +let impl_11__MIN: Core.Primitive.t_usize = + Core.Primitive.C_usize Core.Base_interface.Int.f_MIN <: Core.Primitive.t_usize + +let impl_11__from_le (x: Core.Primitive.t_usize) : Core.Primitive.t_usize = x + +let impl_11__to_le (self: Core.Primitive.t_usize) : Core.Primitive.t_usize = self + +let impl_6__checked_add (self rhs: Core.Primitive.t_u8) : Core.Option.t_Option Core.Primitive.t_u8 = + Core.Option.Option_Some (Core.Intrinsics.unchecked_add_u8 self rhs) + <: + Core.Option.t_Option Core.Primitive.t_u8 + +let impl_7__checked_add (self rhs: Core.Primitive.t_u16) : Core.Option.t_Option Core.Primitive.t_u16 = + Core.Option.Option_Some (Core.Intrinsics.unchecked_add_u16 self rhs) + <: + Core.Option.t_Option Core.Primitive.t_u16 + +let impl_8__checked_add (self rhs: Core.Primitive.t_u32) : Core.Option.t_Option Core.Primitive.t_u32 = + Core.Option.Option_Some (Core.Intrinsics.unchecked_add_u32 self rhs) + <: + Core.Option.t_Option Core.Primitive.t_u32 + +let impl_9__checked_add (self rhs: Core.Primitive.t_u64) : Core.Option.t_Option Core.Primitive.t_u64 = + Core.Option.Option_Some (Core.Intrinsics.unchecked_add_u64 self rhs) + <: + Core.Option.t_Option Core.Primitive.t_u64 + +let impl_10__checked_add (self rhs: Core.Primitive.t_u128) + : Core.Option.t_Option Core.Primitive.t_u128 = + Core.Option.Option_Some (Core.Intrinsics.unchecked_add_u128 self rhs) + <: + Core.Option.t_Option Core.Primitive.t_u128 + +let impl_11__checked_add (self rhs: Core.Primitive.t_usize) + : Core.Option.t_Option Core.Primitive.t_usize = + Core.Option.Option_Some (Core.Intrinsics.unchecked_add_usize self rhs) + <: + Core.Option.t_Option Core.Primitive.t_usize + +let impl__i128__MAX: Core.Primitive.t_i128 = + Core.Primitive.C_i128 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_i128 + +let impl__i128__MIN: Core.Primitive.t_i128 = + Core.Primitive.C_i128 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_i128 + +let impl__i16__MAX: Core.Primitive.t_i16 = + Core.Primitive.C_i16 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_i16 + +let impl__i16__MIN: Core.Primitive.t_i16 = + Core.Primitive.C_i16 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_i16 + +let impl__i32__MAX: Core.Primitive.t_i32 = + Core.Primitive.C_i32 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_i32 + +let impl__i32__MIN: Core.Primitive.t_i32 = + Core.Primitive.C_i32 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_i32 + +let impl__i64__MAX: Core.Primitive.t_i64 = + Core.Primitive.C_i64 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_i64 + +let impl__i64__MIN: Core.Primitive.t_i64 = + Core.Primitive.C_i64 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_i64 + +let impl__i8__MAX: Core.Primitive.t_i8 = + Core.Primitive.C_i8 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_i8 + +let impl__i8__MIN: Core.Primitive.t_i8 = + Core.Primitive.C_i8 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_i8 + +let impl__isize__MAX: Core.Primitive.t_isize = + Core.Primitive.C_isize Core.Base_interface.Int.f_MAX <: Core.Primitive.t_isize + +let impl__isize__MIN: Core.Primitive.t_isize = + Core.Primitive.C_isize Core.Base_interface.Int.f_MIN <: Core.Primitive.t_isize + +let impl__i8__is_negative (self: Core.Primitive.t_i8) : bool = + self <. + (Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y + <: + Core.Primitive.t_i8) + +let impl__i8__is_positive (self: Core.Primitive.t_i8) : bool = + self >. + (Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y + <: + Core.Primitive.t_i8) + +let impl__i8__signum (self: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + if + (Core.Clone.f_clone #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve self + <: + Core.Primitive.t_i8) <. + (Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y + <: + Core.Primitive.t_i8) + then Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve (-1y) + else + if + self =. + (Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y + <: + Core.Primitive.t_i8) + then Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y + else Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 1y + +let impl__i16__is_negative (self: Core.Primitive.t_i16) : bool = + self <. + (Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s + <: + Core.Primitive.t_i16) + +let impl__i16__is_positive (self: Core.Primitive.t_i16) : bool = + self >. + (Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s + <: + Core.Primitive.t_i16) + +let impl__i16__signum (self: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + if + (Core.Clone.f_clone #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve self + <: + Core.Primitive.t_i16) <. + (Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s + <: + Core.Primitive.t_i16) + then Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve (-1s) + else + if + self =. + (Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s + <: + Core.Primitive.t_i16) + then Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s + else Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 1s + +let impl__i32__is_negative (self: Core.Primitive.t_i32) : bool = + self <. + (Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l + <: + Core.Primitive.t_i32) + +let impl__i32__is_positive (self: Core.Primitive.t_i32) : bool = + self >. + (Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l + <: + Core.Primitive.t_i32) + +let impl__i32__signum (self: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + if + (Core.Clone.f_clone #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve self + <: + Core.Primitive.t_i32) <. + (Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l + <: + Core.Primitive.t_i32) + then Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve (-1l) + else + if + self =. + (Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l + <: + Core.Primitive.t_i32) + then Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l + else Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 1l + +let impl__i64__is_negative (self: Core.Primitive.t_i64) : bool = + self <. + (Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L + <: + Core.Primitive.t_i64) + +let impl__i64__is_positive (self: Core.Primitive.t_i64) : bool = + self >. + (Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L + <: + Core.Primitive.t_i64) + +let impl__i64__signum (self: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + if + (Core.Clone.f_clone #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve self + <: + Core.Primitive.t_i64) <. + (Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L + <: + Core.Primitive.t_i64) + then Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve (-1L) + else + if + self =. + (Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L + <: + Core.Primitive.t_i64) + then Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L + else Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 1L + +let impl__i128__is_negative (self: Core.Primitive.t_i128) : bool = + self <. + (Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) + <: + Core.Primitive.t_i128) + +let impl__i128__is_positive (self: Core.Primitive.t_i128) : bool = + self >. + (Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) + <: + Core.Primitive.t_i128) + +let impl__i128__signum (self: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + if + (Core.Clone.f_clone #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve self + <: + Core.Primitive.t_i128) <. + (Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) + <: + Core.Primitive.t_i128) + then + Core.Convert.f_into #i128 + #Core.Primitive.t_i128 + #FStar.Tactics.Typeclasses.solve + (pub_i128 (-1)) + else + if + self =. + (Core.Convert.f_into #i128 + #Core.Primitive.t_i128 + #FStar.Tactics.Typeclasses.solve + (pub_i128 0) + <: + Core.Primitive.t_i128) + then + Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) + else + Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 1) + +let impl__isize__is_negative (self: Core.Primitive.t_isize) : bool = + self <. + (Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) + <: + Core.Primitive.t_isize) + +let impl__isize__is_positive (self: Core.Primitive.t_isize) : bool = + self >. + (Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) + <: + Core.Primitive.t_isize) + +let impl__isize__signum (self: Core.Primitive.t_isize) : Core.Primitive.t_isize = + if + (Core.Clone.f_clone #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve self + <: + Core.Primitive.t_isize) <. + (Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) + <: + Core.Primitive.t_isize) + then + Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz (-1)) + else + if + self =. + (Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) + <: + Core.Primitive.t_isize) + then Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) + else Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 1) + +let impl__i8__wrapping_add (self rhs: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + Core.Intrinsics.wrapping_add_i8 self rhs + +let impl__i8__wrapping_sub (self rhs: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + Core.Intrinsics.wrapping_sub_i8 self rhs + +let impl__i8__wrapping_neg (self: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + impl__i8__wrapping_sub (Core.Convert.f_into #i8 + #Core.Primitive.t_i8 + #FStar.Tactics.Typeclasses.solve + 0y + <: + Core.Primitive.t_i8) + self + +let impl__i8__wrapping_abs (self: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + if + impl__i8__is_negative (Core.Clone.f_clone #Core.Primitive.t_i8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_i8) + then impl__i8__wrapping_neg self + else self + +let impl__i16__wrapping_add (self rhs: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + Core.Intrinsics.wrapping_add_i16 self rhs + +let impl__i16__wrapping_sub (self rhs: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + Core.Intrinsics.wrapping_sub_i16 self rhs + +let impl__i16__wrapping_neg (self: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + impl__i16__wrapping_sub (Core.Convert.f_into #i16 + #Core.Primitive.t_i16 + #FStar.Tactics.Typeclasses.solve + 0s + <: + Core.Primitive.t_i16) + self + +let impl__i16__wrapping_abs (self: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + if + impl__i16__is_negative (Core.Clone.f_clone #Core.Primitive.t_i16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_i16) + then impl__i16__wrapping_neg self + else self + +let impl__i32__wrapping_add (self rhs: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + Core.Intrinsics.wrapping_add_i32 self rhs + +let impl__i32__wrapping_sub (self rhs: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + Core.Intrinsics.wrapping_sub_i32 self rhs + +let impl__i32__wrapping_neg (self: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + impl__i32__wrapping_sub (Core.Convert.f_into #i32 + #Core.Primitive.t_i32 + #FStar.Tactics.Typeclasses.solve + 0l + <: + Core.Primitive.t_i32) + self + +let impl__i32__wrapping_abs (self: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + if + impl__i32__is_negative (Core.Clone.f_clone #Core.Primitive.t_i32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_i32) + then impl__i32__wrapping_neg self + else self + +let impl__i64__wrapping_add (self rhs: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + Core.Intrinsics.wrapping_add_i64 self rhs + +let impl__i64__wrapping_sub (self rhs: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + Core.Intrinsics.wrapping_sub_i64 self rhs + +let impl__i64__wrapping_neg (self: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + impl__i64__wrapping_sub (Core.Convert.f_into #i64 + #Core.Primitive.t_i64 + #FStar.Tactics.Typeclasses.solve + 0L + <: + Core.Primitive.t_i64) + self + +let impl__i64__wrapping_abs (self: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + if + impl__i64__is_negative (Core.Clone.f_clone #Core.Primitive.t_i64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_i64) + then impl__i64__wrapping_neg self + else self + +let impl__i128__wrapping_add (self rhs: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + Core.Intrinsics.wrapping_add_i128 self rhs + +let impl__i128__wrapping_sub (self rhs: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + Core.Intrinsics.wrapping_sub_i128 self rhs + +let impl__i128__wrapping_neg (self: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + impl__i128__wrapping_sub (Core.Convert.f_into #i128 + #Core.Primitive.t_i128 + #FStar.Tactics.Typeclasses.solve + (pub_i128 0) + <: + Core.Primitive.t_i128) + self + +let impl__i128__wrapping_abs (self: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + if + impl__i128__is_negative (Core.Clone.f_clone #Core.Primitive.t_i128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_i128) + then impl__i128__wrapping_neg self + else self + +let impl__isize__wrapping_add (self rhs: Core.Primitive.t_isize) : Core.Primitive.t_isize = + Core.Intrinsics.wrapping_add_isize self rhs + +let impl__isize__wrapping_sub (self rhs: Core.Primitive.t_isize) : Core.Primitive.t_isize = + Core.Intrinsics.wrapping_sub_isize self rhs + +let impl__isize__wrapping_neg (self: Core.Primitive.t_isize) : Core.Primitive.t_isize = + impl__isize__wrapping_sub (Core.Convert.f_into #isize + #Core.Primitive.t_isize + #FStar.Tactics.Typeclasses.solve + (isz 0) + <: + Core.Primitive.t_isize) + self + +let impl__isize__wrapping_abs (self: Core.Primitive.t_isize) : Core.Primitive.t_isize = + if + impl__isize__is_negative (Core.Clone.f_clone #Core.Primitive.t_isize + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_isize) + then impl__isize__wrapping_neg self + else self + +let impl_6__checked_div (self rhs: Core.Primitive.t_u8) : Core.Option.t_Option Core.Primitive.t_u8 = + if + rhs =. + (Core.Convert.f_into #u8 #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve 0uy + <: + Core.Primitive.t_u8) + then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u8 + else + Core.Option.Option_Some (Core.Intrinsics.unchecked_div_u8 self rhs) + <: + Core.Option.t_Option Core.Primitive.t_u8 + +let impl_6__overflowing_add (self rhs: Core.Primitive.t_u8) : (Core.Primitive.t_u8 & bool) = Core.Intrinsics.add_with_overflow_u8 self rhs -let impl_1__overflowing_add (self rhs: Core.Primitive.t_u16) : (Core.Primitive.t_u16 & bool) = +let impl_7__checked_div (self rhs: Core.Primitive.t_u16) : Core.Option.t_Option Core.Primitive.t_u16 = + if + rhs =. + (Core.Convert.f_into #u16 #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve 0us + <: + Core.Primitive.t_u16) + then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u16 + else + Core.Option.Option_Some (Core.Intrinsics.unchecked_div_u16 self rhs) + <: + Core.Option.t_Option Core.Primitive.t_u16 + +let impl_7__overflowing_add (self rhs: Core.Primitive.t_u16) : (Core.Primitive.t_u16 & bool) = Core.Intrinsics.add_with_overflow_u16 self rhs -let impl_2__overflowing_add (self rhs: Core.Primitive.t_u32) : (Core.Primitive.t_u32 & bool) = +let impl_8__checked_div (self rhs: Core.Primitive.t_u32) : Core.Option.t_Option Core.Primitive.t_u32 = + if + rhs =. + (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul + <: + Core.Primitive.t_u32) + then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u32 + else + Core.Option.Option_Some (Core.Intrinsics.unchecked_div_u32 self rhs) + <: + Core.Option.t_Option Core.Primitive.t_u32 + +let impl_8__overflowing_add (self rhs: Core.Primitive.t_u32) : (Core.Primitive.t_u32 & bool) = Core.Intrinsics.add_with_overflow_u32 self rhs -let impl_3__overflowing_add (self rhs: Core.Primitive.t_u64) : (Core.Primitive.t_u64 & bool) = +let impl_9__checked_div (self rhs: Core.Primitive.t_u64) : Core.Option.t_Option Core.Primitive.t_u64 = + if + rhs =. + (Core.Convert.f_into #u64 #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve 0uL + <: + Core.Primitive.t_u64) + then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u64 + else + Core.Option.Option_Some (Core.Intrinsics.unchecked_div_u64 self rhs) + <: + Core.Option.t_Option Core.Primitive.t_u64 + +let impl_9__overflowing_add (self rhs: Core.Primitive.t_u64) : (Core.Primitive.t_u64 & bool) = Core.Intrinsics.add_with_overflow_u64 self rhs -let impl_4__overflowing_add (self rhs: Core.Primitive.t_u128) : (Core.Primitive.t_u128 & bool) = +let impl_10__checked_div (self rhs: Core.Primitive.t_u128) + : Core.Option.t_Option Core.Primitive.t_u128 = + if + rhs =. + (Core.Convert.f_into #u128 #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 0) + <: + Core.Primitive.t_u128) + then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u128 + else + Core.Option.Option_Some (Core.Intrinsics.unchecked_div_u128 self rhs) + <: + Core.Option.t_Option Core.Primitive.t_u128 + +let impl_10__overflowing_add (self rhs: Core.Primitive.t_u128) : (Core.Primitive.t_u128 & bool) = Core.Intrinsics.add_with_overflow_u128 self rhs -let impl_5__overflowing_add (self rhs: Core.Primitive.t_usize) : (Core.Primitive.t_usize & bool) = +let impl_11__checked_div (self rhs: Core.Primitive.t_usize) + : Core.Option.t_Option Core.Primitive.t_usize = + if + rhs =. + (Core.Convert.f_into #usize #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve (sz 0) + <: + Core.Primitive.t_usize) + then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize + else + Core.Option.Option_Some (Core.Intrinsics.unchecked_div_usize self rhs) + <: + Core.Option.t_Option Core.Primitive.t_usize + +let impl_11__overflowing_add (self rhs: Core.Primitive.t_usize) : (Core.Primitive.t_usize & bool) = Core.Intrinsics.add_with_overflow_usize self rhs -let impl__wrapping_add (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = +let impl_6__wrapping_add (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = Core.Intrinsics.wrapping_add_u8 self rhs -let impl__wrapping_mul (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = +let impl_6__wrapping_mul (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = Core.Intrinsics.wrapping_mul_u8 self rhs -let impl_1__wrapping_add (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = +let impl_7__wrapping_add (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = Core.Intrinsics.wrapping_add_u16 self rhs -let impl_1__wrapping_mul (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = +let impl_7__wrapping_mul (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = Core.Intrinsics.wrapping_mul_u16 self rhs -let impl_2__wrapping_add (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = +let impl_8__wrapping_add (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = Core.Intrinsics.wrapping_add_u32 self rhs -let impl_2__wrapping_mul (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = +let impl_8__wrapping_mul (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = Core.Intrinsics.wrapping_mul_u32 self rhs -let impl_3__wrapping_add (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = +let impl_9__wrapping_add (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = Core.Intrinsics.wrapping_add_u64 self rhs -let impl_3__wrapping_mul (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = +let impl_9__wrapping_mul (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = Core.Intrinsics.wrapping_mul_u64 self rhs -let impl_4__wrapping_add (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = +let impl_10__wrapping_add (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = Core.Intrinsics.wrapping_add_u128 self rhs -let impl_4__wrapping_mul (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = +let impl_10__wrapping_mul (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = Core.Intrinsics.wrapping_mul_u128 self rhs -let impl_5__wrapping_add (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = +let impl_11__wrapping_add (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = Core.Intrinsics.wrapping_add_usize self rhs -let impl_5__wrapping_mul (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = +let impl_11__wrapping_mul (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = Core.Intrinsics.wrapping_mul_usize self rhs -let impl__wrapping_sub (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = +let impl__i8__abs (self: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + if + impl__i8__is_negative (Core.Clone.f_clone #Core.Primitive.t_i8 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_i8) + then Core.Ops.Arith.f_neg #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve self + else self + +let impl__i16__abs (self: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + if + impl__i16__is_negative (Core.Clone.f_clone #Core.Primitive.t_i16 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_i16) + then Core.Ops.Arith.f_neg #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve self + else self + +let impl__i32__abs (self: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + if + impl__i32__is_negative (Core.Clone.f_clone #Core.Primitive.t_i32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_i32) + then Core.Ops.Arith.f_neg #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve self + else self + +let impl__i64__abs (self: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + if + impl__i64__is_negative (Core.Clone.f_clone #Core.Primitive.t_i64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_i64) + then Core.Ops.Arith.f_neg #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve self + else self + +let impl__i128__abs (self: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + if + impl__i128__is_negative (Core.Clone.f_clone #Core.Primitive.t_i128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_i128) + then Core.Ops.Arith.f_neg #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve self + else self + +let impl__isize__abs (self: Core.Primitive.t_isize) : Core.Primitive.t_isize = + if + impl__isize__is_negative (Core.Clone.f_clone #Core.Primitive.t_isize + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Primitive.t_isize) + then Core.Ops.Arith.f_neg #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve self + else self + +let impl_6__wrapping_sub (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = Core.Intrinsics.wrapping_sub_u8 self rhs -let impl__wrapping_neg (self: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - impl__wrapping_sub (Core.Primitive.C_u8 Core.Int.f_ZERO <: Core.Primitive.t_u8) self +let impl_6__wrapping_neg (self: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + impl_6__wrapping_sub (Core.Primitive.C_u8 Core.Base_interface.Int.f_ZERO <: Core.Primitive.t_u8) + self -let impl_1__wrapping_sub (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = +let impl_7__wrapping_sub (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = Core.Intrinsics.wrapping_sub_u16 self rhs -let impl_1__wrapping_neg (self: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - impl_1__wrapping_sub (Core.Primitive.C_u16 Core.Int.f_ZERO <: Core.Primitive.t_u16) self +let impl_7__wrapping_neg (self: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + impl_7__wrapping_sub (Core.Primitive.C_u16 Core.Base_interface.Int.f_ZERO <: Core.Primitive.t_u16) + self -let impl_2__wrapping_sub (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = +let impl_8__wrapping_sub (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = Core.Intrinsics.wrapping_sub_u32 self rhs -let impl_2__wrapping_neg (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - impl_2__wrapping_sub (Core.Primitive.C_u32 Core.Int.f_ZERO <: Core.Primitive.t_u32) self +let impl_8__wrapping_neg (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + impl_8__wrapping_sub (Core.Primitive.C_u32 Core.Base_interface.Int.f_ZERO <: Core.Primitive.t_u32) + self -let impl_3__wrapping_sub (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = +let impl_9__wrapping_sub (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = Core.Intrinsics.wrapping_sub_u64 self rhs -let impl_3__wrapping_neg (self: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - impl_3__wrapping_sub (Core.Primitive.C_u64 Core.Int.f_ZERO <: Core.Primitive.t_u64) self +let impl_9__wrapping_neg (self: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + impl_9__wrapping_sub (Core.Primitive.C_u64 Core.Base_interface.Int.f_ZERO <: Core.Primitive.t_u64) + self -let impl_4__wrapping_sub (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = +let impl_10__wrapping_sub (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = Core.Intrinsics.wrapping_sub_u128 self rhs -let impl_4__wrapping_neg (self: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - impl_4__wrapping_sub (Core.Primitive.C_u128 Core.Int.f_ZERO <: Core.Primitive.t_u128) self +let impl_10__wrapping_neg (self: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + impl_10__wrapping_sub (Core.Primitive.C_u128 Core.Base_interface.Int.f_ZERO + <: + Core.Primitive.t_u128) + self -let impl_5__wrapping_sub (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = +let impl_11__wrapping_sub (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = Core.Intrinsics.wrapping_sub_usize self rhs -let impl_5__wrapping_neg (self: Core.Primitive.t_usize) : Core.Primitive.t_usize = - impl_5__wrapping_sub (Core.Primitive.C_usize Core.Int.f_ZERO <: Core.Primitive.t_usize) self +let impl_11__wrapping_neg (self: Core.Primitive.t_usize) : Core.Primitive.t_usize = + impl_11__wrapping_sub (Core.Primitive.C_usize Core.Base_interface.Int.f_ZERO + <: + Core.Primitive.t_usize) + self -let impl__wrapping_rem (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self %! rhs +let impl_6__wrapping_div (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self /! rhs -let impl__wrapping_rem_euclid (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self %! rhs +let impl_6__wrapping_div_euclid (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self /! rhs -let impl__wrapping_div (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self /! rhs +let impl_7__wrapping_div (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = self /! rhs -let impl__wrapping_div_euclid (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self /! rhs +let impl_7__wrapping_div_euclid (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + self /! rhs -let impl_1__wrapping_rem (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = self %! rhs +let impl_8__wrapping_div (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self /! rhs -let impl_1__wrapping_rem_euclid (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - self %! rhs +let impl_8__wrapping_div_euclid (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + self /! rhs -let impl_1__wrapping_div (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = self /! rhs +let impl_9__wrapping_div (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self /! rhs -let impl_1__wrapping_div_euclid (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = +let impl_9__wrapping_div_euclid (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self /! rhs -let impl_2__wrapping_rem (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self %! rhs +let impl_10__wrapping_div (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self /! rhs -let impl_2__wrapping_rem_euclid (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - self %! rhs +let impl_10__wrapping_div_euclid (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + self /! rhs -let impl_2__wrapping_div (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self /! rhs +let impl_11__wrapping_div (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = self /! rhs -let impl_2__wrapping_div_euclid (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = +let impl_11__wrapping_div_euclid (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = self /! rhs -let impl_3__wrapping_rem (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self %! rhs +let impl_6__wrapping_rem (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self %! rhs -let impl_3__wrapping_rem_euclid (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - self %! rhs +let impl_6__wrapping_rem_euclid (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self %! rhs -let impl_3__wrapping_div (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self /! rhs +let impl_7__wrapping_rem (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = self %! rhs -let impl_3__wrapping_div_euclid (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - self /! rhs +let impl_7__wrapping_rem_euclid (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + self %! rhs -let impl_4__wrapping_rem (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self %! rhs +let impl_8__wrapping_rem (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self %! rhs -let impl_4__wrapping_rem_euclid (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = +let impl_8__wrapping_rem_euclid (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self %! rhs -let impl_4__wrapping_div (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self /! rhs +let impl_9__wrapping_rem (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self %! rhs -let impl_4__wrapping_div_euclid (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - self /! rhs +let impl_9__wrapping_rem_euclid (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + self %! rhs -let impl_5__wrapping_rem (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = self %! rhs +let impl_10__wrapping_rem (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self %! rhs -let impl_5__wrapping_rem_euclid (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = +let impl_10__wrapping_rem_euclid (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self %! rhs -let impl_5__wrapping_div (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = self /! rhs +let impl_11__wrapping_rem (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = self %! rhs -let impl_5__wrapping_div_euclid (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = - self /! rhs +let impl_11__wrapping_rem_euclid (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = + self %! rhs + +let impl_6__rotate_left (self: Core.Primitive.t_u8) (n: Core.Primitive.t_u32) : Core.Primitive.t_u8 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist1:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_u8 self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u8 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist1) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u8 Core.Primitive.t_u8) + +let impl_6__rotate_right (self: Core.Primitive.t_u8) (n: Core.Primitive.t_u32) : Core.Primitive.t_u8 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist2:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_u8 self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u8 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist2) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u8 Core.Primitive.t_u8) + +let impl_7__rotate_left (self: Core.Primitive.t_u16) (n: Core.Primitive.t_u32) + : Core.Primitive.t_u16 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist3:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_u16 self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u16 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist3) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u16 Core.Primitive.t_u16) + +let impl_7__rotate_right (self: Core.Primitive.t_u16) (n: Core.Primitive.t_u32) + : Core.Primitive.t_u16 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist4:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_u16 self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u16 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist4) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u16 Core.Primitive.t_u16) + +let impl_8__rotate_left (self n: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist5:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_u32 self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist5) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_8__rotate_right (self n: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist6:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_u32 self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist6) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_9__rotate_left (self: Core.Primitive.t_u64) (n: Core.Primitive.t_u32) + : Core.Primitive.t_u64 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist7:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_u64 self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u64 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist7) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u64 Core.Primitive.t_u64) + +let impl_9__rotate_right (self: Core.Primitive.t_u64) (n: Core.Primitive.t_u32) + : Core.Primitive.t_u64 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist8:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_u64 self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u64 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist8) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u64 Core.Primitive.t_u64) + +let impl_10__rotate_left (self: Core.Primitive.t_u128) (n: Core.Primitive.t_u32) + : Core.Primitive.t_u128 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist9:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_u128 self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u128 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist9) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u128 Core.Primitive.t_u128) + +let impl_10__rotate_right (self: Core.Primitive.t_u128) (n: Core.Primitive.t_u32) + : Core.Primitive.t_u128 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist10:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_u128 self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u128 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist10) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u128 Core.Primitive.t_u128) + +let impl_11__rotate_left (self: Core.Primitive.t_usize) (n: Core.Primitive.t_u32) + : Core.Primitive.t_usize = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist11:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_usize self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_usize Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist11) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_usize Core.Primitive.t_usize) + +let impl_11__rotate_right (self: Core.Primitive.t_usize) (n: Core.Primitive.t_u32) + : Core.Primitive.t_usize = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist12:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_usize self n) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_usize Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist12) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_usize Core.Primitive.t_usize) + +let impl_6__count_ones (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist13:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_u8 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist13) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_6__leading_zeros (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist14:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_u8 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist14) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_6__swap_bytes (self: Core.Primitive.t_u8) : Core.Primitive.t_u8 = + Core.Convert.f_into #Core.Primitive.t_u8 + #Core.Primitive.t_u8 + #FStar.Tactics.Typeclasses.solve + (Core.Intrinsics.bswap_u8 self <: Core.Primitive.t_u8) + +let impl_6__from_be (x: Core.Primitive.t_u8) : Core.Primitive.t_u8 = impl_6__swap_bytes x + +let impl_6__to_be (self: Core.Primitive.t_u8) : Core.Primitive.t_u8 = impl_6__swap_bytes self + +let impl_6__trailing_zeros (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist15:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_u8 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist15) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_7__count_ones (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist16:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_u16 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist16) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_7__leading_zeros (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist17:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_u16 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist17) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_7__swap_bytes (self: Core.Primitive.t_u16) : Core.Primitive.t_u16 = + Core.Convert.f_into #Core.Primitive.t_u16 + #Core.Primitive.t_u16 + #FStar.Tactics.Typeclasses.solve + (Core.Intrinsics.bswap_u16 self <: Core.Primitive.t_u16) + +let impl_7__from_be (x: Core.Primitive.t_u16) : Core.Primitive.t_u16 = impl_7__swap_bytes x + +let impl_7__to_be (self: Core.Primitive.t_u16) : Core.Primitive.t_u16 = impl_7__swap_bytes self + +let impl_7__trailing_zeros (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist18:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_u16 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist18) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_8__count_ones (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist19:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_u32 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist19) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_8__leading_zeros (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist20:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_u32 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist20) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_8__swap_bytes (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Core.Convert.f_into #Core.Primitive.t_u32 + #Core.Primitive.t_u32 + #FStar.Tactics.Typeclasses.solve + (Core.Intrinsics.bswap_u32 self <: Core.Primitive.t_u32) + +let impl_8__from_be (x: Core.Primitive.t_u32) : Core.Primitive.t_u32 = impl_8__swap_bytes x + +let impl_8__to_be (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = impl_8__swap_bytes self + +let impl_8__trailing_zeros (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist21:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_u32 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist21) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_9__count_ones (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist22:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_u64 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist22) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_9__leading_zeros (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist23:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_u64 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist23) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_9__swap_bytes (self: Core.Primitive.t_u64) : Core.Primitive.t_u64 = + Core.Convert.f_into #Core.Primitive.t_u64 + #Core.Primitive.t_u64 + #FStar.Tactics.Typeclasses.solve + (Core.Intrinsics.bswap_u64 self <: Core.Primitive.t_u64) + +let impl_9__from_be (x: Core.Primitive.t_u64) : Core.Primitive.t_u64 = impl_9__swap_bytes x + +let impl_9__to_be (self: Core.Primitive.t_u64) : Core.Primitive.t_u64 = impl_9__swap_bytes self + +let impl_9__trailing_zeros (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist24:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_u64 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist24) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_10__count_ones (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist25:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_u128 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist25) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_10__leading_zeros (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist26:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_u128 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist26) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_10__swap_bytes (self: Core.Primitive.t_u128) : Core.Primitive.t_u128 = + Core.Convert.f_into #Core.Primitive.t_u128 + #Core.Primitive.t_u128 + #FStar.Tactics.Typeclasses.solve + (Core.Intrinsics.bswap_u128 self <: Core.Primitive.t_u128) + +let impl_10__from_be (x: Core.Primitive.t_u128) : Core.Primitive.t_u128 = impl_10__swap_bytes x + +let impl_10__to_be (self: Core.Primitive.t_u128) : Core.Primitive.t_u128 = impl_10__swap_bytes self + +let impl_10__trailing_zeros (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist27:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_u128 self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist27) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_11__count_ones (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist28:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_usize self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist28) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_11__leading_zeros (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist29:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_usize self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist29) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl_11__swap_bytes (self: Core.Primitive.t_usize) : Core.Primitive.t_usize = + Core.Convert.f_into #Core.Primitive.t_usize + #Core.Primitive.t_usize + #FStar.Tactics.Typeclasses.solve + (Core.Intrinsics.bswap_usize self <: Core.Primitive.t_usize) + +let impl_11__from_be (x: Core.Primitive.t_usize) : Core.Primitive.t_usize = impl_11__swap_bytes x + +let impl_11__to_be (self: Core.Primitive.t_usize) : Core.Primitive.t_usize = + impl_11__swap_bytes self + +let impl_11__trailing_zeros (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = + Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist30:Rust_primitives.Hax.t_Never = + Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_usize self) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never + in + Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist30) + <: + Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) + +let impl__i8__rem_euclid (self rhs: Core.Primitive.t_i8) : Core.Primitive.t_i8 = + let r:Core.Primitive.t_i8 = + self %! + (Core.Clone.f_clone #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Primitive.t_i8) + in + if + r <. + (Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y + <: + Core.Primitive.t_i8) + then impl__i8__wrapping_add r (impl__i8__wrapping_abs rhs <: Core.Primitive.t_i8) + else r + +let impl__i16__rem_euclid (self rhs: Core.Primitive.t_i16) : Core.Primitive.t_i16 = + let r:Core.Primitive.t_i16 = + self %! + (Core.Clone.f_clone #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Primitive.t_i16) + in + if + r <. + (Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s + <: + Core.Primitive.t_i16) + then impl__i16__wrapping_add r (impl__i16__wrapping_abs rhs <: Core.Primitive.t_i16) + else r + +let impl__i32__rem_euclid (self rhs: Core.Primitive.t_i32) : Core.Primitive.t_i32 = + let r:Core.Primitive.t_i32 = + self %! + (Core.Clone.f_clone #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Primitive.t_i32) + in + if + r <. + (Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l + <: + Core.Primitive.t_i32) + then impl__i32__wrapping_add r (impl__i32__wrapping_abs rhs <: Core.Primitive.t_i32) + else r + +let impl__i64__rem_euclid (self rhs: Core.Primitive.t_i64) : Core.Primitive.t_i64 = + let r:Core.Primitive.t_i64 = + self %! + (Core.Clone.f_clone #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Primitive.t_i64) + in + if + r <. + (Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L + <: + Core.Primitive.t_i64) + then impl__i64__wrapping_add r (impl__i64__wrapping_abs rhs <: Core.Primitive.t_i64) + else r + +let impl__i128__rem_euclid (self rhs: Core.Primitive.t_i128) : Core.Primitive.t_i128 = + let r:Core.Primitive.t_i128 = + self %! + (Core.Clone.f_clone #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Primitive.t_i128) + in + if + r <. + (Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) + <: + Core.Primitive.t_i128) + then impl__i128__wrapping_add r (impl__i128__wrapping_abs rhs <: Core.Primitive.t_i128) + else r + +let impl__isize__rem_euclid (self rhs: Core.Primitive.t_isize) : Core.Primitive.t_isize = + let r:Core.Primitive.t_isize = + self %! + (Core.Clone.f_clone #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Primitive.t_isize) + in + if + r <. + (Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) + <: + Core.Primitive.t_isize) + then impl__isize__wrapping_add r (impl__isize__wrapping_abs rhs <: Core.Primitive.t_isize) + else r + +let impl_6__count_zeros (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = + impl_6__count_ones (~.self <: Core.Primitive.t_u8) + +let impl_6__leading_ones (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = + impl_6__leading_zeros (~.self <: Core.Primitive.t_u8) + +let impl_6__trailing_ones (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = + impl_6__trailing_zeros (~.self <: Core.Primitive.t_u8) + +let impl_7__count_zeros (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = + impl_7__count_ones (~.self <: Core.Primitive.t_u16) + +let impl_7__leading_ones (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = + impl_7__leading_zeros (~.self <: Core.Primitive.t_u16) + +let impl_7__trailing_ones (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = + impl_7__trailing_zeros (~.self <: Core.Primitive.t_u16) + +let impl_8__count_zeros (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + impl_8__count_ones (~.self <: Core.Primitive.t_u32) + +let impl_8__leading_ones (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + impl_8__leading_zeros (~.self <: Core.Primitive.t_u32) + +let impl_8__trailing_ones (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = + impl_8__trailing_zeros (~.self <: Core.Primitive.t_u32) + +let impl_9__count_zeros (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = + impl_9__count_ones (~.self <: Core.Primitive.t_u64) + +let impl_9__leading_ones (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = + impl_9__leading_zeros (~.self <: Core.Primitive.t_u64) + +let impl_9__trailing_ones (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = + impl_9__trailing_zeros (~.self <: Core.Primitive.t_u64) + +let impl_10__count_zeros (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = + impl_10__count_ones (~.self <: Core.Primitive.t_u128) + +let impl_10__leading_ones (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = + impl_10__leading_zeros (~.self <: Core.Primitive.t_u128) + +let impl_10__trailing_ones (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = + impl_10__trailing_zeros (~.self <: Core.Primitive.t_u128) + +let impl_11__count_zeros (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = + impl_11__count_ones (~.self <: Core.Primitive.t_usize) + +let impl_11__leading_ones (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = + impl_11__leading_zeros (~.self <: Core.Primitive.t_usize) + +let impl_11__trailing_ones (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = + impl_11__trailing_zeros (~.self <: Core.Primitive.t_usize) diff --git a/proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst b/proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst new file mode 100644 index 000000000..4267c3f35 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst @@ -0,0 +1,1186 @@ +module Core.Ops.Arith.Impls_for_prims +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Ops.Arith.t_Neg Core.Primitive.t_i8 = + { + f_Output = Core.Primitive.t_i8; + f_neg_pre = (fun (self: Core.Primitive.t_i8) -> true); + f_neg_post = (fun (self: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true); + f_neg + = + fun (self: Core.Primitive.t_i8) -> + Core.Primitive.C_i8 + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self.Core.Primitive._0) + <: + Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Ops.Arith.t_Neg Core.Primitive.t_i16 = + { + f_Output = Core.Primitive.t_i16; + f_neg_pre = (fun (self: Core.Primitive.t_i16) -> true); + f_neg_post = (fun (self: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> true); + f_neg + = + fun (self: Core.Primitive.t_i16) -> + Core.Primitive.C_i16 + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Ops.Arith.t_Neg Core.Primitive.t_i32 = + { + f_Output = Core.Primitive.t_i32; + f_neg_pre = (fun (self: Core.Primitive.t_i32) -> true); + f_neg_post = (fun (self: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> true); + f_neg + = + fun (self: Core.Primitive.t_i32) -> + Core.Primitive.C_i32 + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Ops.Arith.t_Neg Core.Primitive.t_i64 = + { + f_Output = Core.Primitive.t_i64; + f_neg_pre = (fun (self: Core.Primitive.t_i64) -> true); + f_neg_post = (fun (self: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> true); + f_neg + = + fun (self: Core.Primitive.t_i64) -> + Core.Primitive.C_i64 + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Ops.Arith.t_Neg Core.Primitive.t_i128 = + { + f_Output = Core.Primitive.t_i128; + f_neg_pre = (fun (self: Core.Primitive.t_i128) -> true); + f_neg_post = (fun (self: Core.Primitive.t_i128) (out: Core.Primitive.t_i128) -> true); + f_neg + = + fun (self: Core.Primitive.t_i128) -> + Core.Primitive.C_i128 + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Ops.Arith.t_Neg Core.Primitive.t_isize = + { + f_Output = Core.Primitive.t_isize; + f_neg_pre = (fun (self: Core.Primitive.t_isize) -> true); + f_neg_post = (fun (self: Core.Primitive.t_isize) (out: Core.Primitive.t_isize) -> true); + f_neg + = + fun (self: Core.Primitive.t_isize) -> + Core.Primitive.C_isize + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Ops.Arith.t_Add Core.Primitive.t_i8 Core.Primitive.t_i8 = + { + f_Output = Core.Primitive.t_i8; + f_add_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); + f_add_post + = + (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true + ); + f_add + = + fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> + Core.Primitive.C_i8 (self.Core.Primitive._0 +! other.Core.Primitive._0) <: Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Ops.Arith.t_Add Core.Primitive.t_i16 Core.Primitive.t_i16 = + { + f_Output = Core.Primitive.t_i16; + f_add_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); + f_add_post + = + (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> + true); + f_add + = + fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> + Core.Primitive.C_i16 (self.Core.Primitive._0 +! other.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Ops.Arith.t_Add Core.Primitive.t_i32 Core.Primitive.t_i32 = + { + f_Output = Core.Primitive.t_i32; + f_add_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); + f_add_post + = + (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> + true); + f_add + = + fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> + Core.Primitive.C_i32 (self.Core.Primitive._0 +! other.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Ops.Arith.t_Add Core.Primitive.t_i64 Core.Primitive.t_i64 = + { + f_Output = Core.Primitive.t_i64; + f_add_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); + f_add_post + = + (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> + true); + f_add + = + fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> + Core.Primitive.C_i64 (self.Core.Primitive._0 +! other.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Ops.Arith.t_Add Core.Primitive.t_i128 Core.Primitive.t_i128 = + { + f_Output = Core.Primitive.t_i128; + f_add_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); + f_add_post + = + (fun + (self: Core.Primitive.t_i128) + (other: Core.Primitive.t_i128) + (out: Core.Primitive.t_i128) + -> + true); + f_add + = + fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> + Core.Primitive.C_i128 (self.Core.Primitive._0 +! other.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Ops.Arith.t_Add Core.Primitive.t_isize Core.Primitive.t_isize = + { + f_Output = Core.Primitive.t_isize; + f_add_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); + f_add_post + = + (fun + (self: Core.Primitive.t_isize) + (other: Core.Primitive.t_isize) + (out: Core.Primitive.t_isize) + -> + true); + f_add + = + fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> + Core.Primitive.C_isize (self.Core.Primitive._0 +! other.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Ops.Arith.t_Sub Core.Primitive.t_i8 Core.Primitive.t_i8 = + { + f_Output = Core.Primitive.t_i8; + f_sub_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); + f_sub_post + = + (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true + ); + f_sub + = + fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> + Core.Primitive.C_i8 (self.Core.Primitive._0 -! other.Core.Primitive._0) <: Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Ops.Arith.t_Sub Core.Primitive.t_i16 Core.Primitive.t_i16 = + { + f_Output = Core.Primitive.t_i16; + f_sub_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); + f_sub_post + = + (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> + true); + f_sub + = + fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> + Core.Primitive.C_i16 (self.Core.Primitive._0 -! other.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Ops.Arith.t_Sub Core.Primitive.t_i32 Core.Primitive.t_i32 = + { + f_Output = Core.Primitive.t_i32; + f_sub_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); + f_sub_post + = + (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> + true); + f_sub + = + fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> + Core.Primitive.C_i32 (self.Core.Primitive._0 -! other.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Ops.Arith.t_Sub Core.Primitive.t_i64 Core.Primitive.t_i64 = + { + f_Output = Core.Primitive.t_i64; + f_sub_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); + f_sub_post + = + (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> + true); + f_sub + = + fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> + Core.Primitive.C_i64 (self.Core.Primitive._0 -! other.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Ops.Arith.t_Sub Core.Primitive.t_i128 Core.Primitive.t_i128 = + { + f_Output = Core.Primitive.t_i128; + f_sub_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); + f_sub_post + = + (fun + (self: Core.Primitive.t_i128) + (other: Core.Primitive.t_i128) + (out: Core.Primitive.t_i128) + -> + true); + f_sub + = + fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> + Core.Primitive.C_i128 (self.Core.Primitive._0 -! other.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Ops.Arith.t_Sub Core.Primitive.t_isize Core.Primitive.t_isize = + { + f_Output = Core.Primitive.t_isize; + f_sub_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); + f_sub_post + = + (fun + (self: Core.Primitive.t_isize) + (other: Core.Primitive.t_isize) + (out: Core.Primitive.t_isize) + -> + true); + f_sub + = + fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> + Core.Primitive.C_isize (self.Core.Primitive._0 -! other.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Ops.Arith.t_Add Core.Primitive.t_u8 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u8; + f_add_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); + f_add_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true + ); + f_add + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 +! other.Core.Primitive._0) <: Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Ops.Arith.t_Add Core.Primitive.t_u16 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u16; + f_add_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); + f_add_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> + true); + f_add + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 +! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Ops.Arith.t_Add Core.Primitive.t_u32 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u32; + f_add_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); + f_add_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> + true); + f_add + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 +! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Ops.Arith.t_Add Core.Primitive.t_u64 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u64; + f_add_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); + f_add_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> + true); + f_add + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 +! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Ops.Arith.t_Add Core.Primitive.t_u128 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u128; + f_add_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); + f_add_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_u128) + -> + true); + f_add + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 +! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Ops.Arith.t_Add Core.Primitive.t_usize Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_usize; + f_add_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); + f_add_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_usize) + -> + true); + f_add + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_usize (self.Core.Primitive._0 +! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Ops.Arith.t_Mul Core.Primitive.t_u8 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u8; + f_mul_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); + f_mul_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true + ); + f_mul + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 *! other.Core.Primitive._0) <: Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Ops.Arith.t_Mul Core.Primitive.t_u16 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u16; + f_mul_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); + f_mul_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> + true); + f_mul + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 *! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Ops.Arith.t_Mul Core.Primitive.t_u32 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u32; + f_mul_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); + f_mul_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> + true); + f_mul + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 *! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Ops.Arith.t_Mul Core.Primitive.t_u64 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u64; + f_mul_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); + f_mul_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> + true); + f_mul + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 *! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Ops.Arith.t_Mul Core.Primitive.t_u128 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u128; + f_mul_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); + f_mul_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_u128) + -> + true); + f_mul + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 *! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Ops.Arith.t_Mul Core.Primitive.t_usize Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_usize; + f_mul_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); + f_mul_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_usize) + -> + true); + f_mul + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_usize (self.Core.Primitive._0 *! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Ops.Arith.t_Mul Core.Primitive.t_i8 Core.Primitive.t_i8 = + { + f_Output = Core.Primitive.t_i8; + f_mul_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); + f_mul_post + = + (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true + ); + f_mul + = + fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> + Core.Primitive.C_i8 (self.Core.Primitive._0 *! other.Core.Primitive._0) <: Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Ops.Arith.t_Mul Core.Primitive.t_i16 Core.Primitive.t_i16 = + { + f_Output = Core.Primitive.t_i16; + f_mul_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); + f_mul_post + = + (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> + true); + f_mul + = + fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> + Core.Primitive.C_i16 (self.Core.Primitive._0 *! other.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Ops.Arith.t_Mul Core.Primitive.t_i32 Core.Primitive.t_i32 = + { + f_Output = Core.Primitive.t_i32; + f_mul_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); + f_mul_post + = + (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> + true); + f_mul + = + fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> + Core.Primitive.C_i32 (self.Core.Primitive._0 *! other.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Ops.Arith.t_Mul Core.Primitive.t_i64 Core.Primitive.t_i64 = + { + f_Output = Core.Primitive.t_i64; + f_mul_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); + f_mul_post + = + (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> + true); + f_mul + = + fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> + Core.Primitive.C_i64 (self.Core.Primitive._0 *! other.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Ops.Arith.t_Mul Core.Primitive.t_i128 Core.Primitive.t_i128 = + { + f_Output = Core.Primitive.t_i128; + f_mul_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); + f_mul_post + = + (fun + (self: Core.Primitive.t_i128) + (other: Core.Primitive.t_i128) + (out: Core.Primitive.t_i128) + -> + true); + f_mul + = + fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> + Core.Primitive.C_i128 (self.Core.Primitive._0 *! other.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Ops.Arith.t_Mul Core.Primitive.t_isize Core.Primitive.t_isize = + { + f_Output = Core.Primitive.t_isize; + f_mul_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); + f_mul_post + = + (fun + (self: Core.Primitive.t_isize) + (other: Core.Primitive.t_isize) + (out: Core.Primitive.t_isize) + -> + true); + f_mul + = + fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> + Core.Primitive.C_isize (self.Core.Primitive._0 *! other.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_42: Core.Ops.Arith.t_Div Core.Primitive.t_u8 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u8; + f_div_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); + f_div_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true + ); + f_div + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 /! other.Core.Primitive._0) <: Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_43: Core.Ops.Arith.t_Div Core.Primitive.t_u16 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u16; + f_div_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); + f_div_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> + true); + f_div + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 /! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_44: Core.Ops.Arith.t_Div Core.Primitive.t_u32 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u32; + f_div_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); + f_div_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> + true); + f_div + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 /! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_45: Core.Ops.Arith.t_Div Core.Primitive.t_u64 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u64; + f_div_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); + f_div_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> + true); + f_div + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 /! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_46: Core.Ops.Arith.t_Div Core.Primitive.t_u128 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u128; + f_div_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); + f_div_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_u128) + -> + true); + f_div + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 /! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_47: Core.Ops.Arith.t_Div Core.Primitive.t_usize Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_usize; + f_div_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); + f_div_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_usize) + -> + true); + f_div + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_usize (self.Core.Primitive._0 /! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_54: Core.Ops.Arith.t_Rem Core.Primitive.t_u8 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u8; + f_rem_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); + f_rem_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true + ); + f_rem + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 %! other.Core.Primitive._0) <: Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_55: Core.Ops.Arith.t_Rem Core.Primitive.t_u16 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u16; + f_rem_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); + f_rem_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> + true); + f_rem + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 %! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_56: Core.Ops.Arith.t_Rem Core.Primitive.t_u32 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u32; + f_rem_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); + f_rem_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> + true); + f_rem + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 %! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_57: Core.Ops.Arith.t_Rem Core.Primitive.t_u64 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u64; + f_rem_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); + f_rem_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> + true); + f_rem + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 %! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_58: Core.Ops.Arith.t_Rem Core.Primitive.t_u128 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u128; + f_rem_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); + f_rem_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_u128) + -> + true); + f_rem + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 %! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_59: Core.Ops.Arith.t_Rem Core.Primitive.t_usize Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_usize; + f_rem_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); + f_rem_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_usize) + -> + true); + f_rem + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_usize (self.Core.Primitive._0 %! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Ops.Arith.t_Sub Core.Primitive.t_u8 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u8; + f_sub_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); + f_sub_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true + ); + f_sub + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 -! other.Core.Primitive._0) <: Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Ops.Arith.t_Sub Core.Primitive.t_u16 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u16; + f_sub_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); + f_sub_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> + true); + f_sub + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 -! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Ops.Arith.t_Sub Core.Primitive.t_u32 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u32; + f_sub_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); + f_sub_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> + true); + f_sub + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 -! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Ops.Arith.t_Sub Core.Primitive.t_u64 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u64; + f_sub_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); + f_sub_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> + true); + f_sub + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 -! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Ops.Arith.t_Sub Core.Primitive.t_u128 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u128; + f_sub_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); + f_sub_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_u128) + -> + true); + f_sub + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 -! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Ops.Arith.t_Sub Core.Primitive.t_usize Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_usize; + f_sub_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); + f_sub_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_usize) + -> + true); + f_sub + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_usize (self.Core.Primitive._0 -! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_48: Core.Ops.Arith.t_Div Core.Primitive.t_i8 Core.Primitive.t_i8 = + { + f_Output = Core.Primitive.t_i8; + f_div_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); + f_div_post + = + (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true + ); + f_div + = + fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> + Core.Primitive.C_i8 (self.Core.Primitive._0 /! other.Core.Primitive._0) <: Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_49: Core.Ops.Arith.t_Div Core.Primitive.t_i16 Core.Primitive.t_i16 = + { + f_Output = Core.Primitive.t_i16; + f_div_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); + f_div_post + = + (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> + true); + f_div + = + fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> + Core.Primitive.C_i16 (self.Core.Primitive._0 /! other.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_50: Core.Ops.Arith.t_Div Core.Primitive.t_i32 Core.Primitive.t_i32 = + { + f_Output = Core.Primitive.t_i32; + f_div_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); + f_div_post + = + (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> + true); + f_div + = + fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> + Core.Primitive.C_i32 (self.Core.Primitive._0 /! other.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_51: Core.Ops.Arith.t_Div Core.Primitive.t_i64 Core.Primitive.t_i64 = + { + f_Output = Core.Primitive.t_i64; + f_div_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); + f_div_post + = + (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> + true); + f_div + = + fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> + Core.Primitive.C_i64 (self.Core.Primitive._0 /! other.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_52: Core.Ops.Arith.t_Div Core.Primitive.t_i128 Core.Primitive.t_i128 = + { + f_Output = Core.Primitive.t_i128; + f_div_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); + f_div_post + = + (fun + (self: Core.Primitive.t_i128) + (other: Core.Primitive.t_i128) + (out: Core.Primitive.t_i128) + -> + true); + f_div + = + fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> + Core.Primitive.C_i128 (self.Core.Primitive._0 /! other.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_53: Core.Ops.Arith.t_Div Core.Primitive.t_isize Core.Primitive.t_isize = + { + f_Output = Core.Primitive.t_isize; + f_div_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); + f_div_post + = + (fun + (self: Core.Primitive.t_isize) + (other: Core.Primitive.t_isize) + (out: Core.Primitive.t_isize) + -> + true); + f_div + = + fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> + Core.Primitive.C_isize (self.Core.Primitive._0 /! other.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_60: Core.Ops.Arith.t_Rem Core.Primitive.t_i8 Core.Primitive.t_i8 = + { + f_Output = Core.Primitive.t_i8; + f_rem_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); + f_rem_post + = + (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true + ); + f_rem + = + fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> + Core.Primitive.C_i8 (self.Core.Primitive._0 %! other.Core.Primitive._0) <: Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_61: Core.Ops.Arith.t_Rem Core.Primitive.t_i16 Core.Primitive.t_i16 = + { + f_Output = Core.Primitive.t_i16; + f_rem_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); + f_rem_post + = + (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> + true); + f_rem + = + fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> + Core.Primitive.C_i16 (self.Core.Primitive._0 %! other.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_62: Core.Ops.Arith.t_Rem Core.Primitive.t_i32 Core.Primitive.t_i32 = + { + f_Output = Core.Primitive.t_i32; + f_rem_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); + f_rem_post + = + (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> + true); + f_rem + = + fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> + Core.Primitive.C_i32 (self.Core.Primitive._0 %! other.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_63: Core.Ops.Arith.t_Rem Core.Primitive.t_i64 Core.Primitive.t_i64 = + { + f_Output = Core.Primitive.t_i64; + f_rem_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); + f_rem_post + = + (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> + true); + f_rem + = + fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> + Core.Primitive.C_i64 (self.Core.Primitive._0 %! other.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_64: Core.Ops.Arith.t_Rem Core.Primitive.t_i128 Core.Primitive.t_i128 = + { + f_Output = Core.Primitive.t_i128; + f_rem_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); + f_rem_post + = + (fun + (self: Core.Primitive.t_i128) + (other: Core.Primitive.t_i128) + (out: Core.Primitive.t_i128) + -> + true); + f_rem + = + fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> + Core.Primitive.C_i128 (self.Core.Primitive._0 %! other.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_65: Core.Ops.Arith.t_Rem Core.Primitive.t_isize Core.Primitive.t_isize = + { + f_Output = Core.Primitive.t_isize; + f_rem_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); + f_rem_post + = + (fun + (self: Core.Primitive.t_isize) + (other: Core.Primitive.t_isize) + (out: Core.Primitive.t_isize) + -> + true); + f_rem + = + fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> + Core.Primitive.C_isize (self.Core.Primitive._0 %! other.Core.Primitive._0) + <: + Core.Primitive.t_isize + } diff --git a/proof-libs/fstar/generated-core/Core.Ops.Arith.fst b/proof-libs/fstar/generated-core/Core.Ops.Arith.fst index 454c97ceb..7bbf57888 100644 --- a/proof-libs/fstar/generated-core/Core.Ops.Arith.fst +++ b/proof-libs/fstar/generated-core/Core.Ops.Arith.fst @@ -4,7 +4,6 @@ open Core open FStar.Mul class t_Add (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_add_pre:v_Self -> v_Rhs -> Type0; f_add_post:v_Self -> v_Rhs -> f_Output -> Type0; @@ -13,7 +12,6 @@ class t_Add (v_Self: Type0) (v_Rhs: Type0) = { } class t_Div (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_div_pre:v_Self -> v_Rhs -> Type0; f_div_post:v_Self -> v_Rhs -> f_Output -> Type0; @@ -22,7 +20,6 @@ class t_Div (v_Self: Type0) (v_Rhs: Type0) = { } class t_Mul (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_mul_pre:v_Self -> v_Rhs -> Type0; f_mul_post:v_Self -> v_Rhs -> f_Output -> Type0; @@ -31,7 +28,6 @@ class t_Mul (v_Self: Type0) (v_Rhs: Type0) = { } class t_Neg (v_Self: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_neg_pre:v_Self -> Type0; f_neg_post:v_Self -> f_Output -> Type0; @@ -39,7 +35,6 @@ class t_Neg (v_Self: Type0) = { } class t_Rem (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_rem_pre:v_Self -> v_Rhs -> Type0; f_rem_post:v_Self -> v_Rhs -> f_Output -> Type0; @@ -48,34 +43,9 @@ class t_Rem (v_Self: Type0) (v_Rhs: Type0) = { } class t_Sub (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_sub_pre:v_Self -> v_Rhs -> Type0; f_sub_post:v_Self -> v_Rhs -> f_Output -> Type0; f_sub:x0: v_Self -> x1: v_Rhs -> Prims.Pure f_Output (f_sub_pre x0 x1) (fun result -> f_sub_post x0 x1 result) } - -////////////////////////////////////////////////////////// - -// TODO: Generate file, currently manually written file - -unfold -let (+!) #a #b {| t_Add a b |} = f_add #a #b - -unfold -let (/!) #a #b {| t_Div a b |} = f_div #a #b - -unfold -let ( *! ) #a #b {| t_Mul a b |} = f_mul #a #b - -// unfold -// let (~!) #a {| t_Neg a |} = f_neg #a - -unfold -let (%!) #a #b {| t_Rem a b |} = f_rem #a #b - -unfold -let (-!) #a #b {| t_Sub a b |} = f_sub #a #b - -////////////////////////////////////////////////////////// diff --git a/proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst b/proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst new file mode 100644 index 000000000..e517afe1f --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst @@ -0,0 +1,1796 @@ +module Core.Ops.Bit.Impls_for_prims +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_84: Core.Ops.Bit.t_BitOr Core.Primitive.t_i8 Core.Primitive.t_i8 = + { + f_Output = Core.Primitive.t_i8; + f_bitor_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); + f_bitor_post + = + (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true + ); + f_bitor + = + fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> + Core.Primitive.C_i8 (self.Core.Primitive._0 |. other.Core.Primitive._0) <: Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_85: Core.Ops.Bit.t_BitOr Core.Primitive.t_i16 Core.Primitive.t_i16 = + { + f_Output = Core.Primitive.t_i16; + f_bitor_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); + f_bitor_post + = + (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> + true); + f_bitor + = + fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> + Core.Primitive.C_i16 (self.Core.Primitive._0 |. other.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_86: Core.Ops.Bit.t_BitOr Core.Primitive.t_i32 Core.Primitive.t_i32 = + { + f_Output = Core.Primitive.t_i32; + f_bitor_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); + f_bitor_post + = + (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> + true); + f_bitor + = + fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> + Core.Primitive.C_i32 (self.Core.Primitive._0 |. other.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_87: Core.Ops.Bit.t_BitOr Core.Primitive.t_i64 Core.Primitive.t_i64 = + { + f_Output = Core.Primitive.t_i64; + f_bitor_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); + f_bitor_post + = + (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> + true); + f_bitor + = + fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> + Core.Primitive.C_i64 (self.Core.Primitive._0 |. other.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_88: Core.Ops.Bit.t_BitOr Core.Primitive.t_i128 Core.Primitive.t_i128 = + { + f_Output = Core.Primitive.t_i128; + f_bitor_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); + f_bitor_post + = + (fun + (self: Core.Primitive.t_i128) + (other: Core.Primitive.t_i128) + (out: Core.Primitive.t_i128) + -> + true); + f_bitor + = + fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> + Core.Primitive.C_i128 (self.Core.Primitive._0 |. other.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_89: Core.Ops.Bit.t_BitOr Core.Primitive.t_isize Core.Primitive.t_isize = + { + f_Output = Core.Primitive.t_isize; + f_bitor_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); + f_bitor_post + = + (fun + (self: Core.Primitive.t_isize) + (other: Core.Primitive.t_isize) + (out: Core.Primitive.t_isize) + -> + true); + f_bitor + = + fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> + Core.Primitive.C_isize (self.Core.Primitive._0 |. other.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u8; + f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true + ); + f_shr + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u8; + f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u16) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u8) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u8; + f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u32) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u8) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u8; + f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u64) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u8) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u8; + f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u128) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u8) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_u8; + f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_usize) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u8) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u16; + f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u8) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u16) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u16; + f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u16; + f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u32) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u16) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u16; + f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u64) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u16) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u16; + f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u128) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u16) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_u16; + f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_usize) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u16) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u32; + f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u8) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u32) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u32; + f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u16) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u32) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u32; + f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u32; + f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u64) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u32) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u32; + f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u128) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u32) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_u32; + f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_usize) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u32) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u64; + f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u8) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u64) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u64; + f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u16) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u64) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u64; + f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u32) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u64) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u64; + f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u64; + f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u128) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u64) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_u64; + f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_usize) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u64) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u128; + f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u8) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u128) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u128; + f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u16) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u128) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u128; + f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u32) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u128) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u128; + f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u64) -> true); + f_shr_post + = + (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u128) -> + true); + f_shr + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u128; + f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); + f_shr_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_u128) + -> + true); + f_shr + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_u128; + f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_usize) -> true); + f_shr_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_u128) + -> + true); + f_shr + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_usize; + f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u8) -> true); + f_shr_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_u8) + (out: Core.Primitive.t_usize) + -> + true); + f_shr + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_usize; + f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u16) -> true); + f_shr_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_u16) + (out: Core.Primitive.t_usize) + -> + true); + f_shr + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_usize; + f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u32) -> true); + f_shr_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_u32) + (out: Core.Primitive.t_usize) + -> + true); + f_shr + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_usize; + f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u64) -> true); + f_shr_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_u64) + (out: Core.Primitive.t_usize) + -> + true); + f_shr + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_usize; + f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u128) -> true); + f_shr_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_usize) + -> + true); + f_shr + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_usize; + f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); + f_shr_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_usize) + -> + true); + f_shr + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_42: Core.Ops.Bit.t_Shl Core.Primitive.t_u8 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u8; + f_shl_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); + f_shl_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true + ); + f_shl + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u8) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u8) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u8) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u8) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u8) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u16) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u16) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u16) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u16) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u16) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u32) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u32) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u32) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u32) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u32) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u64) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u64) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u64) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u64) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u64) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u128) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u128) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u128) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u128) -> + true); + f_shl + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_u128) + -> + true); + f_shl + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_u128) + -> + true); + f_shl + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 < true); + f_shl_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_u8) + (out: Core.Primitive.t_usize) + -> + true); + f_shl + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_usize (self.Core.Primitive._0 < true); + f_shl_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_u16) + (out: Core.Primitive.t_usize) + -> + true); + f_shl + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_usize (self.Core.Primitive._0 < true); + f_shl_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_u32) + (out: Core.Primitive.t_usize) + -> + true); + f_shl + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_usize (self.Core.Primitive._0 < true); + f_shl_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_u64) + (out: Core.Primitive.t_usize) + -> + true); + f_shl + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_usize (self.Core.Primitive._0 < true); + f_shl_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_usize) + -> + true); + f_shl + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_usize (self.Core.Primitive._0 < true); + f_shl_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_usize) + -> + true); + f_shl + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_usize (self.Core.Primitive._0 < true); + f_bitor_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true + ); + f_bitor + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 |. other.Core.Primitive._0) <: Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_79: Core.Ops.Bit.t_BitOr Core.Primitive.t_u16 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u16; + f_bitor_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); + f_bitor_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> + true); + f_bitor + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 |. other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_80: Core.Ops.Bit.t_BitOr Core.Primitive.t_u32 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u32; + f_bitor_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); + f_bitor_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> + true); + f_bitor + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 |. other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_81: Core.Ops.Bit.t_BitOr Core.Primitive.t_u64 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u64; + f_bitor_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); + f_bitor_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> + true); + f_bitor + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 |. other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_82: Core.Ops.Bit.t_BitOr Core.Primitive.t_u128 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u128; + f_bitor_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); + f_bitor_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_u128) + -> + true); + f_bitor + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 |. other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_83: Core.Ops.Bit.t_BitOr Core.Primitive.t_usize Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_usize; + f_bitor_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); + f_bitor_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_usize) + -> + true); + f_bitor + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_usize (self.Core.Primitive._0 |. other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_90: Core.Ops.Bit.t_BitXor Core.Primitive.t_u8 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u8; + f_bitxor_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); + f_bitxor_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true + ); + f_bitxor + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 ^. other.Core.Primitive._0) <: Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_91: Core.Ops.Bit.t_BitXor Core.Primitive.t_u16 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u16; + f_bitxor_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); + f_bitxor_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> + true); + f_bitxor + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 ^. other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_92: Core.Ops.Bit.t_BitXor Core.Primitive.t_u32 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u32; + f_bitxor_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); + f_bitxor_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> + true); + f_bitxor + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 ^. other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_93: Core.Ops.Bit.t_BitXor Core.Primitive.t_u64 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u64; + f_bitxor_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); + f_bitxor_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> + true); + f_bitxor + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 ^. other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_94: Core.Ops.Bit.t_BitXor Core.Primitive.t_u128 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u128; + f_bitxor_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); + f_bitxor_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_u128) + -> + true); + f_bitxor + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 ^. other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_95: Core.Ops.Bit.t_BitXor Core.Primitive.t_usize Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_usize; + f_bitxor_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); + f_bitxor_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_usize) + -> + true); + f_bitxor + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_usize (self.Core.Primitive._0 ^. other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_96: Core.Ops.Bit.t_BitAnd Core.Primitive.t_u8 Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u8; + f_bitand_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); + f_bitand_post + = + (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true + ); + f_bitand + = + fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 (self.Core.Primitive._0 &. other.Core.Primitive._0) <: Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_97: Core.Ops.Bit.t_BitAnd Core.Primitive.t_u16 Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u16; + f_bitand_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); + f_bitand_post + = + (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> + true); + f_bitand + = + fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 (self.Core.Primitive._0 &. other.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_98: Core.Ops.Bit.t_BitAnd Core.Primitive.t_u32 Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u32; + f_bitand_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); + f_bitand_post + = + (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> + true); + f_bitand + = + fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 (self.Core.Primitive._0 &. other.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_99: Core.Ops.Bit.t_BitAnd Core.Primitive.t_u64 Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u64; + f_bitand_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); + f_bitand_post + = + (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> + true); + f_bitand + = + fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 (self.Core.Primitive._0 &. other.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_100: Core.Ops.Bit.t_BitAnd Core.Primitive.t_u128 Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u128; + f_bitand_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); + f_bitand_post + = + (fun + (self: Core.Primitive.t_u128) + (other: Core.Primitive.t_u128) + (out: Core.Primitive.t_u128) + -> + true); + f_bitand + = + fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 (self.Core.Primitive._0 &. other.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_101: Core.Ops.Bit.t_BitAnd Core.Primitive.t_usize Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_usize; + f_bitand_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); + f_bitand_post + = + (fun + (self: Core.Primitive.t_usize) + (other: Core.Primitive.t_usize) + (out: Core.Primitive.t_usize) + -> + true); + f_bitand + = + fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> + Core.Primitive.C_usize (self.Core.Primitive._0 &. other.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Ops.Bit.t_Not Core.Primitive.t_u8 = + { + f_Output = Core.Primitive.t_u8; + f_not_pre = (fun (self: Core.Primitive.t_u8) -> true); + f_not_post = (fun (self: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true); + f_not + = + fun (self: Core.Primitive.t_u8) -> + Core.Primitive.C_u8 ~.self.Core.Primitive._0 <: Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Ops.Bit.t_Not Core.Primitive.t_u16 = + { + f_Output = Core.Primitive.t_u16; + f_not_pre = (fun (self: Core.Primitive.t_u16) -> true); + f_not_post = (fun (self: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> true); + f_not + = + fun (self: Core.Primitive.t_u16) -> + Core.Primitive.C_u16 ~.self.Core.Primitive._0 <: Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Ops.Bit.t_Not Core.Primitive.t_u32 = + { + f_Output = Core.Primitive.t_u32; + f_not_pre = (fun (self: Core.Primitive.t_u32) -> true); + f_not_post = (fun (self: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> true); + f_not + = + fun (self: Core.Primitive.t_u32) -> + Core.Primitive.C_u32 ~.self.Core.Primitive._0 <: Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Ops.Bit.t_Not Core.Primitive.t_u64 = + { + f_Output = Core.Primitive.t_u64; + f_not_pre = (fun (self: Core.Primitive.t_u64) -> true); + f_not_post = (fun (self: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> true); + f_not + = + fun (self: Core.Primitive.t_u64) -> + Core.Primitive.C_u64 ~.self.Core.Primitive._0 <: Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Ops.Bit.t_Not Core.Primitive.t_u128 = + { + f_Output = Core.Primitive.t_u128; + f_not_pre = (fun (self: Core.Primitive.t_u128) -> true); + f_not_post = (fun (self: Core.Primitive.t_u128) (out: Core.Primitive.t_u128) -> true); + f_not + = + fun (self: Core.Primitive.t_u128) -> + Core.Primitive.C_u128 ~.self.Core.Primitive._0 <: Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Ops.Bit.t_Not Core.Primitive.t_usize = + { + f_Output = Core.Primitive.t_usize; + f_not_pre = (fun (self: Core.Primitive.t_usize) -> true); + f_not_post = (fun (self: Core.Primitive.t_usize) (out: Core.Primitive.t_usize) -> true); + f_not + = + fun (self: Core.Primitive.t_usize) -> + Core.Primitive.C_usize ~.self.Core.Primitive._0 <: Core.Primitive.t_usize + } diff --git a/proof-libs/fstar/generated-core/Core.Ops.Bit.fst b/proof-libs/fstar/generated-core/Core.Ops.Bit.fst index be8219a78..60b876097 100644 --- a/proof-libs/fstar/generated-core/Core.Ops.Bit.fst +++ b/proof-libs/fstar/generated-core/Core.Ops.Bit.fst @@ -4,7 +4,6 @@ open Core open FStar.Mul class t_BitAnd (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_bitand_pre:v_Self -> v_Rhs -> Type0; f_bitand_post:v_Self -> v_Rhs -> f_Output -> Type0; @@ -13,7 +12,6 @@ class t_BitAnd (v_Self: Type0) (v_Rhs: Type0) = { } class t_BitOr (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_bitor_pre:v_Self -> v_Rhs -> Type0; f_bitor_post:v_Self -> v_Rhs -> f_Output -> Type0; @@ -22,7 +20,6 @@ class t_BitOr (v_Self: Type0) (v_Rhs: Type0) = { } class t_BitXor (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_bitxor_pre:v_Self -> v_Rhs -> Type0; f_bitxor_post:v_Self -> v_Rhs -> f_Output -> Type0; @@ -31,7 +28,6 @@ class t_BitXor (v_Self: Type0) (v_Rhs: Type0) = { } class t_Not (v_Self: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_not_pre:v_Self -> Type0; f_not_post:v_Self -> f_Output -> Type0; @@ -39,7 +35,6 @@ class t_Not (v_Self: Type0) = { } class t_Shl (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_shl_pre:v_Self -> v_Rhs -> Type0; f_shl_post:v_Self -> v_Rhs -> f_Output -> Type0; @@ -48,27 +43,9 @@ class t_Shl (v_Self: Type0) (v_Rhs: Type0) = { } class t_Shr (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ Tactics.Typeclasses.no_method] f_Output:Type0; f_shr_pre:v_Self -> v_Rhs -> Type0; f_shr_post:v_Self -> v_Rhs -> f_Output -> Type0; f_shr:x0: v_Self -> x1: v_Rhs -> Prims.Pure f_Output (f_shr_pre x0 x1) (fun result -> f_shr_post x0 x1 result) } - -////////////////////////////////////////////////////////// - -// TODO: Generate file, currently manually written file - -unfold -let ( ^. ) #a #b {| t_BitXor a b |} = f_bitxor #a #b -unfold -let ( |. ) #a #b {| t_BitOr a b |} = f_bitor #a #b -unfold -let ( &. ) #a #b {| t_BitAnd a b |} = f_bitand #a #b -unfold -let ( <>! ) #a #b {| t_Shr a b |} = f_shr #a #b - -////////////////////////////////////////////////////////// diff --git a/proof-libs/fstar/generated-core/Core.Ops.Deref.fst b/proof-libs/fstar/generated-core/Core.Ops.Deref.fst deleted file mode 100644 index 4d34d7408..000000000 --- a/proof-libs/fstar/generated-core/Core.Ops.Deref.fst +++ /dev/null @@ -1,9 +0,0 @@ -module Core.Ops.Deref -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -/// Indicates that a struct can be used as a method receiver, without the -/// `arbitrary_self_types` feature. This is implemented by stdlib pointer types like `Box`, -/// `Rc`, `&T`, and `Pin

`. -class t_Receiver (v_Self: Type0) = { __marker_trait_t_Receiver:Prims.unit } diff --git a/proof-libs/fstar/generated-core/Core.Ops.Function.fst b/proof-libs/fstar/generated-core/Core.Ops.Function.fst new file mode 100644 index 000000000..8b82d90c3 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Ops.Function.fst @@ -0,0 +1,33 @@ +module Core.Ops.Function +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_FnOnce (v_Self: Type0) (v_Args: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_18093577594825678560:Core.Marker.t_Tuple v_Args; + f_Output:Type0; + f_call_once_pre:v_Self -> v_Args -> Type0; + f_call_once_post:v_Self -> v_Args -> f_Output -> Type0; + f_call_once:x0: v_Self -> x1: v_Args + -> Prims.Pure f_Output (f_call_once_pre x0 x1) (fun result -> f_call_once_post x0 x1 result) +} + +class t_FnMut (v_Self: Type0) (v_Args: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_4383436188827019856:t_FnOnce v_Self v_Args; + [@@@ FStar.Tactics.Typeclasses.no_method]_super_18093577594825678560:Core.Marker.t_Tuple v_Args; + f_call_mut_pre:v_Self -> v_Args -> Type0; + f_call_mut_post:v_Self -> v_Args -> (v_Self & v_4383436188827019856.f_Output) -> Type0; + f_call_mut:x0: v_Self -> x1: v_Args + -> Prims.Pure (v_Self & v_4383436188827019856.f_Output) + (f_call_mut_pre x0 x1) + (fun result -> f_call_mut_post x0 x1 result) +} + +class t_Fn (v_Self: Type0) (v_Args: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_17624495069805845666:t_FnMut v_Self v_Args; + [@@@ FStar.Tactics.Typeclasses.no_method]_super_18093577594825678560:Core.Marker.t_Tuple v_Args; + f_call_pre:v_Self -> v_Args -> Type0; + f_call_post:v_Self -> v_Args -> _ -> Type0; + f_call:x0: v_Self -> x1: v_Args + -> Prims.Pure _ (f_call_pre x0 x1) (fun result -> f_call_post x0 x1 result) +} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Index.fst b/proof-libs/fstar/generated-core/Core.Ops.Index.fst new file mode 100644 index 000000000..6cc80a42c --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Ops.Index.fst @@ -0,0 +1,12 @@ +module Core.Ops.Index +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_Index (v_Self: Type0) (v_Idx: Type0) = { + f_Output:Type0; + f_index_pre:v_Self -> v_Idx -> Type0; + f_index_post:v_Self -> v_Idx -> f_Output -> Type0; + f_index:x0: v_Self -> x1: v_Idx + -> Prims.Pure f_Output (f_index_pre x0 x1) (fun result -> f_index_post x0 x1 result) +} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Index_range.fst b/proof-libs/fstar/generated-core/Core.Ops.Index_range.fst new file mode 100644 index 000000000..112599a67 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Ops.Index_range.fst @@ -0,0 +1,118 @@ +module Core.Ops.Index_range +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_IndexRange = { + f_start:usize; + f_end:usize +} + +let impl__IndexRange__len (self: t_IndexRange) : usize = + Rust_primitives.Usize.sub self.f_end self.f_start + +let impl__IndexRange__next_unchecked (self: t_IndexRange) : (t_IndexRange & usize) = + let value:usize = self.f_start in + let self:t_IndexRange = + { self with f_start = Rust_primitives.Usize.add value (sz 1) } <: t_IndexRange + in + let hax_temp_output:usize = value in + self, hax_temp_output <: (t_IndexRange & usize) + +let impl__IndexRange__zero_to (v_end: usize) : t_IndexRange = + { f_start = sz 0; f_end = v_end } <: t_IndexRange + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Iter.Traits.Iterator.t_Iterator t_IndexRange = + { + f_Item = usize; + f_next_pre = (fun (self: t_IndexRange) -> true); + f_next_post + = + (fun (self: t_IndexRange) (out: (t_IndexRange & Core.Option.t_Option usize)) -> true); + f_next + = + (fun (self: t_IndexRange) -> + let hax_temp_output:Core.Option.t_Option usize = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + in + self, hax_temp_output <: (t_IndexRange & Core.Option.t_Option usize)); + f_size_hint_pre = (fun (self: t_IndexRange) -> true); + f_size_hint_post + = + (fun (self: t_IndexRange) (out: (usize & Core.Option.t_Option usize)) -> true); + f_size_hint + = + (fun (self: t_IndexRange) -> + let len:usize = impl__IndexRange__len self in + len, (Core.Option.Option_Some len <: Core.Option.t_Option usize) + <: + (usize & Core.Option.t_Option usize)); + f_fold_pre + = + (fun + (#v_B: Type0) + (#v_F: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] + i3: + Core.Ops.Function.t_FnMut v_F (v_B & (impl_1).f_Item)) + (self: t_IndexRange) + (init: v_B) + (f: v_F) + -> + true); + f_fold_post + = + (fun + (#v_B: Type0) + (#v_F: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] + i3: + Core.Ops.Function.t_FnMut v_F (v_B & (impl_1).f_Item)) + (self: t_IndexRange) + (init: v_B) + (f: v_F) + (out: v_B) + -> + true); + f_fold + = + fun + (#v_B: Type0) + (#v_F: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] + i3: + Core.Ops.Function.t_FnMut v_F (v_B & (impl_1).f_Item)) + (self: t_IndexRange) + (init: v_B) + (f: v_F) + -> + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Iter.Traits.Exact_size.t_ExactSizeIterator t_IndexRange = + { + _super_15444444506782437531 = FStar.Tactics.Typeclasses.solve; + f_len_pre = (fun (self: t_IndexRange) -> true); + f_len_post = (fun (self: t_IndexRange) (out: usize) -> true); + f_len = fun (self: t_IndexRange) -> impl__IndexRange__len self + } diff --git a/proof-libs/fstar/generated-core/Core.Ops.Range.fst b/proof-libs/fstar/generated-core/Core.Ops.Range.fst new file mode 100644 index 000000000..a1e605f74 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Ops.Range.fst @@ -0,0 +1,9 @@ +module Core.Ops.Range +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Range (v_Idx: Type0) = { + f_start:v_Idx; + f_end:v_Idx +} diff --git a/proof-libs/fstar/generated-core/Core.Option.fst b/proof-libs/fstar/generated-core/Core.Option.fst index e7b557365..6f7c137fd 100644 --- a/proof-libs/fstar/generated-core/Core.Option.fst +++ b/proof-libs/fstar/generated-core/Core.Option.fst @@ -6,3 +6,56 @@ open FStar.Mul type t_Option (v_T: Type0) = | Option_None : t_Option v_T | Option_Some : v_T -> t_Option v_T + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Clone.t_Clone (t_Option v_T) = + { + f_clone_pre = (fun (self: t_Option v_T) -> true); + f_clone_post = (fun (self: t_Option v_T) (out: t_Option v_T) -> true); + f_clone + = + fun (self: t_Option v_T) -> + match self with + | Option_Some x -> + Option_Some (Core.Clone.f_clone #v_T #FStar.Tactics.Typeclasses.solve x) <: t_Option v_T + | Option_None -> Option_None <: t_Option v_T + } + +let impl_1__is_some (#v_T: Type0) (self: t_Option v_T) : bool = + match self with + | Option_Some _ -> true + | _ -> false + +let impl_1__map + (#v_T #v_U #v_F: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i3: Core.Ops.Function.t_FnOnce v_F v_T) + (self: t_Option v_T) + (f: v_F) + : t_Option v_U = + match self with + | Option_Some x -> + Option_Some + (Core.Ops.Function.f_call_once #v_F #v_T #FStar.Tactics.Typeclasses.solve f (x <: v_T)) + <: + t_Option v_U + | Option_None -> Option_None <: t_Option v_U + +let unwrap_failed (_: Prims.unit) : Rust_primitives.Hax.t_Never = + Core.Panicking.panic "called `Option::unwrap()` on a `None` value" + +let impl_1__unwrap (#v_T: Type0) (self: t_Option v_T) + : Prims.Pure v_T (requires impl_1__is_some #v_T self___) (fun _ -> Prims.l_True) = + match self with + | Option_Some v_val -> v_val + | Option_None -> + Rust_primitives.Hax.never_to_any (unwrap_failed () <: Rust_primitives.Hax.t_Never) + +let expect_failed (msg: string) : Rust_primitives.Hax.t_Never = + Core.Panicking.panic_display #string msg + +let impl_1__expect (#v_T: Type0) (self: t_Option v_T) (msg: string) : v_T = + match self with + | Option_Some v_val -> v_val + | Option_None -> + Rust_primitives.Hax.never_to_any (expect_failed msg <: Rust_primitives.Hax.t_Never) diff --git a/proof-libs/fstar/generated-core/Core.Panicking.fst b/proof-libs/fstar/generated-core/Core.Panicking.fst index 36f4dc7ca..6b444e304 100644 --- a/proof-libs/fstar/generated-core/Core.Panicking.fst +++ b/proof-libs/fstar/generated-core/Core.Panicking.fst @@ -3,15 +3,49 @@ module Core.Panicking open Core open FStar.Mul -type t_Never = False +type t_AssertKind = + | AssertKind_Eq : t_AssertKind + | AssertKind_Ne : t_AssertKind + | AssertKind_Match : t_AssertKind -let never_to_any (#v_T: Type0) (x: t_Never) : v_T = - (match x with ) +let t_AssertKind_cast_to_repr (x: t_AssertKind) : isize = + match x with + | AssertKind_Eq -> isz 0 + | AssertKind_Ne -> isz 1 + | AssertKind_Match -> isz 3 -let rec panic (expr: string) - : Prims.Pure t_Never (requires false) (fun _ -> Prims.l_True) = - panic "not yet implemented" +type t_Never = -let panic_explicit (_: Prims.unit) - : Prims.Pure t_Never (requires false) (fun _ -> Prims.l_True) = - panic "not yet implemented" +let t_Never_cast_to_repr (x: t_Never) : Rust_primitives.Hax.t_Never = match x with + +let never_to_any (#v_T: Type0) (x: t_Never) : v_T = Rust_primitives.Hax.never_to_any (match x with ) + +let rec panic_fmt (fmt: Core.Fmt.t_Arguments) : Rust_primitives.Hax.t_Never = panic_fmt fmt + +/// The underlying implementation of core's `panic!` macro when no formatting is used. +let panic (expr: string) : Rust_primitives.Hax.t_Never = + panic_fmt (Core.Fmt.impl_2__new_const (sz 1) + (let list = [expr] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + Core.Fmt.t_Arguments) + +let panic_display + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Fmt.t_Display v_T) + (x: v_T) + : Rust_primitives.Hax.t_Never = + panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 1) + (let list = [""] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (let list = [Core.Fmt.Rt.impl_1__new_display #v_T x <: Core.Fmt.Rt.t_Argument] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + Core.Fmt.t_Arguments) + +let panic_explicit (_: Prims.unit) : Rust_primitives.Hax.t_Never = + panic_display #string "explicit panic" diff --git a/proof-libs/fstar/generated-core/Core.Prelude.fst b/proof-libs/fstar/generated-core/Core.Prelude.fst deleted file mode 100644 index 94f2e1547..000000000 --- a/proof-libs/fstar/generated-core/Core.Prelude.fst +++ /dev/null @@ -1,4 +0,0 @@ -module Core.Prelude -#set-options "--fuel 1 --ifuel 1 --z3rlimit 15" - -open Core.Array diff --git a/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst b/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst new file mode 100644 index 000000000..539a925ce --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst @@ -0,0 +1,733 @@ +module Core.Primitive.Number_conversion +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Convert.t_From Core.Primitive.t_u128 u128 = + { + f_from_pre = (fun (x: u128) -> true); + f_from_post = (fun (x: u128) (out: Core.Primitive.t_u128) -> true); + f_from + = + fun (x: u128) -> + Core.Primitive.C_u128 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #u128 + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + x + } + <: + Core.Base_interface.Int.t_U128) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Convert.t_From u128 Core.Primitive.t_u128 = + { + f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); + f_from_post = (fun (x: Core.Primitive.t_u128) (out: u128) -> true); + f_from + = + fun (x: Core.Primitive.t_u128) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #u128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Convert.t_From Core.Primitive.t_u16 u16 = + { + f_from_pre = (fun (x: u16) -> true); + f_from_post = (fun (x: u16) (out: Core.Primitive.t_u16) -> true); + f_from + = + fun (x: u16) -> + Core.Primitive.C_u16 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #u16 + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + x + } + <: + Core.Base_interface.Int.t_U16) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Convert.t_From u16 Core.Primitive.t_u16 = + { + f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); + f_from_post = (fun (x: Core.Primitive.t_u16) (out: u16) -> true); + f_from + = + fun (x: Core.Primitive.t_u16) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #u16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Convert.t_From Core.Primitive.t_u32 u32 = + { + f_from_pre = (fun (x: u32) -> true); + f_from_post = (fun (x: u32) (out: Core.Primitive.t_u32) -> true); + f_from + = + fun (x: u32) -> + Core.Primitive.C_u32 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #u32 + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + x + } + <: + Core.Base_interface.Int.t_U32) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Convert.t_From u32 Core.Primitive.t_u32 = + { + f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); + f_from_post = (fun (x: Core.Primitive.t_u32) (out: u32) -> true); + f_from + = + fun (x: Core.Primitive.t_u32) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #u32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Convert.t_From Core.Primitive.t_u64 u64 = + { + f_from_pre = (fun (x: u64) -> true); + f_from_post = (fun (x: u64) (out: Core.Primitive.t_u64) -> true); + f_from + = + fun (x: u64) -> + Core.Primitive.C_u64 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #u64 + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + x + } + <: + Core.Base_interface.Int.t_U64) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Convert.t_From u64 Core.Primitive.t_u64 = + { + f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); + f_from_post = (fun (x: Core.Primitive.t_u64) (out: u64) -> true); + f_from + = + fun (x: Core.Primitive.t_u64) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #u64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Convert.t_From Core.Primitive.t_u8 u8 = + { + f_from_pre = (fun (x: u8) -> true); + f_from_post = (fun (x: u8) (out: Core.Primitive.t_u8) -> true); + f_from + = + fun (x: u8) -> + Core.Primitive.C_u8 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #u8 #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_U8) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Convert.t_From u8 Core.Primitive.t_u8 = + { + f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); + f_from_post = (fun (x: Core.Primitive.t_u8) (out: u8) -> true); + f_from + = + fun (x: Core.Primitive.t_u8) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #u8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Convert.t_From Core.Primitive.t_usize usize = + { + f_from_pre = (fun (x: usize) -> true); + f_from_post = (fun (x: usize) (out: Core.Primitive.t_usize) -> true); + f_from + = + fun (x: usize) -> + Core.Primitive.C_usize + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #usize + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + x + } + <: + Core.Base_interface.Int.t_U64) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Convert.t_From usize Core.Primitive.t_usize = + { + f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); + f_from_post = (fun (x: Core.Primitive.t_usize) (out: usize) -> true); + f_from + = + fun (x: Core.Primitive.t_usize) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #usize + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Convert.t_From Core.Primitive.t_usize Core.Primitive.t_u64 = + { + f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); + f_from_post = (fun (x: Core.Primitive.t_u64) (out: Core.Primitive.t_usize) -> true); + f_from + = + fun (x: Core.Primitive.t_u64) -> + Core.Primitive.C_usize + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Convert.t_From Core.Primitive.t_u64 Core.Primitive.t_usize = + { + f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); + f_from_post = (fun (x: Core.Primitive.t_usize) (out: Core.Primitive.t_u64) -> true); + f_from + = + fun (x: Core.Primitive.t_usize) -> + Core.Primitive.C_u64 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Convert.t_From Core.Primitive.t_u16 Core.Primitive.t_u8 = + { + f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); + f_from_post = (fun (x: Core.Primitive.t_u8) (out: Core.Primitive.t_u16) -> true); + f_from + = + fun (x: Core.Primitive.t_u8) -> + Core.Primitive.C_u16 + (Core.Convert.f_into #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Convert.t_From Core.Primitive.t_u32 Core.Primitive.t_u8 = + { + f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); + f_from_post = (fun (x: Core.Primitive.t_u8) (out: Core.Primitive.t_u32) -> true); + f_from + = + fun (x: Core.Primitive.t_u8) -> + Core.Primitive.C_u32 + (Core.Convert.f_into #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Convert.t_From Core.Primitive.t_u64 Core.Primitive.t_u8 = + { + f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); + f_from_post = (fun (x: Core.Primitive.t_u8) (out: Core.Primitive.t_u64) -> true); + f_from + = + fun (x: Core.Primitive.t_u8) -> + Core.Primitive.C_u64 + (Core.Convert.f_into #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Convert.t_From Core.Primitive.t_u128 Core.Primitive.t_u8 = + { + f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); + f_from_post = (fun (x: Core.Primitive.t_u8) (out: Core.Primitive.t_u128) -> true); + f_from + = + fun (x: Core.Primitive.t_u8) -> + Core.Primitive.C_u128 + (Core.Convert.f_into #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Convert.t_From Core.Primitive.t_usize Core.Primitive.t_u8 = + { + f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); + f_from_post = (fun (x: Core.Primitive.t_u8) (out: Core.Primitive.t_usize) -> true); + f_from + = + fun (x: Core.Primitive.t_u8) -> + Core.Primitive.C_usize + (Core.Convert.f_into #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Convert.t_From Core.Primitive.t_u8 Core.Primitive.t_u16 = + { + f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); + f_from_post = (fun (x: Core.Primitive.t_u16) (out: Core.Primitive.t_u8) -> true); + f_from + = + fun (x: Core.Primitive.t_u16) -> + Core.Primitive.C_u8 + (Core.Convert.f_into #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Convert.t_From Core.Primitive.t_u32 Core.Primitive.t_u16 = + { + f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); + f_from_post = (fun (x: Core.Primitive.t_u16) (out: Core.Primitive.t_u32) -> true); + f_from + = + fun (x: Core.Primitive.t_u16) -> + Core.Primitive.C_u32 + (Core.Convert.f_into #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Convert.t_From Core.Primitive.t_u64 Core.Primitive.t_u16 = + { + f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); + f_from_post = (fun (x: Core.Primitive.t_u16) (out: Core.Primitive.t_u64) -> true); + f_from + = + fun (x: Core.Primitive.t_u16) -> + Core.Primitive.C_u64 + (Core.Convert.f_into #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Convert.t_From Core.Primitive.t_u128 Core.Primitive.t_u16 = + { + f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); + f_from_post = (fun (x: Core.Primitive.t_u16) (out: Core.Primitive.t_u128) -> true); + f_from + = + fun (x: Core.Primitive.t_u16) -> + Core.Primitive.C_u128 + (Core.Convert.f_into #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Convert.t_From Core.Primitive.t_usize Core.Primitive.t_u16 = + { + f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); + f_from_post = (fun (x: Core.Primitive.t_u16) (out: Core.Primitive.t_usize) -> true); + f_from + = + fun (x: Core.Primitive.t_u16) -> + Core.Primitive.C_usize + (Core.Convert.f_into #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Convert.t_From Core.Primitive.t_u8 Core.Primitive.t_u32 = + { + f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); + f_from_post = (fun (x: Core.Primitive.t_u32) (out: Core.Primitive.t_u8) -> true); + f_from + = + fun (x: Core.Primitive.t_u32) -> + Core.Primitive.C_u8 + (Core.Convert.f_into #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Convert.t_From Core.Primitive.t_u16 Core.Primitive.t_u32 = + { + f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); + f_from_post = (fun (x: Core.Primitive.t_u32) (out: Core.Primitive.t_u16) -> true); + f_from + = + fun (x: Core.Primitive.t_u32) -> + Core.Primitive.C_u16 + (Core.Convert.f_into #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Convert.t_From Core.Primitive.t_u64 Core.Primitive.t_u32 = + { + f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); + f_from_post = (fun (x: Core.Primitive.t_u32) (out: Core.Primitive.t_u64) -> true); + f_from + = + fun (x: Core.Primitive.t_u32) -> + Core.Primitive.C_u64 + (Core.Convert.f_into #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Convert.t_From Core.Primitive.t_u128 Core.Primitive.t_u32 = + { + f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); + f_from_post = (fun (x: Core.Primitive.t_u32) (out: Core.Primitive.t_u128) -> true); + f_from + = + fun (x: Core.Primitive.t_u32) -> + Core.Primitive.C_u128 + (Core.Convert.f_into #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Convert.t_From Core.Primitive.t_usize Core.Primitive.t_u32 = + { + f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); + f_from_post = (fun (x: Core.Primitive.t_u32) (out: Core.Primitive.t_usize) -> true); + f_from + = + fun (x: Core.Primitive.t_u32) -> + Core.Primitive.C_usize + (Core.Convert.f_into #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Convert.t_From Core.Primitive.t_u8 Core.Primitive.t_u64 = + { + f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); + f_from_post = (fun (x: Core.Primitive.t_u64) (out: Core.Primitive.t_u8) -> true); + f_from + = + fun (x: Core.Primitive.t_u64) -> + Core.Primitive.C_u8 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Convert.t_From Core.Primitive.t_u16 Core.Primitive.t_u64 = + { + f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); + f_from_post = (fun (x: Core.Primitive.t_u64) (out: Core.Primitive.t_u16) -> true); + f_from + = + fun (x: Core.Primitive.t_u64) -> + Core.Primitive.C_u16 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Convert.t_From Core.Primitive.t_u32 Core.Primitive.t_u64 = + { + f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); + f_from_post = (fun (x: Core.Primitive.t_u64) (out: Core.Primitive.t_u32) -> true); + f_from + = + fun (x: Core.Primitive.t_u64) -> + Core.Primitive.C_u32 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Convert.t_From Core.Primitive.t_u128 Core.Primitive.t_u64 = + { + f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); + f_from_post = (fun (x: Core.Primitive.t_u64) (out: Core.Primitive.t_u128) -> true); + f_from + = + fun (x: Core.Primitive.t_u64) -> + Core.Primitive.C_u128 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Convert.t_From Core.Primitive.t_u8 Core.Primitive.t_u128 = + { + f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); + f_from_post = (fun (x: Core.Primitive.t_u128) (out: Core.Primitive.t_u8) -> true); + f_from + = + fun (x: Core.Primitive.t_u128) -> + Core.Primitive.C_u8 + (Core.Convert.f_into #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Convert.t_From Core.Primitive.t_u16 Core.Primitive.t_u128 = + { + f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); + f_from_post = (fun (x: Core.Primitive.t_u128) (out: Core.Primitive.t_u16) -> true); + f_from + = + fun (x: Core.Primitive.t_u128) -> + Core.Primitive.C_u16 + (Core.Convert.f_into #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Convert.t_From Core.Primitive.t_u32 Core.Primitive.t_u128 = + { + f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); + f_from_post = (fun (x: Core.Primitive.t_u128) (out: Core.Primitive.t_u32) -> true); + f_from + = + fun (x: Core.Primitive.t_u128) -> + Core.Primitive.C_u32 + (Core.Convert.f_into #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Convert.t_From Core.Primitive.t_u64 Core.Primitive.t_u128 = + { + f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); + f_from_post = (fun (x: Core.Primitive.t_u128) (out: Core.Primitive.t_u64) -> true); + f_from + = + fun (x: Core.Primitive.t_u128) -> + Core.Primitive.C_u64 + (Core.Convert.f_into #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Convert.t_From Core.Primitive.t_usize Core.Primitive.t_u128 = + { + f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); + f_from_post = (fun (x: Core.Primitive.t_u128) (out: Core.Primitive.t_usize) -> true); + f_from + = + fun (x: Core.Primitive.t_u128) -> + Core.Primitive.C_usize + (Core.Convert.f_into #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Convert.t_From Core.Primitive.t_u8 Core.Primitive.t_usize = + { + f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); + f_from_post = (fun (x: Core.Primitive.t_usize) (out: Core.Primitive.t_u8) -> true); + f_from + = + fun (x: Core.Primitive.t_usize) -> + Core.Primitive.C_u8 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Convert.t_From Core.Primitive.t_u16 Core.Primitive.t_usize = + { + f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); + f_from_post = (fun (x: Core.Primitive.t_usize) (out: Core.Primitive.t_u16) -> true); + f_from + = + fun (x: Core.Primitive.t_usize) -> + Core.Primitive.C_u16 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Convert.t_From Core.Primitive.t_u32 Core.Primitive.t_usize = + { + f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); + f_from_post = (fun (x: Core.Primitive.t_usize) (out: Core.Primitive.t_u32) -> true); + f_from + = + fun (x: Core.Primitive.t_usize) -> + Core.Primitive.C_u32 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Convert.t_From Core.Primitive.t_u128 Core.Primitive.t_usize = + { + f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); + f_from_post = (fun (x: Core.Primitive.t_usize) (out: Core.Primitive.t_u128) -> true); + f_from + = + fun (x: Core.Primitive.t_usize) -> + Core.Primitive.C_u128 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_u128 + } diff --git a/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst b/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst new file mode 100644 index 000000000..e4008fbb6 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst @@ -0,0 +1,718 @@ +module Core.Primitive.Number_conversion_i +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Convert.t_From Core.Primitive.t_i8 i8 = + { + f_from_pre = (fun (x: i8) -> true); + f_from_post = (fun (x: i8) (out: Core.Primitive.t_i8) -> true); + f_from + = + fun (x: i8) -> + Core.Primitive.C_i8 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #i8 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I8) + <: + Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Convert.t_From i8 Core.Primitive.t_i8 = + { + f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); + f_from_post = (fun (x: Core.Primitive.t_i8) (out: i8) -> true); + f_from + = + fun (x: Core.Primitive.t_i8) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #i8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Convert.t_From Core.Primitive.t_i16 i16 = + { + f_from_pre = (fun (x: i16) -> true); + f_from_post = (fun (x: i16) (out: Core.Primitive.t_i16) -> true); + f_from + = + fun (x: i16) -> + Core.Primitive.C_i16 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #i16 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I16) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Convert.t_From i16 Core.Primitive.t_i16 = + { + f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); + f_from_post = (fun (x: Core.Primitive.t_i16) (out: i16) -> true); + f_from + = + fun (x: Core.Primitive.t_i16) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #i16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Convert.t_From Core.Primitive.t_i32 i32 = + { + f_from_pre = (fun (x: i32) -> true); + f_from_post = (fun (x: i32) (out: Core.Primitive.t_i32) -> true); + f_from + = + fun (x: i32) -> + Core.Primitive.C_i32 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #i32 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I32) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Convert.t_From i32 Core.Primitive.t_i32 = + { + f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); + f_from_post = (fun (x: Core.Primitive.t_i32) (out: i32) -> true); + f_from + = + fun (x: Core.Primitive.t_i32) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #i32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Convert.t_From Core.Primitive.t_i64 i64 = + { + f_from_pre = (fun (x: i64) -> true); + f_from_post = (fun (x: i64) (out: Core.Primitive.t_i64) -> true); + f_from + = + fun (x: i64) -> + Core.Primitive.C_i64 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #i64 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I64) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Convert.t_From i64 Core.Primitive.t_i64 = + { + f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); + f_from_post = (fun (x: Core.Primitive.t_i64) (out: i64) -> true); + f_from + = + fun (x: Core.Primitive.t_i64) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #i64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Convert.t_From Core.Primitive.t_i128 i128 = + { + f_from_pre = (fun (x: i128) -> true); + f_from_post = (fun (x: i128) (out: Core.Primitive.t_i128) -> true); + f_from + = + fun (x: i128) -> + Core.Primitive.C_i128 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #i128 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I128) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Convert.t_From i128 Core.Primitive.t_i128 = + { + f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); + f_from_post = (fun (x: Core.Primitive.t_i128) (out: i128) -> true); + f_from + = + fun (x: Core.Primitive.t_i128) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #i128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Convert.t_From Core.Primitive.t_isize isize = + { + f_from_pre = (fun (x: isize) -> true); + f_from_post = (fun (x: isize) (out: Core.Primitive.t_isize) -> true); + f_from + = + fun (x: isize) -> + Core.Primitive.C_isize + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #isize #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I64) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Convert.t_From isize Core.Primitive.t_isize = + { + f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); + f_from_post = (fun (x: Core.Primitive.t_isize) (out: isize) -> true); + f_from + = + fun (x: Core.Primitive.t_isize) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #isize + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Convert.t_From Core.Primitive.t_i16 Core.Primitive.t_i8 = + { + f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); + f_from_post = (fun (x: Core.Primitive.t_i8) (out: Core.Primitive.t_i16) -> true); + f_from + = + fun (x: Core.Primitive.t_i8) -> + Core.Primitive.C_i16 + (Core.Convert.f_into #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Convert.t_From Core.Primitive.t_i32 Core.Primitive.t_i8 = + { + f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); + f_from_post = (fun (x: Core.Primitive.t_i8) (out: Core.Primitive.t_i32) -> true); + f_from + = + fun (x: Core.Primitive.t_i8) -> + Core.Primitive.C_i32 + (Core.Convert.f_into #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Convert.t_From Core.Primitive.t_i64 Core.Primitive.t_i8 = + { + f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); + f_from_post = (fun (x: Core.Primitive.t_i8) (out: Core.Primitive.t_i64) -> true); + f_from + = + fun (x: Core.Primitive.t_i8) -> + Core.Primitive.C_i64 + (Core.Convert.f_into #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Convert.t_From Core.Primitive.t_i128 Core.Primitive.t_i8 = + { + f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); + f_from_post = (fun (x: Core.Primitive.t_i8) (out: Core.Primitive.t_i128) -> true); + f_from + = + fun (x: Core.Primitive.t_i8) -> + Core.Primitive.C_i128 + (Core.Convert.f_into #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Convert.t_From Core.Primitive.t_isize Core.Primitive.t_i8 = + { + f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); + f_from_post = (fun (x: Core.Primitive.t_i8) (out: Core.Primitive.t_isize) -> true); + f_from + = + fun (x: Core.Primitive.t_i8) -> + Core.Primitive.C_isize + (Core.Convert.f_into #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Convert.t_From Core.Primitive.t_i8 Core.Primitive.t_i16 = + { + f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); + f_from_post = (fun (x: Core.Primitive.t_i16) (out: Core.Primitive.t_i8) -> true); + f_from + = + fun (x: Core.Primitive.t_i16) -> + Core.Primitive.C_i8 + (Core.Convert.f_into #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Convert.t_From Core.Primitive.t_i32 Core.Primitive.t_i16 = + { + f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); + f_from_post = (fun (x: Core.Primitive.t_i16) (out: Core.Primitive.t_i32) -> true); + f_from + = + fun (x: Core.Primitive.t_i16) -> + Core.Primitive.C_i32 + (Core.Convert.f_into #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Convert.t_From Core.Primitive.t_i64 Core.Primitive.t_i16 = + { + f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); + f_from_post = (fun (x: Core.Primitive.t_i16) (out: Core.Primitive.t_i64) -> true); + f_from + = + fun (x: Core.Primitive.t_i16) -> + Core.Primitive.C_i64 + (Core.Convert.f_into #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Convert.t_From Core.Primitive.t_i128 Core.Primitive.t_i16 = + { + f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); + f_from_post = (fun (x: Core.Primitive.t_i16) (out: Core.Primitive.t_i128) -> true); + f_from + = + fun (x: Core.Primitive.t_i16) -> + Core.Primitive.C_i128 + (Core.Convert.f_into #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Convert.t_From Core.Primitive.t_isize Core.Primitive.t_i16 = + { + f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); + f_from_post = (fun (x: Core.Primitive.t_i16) (out: Core.Primitive.t_isize) -> true); + f_from + = + fun (x: Core.Primitive.t_i16) -> + Core.Primitive.C_isize + (Core.Convert.f_into #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Convert.t_From Core.Primitive.t_i8 Core.Primitive.t_i32 = + { + f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); + f_from_post = (fun (x: Core.Primitive.t_i32) (out: Core.Primitive.t_i8) -> true); + f_from + = + fun (x: Core.Primitive.t_i32) -> + Core.Primitive.C_i8 + (Core.Convert.f_into #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Convert.t_From Core.Primitive.t_i16 Core.Primitive.t_i32 = + { + f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); + f_from_post = (fun (x: Core.Primitive.t_i32) (out: Core.Primitive.t_i16) -> true); + f_from + = + fun (x: Core.Primitive.t_i32) -> + Core.Primitive.C_i16 + (Core.Convert.f_into #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Convert.t_From Core.Primitive.t_i64 Core.Primitive.t_i32 = + { + f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); + f_from_post = (fun (x: Core.Primitive.t_i32) (out: Core.Primitive.t_i64) -> true); + f_from + = + fun (x: Core.Primitive.t_i32) -> + Core.Primitive.C_i64 + (Core.Convert.f_into #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Convert.t_From Core.Primitive.t_i128 Core.Primitive.t_i32 = + { + f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); + f_from_post = (fun (x: Core.Primitive.t_i32) (out: Core.Primitive.t_i128) -> true); + f_from + = + fun (x: Core.Primitive.t_i32) -> + Core.Primitive.C_i128 + (Core.Convert.f_into #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Convert.t_From Core.Primitive.t_isize Core.Primitive.t_i32 = + { + f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); + f_from_post = (fun (x: Core.Primitive.t_i32) (out: Core.Primitive.t_isize) -> true); + f_from + = + fun (x: Core.Primitive.t_i32) -> + Core.Primitive.C_isize + (Core.Convert.f_into #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Convert.t_From Core.Primitive.t_i8 Core.Primitive.t_i64 = + { + f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); + f_from_post = (fun (x: Core.Primitive.t_i64) (out: Core.Primitive.t_i8) -> true); + f_from + = + fun (x: Core.Primitive.t_i64) -> + Core.Primitive.C_i8 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Convert.t_From Core.Primitive.t_i16 Core.Primitive.t_i64 = + { + f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); + f_from_post = (fun (x: Core.Primitive.t_i64) (out: Core.Primitive.t_i16) -> true); + f_from + = + fun (x: Core.Primitive.t_i64) -> + Core.Primitive.C_i16 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Convert.t_From Core.Primitive.t_i32 Core.Primitive.t_i64 = + { + f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); + f_from_post = (fun (x: Core.Primitive.t_i64) (out: Core.Primitive.t_i32) -> true); + f_from + = + fun (x: Core.Primitive.t_i64) -> + Core.Primitive.C_i32 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Convert.t_From Core.Primitive.t_i128 Core.Primitive.t_i64 = + { + f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); + f_from_post = (fun (x: Core.Primitive.t_i64) (out: Core.Primitive.t_i128) -> true); + f_from + = + fun (x: Core.Primitive.t_i64) -> + Core.Primitive.C_i128 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Convert.t_From Core.Primitive.t_isize Core.Primitive.t_i64 = + { + f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); + f_from_post = (fun (x: Core.Primitive.t_i64) (out: Core.Primitive.t_isize) -> true); + f_from + = + fun (x: Core.Primitive.t_i64) -> + Core.Primitive.C_isize + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Convert.t_From Core.Primitive.t_i8 Core.Primitive.t_i128 = + { + f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); + f_from_post = (fun (x: Core.Primitive.t_i128) (out: Core.Primitive.t_i8) -> true); + f_from + = + fun (x: Core.Primitive.t_i128) -> + Core.Primitive.C_i8 + (Core.Convert.f_into #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Convert.t_From Core.Primitive.t_i16 Core.Primitive.t_i128 = + { + f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); + f_from_post = (fun (x: Core.Primitive.t_i128) (out: Core.Primitive.t_i16) -> true); + f_from + = + fun (x: Core.Primitive.t_i128) -> + Core.Primitive.C_i16 + (Core.Convert.f_into #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Convert.t_From Core.Primitive.t_i32 Core.Primitive.t_i128 = + { + f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); + f_from_post = (fun (x: Core.Primitive.t_i128) (out: Core.Primitive.t_i32) -> true); + f_from + = + fun (x: Core.Primitive.t_i128) -> + Core.Primitive.C_i32 + (Core.Convert.f_into #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Convert.t_From Core.Primitive.t_i64 Core.Primitive.t_i128 = + { + f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); + f_from_post = (fun (x: Core.Primitive.t_i128) (out: Core.Primitive.t_i64) -> true); + f_from + = + fun (x: Core.Primitive.t_i128) -> + Core.Primitive.C_i64 + (Core.Convert.f_into #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Convert.t_From Core.Primitive.t_isize Core.Primitive.t_i128 = + { + f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); + f_from_post = (fun (x: Core.Primitive.t_i128) (out: Core.Primitive.t_isize) -> true); + f_from + = + fun (x: Core.Primitive.t_i128) -> + Core.Primitive.C_isize + (Core.Convert.f_into #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Convert.t_From Core.Primitive.t_i8 Core.Primitive.t_isize = + { + f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); + f_from_post = (fun (x: Core.Primitive.t_isize) (out: Core.Primitive.t_i8) -> true); + f_from + = + fun (x: Core.Primitive.t_isize) -> + Core.Primitive.C_i8 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Convert.t_From Core.Primitive.t_i16 Core.Primitive.t_isize = + { + f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); + f_from_post = (fun (x: Core.Primitive.t_isize) (out: Core.Primitive.t_i16) -> true); + f_from + = + fun (x: Core.Primitive.t_isize) -> + Core.Primitive.C_i16 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Convert.t_From Core.Primitive.t_i32 Core.Primitive.t_isize = + { + f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); + f_from_post = (fun (x: Core.Primitive.t_isize) (out: Core.Primitive.t_i32) -> true); + f_from + = + fun (x: Core.Primitive.t_isize) -> + Core.Primitive.C_i32 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Convert.t_From Core.Primitive.t_i64 Core.Primitive.t_isize = + { + f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); + f_from_post = (fun (x: Core.Primitive.t_isize) (out: Core.Primitive.t_i64) -> true); + f_from + = + fun (x: Core.Primitive.t_isize) -> + Core.Primitive.C_i64 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Convert.t_From Core.Primitive.t_i128 Core.Primitive.t_isize = + { + f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); + f_from_post = (fun (x: Core.Primitive.t_isize) (out: Core.Primitive.t_i128) -> true); + f_from + = + fun (x: Core.Primitive.t_isize) -> + Core.Primitive.C_i128 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x.Core.Primitive._0) + <: + Core.Primitive.t_i128 + } diff --git a/proof-libs/fstar/generated-core/Core.Primitive.fst b/proof-libs/fstar/generated-core/Core.Primitive.fst index 9c3e73b73..75d2ad274 100644 --- a/proof-libs/fstar/generated-core/Core.Primitive.fst +++ b/proof-libs/fstar/generated-core/Core.Primitive.fst @@ -3,27 +3,118 @@ module Core.Primitive open Core open FStar.Mul -open Core.Cmp -open Core.Ops.Arith -open Core.Ops.Bit +type t_Slice (v_T: Type0) = { f_v:Core.Base.Spec.Seq.t_Seq v_T } -type t_u128 = | C_u128 : Core.Int.t_U128 -> t_u128 +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2 (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Convert.t_From (t_Slice v_T) (t_Slice v_T) = + { + f_from_pre = (fun (x: t_Slice v_T) -> true); + f_from_post = (fun (x: t_Slice v_T) (out: t_Slice v_T) -> true); + f_from + = + fun (x: t_Slice v_T) -> + { + f_v + = + { Core.Base.Spec.Seq.f_v = Alloc.Slice.impl__to_vec #v_T x } <: Core.Base.Spec.Seq.t_Seq v_T + } + <: + t_Slice v_T + } + +type t_Array (v_T: Type0) (v_N: usize) = { f_v:t_Slice v_T } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl + (#v_T: Type0) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Convert.t_From (t_Array v_T v_N) (t_Array v_T v_N) = + { + f_from_pre = (fun (x: t_Array v_T v_N) -> true); + f_from_post = (fun (x: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); + f_from + = + fun (x: t_Array v_T v_N) -> + { + f_v + = + { + f_v + = + { + Core.Base.Spec.Seq.f_v + = + Alloc.Slice.impl__to_vec #v_T + (x.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] <: t_Slice v_T) + } + <: + Core.Base.Spec.Seq.t_Seq v_T + } + <: + t_Slice v_T + } + <: + t_Array v_T v_N + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1 + (#v_T: Type0) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Convert.t_From (t_Array v_T v_N) (t_Array v_T v_N) = + { + f_from_pre = (fun (x: t_Array v_T v_N) -> true); + f_from_post = (fun (x: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); + f_from + = + fun (x: t_Array v_T v_N) -> + match + Core.Convert.f_try_into #(Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global) + #(t_Array v_T v_N) + #FStar.Tactics.Typeclasses.solve + x.f_v.f_v.Core.Base.Spec.Seq.f_v + with + | Core.Result.Result_Ok x -> x + | _ -> + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_const (sz 1 + ) + (let list = ["some error?"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + } + +let impl_3__cast + (#v_T: Type0) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (self: t_Array v_T v_N) + : t_Slice v_T = self.f_v + +type t_u128 = | C_u128 : Core.Base_interface.Int.t_U128 -> t_u128 [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Clone.t_Clone t_u128 = +let impl_13: Core.Clone.t_Clone t_u128 = { f_clone_pre = (fun (self: t_u128) -> true); f_clone_post = (fun (self: t_u128) (out: t_u128) -> true); f_clone = fun (self: t_u128) -> - C_u128 (Core.Clone.f_clone #Core.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0) + C_u128 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0) <: t_u128 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Cmp.t_PartialEq t_u128 t_u128 = +let impl_37: Core.Cmp.t_PartialEq t_u128 t_u128 = { f_eq_pre = (fun (self: t_u128) (rhs: t_u128) -> true); f_eq_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); @@ -34,7 +125,7 @@ let impl_30: Core.Cmp.t_PartialEq t_u128 t_u128 = } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Cmp.t_PartialOrd t_u128 t_u128 = +let impl_38: Core.Cmp.t_PartialOrd t_u128 t_u128 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; f_partial_cmp_pre = (fun (self: t_u128) (rhs: t_u128) -> true); @@ -44,8 +135,8 @@ let impl_31: Core.Cmp.t_PartialOrd t_u128 t_u128 = f_partial_cmp = (fun (self: t_u128) (rhs: t_u128) -> - Core.Cmp.f_partial_cmp #Core.Int.t_U128 - #Core.Int.t_U128 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0 rhs._0); @@ -55,8 +146,8 @@ let impl_31: Core.Cmp.t_PartialOrd t_u128 t_u128 = = (fun (self: t_u128) (rhs: t_u128) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U128 - #Core.Int.t_U128 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -69,8 +160,8 @@ let impl_31: Core.Cmp.t_PartialOrd t_u128 t_u128 = = (fun (self: t_u128) (rhs: t_u128) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U128 - #Core.Int.t_U128 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -84,8 +175,8 @@ let impl_31: Core.Cmp.t_PartialOrd t_u128 t_u128 = = (fun (self: t_u128) (rhs: t_u128) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U128 - #Core.Int.t_U128 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -98,8 +189,8 @@ let impl_31: Core.Cmp.t_PartialOrd t_u128 t_u128 = = fun (self: t_u128) (rhs: t_u128) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U128 - #Core.Int.t_U128 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -109,21 +200,24 @@ let impl_31: Core.Cmp.t_PartialOrd t_u128 t_u128 = | _ -> false } -type t_u16 = | C_u16 : Core.Int.t_U16 -> t_u16 +type t_u16 = | C_u16 : Core.Base_interface.Int.t_U16 -> t_u16 [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Clone.t_Clone t_u16 = +let impl_7: Core.Clone.t_Clone t_u16 = { f_clone_pre = (fun (self: t_u16) -> true); f_clone_post = (fun (self: t_u16) (out: t_u16) -> true); f_clone = fun (self: t_u16) -> - C_u16 (Core.Clone.f_clone #Core.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0) <: t_u16 + C_u16 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_u16 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Cmp.t_PartialEq t_u16 t_u16 = +let impl_31: Core.Cmp.t_PartialEq t_u16 t_u16 = { f_eq_pre = (fun (self: t_u16) (rhs: t_u16) -> true); f_eq_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); @@ -134,7 +228,7 @@ let impl_12: Core.Cmp.t_PartialEq t_u16 t_u16 = } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Cmp.t_PartialOrd t_u16 t_u16 = +let impl_32: Core.Cmp.t_PartialOrd t_u16 t_u16 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; f_partial_cmp_pre = (fun (self: t_u16) (rhs: t_u16) -> true); @@ -144,8 +238,8 @@ let impl_13: Core.Cmp.t_PartialOrd t_u16 t_u16 = f_partial_cmp = (fun (self: t_u16) (rhs: t_u16) -> - Core.Cmp.f_partial_cmp #Core.Int.t_U16 - #Core.Int.t_U16 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0 rhs._0); @@ -155,8 +249,8 @@ let impl_13: Core.Cmp.t_PartialOrd t_u16 t_u16 = = (fun (self: t_u16) (rhs: t_u16) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U16 - #Core.Int.t_U16 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -169,8 +263,8 @@ let impl_13: Core.Cmp.t_PartialOrd t_u16 t_u16 = = (fun (self: t_u16) (rhs: t_u16) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U16 - #Core.Int.t_U16 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -184,8 +278,8 @@ let impl_13: Core.Cmp.t_PartialOrd t_u16 t_u16 = = (fun (self: t_u16) (rhs: t_u16) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U16 - #Core.Int.t_U16 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -198,8 +292,8 @@ let impl_13: Core.Cmp.t_PartialOrd t_u16 t_u16 = = fun (self: t_u16) (rhs: t_u16) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U16 - #Core.Int.t_U16 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -209,21 +303,24 @@ let impl_13: Core.Cmp.t_PartialOrd t_u16 t_u16 = | _ -> false } -type t_u32 = | C_u32 : Core.Int.t_U32 -> t_u32 +type t_u32 = | C_u32 : Core.Base_interface.Int.t_U32 -> t_u32 [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Clone.t_Clone t_u32 = +let impl_9: Core.Clone.t_Clone t_u32 = { f_clone_pre = (fun (self: t_u32) -> true); f_clone_post = (fun (self: t_u32) (out: t_u32) -> true); f_clone = fun (self: t_u32) -> - C_u32 (Core.Clone.f_clone #Core.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0) <: t_u32 + C_u32 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_u32 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Cmp.t_PartialEq t_u32 t_u32 = +let impl_33: Core.Cmp.t_PartialEq t_u32 t_u32 = { f_eq_pre = (fun (self: t_u32) (rhs: t_u32) -> true); f_eq_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); @@ -234,7 +331,7 @@ let impl_18: Core.Cmp.t_PartialEq t_u32 t_u32 = } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Cmp.t_PartialOrd t_u32 t_u32 = +let impl_34: Core.Cmp.t_PartialOrd t_u32 t_u32 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; f_partial_cmp_pre = (fun (self: t_u32) (rhs: t_u32) -> true); @@ -244,8 +341,8 @@ let impl_19: Core.Cmp.t_PartialOrd t_u32 t_u32 = f_partial_cmp = (fun (self: t_u32) (rhs: t_u32) -> - Core.Cmp.f_partial_cmp #Core.Int.t_U32 - #Core.Int.t_U32 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0 rhs._0); @@ -255,8 +352,8 @@ let impl_19: Core.Cmp.t_PartialOrd t_u32 t_u32 = = (fun (self: t_u32) (rhs: t_u32) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U32 - #Core.Int.t_U32 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -269,8 +366,8 @@ let impl_19: Core.Cmp.t_PartialOrd t_u32 t_u32 = = (fun (self: t_u32) (rhs: t_u32) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U32 - #Core.Int.t_U32 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -284,8 +381,8 @@ let impl_19: Core.Cmp.t_PartialOrd t_u32 t_u32 = = (fun (self: t_u32) (rhs: t_u32) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U32 - #Core.Int.t_U32 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -298,8 +395,8 @@ let impl_19: Core.Cmp.t_PartialOrd t_u32 t_u32 = = fun (self: t_u32) (rhs: t_u32) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U32 - #Core.Int.t_U32 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -309,21 +406,24 @@ let impl_19: Core.Cmp.t_PartialOrd t_u32 t_u32 = | _ -> false } -type t_u64 = | C_u64 : Core.Int.t_U64 -> t_u64 +type t_u64 = | C_u64 : Core.Base_interface.Int.t_U64 -> t_u64 [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Clone.t_Clone t_u64 = +let impl_11: Core.Clone.t_Clone t_u64 = { f_clone_pre = (fun (self: t_u64) -> true); f_clone_post = (fun (self: t_u64) (out: t_u64) -> true); f_clone = fun (self: t_u64) -> - C_u64 (Core.Clone.f_clone #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) <: t_u64 + C_u64 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_u64 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Cmp.t_PartialEq t_u64 t_u64 = +let impl_35: Core.Cmp.t_PartialEq t_u64 t_u64 = { f_eq_pre = (fun (self: t_u64) (rhs: t_u64) -> true); f_eq_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); @@ -334,7 +434,7 @@ let impl_24: Core.Cmp.t_PartialEq t_u64 t_u64 = } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Cmp.t_PartialOrd t_u64 t_u64 = +let impl_36: Core.Cmp.t_PartialOrd t_u64 t_u64 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; f_partial_cmp_pre = (fun (self: t_u64) (rhs: t_u64) -> true); @@ -344,8 +444,8 @@ let impl_25: Core.Cmp.t_PartialOrd t_u64 t_u64 = f_partial_cmp = (fun (self: t_u64) (rhs: t_u64) -> - Core.Cmp.f_partial_cmp #Core.Int.t_U64 - #Core.Int.t_U64 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0 rhs._0); @@ -355,8 +455,8 @@ let impl_25: Core.Cmp.t_PartialOrd t_u64 t_u64 = = (fun (self: t_u64) (rhs: t_u64) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U64 - #Core.Int.t_U64 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -369,8 +469,8 @@ let impl_25: Core.Cmp.t_PartialOrd t_u64 t_u64 = = (fun (self: t_u64) (rhs: t_u64) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U64 - #Core.Int.t_U64 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -384,8 +484,8 @@ let impl_25: Core.Cmp.t_PartialOrd t_u64 t_u64 = = (fun (self: t_u64) (rhs: t_u64) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U64 - #Core.Int.t_U64 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -398,8 +498,8 @@ let impl_25: Core.Cmp.t_PartialOrd t_u64 t_u64 = = fun (self: t_u64) (rhs: t_u64) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U64 - #Core.Int.t_U64 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -409,21 +509,24 @@ let impl_25: Core.Cmp.t_PartialOrd t_u64 t_u64 = | _ -> false } -type t_u8 = | C_u8 : Core.Int.t_U8 -> t_u8 +type t_u8 = | C_u8 : Core.Base_interface.Int.t_U8 -> t_u8 [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Clone.t_Clone t_u8 = +let impl_5: Core.Clone.t_Clone t_u8 = { f_clone_pre = (fun (self: t_u8) -> true); f_clone_post = (fun (self: t_u8) (out: t_u8) -> true); f_clone = fun (self: t_u8) -> - C_u8 (Core.Clone.f_clone #Core.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0) <: t_u8 + C_u8 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_u8 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Cmp.t_PartialEq t_u8 t_u8 = +let impl_29: Core.Cmp.t_PartialEq t_u8 t_u8 = { f_eq_pre = (fun (self: t_u8) (rhs: t_u8) -> true); f_eq_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); @@ -434,7 +537,7 @@ let impl_6: Core.Cmp.t_PartialEq t_u8 t_u8 = } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Cmp.t_PartialOrd t_u8 t_u8 = +let impl_30: Core.Cmp.t_PartialOrd t_u8 t_u8 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; f_partial_cmp_pre = (fun (self: t_u8) (rhs: t_u8) -> true); @@ -444,8 +547,8 @@ let impl_7: Core.Cmp.t_PartialOrd t_u8 t_u8 = f_partial_cmp = (fun (self: t_u8) (rhs: t_u8) -> - Core.Cmp.f_partial_cmp #Core.Int.t_U8 - #Core.Int.t_U8 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0 rhs._0); @@ -455,8 +558,8 @@ let impl_7: Core.Cmp.t_PartialOrd t_u8 t_u8 = = (fun (self: t_u8) (rhs: t_u8) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U8 - #Core.Int.t_U8 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -469,8 +572,8 @@ let impl_7: Core.Cmp.t_PartialOrd t_u8 t_u8 = = (fun (self: t_u8) (rhs: t_u8) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U8 - #Core.Int.t_U8 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -484,8 +587,8 @@ let impl_7: Core.Cmp.t_PartialOrd t_u8 t_u8 = = (fun (self: t_u8) (rhs: t_u8) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U8 - #Core.Int.t_U8 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -498,8 +601,8 @@ let impl_7: Core.Cmp.t_PartialOrd t_u8 t_u8 = = fun (self: t_u8) (rhs: t_u8) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U8 - #Core.Int.t_U8 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -509,23 +612,24 @@ let impl_7: Core.Cmp.t_PartialOrd t_u8 t_u8 = | _ -> false } -type t_usize = | C_usize : Core.Int.t_U64 -> t_usize +type t_usize = | C_usize : Core.Base_interface.Int.t_U64 -> t_usize [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Clone.t_Clone t_usize = +let impl_15: Core.Clone.t_Clone t_usize = { f_clone_pre = (fun (self: t_usize) -> true); f_clone_post = (fun (self: t_usize) (out: t_usize) -> true); f_clone = fun (self: t_usize) -> - C_usize (Core.Clone.f_clone #Core.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) + C_usize + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) <: t_usize } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Cmp.t_PartialEq t_usize t_usize = +let impl_39: Core.Cmp.t_PartialEq t_usize t_usize = { f_eq_pre = (fun (self: t_usize) (rhs: t_usize) -> true); f_eq_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); @@ -536,7 +640,7 @@ let impl_36: Core.Cmp.t_PartialEq t_usize t_usize = } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Cmp.t_PartialOrd t_usize t_usize = +let impl_40: Core.Cmp.t_PartialOrd t_usize t_usize = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; f_partial_cmp_pre = (fun (self: t_usize) (rhs: t_usize) -> true); @@ -546,8 +650,8 @@ let impl_37: Core.Cmp.t_PartialOrd t_usize t_usize = f_partial_cmp = (fun (self: t_usize) (rhs: t_usize) -> - Core.Cmp.f_partial_cmp #Core.Int.t_U64 - #Core.Int.t_U64 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0 rhs._0); @@ -557,8 +661,8 @@ let impl_37: Core.Cmp.t_PartialOrd t_usize t_usize = = (fun (self: t_usize) (rhs: t_usize) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U64 - #Core.Int.t_U64 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -571,8 +675,8 @@ let impl_37: Core.Cmp.t_PartialOrd t_usize t_usize = = (fun (self: t_usize) (rhs: t_usize) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U64 - #Core.Int.t_U64 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -586,8 +690,8 @@ let impl_37: Core.Cmp.t_PartialOrd t_usize t_usize = = (fun (self: t_usize) (rhs: t_usize) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U64 - #Core.Int.t_U64 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -600,8 +704,8 @@ let impl_37: Core.Cmp.t_PartialOrd t_usize t_usize = = fun (self: t_usize) (rhs: t_usize) -> match - Core.Cmp.f_partial_cmp #Core.Int.t_U64 - #Core.Int.t_U64 + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0 rhs._0 @@ -611,234 +715,620 @@ let impl_37: Core.Cmp.t_PartialOrd t_usize t_usize = | _ -> false } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Ops.Arith.t_Mul t_u8 t_u8 = - { - f_Output = t_u8; - f_mul_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_mul_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); - f_mul = fun (self: t_u8) (rhs: t_u8) -> C_u8 (self._0 *! rhs._0) <: t_u8 - } +type t_i128 = | C_i128 : Core.Base_interface.Int.t_I128 -> t_i128 [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Ops.Arith.t_Rem t_u8 t_u8 = +let impl_25: Core.Clone.t_Clone t_i128 = { - f_Output = t_u8; - f_rem_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_rem_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); - f_rem = fun (self: t_u8) (rhs: t_u8) -> C_u8 (self._0 %! rhs._0) <: t_u8 + f_clone_pre = (fun (self: t_i128) -> true); + f_clone_post = (fun (self: t_i128) (out: t_i128) -> true); + f_clone + = + fun (self: t_i128) -> + C_i128 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I128 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i128 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Ops.Arith.t_Add t_u8 t_u8 = +let impl_49: Core.Cmp.t_PartialEq t_i128 t_i128 = { - f_Output = t_u8; - f_add_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_add_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); - f_add = fun (self: t_u8) (rhs: t_u8) -> C_u8 (self._0 +! rhs._0) <: t_u8 + f_eq_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_eq_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_eq = (fun (self: t_i128) (rhs: t_i128) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_ne_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_ne = fun (self: t_i128) (rhs: t_i128) -> ~.(self._0 =. rhs._0 <: bool) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Ops.Arith.t_Div t_u8 t_u8 = +let impl_50: Core.Cmp.t_PartialOrd t_i128 t_i128 = { - f_Output = t_u8; - f_div_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_div_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); - f_div = fun (self: t_u8) (rhs: t_u8) -> C_u8 (self._0 /! rhs._0) <: t_u8 + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_partial_cmp_post + = + (fun (self: t_i128) (rhs: t_i128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_i128) (rhs: t_i128) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_lt_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_lt + = + (fun (self: t_i128) (rhs: t_i128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_le_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_le + = + (fun (self: t_i128) (rhs: t_i128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_gt_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_gt + = + (fun (self: t_i128) (rhs: t_i128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_ge_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_ge + = + fun (self: t_i128) (rhs: t_i128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Ops.Arith.t_Mul t_u16 t_u16 = - { - f_Output = t_u16; - f_mul_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_mul_post = (fun (self: t_u16) (rhs: t_u16) (out: t_u16) -> true); - f_mul = fun (self: t_u16) (rhs: t_u16) -> C_u16 (self._0 *! rhs._0) <: t_u16 - } +type t_i16 = | C_i16 : Core.Base_interface.Int.t_I16 -> t_i16 [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Ops.Arith.t_Rem t_u16 t_u16 = +let impl_19: Core.Clone.t_Clone t_i16 = { - f_Output = t_u16; - f_rem_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_rem_post = (fun (self: t_u16) (rhs: t_u16) (out: t_u16) -> true); - f_rem = fun (self: t_u16) (rhs: t_u16) -> C_u16 (self._0 %! rhs._0) <: t_u16 + f_clone_pre = (fun (self: t_i16) -> true); + f_clone_post = (fun (self: t_i16) (out: t_i16) -> true); + f_clone + = + fun (self: t_i16) -> + C_i16 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I16 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i16 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Ops.Arith.t_Add t_u16 t_u16 = +let impl_43: Core.Cmp.t_PartialEq t_i16 t_i16 = { - f_Output = t_u16; - f_add_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_add_post = (fun (self: t_u16) (rhs: t_u16) (out: t_u16) -> true); - f_add = fun (self: t_u16) (rhs: t_u16) -> C_u16 (self._0 +! rhs._0) <: t_u16 + f_eq_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_eq_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_eq = (fun (self: t_i16) (rhs: t_i16) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_ne_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_ne = fun (self: t_i16) (rhs: t_i16) -> ~.(self._0 =. rhs._0 <: bool) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Ops.Arith.t_Div t_u16 t_u16 = +let impl_44: Core.Cmp.t_PartialOrd t_i16 t_i16 = { - f_Output = t_u16; - f_div_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_div_post = (fun (self: t_u16) (rhs: t_u16) (out: t_u16) -> true); - f_div = fun (self: t_u16) (rhs: t_u16) -> C_u16 (self._0 /! rhs._0) <: t_u16 + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_partial_cmp_post + = + (fun (self: t_i16) (rhs: t_i16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_i16) (rhs: t_i16) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_lt_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_lt + = + (fun (self: t_i16) (rhs: t_i16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_le_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_le + = + (fun (self: t_i16) (rhs: t_i16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_gt_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_gt + = + (fun (self: t_i16) (rhs: t_i16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_ge_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_ge + = + fun (self: t_i16) (rhs: t_i16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Ops.Arith.t_Mul t_u32 t_u32 = - { - f_Output = t_u32; - f_mul_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_mul_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); - f_mul = fun (self: t_u32) (rhs: t_u32) -> C_u32 (self._0 *! rhs._0) <: t_u32 - } +type t_i32 = | C_i32 : Core.Base_interface.Int.t_I32 -> t_i32 [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Ops.Arith.t_Rem t_u32 t_u32 = +let impl_21: Core.Clone.t_Clone t_i32 = { - f_Output = t_u32; - f_rem_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_rem_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); - f_rem = fun (self: t_u32) (rhs: t_u32) -> C_u32 (self._0 %! rhs._0) <: t_u32 + f_clone_pre = (fun (self: t_i32) -> true); + f_clone_post = (fun (self: t_i32) (out: t_i32) -> true); + f_clone + = + fun (self: t_i32) -> + C_i32 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I32 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i32 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Ops.Arith.t_Add t_u32 t_u32 = +let impl_45: Core.Cmp.t_PartialEq t_i32 t_i32 = { - f_Output = t_u32; - f_add_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_add_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); - f_add = fun (self: t_u32) (rhs: t_u32) -> C_u32 (self._0 +! rhs._0) <: t_u32 + f_eq_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_eq_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_eq = (fun (self: t_i32) (rhs: t_i32) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_ne_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_ne = fun (self: t_i32) (rhs: t_i32) -> ~.(self._0 =. rhs._0 <: bool) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Ops.Arith.t_Div t_u32 t_u32 = +let impl_46: Core.Cmp.t_PartialOrd t_i32 t_i32 = { - f_Output = t_u32; - f_div_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_div_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); - f_div = fun (self: t_u32) (rhs: t_u32) -> C_u32 (self._0 /! rhs._0) <: t_u32 + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_partial_cmp_post + = + (fun (self: t_i32) (rhs: t_i32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_i32) (rhs: t_i32) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_lt_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_lt + = + (fun (self: t_i32) (rhs: t_i32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_le_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_le + = + (fun (self: t_i32) (rhs: t_i32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_gt_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_gt + = + (fun (self: t_i32) (rhs: t_i32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_ge_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_ge + = + fun (self: t_i32) (rhs: t_i32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Ops.Arith.t_Mul t_u64 t_u64 = - { - f_Output = t_u64; - f_mul_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_mul_post = (fun (self: t_u64) (rhs: t_u64) (out: t_u64) -> true); - f_mul = fun (self: t_u64) (rhs: t_u64) -> C_u64 (self._0 *! rhs._0) <: t_u64 - } +type t_i64 = | C_i64 : Core.Base_interface.Int.t_I64 -> t_i64 [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Ops.Arith.t_Rem t_u64 t_u64 = +let impl_23: Core.Clone.t_Clone t_i64 = { - f_Output = t_u64; - f_rem_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_rem_post = (fun (self: t_u64) (rhs: t_u64) (out: t_u64) -> true); - f_rem = fun (self: t_u64) (rhs: t_u64) -> C_u64 (self._0 %! rhs._0) <: t_u64 + f_clone_pre = (fun (self: t_i64) -> true); + f_clone_post = (fun (self: t_i64) (out: t_i64) -> true); + f_clone + = + fun (self: t_i64) -> + C_i64 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i64 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Ops.Arith.t_Add t_u64 t_u64 = +let impl_47: Core.Cmp.t_PartialEq t_i64 t_i64 = { - f_Output = t_u64; - f_add_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_add_post = (fun (self: t_u64) (rhs: t_u64) (out: t_u64) -> true); - f_add = fun (self: t_u64) (rhs: t_u64) -> C_u64 (self._0 +! rhs._0) <: t_u64 + f_eq_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_eq_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_eq = (fun (self: t_i64) (rhs: t_i64) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_ne_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_ne = fun (self: t_i64) (rhs: t_i64) -> ~.(self._0 =. rhs._0 <: bool) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Ops.Arith.t_Div t_u64 t_u64 = +let impl_48: Core.Cmp.t_PartialOrd t_i64 t_i64 = { - f_Output = t_u64; - f_div_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_div_post = (fun (self: t_u64) (rhs: t_u64) (out: t_u64) -> true); - f_div = fun (self: t_u64) (rhs: t_u64) -> C_u64 (self._0 /! rhs._0) <: t_u64 + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_partial_cmp_post + = + (fun (self: t_i64) (rhs: t_i64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_i64) (rhs: t_i64) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_lt_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_lt + = + (fun (self: t_i64) (rhs: t_i64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_le_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_le + = + (fun (self: t_i64) (rhs: t_i64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_gt_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_gt + = + (fun (self: t_i64) (rhs: t_i64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_ge_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_ge + = + fun (self: t_i64) (rhs: t_i64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Ops.Arith.t_Mul t_u128 t_u128 = - { - f_Output = t_u128; - f_mul_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_mul_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); - f_mul = fun (self: t_u128) (rhs: t_u128) -> C_u128 (self._0 *! rhs._0) <: t_u128 - } +type t_i8 = | C_i8 : Core.Base_interface.Int.t_I8 -> t_i8 [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Ops.Arith.t_Rem t_u128 t_u128 = +let impl_17: Core.Clone.t_Clone t_i8 = { - f_Output = t_u128; - f_rem_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_rem_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); - f_rem = fun (self: t_u128) (rhs: t_u128) -> C_u128 (self._0 %! rhs._0) <: t_u128 + f_clone_pre = (fun (self: t_i8) -> true); + f_clone_post = (fun (self: t_i8) (out: t_i8) -> true); + f_clone + = + fun (self: t_i8) -> + C_i8 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i8 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Ops.Arith.t_Add t_u128 t_u128 = +let impl_41: Core.Cmp.t_PartialEq t_i8 t_i8 = { - f_Output = t_u128; - f_add_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_add_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); - f_add = fun (self: t_u128) (rhs: t_u128) -> C_u128 (self._0 +! rhs._0) <: t_u128 + f_eq_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_eq_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_eq = (fun (self: t_i8) (rhs: t_i8) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_ne_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_ne = fun (self: t_i8) (rhs: t_i8) -> ~.(self._0 =. rhs._0 <: bool) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Ops.Arith.t_Div t_u128 t_u128 = +let impl_42: Core.Cmp.t_PartialOrd t_i8 t_i8 = { - f_Output = t_u128; - f_div_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_div_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); - f_div = fun (self: t_u128) (rhs: t_u128) -> C_u128 (self._0 /! rhs._0) <: t_u128 + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_partial_cmp_post + = + (fun (self: t_i8) (rhs: t_i8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_i8) (rhs: t_i8) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_lt_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_lt + = + (fun (self: t_i8) (rhs: t_i8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_le_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_le + = + (fun (self: t_i8) (rhs: t_i8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_gt_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_gt + = + (fun (self: t_i8) (rhs: t_i8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_ge_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_ge + = + fun (self: t_i8) (rhs: t_i8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Ops.Arith.t_Mul t_usize t_usize = - { - f_Output = t_usize; - f_mul_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_mul_post = (fun (self: t_usize) (rhs: t_usize) (out: t_usize) -> true); - f_mul = fun (self: t_usize) (rhs: t_usize) -> C_usize (self._0 *! rhs._0) <: t_usize - } +type t_isize = | C_isize : Core.Base_interface.Int.t_I64 -> t_isize [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Ops.Arith.t_Rem t_usize t_usize = +let impl_27: Core.Clone.t_Clone t_isize = { - f_Output = t_usize; - f_rem_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_rem_post = (fun (self: t_usize) (rhs: t_usize) (out: t_usize) -> true); - f_rem = fun (self: t_usize) (rhs: t_usize) -> C_usize (self._0 %! rhs._0) <: t_usize + f_clone_pre = (fun (self: t_isize) -> true); + f_clone_post = (fun (self: t_isize) (out: t_isize) -> true); + f_clone + = + fun (self: t_isize) -> + C_isize + (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_isize } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Ops.Arith.t_Add t_usize t_usize = +let impl_51: Core.Cmp.t_PartialEq t_isize t_isize = { - f_Output = t_usize; - f_add_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_add_post = (fun (self: t_usize) (rhs: t_usize) (out: t_usize) -> true); - f_add = fun (self: t_usize) (rhs: t_usize) -> C_usize (self._0 +! rhs._0) <: t_usize + f_eq_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_eq_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_eq = (fun (self: t_isize) (rhs: t_isize) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_ne_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_ne = fun (self: t_isize) (rhs: t_isize) -> ~.(self._0 =. rhs._0 <: bool) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Ops.Arith.t_Div t_usize t_usize = +let impl_52: Core.Cmp.t_PartialOrd t_isize t_isize = { - f_Output = t_usize; - f_div_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_div_post = (fun (self: t_usize) (rhs: t_usize) (out: t_usize) -> true); - f_div = fun (self: t_usize) (rhs: t_usize) -> C_usize (self._0 /! rhs._0) <: t_usize + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_partial_cmp_post + = + (fun (self: t_isize) (rhs: t_isize) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_isize) (rhs: t_isize) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_lt_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_lt + = + (fun (self: t_isize) (rhs: t_isize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_le_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_le + = + (fun (self: t_isize) (rhs: t_isize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_gt_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_gt + = + (fun (self: t_isize) (rhs: t_isize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_ge_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_ge + = + fun (self: t_isize) (rhs: t_isize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false } - -////////////////////////// - -type u128 = t_u128 -type u64 = t_u64 -type u32 = t_u32 -type u16 = t_u16 -type u8 = t_u8 -type usize = t_usize - -type pub_u128 x = C_u128 { f_v = x } -type pub_u64 x = C_u64 { f_v = x } -type pub_u32 x = C_u32 { f_v = x } -type pub_u16 x = C_u16 { f_v = x } -type pub_u8 x = C_u8 { f_v = x } -type sz x = C_usize { f_v = x } diff --git a/proof-libs/fstar/generated-core/Core.Result.fst b/proof-libs/fstar/generated-core/Core.Result.fst new file mode 100644 index 000000000..cd4873cfe --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Result.fst @@ -0,0 +1,13 @@ +module Core.Result +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Result (v_T: Type0) (v_E: Type0) = + | Result_Ok : v_T -> t_Result v_T v_E + | Result_Err : v_E -> t_Result v_T v_E + +let impl__ok (#v_T #v_E: Type0) (self: t_Result v_T v_E) : Core.Option.t_Option v_T = + match self with + | Result_Ok x -> Core.Option.Option_Some x <: Core.Option.t_Option v_T + | Result_Err _ -> Core.Option.Option_None <: Core.Option.t_Option v_T diff --git a/proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst b/proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst new file mode 100644 index 000000000..168a29f28 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst @@ -0,0 +1,34 @@ +module Core.Slice.Index.Private_slice_index +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_Sealed (v_Self: Type0) = { __marker_trait_t_Sealed:Prims.unit } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: t_Sealed (Core.Ops.Range.t_RangeTo usize) = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: t_Sealed (Core.Ops.Range.t_RangeFrom usize) = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: t_Sealed Core.Ops.Range.t_RangeFull = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: t_Sealed (Core.Ops.Range.t_RangeInclusive usize) = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: t_Sealed (Core.Ops.Range.t_RangeToInclusive usize) = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: t_Sealed (Core.Ops.Range.t_Bound usize & Core.Ops.Range.t_Bound usize) = + { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: t_Sealed (Core.Ops.Range.t_Range usize) = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: t_Sealed Core.Ops.Index_range.t_IndexRange = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: t_Sealed Core.Primitive.t_usize = { __marker_trait = () } diff --git a/proof-libs/fstar/generated-core/Core.Slice.Index.fst b/proof-libs/fstar/generated-core/Core.Slice.Index.fst new file mode 100644 index 000000000..cdd0e1ce5 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Slice.Index.fst @@ -0,0 +1,71 @@ +module Core.Slice.Index +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +class t_SliceIndex (v_Self: Type0) (v_T: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_9346575357466912174:Core.Slice.Index.Private_slice_index.t_Sealed + v_Self; + f_Output:Type0; + f_index_pre:v_Self -> v_T -> Type0; + f_index_post:v_Self -> v_T -> f_Output -> Type0; + f_index:x0: v_Self -> x1: v_T + -> Prims.Pure f_Output (f_index_pre x0 x1) (fun result -> f_index_post x0 x1 result) +} + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl + (#v_T #v_I: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: t_SliceIndex v_I (Core.Primitive.t_Slice v_T)) + : Core.Ops.Index.t_Index (Core.Primitive.t_Slice v_T) v_I = + { + f_Output = i2.f_Output; + f_index_pre = (fun (self: Core.Primitive.t_Slice v_T) (index: v_I) -> true); + f_index_post = (fun (self: Core.Primitive.t_Slice v_T) (index: v_I) (out: i2.f_Output) -> true); + f_index + = + fun (self: Core.Primitive.t_Slice v_T) (index: v_I) -> + f_index #v_I #(Core.Primitive.t_Slice v_T) #FStar.Tactics.Typeclasses.solve index self + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2 (#v_T: Type0) : t_SliceIndex Core.Ops.Range.t_RangeFull (Core.Primitive.t_Slice v_T) = + { + _super_9346575357466912174 = FStar.Tactics.Typeclasses.solve; + f_Output = Core.Primitive.t_Slice v_T; + f_index_pre + = + (fun (self: Core.Ops.Range.t_RangeFull) (slice: Core.Primitive.t_Slice v_T) -> true); + f_index_post + = + (fun + (self: Core.Ops.Range.t_RangeFull) + (slice: Core.Primitive.t_Slice v_T) + (out: Core.Primitive.t_Slice v_T) + -> + true); + f_index = fun (self: Core.Ops.Range.t_RangeFull) (slice: Core.Primitive.t_Slice v_T) -> slice + } + +/// The methods `index` and `index_mut` panic if the index is out of bounds. +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1 (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : t_SliceIndex Core.Primitive.t_usize (Core.Primitive.t_Slice v_T) = + { + _super_9346575357466912174 = FStar.Tactics.Typeclasses.solve; + f_Output = v_T; + f_index_pre = (fun (self: Core.Primitive.t_usize) (slice: Core.Primitive.t_Slice v_T) -> true); + f_index_post + = + (fun (self: Core.Primitive.t_usize) (slice: Core.Primitive.t_Slice v_T) (out: v_T) -> true); + f_index + = + fun (self: Core.Primitive.t_usize) (slice: Core.Primitive.t_Slice v_T) -> + let (x: usize):usize = + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #usize + #FStar.Tactics.Typeclasses.solve + self.Core.Primitive._0.Core.Base_interface.Int.f_v + in + slice.Core.Primitive.f_v.Core.Base.Spec.Seq.f_v.[ x ] + } diff --git a/proof-libs/fstar/generated-core/Core.Slice.Iter.fst b/proof-libs/fstar/generated-core/Core.Slice.Iter.fst new file mode 100644 index 000000000..a9223a99d --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Slice.Iter.fst @@ -0,0 +1,42 @@ +module Core.Slice.Iter +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Iter (v_T: Type0) = { + f_data:Core.Primitive.t_Slice v_T; + f__marker:Core.Marker.t_PhantomData v_T +} + +let impl__new + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (slice: Core.Primitive.t_Slice v_T) + : t_Iter v_T = + { + f_data = Core.Clone.f_clone #(Core.Primitive.t_Slice v_T) #FStar.Tactics.Typeclasses.solve slice; + f__marker = Core.Marker.PhantomData <: Core.Marker.t_PhantomData v_T + } + <: + t_Iter v_T + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1 (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Clone.t_Clone (t_Iter v_T) = + { + f_clone_pre = (fun (self: t_Iter v_T) -> true); + f_clone_post = (fun (self: t_Iter v_T) (out: t_Iter v_T) -> true); + f_clone + = + fun (self: t_Iter v_T) -> + { + f_data + = + Core.Clone.f_clone #(Core.Primitive.t_Slice v_T) + #FStar.Tactics.Typeclasses.solve + self.f_data; + f__marker = self.f__marker + } + <: + t_Iter v_T + } diff --git a/proof-libs/fstar/generated-core/Core.Slice.fst b/proof-libs/fstar/generated-core/Core.Slice.fst new file mode 100644 index 000000000..2d0e00be5 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Slice.fst @@ -0,0 +1,33 @@ +module Core.Slice +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let impl__len + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (self: Core.Primitive.t_Slice v_T) + : usize = + Core.Convert.f_from #usize + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + (Core.Base.Seq.len #v_T + (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) + #FStar.Tactics.Typeclasses.solve + self.Core.Primitive.f_v + <: + Core.Base.Spec.Seq.t_Seq v_T) + <: + Core.Base.Spec.Haxint.t_HaxInt) + +let impl__is_empty + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: Core.Primitive.t_Slice v_T) + : bool = Rust_primitives.Usize.eq (impl__len #v_T self <: usize) (sz 0) + +let impl__iter + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: Core.Primitive.t_Slice v_T) + : Core.Slice.Iter.t_Iter v_T = Core.Slice.Iter.impl__new #v_T self diff --git a/proof-libs/fstar/generated-core/Makefile b/proof-libs/fstar/generated-core/Makefile deleted file mode 100644 index c2b2db6e1..000000000 --- a/proof-libs/fstar/generated-core/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -FSTAR_DEFAULT_ARGS= -ifdef FSTAR_HOME - ULIB_ML=$(FSTAR_HOME)/ulib/ml - FSTARLIB_DIR=$(FSTAR_HOME)/lib/fstar/lib -else - FSTAR_PREFIX=$(dir $(shell which fstar.exe))/.. - ULIB_ML=$(FSTAR_PREFIX)/lib/fstar/ml - FSTARLIB_DIR=$(FSTAR_PREFIX)/lib/fstar/lib -endif -FSTARLIB=$(FSTARLIB_DIR)/fstar_lib.cmxa - -# Left as an example if we were to add multiple versions of fstar ulib -# ifeq ($(MEM),HST) -# OCAML_DEFAULT_FLAGS=-predicates hyperstack -# endif - -ifdef FSTAR_HOME - WITH_OCAMLPATH=OCAMLPATH=$(FSTAR_HOME)/lib -else - WITH_OCAMLPATH= -endif -OCAMLOPT_BARE=$(WITH_OCAMLPATH) ocamlfind opt -OCAMLOPT_=$(OCAMLOPT_BARE) -package fstar.lib -linkpkg -g -OCAMLOPT=$(OCAMLOPT_) $(OCAML_DEFAULT_FLAGS) -OCAMLC_=$(WITH_OCAMLPATH) ocamlfind c -package fstar.lib -linkpkg -g -OCAMLC=$(OCAMLC_) $(OCAML_DEFAULT_FLAGS) diff --git a/proof-libs/fstar/generated-core/Prelude.fst b/proof-libs/fstar/generated-core/Prelude.fst deleted file mode 100644 index 2c4afaac6..000000000 --- a/proof-libs/fstar/generated-core/Prelude.fst +++ /dev/null @@ -1,599 +0,0 @@ -module Prelude -#set-options "--fuel 1 --ifuel 1 --z3rlimit 15" - -open Core.Array -open Core.Primitive -open Core.Base.Int.Number_conversion -open Core.Convert -open Core.Base.Int -open Core.Ops.Arith -open Core.Ops.Bit -// open Core.Num -open Core.Int - -let array_of_list n l : t_Array u8 (sz n) = - { f_v = l } - -let v_RCON: t_Array u8 (sz 15) = - let list = - [(pub_u8 141); (pub_u8 1); (pub_u8 2); (pub_u8 4); (pub_u8 8); (pub_u8 16); (pub_u8 32); (pub_u8 64); (pub_u8 128); (pub_u8 27); (pub_u8 54); (pub_u8 108); (pub_u8 216); (pub_u8 171); (pub_u8 77)] - in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 15); - array_of_list 15 list - -let v_SBOX: t_Array u8 (sz 256) = - let list = - [ - (pub_u8 99); (pub_u8 124); (pub_u8 119); (pub_u8 123); (pub_u8 242); (pub_u8 107); (pub_u8 111); (pub_u8 197); (pub_u8 48); (pub_u8 1); (pub_u8 103); (pub_u8 43); (pub_u8 254); (pub_u8 215); - (pub_u8 171); (pub_u8 118); (pub_u8 202); (pub_u8 130); (pub_u8 201); (pub_u8 125); (pub_u8 250); (pub_u8 89); (pub_u8 71); (pub_u8 240); (pub_u8 173); (pub_u8 212); (pub_u8 162); (pub_u8 175); - (pub_u8 156); (pub_u8 164); (pub_u8 114); (pub_u8 192); (pub_u8 183); (pub_u8 253); (pub_u8 147); (pub_u8 38); (pub_u8 54); (pub_u8 63); (pub_u8 247); (pub_u8 204); (pub_u8 52); (pub_u8 165); - (pub_u8 229); (pub_u8 241); (pub_u8 113); (pub_u8 216); (pub_u8 49); (pub_u8 21); (pub_u8 4); (pub_u8 199); (pub_u8 35); (pub_u8 195); (pub_u8 24); (pub_u8 150); (pub_u8 5); (pub_u8 154); (pub_u8 7); - (pub_u8 18); (pub_u8 128); (pub_u8 226); (pub_u8 235); (pub_u8 39); (pub_u8 178); (pub_u8 117); (pub_u8 9); (pub_u8 131); (pub_u8 44); (pub_u8 26); (pub_u8 27); (pub_u8 110); (pub_u8 90); - (pub_u8 160); (pub_u8 82); (pub_u8 59); (pub_u8 214); (pub_u8 179); (pub_u8 41); (pub_u8 227); (pub_u8 47); (pub_u8 132); (pub_u8 83); (pub_u8 209); (pub_u8 0); (pub_u8 237); (pub_u8 32); - (pub_u8 252); (pub_u8 177); (pub_u8 91); (pub_u8 106); (pub_u8 203); (pub_u8 190); (pub_u8 57); (pub_u8 74); (pub_u8 76); (pub_u8 88); (pub_u8 207); (pub_u8 208); (pub_u8 239); (pub_u8 170); - (pub_u8 251); (pub_u8 67); (pub_u8 77); (pub_u8 51); (pub_u8 133); (pub_u8 69); (pub_u8 249); (pub_u8 2); (pub_u8 127); (pub_u8 80); (pub_u8 60); (pub_u8 159); (pub_u8 168); (pub_u8 81); (pub_u8 163); - (pub_u8 64); (pub_u8 143); (pub_u8 146); (pub_u8 157); (pub_u8 56); (pub_u8 245); (pub_u8 188); (pub_u8 182); (pub_u8 218); (pub_u8 33); (pub_u8 16); (pub_u8 255); (pub_u8 243); (pub_u8 210); - (pub_u8 205); (pub_u8 12); (pub_u8 19); (pub_u8 236); (pub_u8 95); (pub_u8 151); (pub_u8 68); (pub_u8 23); (pub_u8 196); (pub_u8 167); (pub_u8 126); (pub_u8 61); (pub_u8 100); (pub_u8 93); - (pub_u8 25); (pub_u8 115); (pub_u8 96); (pub_u8 129); (pub_u8 79); (pub_u8 220); (pub_u8 34); (pub_u8 42); (pub_u8 144); (pub_u8 136); (pub_u8 70); (pub_u8 238); (pub_u8 184); (pub_u8 20); - (pub_u8 222); (pub_u8 94); (pub_u8 11); (pub_u8 219); (pub_u8 224); (pub_u8 50); (pub_u8 58); (pub_u8 10); (pub_u8 73); (pub_u8 6); (pub_u8 36); (pub_u8 92); (pub_u8 194); (pub_u8 211); (pub_u8 172); - (pub_u8 98); (pub_u8 145); (pub_u8 149); (pub_u8 228); (pub_u8 121); (pub_u8 231); (pub_u8 200); (pub_u8 55); (pub_u8 109); (pub_u8 141); (pub_u8 213); (pub_u8 78); (pub_u8 169); (pub_u8 108); - (pub_u8 86); (pub_u8 244); (pub_u8 234); (pub_u8 101); (pub_u8 122); (pub_u8 174); (pub_u8 8); (pub_u8 186); (pub_u8 120); (pub_u8 37); (pub_u8 46); (pub_u8 28); (pub_u8 166); (pub_u8 180); - (pub_u8 198); (pub_u8 232); (pub_u8 221); (pub_u8 116); (pub_u8 31); (pub_u8 75); (pub_u8 189); (pub_u8 139); (pub_u8 138); (pub_u8 112); (pub_u8 62); (pub_u8 181); (pub_u8 102); (pub_u8 72); - (pub_u8 3); (pub_u8 246); (pub_u8 14); (pub_u8 97); (pub_u8 53); (pub_u8 87); (pub_u8 185); (pub_u8 134); (pub_u8 193); (pub_u8 29); (pub_u8 158); (pub_u8 225); (pub_u8 248); (pub_u8 152); - (pub_u8 17); (pub_u8 105); (pub_u8 217); (pub_u8 142); (pub_u8 148); (pub_u8 155); (pub_u8 30); (pub_u8 135); (pub_u8 233); (pub_u8 206); (pub_u8 85); (pub_u8 40); (pub_u8 223); (pub_u8 140); - (pub_u8 161); (pub_u8 137); (pub_u8 13); (pub_u8 191); (pub_u8 230); (pub_u8 66); (pub_u8 104); (pub_u8 65); (pub_u8 153); (pub_u8 45); (pub_u8 15); (pub_u8 176); (pub_u8 84); (pub_u8 187); - (pub_u8 22) - ] - in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 256); - array_of_list 256 list - -(* Manually added *) -class t_Cast (v_Self: Type0) (v_T: Type0) = { - cast_pre:v_T -> Type0; - cast_post:v_T -> v_Self -> Type0; - cast:x0: v_T -> Prims.Pure v_Self (cast_pre x0) (fun result -> cast_post x0 result) -} - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_cast_u128_u32 : t_Cast u32 u128 = - { - cast_pre = (fun (self: t_u128) -> true); - cast_post = (fun (self: t_u128) (out: t_u32) -> true); - cast - = - fun (self: t_u128) -> C_u32 ({f_v = (match self with C_u128 v -> v.f_v % pow2 32)} <: t_U32) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_cast_u32_u128 : t_Cast u128 u32 = - { - cast_pre = (fun (self: t_u32) -> true); - cast_post = (fun (self: t_u32) (out: t_u128) -> true); - cast - = - fun (self: t_u32) -> C_u128 ({f_v = (match self with C_u32 v -> v.f_v)} <: t_U128) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_cast_u32_u8 : t_Cast u8 u32 = - { - cast_pre = (fun (self: t_u32) -> true); - cast_post = (fun (self: t_u32) (out: t_u8) -> true); - cast - = - fun (self: t_u32) -> C_u8 ({f_v = (match self with C_u32 v -> v.f_v % pow2 8)} <: t_U8) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_cast_u8_u32 : t_Cast u32 u8 = - { - cast_pre = (fun (self: t_u8) -> true); - cast_post = (fun (self: t_u8) (out: t_u32) -> true); - cast - = - fun (self: t_u8) -> C_u32 ({f_v = (match self with C_u8 v -> v.f_v)} <: t_U32) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_cast_u8_usize : t_Cast usize u8 = - { - cast_pre = (fun (self: t_u8) -> true); - cast_post = (fun (self: t_u8) (out: t_usize) -> true); - cast - = - fun (self: t_u8) -> C_usize ({f_v = (match self with C_u8 v -> v.f_v)} <: t_U64) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_shr_u128: Core.Ops.Bit.t_Shr t_u128 t_usize = - { - f_Output = t_u128; - f_shr_pre = (fun (self: t_u128) (rhs: t_usize) -> true); - f_shr_post = (fun (self: t_u128) (rhs: t_usize) (out: t_u128) -> true); - f_shr - = - fun (self: t_u128) (rhs: t_usize) -> C_u128 ((match self with C_u128 v -> v <: t_U128) >>! (match rhs with C_usize v -> v <: t_U64)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_shr_u32_usize: Core.Ops.Bit.t_Shr t_u32 t_usize = - { - f_Output = t_u32; - f_shr_pre = (fun (self: t_u32) (rhs: t_usize) -> true); - f_shr_post = (fun (self: t_u32) (rhs: t_usize) (out: t_u32) -> true); - f_shr - = - fun (self: t_u32) (rhs: t_usize) -> C_u32 ((match self with C_u32 v -> v <: t_U32) >>! (match rhs with C_usize v -> v <: t_U64)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_shr_u8_usize: Core.Ops.Bit.t_Shr t_u8 t_usize = - { - f_Output = t_u8; - f_shr_pre = (fun (self: t_u8) (rhs: t_usize) -> true); - f_shr_post = (fun (self: t_u8) (rhs: t_usize) (out: t_u8) -> true); - f_shr - = - fun (self: t_u8) (rhs: t_usize) -> C_u8 ((match self with C_u8 v -> v <: t_U8) >>! (match rhs with C_usize v -> v <: t_U64)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_shr_u8_u128: Core.Ops.Bit.t_Shr t_u8 t_u128 = - { - f_Output = t_u8; - f_shr_pre = (fun (self: t_u8) (rhs: t_u128) -> true); - f_shr_post = (fun (self: t_u8) (rhs: t_u128) (out: t_u8) -> true); - f_shr - = - fun (self: t_u8) (rhs: t_u128) -> C_u8 ((match self with C_u8 v -> v <: t_U8) >>! (match rhs with C_u128 v -> v <: t_U128)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_u128_u128: Core.Ops.Bit.t_Shl t_u128 t_u128 = - { - f_Output = t_u128; - f_shl_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_shl_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); - f_shl - = - fun (self: t_u128) (rhs: t_u128) -> C_u128 ((match self with C_u128 v -> v <: t_U128) < v <: t_U128)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_u32_u128: Core.Ops.Bit.t_Shl t_u32 t_u128 = - { - f_Output = t_u32; - f_shl_pre = (fun (self: t_u32) (rhs: t_u128) -> true); - f_shl_post = (fun (self: t_u32) (rhs: t_u128) (out: t_u32) -> true); - f_shl - = - fun (self: t_u32) (rhs: t_u128) -> C_u32 ((match self with C_u32 v -> v <: t_U32) < v <: t_U128)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_u8_u128: Core.Ops.Bit.t_Shl t_u8 t_u128 = - { - f_Output = t_u8; - f_shl_pre = (fun (self: t_u8) (rhs: t_u128) -> true); - f_shl_post = (fun (self: t_u8) (rhs: t_u128) (out: t_u8) -> true); - f_shl - = - fun (self: t_u8) (rhs: t_u128) -> C_u8 ((match self with C_u8 v -> v <: t_U8) < v <: t_U128)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_bitor_u128: Core.Ops.Bit.t_BitOr t_u128 t_u128 = - { - f_Output = t_u128; - f_bitor_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_bitor_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); - f_bitor - = - fun (self: t_u128) (rhs: t_u128) -> C_u128 ((match self with C_u128 v -> v <: t_U128) |. (match rhs with C_u128 v -> v <: t_U128)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_bitor_u32: Core.Ops.Bit.t_BitOr t_u32 t_u32 = - { - f_Output = t_u32; - f_bitor_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_bitor_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); - f_bitor - = - fun (self: t_u32) (rhs: t_u32) -> C_u32 ((match self with C_u32 v -> v <: t_U32) |. (match rhs with C_u32 v -> v <: t_U32)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_bitxor_u32: Core.Ops.Bit.t_BitXor t_u32 t_u32 = - { - f_Output = t_u32; - f_bitxor_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_bitxor_post = (fun (self: t_u32) (rhs: t_u32) (out: t_u32) -> true); - f_bitxor - = - fun (self: t_u32) (rhs: t_u32) -> C_u32 ((match self with C_u32 v -> v <: t_U32) ^. (match rhs with C_u32 v -> v <: t_U32)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_bitxor_u128: Core.Ops.Bit.t_BitXor t_u128 t_u128 = - { - f_Output = t_u128; - f_bitxor_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_bitxor_post = (fun (self: t_u128) (rhs: t_u128) (out: t_u128) -> true); - f_bitxor - = - fun (self: t_u128) (rhs: t_u128) -> C_u128 ((match self with C_u128 v -> v <: t_U128) ^. (match rhs with C_u128 v -> v <: t_U128)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_bitxor_u8: Core.Ops.Bit.t_BitXor t_u8 t_u8 = - { - f_Output = t_u8; - f_bitxor_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_bitxor_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); - f_bitxor - = - fun (self: t_u8) (rhs: t_u8) -> C_u8 ((match self with C_u8 v -> v <: t_U8) ^. (match rhs with C_u8 v -> v <: t_U8)) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_bitand_u8: Core.Ops.Bit.t_BitAnd t_u8 t_u8 = - { - f_Output = t_u8; - f_bitand_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_bitand_post = (fun (self: t_u8) (rhs: t_u8) (out: t_u8) -> true); - f_bitand - = - fun (self: t_u8) (rhs: t_u8) -> C_u8 ((match self with C_u8 v -> v <: t_U8) &. (match rhs with C_u8 v -> v <: t_U8)) - } - -(* / Manually added *) - -let index_u32 (s: u128) (i: usize) : u32 = - cast ((s >>! (i *! sz 32 <: usize) <: u128) %! (pub_u128 1 <>! (i *! sz 8 <: usize) <: u32) %! ((pub_u32 1) < v.f_v < 256}) = impl_2__index #u8 (sz 256) (v_SBOX) (sz 255) <: u8 - -let sub0_not (v: u8) = (v_SBOX).[ (cast v <: usize) ] <: u8 -let subi (v: u32) (n: Prims.nat {n < 4}) = sub0_not (index_u8 v (sz n) <: u8) // v_SBOX.[ cast (index_u8 v (sz 0) <: u8) <: usize ] <: u8 - -let subword (v: u32) : u32 = - rebuild_u32 (subi v 0) (subi v 1) (subi v 2) (subi v 3) - // rebuild_u32 (v_SBOX.[ cast (index_u8 v (sz 0) <: u8) <: usize ] <: u8) - // (v_SBOX.[ cast (index_u8 v (sz 1) <: u8) <: usize ] <: u8) - // (v_SBOX.[ cast (index_u8 v (sz 2) <: u8) <: usize ] <: u8) - // (v_SBOX.[ cast (index_u8 v (sz 3) <: u8) <: usize ] <: u8) - -let aeskeygenassist (v1: u128) (v2: u8) : u128 = - let x1:u32 = index_u32 v1 (sz 1) in - let x3:u32 = index_u32 v1 (sz 3) in - let y0:u32 = subword x1 in - let y1:u32 = (rotword y0 <: u32) ^. (cast (v2 <: u8) <: u32) in - let y2:u32 = subword x3 in - let y3:u32 = (rotword y2 <: u32) ^. (cast (v2 <: u8) <: u32) in - rebuild_u128 y0 y1 y2 y3 - -let subbytes (s: u128) : u128 = - rebuild_u128 (subword (index_u32 s (sz 0) <: u32) <: u32) - (subword (index_u32 s (sz 1) <: u32) <: u32) - (subword (index_u32 s (sz 2) <: u32) <: u32) - (subword (index_u32 s (sz 3) <: u32) <: u32) - -let aesenclast (state rkey: u128) : u128 = - let state:u128 = shiftrows state in - let state:u128 = subbytes state in - state ^. rkey - -let vpshufd1 (s: u128) (o: u8) (i: usize) : u32 = - index_u32 (s >>! - (sz 32 *! (cast ((o >>! (sz 2 *! i <: usize) <: u8) %! (pub_u8 4) <: u8) <: usize) <: usize) - <: - u128) - (sz 0) - -let vpshufd (s: u128) (o: u8) : u128 = - let (d1: u32):u32 = vpshufd1 s o (sz 0) in - let (d2: u32):u32 = vpshufd1 s o (sz 1) in - let (d3: u32):u32 = vpshufd1 s o (sz 2) in - let (d4: u32):u32 = vpshufd1 s o (sz 3) in - rebuild_u128 d1 d2 d3 d4 - -let vshufps (s1 s2: u128) (o: u8) : u128 = - let (d1: u32):u32 = vpshufd1 s1 o (sz 0) in - let (d2: u32):u32 = vpshufd1 s1 o (sz 1) in - let (d3: u32):u32 = vpshufd1 s2 o (sz 2) in - let (d4: u32):u32 = vpshufd1 s2 o (sz 3) in - rebuild_u128 d1 d2 d3 d4 - -let key_combine (rkey temp1 temp2: u128) : (u128 & u128) = - let temp1:u128 = vpshufd temp1 (pub_u8 255) in - let temp2:u128 = vshufps temp2 rkey (pub_u8 16) in - let rkey:u128 = rkey ^. temp2 in - let temp2:u128 = vshufps temp2 rkey (pub_u8 140) in - let rkey:u128 = rkey ^. temp2 in - let rkey:u128 = rkey ^. temp1 in - rkey, temp2 <: (u128 & u128) - -let key_expand (rcon: u8) (rkey temp2: u128) : (u128 & u128) = - let temp1:u128 = aeskeygenassist rkey rcon in - key_combine rkey temp1 temp2 - -let xtime (x: u8) : u8 = - let x1:u8 = x <>! (pub_u128 7) in - let x71:u8 = x7 &. (pub_u8 1) in - let x711b:u8 = x71 *! (pub_u8 27) in - x1 ^. x711b - -let mixcolumn (c: usize) (state: u128) : u32 = - let s0:u8 = matrix_index state (sz 0) c in - let s1:u8 = matrix_index state (sz 1) c in - let s2:u8 = matrix_index state (sz 2) c in - let s3:u8 = matrix_index state (sz 3) c in - let tmp:u8 = ((s0 ^. s1 <: u8) ^. s2 <: u8) ^. s3 in - let r0:u8 = (s0 ^. tmp <: u8) ^. (xtime (s0 ^. s1 <: u8) <: u8) in - let r1:u8 = (s1 ^. tmp <: u8) ^. (xtime (s1 ^. s2 <: u8) <: u8) in - let r2:u8 = (s2 ^. tmp <: u8) ^. (xtime (s2 ^. s3 <: u8) <: u8) in - let r3:u8 = (s3 ^. tmp <: u8) ^. (xtime (s3 ^. s0 <: u8) <: u8) in - rebuild_u32 r0 r1 r2 r3 - -let mixcolumns (state: u128) : u128 = - let c0:u32 = mixcolumn (sz 0) state in - let c1:u32 = mixcolumn (sz 1) state in - let c2:u32 = mixcolumn (sz 2) state in - let c3:u32 = mixcolumn (sz 3) state in - rebuild_u128 c0 c1 c2 c3 - -let aesenc (state rkey: u128) : u128 = - let state:u128 = shiftrows state in - let state:u128 = subbytes state in - let state:u128 = mixcolumns state in - state ^. rkey - -type sz_small = x:usize{match x with | C_usize v -> v.f_v < 12} - -open Core.Cmp - -let aes_helper (rkeys: t_Array u128 (sz 12)) (i : Prims.nat {i < 12}) : Lemma (requires (Core.Base.Seq.Base_impl.impl_2__len #u128 rkeys.f_v <: Core.Base.Int.t_HaxInt) = 12) (ensures ((Core.Convert.f_from #Core.Base.Int.t_HaxInt #usize #FStar.Tactics.Typeclasses.solve (sz i)) <. (Core.Base.Seq.Base_impl.impl_2__len #u128 rkeys.f_v <: Core.Base.Int.t_HaxInt))) = () - -#set-options "--fuel 100 --ifuel 1 --z3rlimit 15" -let aes_rounds (rkeys: t_Array u128 (sz 12) {(Core.Base.Seq.Base_impl.impl_2__len #u128 rkeys.f_v <: Core.Base.Int.t_HaxInt) = 12} ) (inp: u128) : u128 = - let _ = aes_helper rkeys in - let (state: u128):u128 = inp ^. (rkeys.[ sz 0 <: sz_small ] <: u128) - in - let state:u128 = - (let state:u128 = state in - let state:u128 = ( aes_helper rkeys 1 ; aesenc state (rkeys.[ sz 1 ] <: u128)) in - let state:u128 = ( aes_helper rkeys 2 ; aesenc state (rkeys.[ sz 2 ] <: u128)) in - let state:u128 = ( aes_helper rkeys 3 ; aesenc state (rkeys.[ sz 3 ] <: u128) ) in - let state:u128 = ( aes_helper rkeys 4 ; aesenc state (rkeys.[ sz 4 ] <: u128) ) in - let state:u128 = ( aes_helper rkeys 5 ; aesenc state (rkeys.[ sz 5 ] <: u128) ) in - let state:u128 = ( aes_helper rkeys 6 ; aesenc state (rkeys.[ sz 6 ] <: u128) ) in - let state:u128 = ( aes_helper rkeys 7 ; aesenc state (rkeys.[ sz 7 ] <: u128) ) in - let state:u128 = ( aes_helper rkeys 8 ; aesenc state (rkeys.[ sz 8 ] <: u128) ) in - let state:u128 = ( aes_helper rkeys 9 ; aesenc state (rkeys.[ sz 9 ] <: u128) ) in - let state:u128 = ( aes_helper rkeys 10 ; aesenc state (rkeys.[ sz 10 ] <: u128) ) in - state - ) - - // Rust_primitives.Hax.Folds.fold_range (sz 1) - // (sz 10) - // (fun state temp_1_ -> - // let state:u128 = state in - // let _:usize = temp_1_ in - // true) - // state - // (fun state round -> - // let state:u128 = state in - // let round:usize = round in - // aesenc state (rkeys.[ round ] <: u128) <: u128) - in - aesenclast state (rkeys.[ sz 10 ] <: u128) - -type rkeys_typ = x:t_Array u128 (sz 12){Core.Base.Seq.Base_impl.impl_2__len #u128 x.f_v = 12} - -#set-options "--fuel 1 --ifuel 1 --z3rlimit 15" -let rec new_is_sized_correct (n : Prims.nat{n < 20}) : Lemma (requires true) (ensures (Core.Base.Seq.Base_impl.impl_2__len #u128 (impl_2__new (sz n) (pub_u128 0)).f_v = n)) = - match Core.Base.Seq.Base_spec.impl_1__match_list #u128 ((impl_2__new (sz n) (pub_u128 0)).f_v) with - | Core.Base.Seq.LIST_NIL -> () - | Core.Base.Seq.LIST_CONS _ tl -> - (new_is_sized_correct (n-1)) - // Core.Base.Int.Base_spec.impl_9__succ (Core.Base.Seq.Base_impl.impl_2__len #u128 tl <: Core.Base.Int.t_HaxInt) - -#set-options "--fuel 20 --ifuel 1 --z3rlimit 30" -let rec set_index_is_sized_correct (ms : Prims.nat{ms < 13}) (n : Prims.nat{n < ms}) (rkeys : t_Array u128 (sz ms)) key : Lemma (requires Core.Base.Seq.Base_impl.impl_2__len #u128 rkeys.f_v = ms) (ensures (Core.Base.Seq.Base_impl.impl_2__len #u128 (impl_2__set_index (sz ms) rkeys (sz n) key).f_v = ms)) = - match Core.Base.Seq.Base_spec.impl_1__match_list #u128 (impl_2__set_index (sz ms) rkeys (sz n) key).f_v with - | Core.Base.Seq.LIST_NIL -> () - | Core.Base.Seq.LIST_CONS _ tl -> - if n = 0 - then () - else - (set_index_is_sized_correct (ms-1) (n-1) { f_v = tl } key) - // Core.Base.Int.Base_spec.impl_9__succ (impl_2__len #v_T tl <: Core.Base.Int.t_HaxInt) - -type usize_small = x:usize{match x with | C_usize v -> v.f_v < 12} - -#set-options "--fuel 300 --ifuel 1 --z3rlimit 30 --split_queries always" -let sub_round_i (key, rkeys, temp2:(u128 & rkeys_typ & u128)) (i : Prims.nat{i<12}) : (u128 & rkeys_typ & u128) = - let rkeys:rkeys_typ = - (set_index_is_sized_correct 12 i rkeys key ; impl_2__set_index (sz 12) rkeys (sz i) key) - in - key, rkeys, temp2 - -let round_i (key, rkeys, temp2:(u128 & rkeys_typ & u128)) (i : Prims.nat{i<12}) : (u128 & rkeys_typ & u128) = - let round:usize_small = sz i in - let rcon:u8 = v_RCON.[ round ] in - let key, temp2:(u128 & u128) = key_expand rcon key temp2 in - sub_round_i (key, rkeys, temp2) i - -let keys_expand (key: u128) : rkeys_typ = - let (rkeys: rkeys_typ) = - (new_is_sized_correct 12; impl_2__new (sz 12) (pub_u128 0)) - in - let key:u128 = key in - let rkeys:rkeys_typ = - impl_2__set_index (sz 12) rkeys (sz 0) key - in - let (temp2: u128):u128 = pub_u128 0 in - let key, rkeys, temp2:(u128 & rkeys_typ & u128) = - ( - let temp0 = (key, rkeys, temp2 <: (u128 & rkeys_typ & u128)) in - let temp0 = round_i temp0 1 in - let temp0 = round_i temp0 2 in - let temp0 = round_i temp0 3 in - let temp0 = round_i temp0 4 in - let temp0 = round_i temp0 5 in - let temp0 = round_i temp0 6 in - let temp0 = round_i temp0 7 in - let temp0 = round_i temp0 8 in - let temp0 = round_i temp0 9 in - let temp0 = round_i temp0 10 in - let temp0 = round_i temp0 11 in - temp0 - ) - // Rust_primitives.Hax.Folds.fold_range (sz 1) - // (sz 11) - // (fun temp_0_ temp_1_ -> - // let key, rkeys, temp2:(u128 & t_Array u128 (sz 12) & u128) = temp_0_ in - // let _:usize = temp_1_ in - // true) - // (key, rkeys, temp2 <: (u128 & t_Array u128 (sz 12) & u128)) - // (fun temp_0_ round -> - // let key, rkeys, temp2:(u128 & t_Array u128 (sz 12) & u128) = temp_0_ in - // let round:usize = round in - // let rcon:u8 = v_RCON.[ round ] in - // let key_temp, temp2_temp:(u128 & u128) = key_expand rcon key temp2 in - // let key:u128 = key_temp in - // let temp2:u128 = temp2_temp in - // let rkeys:t_Array u128 (sz 12) = - // Rust_primitives.Hax.Monomorphized_update_at.update_at_usize rkeys round key - // in - // key, rkeys, temp2 <: (u128 & t_Array u128 (sz 12) & u128)) - in - rkeys - -let aes (key inp: u128) : u128 = - let rkeys:rkeys_typ = keys_expand key in - aes_rounds rkeys inp - -//A main program, which sorts a list and prints it before and after -let main () = - let msg = "" in - // let msg = - // let key = pub_u128 0x3c4fcf098815f7aba6d2ae2816157e2b in - // Printf.sprintf "%s vs %s" - // (string_of_int (match (aeskeygenassist key (v_RCON.[sz 1])) with | C_u128 v -> v.f_v)) - // (string_of_int (match (pub_u128 0x01eb848beb848a013424b5e524b5e434) with | C_u128 v -> v.f_v)) - // in - - // let msg = - // let key = pub_u128 0x3c4fcf098815f7aba6d2ae2816157e2b in - // let (lhs, _) = key_combine key (aeskeygenassist key v_RCON.[sz 1]) (pub_u128 0) in - - // let rhs = pub_u128 0x05766c2a3939a323b12c548817fefaa0 in - - // Printf.sprintf "%s\n%s vs %s" msg - // (string_of_int (match lhs with | C_u128 v -> v.f_v)) - // (string_of_int (match rhs with | C_u128 v -> v.f_v)) - // in - -// let msg = -// let inp = pub_u128 0x627a6f6644b109c82b18330a81c3b3e5 in -// let lhs = mixcolumns(inp) in -// let rhs = pub_u128 0x7b5b54657374566563746f725d53475d in - -// Printf.sprintf "%s\nleft: %s\nright: %s\n" msg -// (string_of_int (match lhs with | C_u128 v -> v.f_v)) -// (string_of_int (match rhs with | C_u128 v -> v.f_v)) -// in - - let msg = - let rkey = pub_u128 0x48692853686179295b477565726f6e5d in - let state = pub_u128 0x7b5b54657374566563746f725d53475d in - let lhs = aesenc state rkey in - let rhs = pub_u128 0xa8311c2f9fdba3c58b104b58ded7e595 in - Printf.sprintf "%s\nleft: %s\nright: %s\n" msg - (string_of_int (match lhs with | C_u128 v -> v.f_v)) - (string_of_int (match rhs with | C_u128 v -> v.f_v)) - in - - // let msg = - // let key = pub_u128 0x3c4fcf098815f7aba6d2ae2816157e2b in - // let inp = pub_u128 0x340737e0a29831318d305a88a8f64332 in - // let ctx = pub_u128 0x320b6a19978511dcfb09dc021d842539 in - - // let enc_val = (aes key inp) in - // Printf.sprintf "%s\nAES(Key = %s, Msg = %s) = %s\n vs %s\n" - // msg - // (string_of_int (match key with | C_u128 v -> v.f_v)) - // (string_of_int (match inp with | C_u128 v -> v.f_v)) - // (string_of_int (match enc_val with | C_u128 v -> v.f_v <: nat)) - // (string_of_int (match ctx with | C_u128 v -> v.f_v)) - // in - - FStar.IO.print_string msg - -//Run ``main ()`` when the module loads -#push-options "--warn_error -272" -let _ = main () -#pop-options - -// TO extract: fstar.exe --extract "*" --odir out --codegen OCaml Prelude.fst -// and to run: AESenc: cd out && OCAMLPATH=$FSTAR_HOME/lib ocamlbuild -use-ocamlfind -pkg batteries -pkg fstar.lib Prelude.native && ./Prelude.native From c2aa9d47097045b51ce7e2671be2bbf8462d13d9 Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Fri, 22 Nov 2024 13:28:53 +0100 Subject: [PATCH 21/59] Freshly generated core code --- proof-libs/coq/coq/generated-core/src/Core.v | 55 + .../coq/coq/generated-core/src/Core_Array.v | 75 +- .../coq/generated-core/src/Core_Array_Iter.v | 32 + .../coq/coq/generated-core/src/Core_Base.v | 36 + .../coq/generated-core/src/Core_Base_Binary.v | 147 ++ .../coq/generated-core/src/Core_Base_Int.v | 30 - .../src/Core_Base_Int_Base_impl.v | 617 -------- .../src/Core_Base_Int_Base_spec.v | 129 -- .../src/Core_Base_Int_Number_conversion.v | 80 - .../src/Core_Base_Number_conversion.v | 347 +++++ .../coq/generated-core/src/Core_Base_Pos.v | 397 +++++ .../coq/generated-core/src/Core_Base_Seq.v | 133 +- .../src/Core_Base_Seq_Base_impl.v | 142 -- .../src/Core_Base_Seq_Base_spec.v | 20 - .../coq/generated-core/src/Core_Base_Spec.v | 39 + .../src/Core_Base_Spec_Binary.v | 16 + .../src/Core_Base_Spec_Binary_Pos.v | 21 + .../src/Core_Base_Spec_Binary_Positive.v | 53 + .../src/Core_Base_Spec_Constants.v | 117 ++ .../src/Core_Base_Spec_Haxint.v | 29 + .../generated-core/src/Core_Base_Spec_Seq.v | 32 + .../generated-core/src/Core_Base_Spec_Unary.v | 38 + .../coq/generated-core/src/Core_Base_Spec_Z.v | 20 + .../coq/coq/generated-core/src/Core_Base_Z.v | 357 +++++ .../generated-core/src/Core_Base_interface.v | 16 + .../src/Core_Base_interface_Coerce.v | 12 + .../src/Core_Base_interface_Int.v | 1129 ++++++++++++++ .../src/Core_Base_interface_Int_I128_proofs.v | 12 + .../src/Core_Base_interface_Int_I16_proofs.v | 12 + .../src/Core_Base_interface_Int_I32_proofs.v | 12 + .../src/Core_Base_interface_Int_I64_proofs.v | 12 + .../src/Core_Base_interface_Int_I8_proofs.v | 12 + .../src/Core_Base_interface_Int_U128_proofs.v | 24 + .../src/Core_Base_interface_Int_U16_proofs.v | 24 + .../src/Core_Base_interface_Int_U32_proofs.v | 24 + .../src/Core_Base_interface_Int_U64_proofs.v | 24 + .../src/Core_Base_interface_Int_U8_proofs.v | 24 + .../coq/coq/generated-core/src/Core_Clone.v | 11 +- .../coq/coq/generated-core/src/Core_Cmp.v | 236 ++- .../coq/coq/generated-core/src/Core_Coerce.v | 21 - .../coq/coq/generated-core/src/Core_Convert.v | 36 +- .../coq/coq/generated-core/src/Core_Fmt.v | 8 + .../coq/coq/generated-core/src/Core_Int.v | 1321 ----------------- .../coq/generated-core/src/Core_Intrinsics.v | 630 +++++++- .../coq/coq/generated-core/src/Core_Iter.v | 24 + .../coq/generated-core/src/Core_Iter_Range.v | 107 ++ .../coq/generated-core/src/Core_Iter_Traits.v | 32 + .../src/Core_Iter_Traits_Collect.v | 17 + .../src/Core_Iter_Traits_Exact_size.v | 14 + .../src/Core_Iter_Traits_Iterator.v | 20 + .../src/Core_Iter_Traits_Marker.v | 21 + .../coq/coq/generated-core/src/Core_Marker.v | 32 +- .../coq/coq/generated-core/src/Core_Num.v | 966 +++++++++--- .../generated-core/src/Core_Num_Int_macros.v | 8 + .../generated-core/src/Core_Num_Uint_macros.v | 8 + .../coq/coq/generated-core/src/Core_Ops.v | 73 +- .../coq/generated-core/src/Core_Ops_Arith.v | 74 +- .../src/Core_Ops_Arith_Impls_for_prims.v | 186 +++ .../coq/coq/generated-core/src/Core_Ops_Bit.v | 70 +- .../src/Core_Ops_Bit_Impls_for_prims.v | 262 ++++ .../generated-core/src/Core_Ops_Function.v | 21 + .../coq/generated-core/src/Core_Ops_Index.v | 8 + .../generated-core/src/Core_Ops_Index_range.v | 35 + .../coq/generated-core/src/Core_Ops_Range.v | 11 + .../coq/coq/generated-core/src/Core_Option.v | 58 +- .../coq/generated-core/src/Core_Panicking.v | 54 +- .../coq/generated-core/src/Core_Primitive.v | 1122 +++++++------- .../src/Core_Primitive_Number_conversion.v | 190 +++ .../src/Core_Primitive_Number_conversion_i.v | 190 +++ .../coq/coq/generated-core/src/Core_Result.v | 20 + .../coq/coq/generated-core/src/Core_Slice.v | 25 + .../coq/generated-core/src/Core_Slice_Index.v | 22 + .../Core_Slice_Index_Private_slice_index.v | 39 + .../coq/generated-core/src/Core_Slice_Iter.v | 26 + .../src/Core_Slice_Iter_Macros.v | 12 + 75 files changed, 6696 insertions(+), 3613 deletions(-) create mode 100644 proof-libs/coq/coq/generated-core/src/Core.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Int.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_impl.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_spec.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Int_Number_conversion.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_impl.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_spec.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Z.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I128_proofs.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I16_proofs.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I32_proofs.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I64_proofs.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I8_proofs.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U128_proofs.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U16_proofs.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U32_proofs.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U64_proofs.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U8_proofs.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Coerce.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Fmt.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Int.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Iter.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Iter_Range.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Iter_Traits.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Collect.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Exact_size.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Marker.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Num_Int_macros.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Ops_Arith_Impls_for_prims.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Ops_Bit_Impls_for_prims.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Result.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Slice.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Slice_Index.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Slice_Index_Private_slice_index.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Slice_Iter_Macros.v diff --git a/proof-libs/coq/coq/generated-core/src/Core.v b/proof-libs/coq/coq/generated-core/src/Core.v new file mode 100644 index 000000000..deb61abc5 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core.v @@ -0,0 +1,55 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Primitive. +Export Primitive. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array.v b/proof-libs/coq/coq/generated-core/src/Core_Array.v index 99cc68b86..7d262d561 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Array.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Array.v @@ -1,72 +1,33 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. +Require Import Index. +Export Index. -From Core Require Import Core_Coerce (t_Abstraction). -Export Core_Coerce (t_Abstraction). +Require Import IndexMut. +Export IndexMut. -From Core Require Import Core_Coerce (t_Concretization). -Export Core_Coerce (t_Concretization). +Require Import Slice. +Export Slice. +Require Import Array. +Export Array. -From Core Require Import Core_Base_Int_Number_conversion. -Export Core_Base_Int_Number_conversion. +Require Import IntoIter. +Export IntoIter. -From Core Require Import Core_Base_Seq. -Export Core_Base_Seq. +(*Not implemented yet? todo(item)*) -From Core Require Import Core_Int. -Export Core_Int. +Record t_TryFromSliceError : Type := { + 0 : unit; +}. +(*item error backend*) -From Core Require Import Core_Cmp. -Export Core_Cmp. +(*item error backend*) -From Core Require Import Core_Clone. -Export Core_Clone. - - -From Core Require Import Core_Primitive. -Export Core_Primitive. - -Instance t_Clone_427868774 `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} : t_Clone (t_Array (v_T) (v_N)) := - { - t_Clone_f_clone := fun (self : t_Array (v_T) (v_N)) => - Build_t_Array (t_Clone_f_clone (t_Array_f_v self)); - }. - -Instance t_PartialEq_670168337 `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} `{t_PartialEq v_T v_T} : t_PartialEq (t_Array (v_T) (v_N)) (t_Array (v_T) (v_N)) := - { - t_PartialEq_f_eq := fun (self : t_Array (v_T) (v_N)) (other : t_Array (v_T) (v_N)) => - t_PartialEq_f_eq (t_Clone_f_clone (t_Array_f_v self)) (t_Array_f_v other); - t_PartialEq_f_ne := fun (self : t_Array (v_T) (v_N)) (other : t_Array (v_T) (v_N)) => - negb (t_PartialEq_f_eq (t_Clone_f_clone (t_Array_f_v self)) (t_Array_f_v other)); - }. - -Definition impl_2__reverse `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} (self : t_Array (v_T) (v_N)) : t_Array (v_T) (v_N) := - Build_t_Array (impl_2__rev (t_Array_f_v self)). - -Lemma lt_usize_implies_hax_int (x : t_usize) (y : t_usize) : - t_PartialOrd_f_lt (x) (y) = true -> - t_PartialOrd_f_lt (t_From_f_from (x)) (t_From_f_from (y)) = true. -Proof. Admitted. - -Lemma lift_usize_equality (x : t_HaxInt) (y : t_usize) : - t_PartialEq_f_eq (x) (t_From_f_from y) = true -> - t_PartialEq_f_eq (t_From_f_from (x)) (y) = true. -Proof. Admitted. - -Program Definition impl_2__index `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} (self : t_Array (v_T) (v_N)) (i : t_usize) `{andb (t_PartialEq_f_eq (impl_2__len (t_Array_f_v self)) (t_From_f_from (v_N))) (t_PartialOrd_f_lt (i) (v_N)) = true} : v_T := - impl_2__get_index (H1 := _) (t_Array_f_v self) (t_From_f_from (i)). -Admit Obligations. - -Definition impl_2__new `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} (x : v_T) : t_Array (v_T) (v_N) := - Build_t_Array (impl_2__repeat (t_From_f_from (v_N)) (x)). - -Program Definition impl_2__set_index `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} `{t_Clone v_T} (self : t_Array (v_T) (v_N)) (i : t_usize) (t : v_T) `{andb (t_PartialEq_f_eq (impl_2__len (t_Array_f_v self)) (t_From_f_from (v_N))) (t_PartialOrd_f_lt (i) (v_N)) = true} : t_Array (v_T) (v_N) := - Build_t_Array (impl_2__set_index (H1 := _) (t_Array_f_v self) (t_From_f_from (i)) (t)). -Admit Obligations. +(*item error backend*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v b/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v new file mode 100644 index 000000000..0ed971717 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v @@ -0,0 +1,32 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import NonZero. +Export NonZero. + +Require Import IndexRange. +Export IndexRange. + +Require Import Range. +Export Range. + +Require Import Array. +Export Array. + +Require Import IntoIterator. +Export IntoIterator. + +Require Import Core_Clone. +Export Core_Clone. + +Require Import Crate_Base. +Export Crate_Base. + +Require Import Hax_lib. +Export Hax_lib. + +(*item error backend*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base.v b/proof-libs/coq/coq/generated-core/src/Core_Base.v new file mode 100644 index 000000000..8e9653885 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base.v @@ -0,0 +1,36 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Spec. +Export Spec. + +Require Import Binary. +Export Binary. + +Require Import Pos. +Export Pos. + +Require Import Z. +Export Z. + +Require Import Number_conversion. +Export Number_conversion. + +Require Import Seq. +Export Seq. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v new file mode 100644 index 000000000..c57e6f0b3 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v @@ -0,0 +1,147 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super_Spec. +Export Super_Spec. + +Require Import Ordering. +Export Ordering. + +Definition positive_cmp__cmp_binary_cont (x : t_Positive_t) (y : t_Positive_t) (r : t_Ordering_t) : t_Ordering_t := + match match_positive x with + | POSITIVE_XH => + match match_positive y with + | POSITIVE_XH => + r + | POSITIVE_XO q | POSITIVE_XI q => + Ordering_Lesst_Ordering_t + end + | POSITIVE_XO p => + match match_positive y with + | POSITIVE_XH => + Ordering_Greatert_Ordering_t + | POSITIVE_XO q => + positive_cmp__cmp_binary_cont p q r + | POSITIVE_XI q => + positive_cmp__cmp_binary_cont p q Ordering_Lesst_Ordering_t + end + | POSITIVE_XI p => + match match_positive y with + | POSITIVE_XH => + Ordering_Greatert_Ordering_t + | POSITIVE_XO q => + positive_cmp__cmp_binary_cont p q Ordering_Greatert_Ordering_t + | POSITIVE_XI q => + positive_cmp__cmp_binary_cont p q r + end + end. + +Definition positive_cmp (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Ordering_t := + positive_cmp__cmp_binary_cont lhs rhs Ordering_Equalt_Ordering_t. + +Definition positive_le (lhs : t_Positive_t) (rhs : t_Positive_t) : bool := + match Option_Some (positive_cmp lhs rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end. + +Definition positive_pred_double (s : t_Positive_t) : t_Positive_t := + match match_positive s with + | POSITIVE_XH => + xH + | POSITIVE_XO p => + xI (positive_pred_double p) + | POSITIVE_XI p => + xI (xO p) + end. + +Definition positive_succ (s : t_Positive_t) : t_Positive_t := + match match_positive s with + | POSITIVE_XH => + xO xH + | POSITIVE_XO q => + xI q + | POSITIVE_XI q => + xO (positive_succ q) + end. + +Definition positive_add (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Positive_t := + positive_add__add lhs rhs. + +Definition positive_mul (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Positive_t := + match match_positive lhs with + | POSITIVE_XH => + rhs + | POSITIVE_XO p => + xO (positive_mul p rhs) + | POSITIVE_XI p => + positive_add (f_clone rhs) (xO (positive_mul p rhs)) + end. + +Definition positive_add__add (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Positive_t := + match match_positive lhs with + | POSITIVE_XH => + match match_positive rhs with + | POSITIVE_XH => + xO xH + | POSITIVE_XO q => + xI q + | POSITIVE_XI q => + xO (positive_succ q) + end + | POSITIVE_XO p => + match match_positive rhs with + | POSITIVE_XH => + xI p + | POSITIVE_XO q => + xO (positive_add__add p q) + | POSITIVE_XI q => + xI (positive_add__add p q) + end + | POSITIVE_XI p => + match match_positive rhs with + | POSITIVE_XH => + xO (positive_succ p) + | POSITIVE_XO q => + xI (positive_add__add p q) + | POSITIVE_XI q => + xO (positive_add__add_carry p q) + end + end. + +Definition positive_add__add_carry (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Positive_t := + match match_positive lhs with + | POSITIVE_XH => + match match_positive rhs with + | POSITIVE_XH => + xI xH + | POSITIVE_XO q => + xO (positive_succ q) + | POSITIVE_XI q => + xI (positive_succ q) + end + | POSITIVE_XO p => + match match_positive rhs with + | POSITIVE_XH => + xO (positive_succ p) + | POSITIVE_XO q => + xI (positive_add__add p q) + | POSITIVE_XI q => + xO (positive_add__add_carry p q) + end + | POSITIVE_XI p => + match match_positive rhs with + | POSITIVE_XH => + xI (positive_succ p) + | POSITIVE_XO q => + xO (positive_add__add_carry p q) + | POSITIVE_XI q => + xI (positive_add__add_carry p q) + end + end. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Int.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Int.v deleted file mode 100644 index 78d754524..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Int.v +++ /dev/null @@ -1,30 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import String. - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -Definition t_HaxInt : Type := N. -Definition t_Positive : Type := positive. - -Notation "'t_POS'" := t_HaxInt. -Notation "'t_POS_POS_ZERO'" := N0. -Notation "'t_POS_POS_POS'" := Npos. - -Notation "'t_POSITIVE'" := t_Positive. -Notation "'t_POSITIVE_POSITIVE_XH'" := xH. -Notation "'t_POSITIVE_POSITIVE_XO'" := xO. -Notation "'t_POSITIVE_POSITIVE_XI'" := xI. - -Definition t_Unary : Type := nat. - -Notation "'t_UNARY'" := t_Unary. -Notation "'t_UNARY_UNARY_ZERO'" := O. -Notation "'t_UNARY_UNARY_SUCC'" := S. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_impl.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_impl.v deleted file mode 100644 index 213d51628..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_impl.v +++ /dev/null @@ -1,617 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import String. - -From Core Require Import Core_Base_Int. -Export Core_Base_Int. - - -From Core Require Import Core_Cmp. -Export Core_Cmp. - -From Core Require Import Core_Clone. -Export Core_Clone. - -From Core Require Import Core_Option. -Export Core_Option. - -From Core Require Import Core_Base_Int_Base_spec. -Export Core_Base_Int_Base_spec. - -Definition impl_7__sub__double_mask (lhs : t_HaxInt) : t_HaxInt := - match impl_9__match_pos (lhs) with - | t_POS_POS_ZERO => - impl_9__ZERO - | t_POS_POS_POS (p) => - impl_4__to_int (impl_8__xO (p)) - end. - -Definition impl_7__sub__succ_double_mask (lhs : t_HaxInt) : t_HaxInt := - match impl_9__match_pos (lhs) with - | t_POS_POS_ZERO => - impl_4__to_int (impl_8__xH) - | t_POS_POS_POS (p) => - impl_4__to_int (impl_8__xI (p)) - end. - -Definition impl_8__double (self : t_HaxInt) : t_HaxInt := - match impl_9__match_pos (self) with - | t_POS_POS_ZERO => - impl_9__ZERO - | t_POS_POS_POS (p) => - impl_4__to_int (impl_8__xO (p)) - end. - -Definition impl_8__half (self : t_HaxInt) : t_HaxInt := - match impl_9__match_pos (self) with - | t_POS_POS_ZERO => - impl_9__ZERO - | t_POS_POS_POS (n) => - match impl_8__match_positive (n) with - | t_POSITIVE_POSITIVE_XH => - impl_9__ZERO - | t_POSITIVE_POSITIVE_XO (p) => - impl_4__to_int (p) - | t_POSITIVE_POSITIVE_XI (p) => - impl_4__to_int (p) - end - end. - -Definition impl_8__succ_double (self : t_HaxInt) : t_Positive := - match impl_9__match_pos (self) with - | t_POS_POS_ZERO => - impl_8__xH - | t_POS_POS_POS (p) => - impl_8__xI (p) - end. - -Fixpoint impl__cmp__cmp_binary_cont (x : t_Positive) (y : t_Positive) (r : t_Ordering) : t_Ordering := - match impl_8__match_positive (x) with - | t_POSITIVE_POSITIVE_XH => - match impl_8__match_positive (y) with - | t_POSITIVE_POSITIVE_XH => - r - | t_POSITIVE_POSITIVE_XO (q) - | t_POSITIVE_POSITIVE_XI (q) => - t_Ordering_Ordering_Less - end - | t_POSITIVE_POSITIVE_XO (p) => - match impl_8__match_positive (y) with - | t_POSITIVE_POSITIVE_XH => - t_Ordering_Ordering_Greater - | t_POSITIVE_POSITIVE_XO (q) => - impl__cmp__cmp_binary_cont (p) (q) (r) - | t_POSITIVE_POSITIVE_XI (q) => - impl__cmp__cmp_binary_cont (p) (q) (t_Ordering_Ordering_Less) - end - | t_POSITIVE_POSITIVE_XI (p) => - match impl_8__match_positive (y) with - | t_POSITIVE_POSITIVE_XH => - t_Ordering_Ordering_Greater - | t_POSITIVE_POSITIVE_XO (q) => - impl__cmp__cmp_binary_cont (p) (q) (t_Ordering_Ordering_Greater) - | t_POSITIVE_POSITIVE_XI (q) => - impl__cmp__cmp_binary_cont (p) (q) (r) - end - end. - -Definition impl__cmp (lhs : t_Positive) (rhs : t_Positive) : t_Ordering := - impl__cmp__cmp_binary_cont (lhs) (rhs) (t_Ordering_Ordering_Equal). - -Instance t_PartialEq_427583131 : t_PartialEq (t_Positive) (t_Positive) := - { - t_PartialEq_f_eq := fun (self : t_Positive) (other : t_Positive) => - t_PartialEq_f_eq (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) (t_Ordering_Ordering_Equal); - t_PartialEq_f_ne := fun (self : t_Positive) (other : t_Positive) => - negb (t_PartialEq_f_eq (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) (t_Ordering_Ordering_Equal)); - }. - -Definition impl_2__cmp (lhs : t_HaxInt) (rhs : t_HaxInt) : t_Ordering := - match impl_9__match_pos (lhs) with - | t_POS_POS_ZERO => - match impl_9__match_pos (rhs) with - | t_POS_POS_ZERO => - t_Ordering_Ordering_Equal - | t_POS_POS_POS (q) => - t_Ordering_Ordering_Less - end - | t_POS_POS_POS (p) => - match impl_9__match_pos (rhs) with - | t_POS_POS_ZERO => - t_Ordering_Ordering_Greater - | t_POS_POS_POS (q) => - impl__cmp (p) (q) - end - end. - -Instance t_PartialEq_822848086 : t_PartialEq (t_HaxInt) (t_HaxInt) := - { - t_PartialEq_f_eq := fun (self : t_HaxInt) (other : t_HaxInt) => - t_PartialEq_f_eq (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) (t_Ordering_Ordering_Equal); - t_PartialEq_f_ne := fun (self : t_HaxInt) (other : t_HaxInt) => - negb (t_PartialEq_f_eq (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) (t_Ordering_Ordering_Equal)); - }. - -Fixpoint impl_4__succ (self : t_Positive) : t_Positive := - match impl_8__match_positive (self) with - | t_POSITIVE_POSITIVE_XH => - impl_8__xO (impl_8__xH) - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__xI (q) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__xO (impl_4__succ (q)) - end. - -Fixpoint impl_7__sub__pred_double (lhs : t_Positive) : t_Positive := - match impl_8__match_positive (lhs) with - | t_POSITIVE_POSITIVE_XH => - impl_8__xH - | t_POSITIVE_POSITIVE_XO (p) => - impl_8__xI (impl_7__sub__pred_double (p)) - | t_POSITIVE_POSITIVE_XI (p) => - impl_8__xI (impl_8__xO (p)) - end. - -Definition impl_7__sub__double_pred_mask (lhs : t_Positive) : t_HaxInt := - match impl_8__match_positive (lhs) with - | t_POSITIVE_POSITIVE_XH => - impl_9__ZERO - | t_POSITIVE_POSITIVE_XO (p) => - impl_4__to_int (impl_8__xO (impl_7__sub__pred_double (p))) - | t_POSITIVE_POSITIVE_XI (p) => - impl_4__to_int (impl_8__xO (impl_8__xO (p))) - end. - -Fixpoint impl_9__power_of_two (self : t_Unary) : t_Positive := - match impl_6__match_unary (self) with - | t_UNARY_UNARY_ZERO => - impl_8__xH - | t_UNARY_UNARY_SUCC (x) => - impl_8__xO (impl_9__power_of_two (x)) - end. - -Fixpoint impl_12__shl__shl_helper (rhs : t_Unary) (lhs : t_HaxInt) : t_HaxInt := - if - impl_9__is_zero (t_Clone_f_clone (lhs)) - then - lhs - else - match impl_6__match_unary (rhs) with - | t_UNARY_UNARY_ZERO => - lhs - | t_UNARY_UNARY_SUCC (n) => - impl_12__shl__shl_helper (n) (impl_8__double (lhs)) - end. - -Definition impl_12__shl (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := - impl_12__shl__shl_helper (impl_5__from_int (rhs)) (self). - -Fixpoint impl_13__shr__shr_helper (rhs : t_Unary) (lhs : t_HaxInt) : t_HaxInt := - if - impl_9__is_zero (t_Clone_f_clone (lhs)) - then - lhs - else - match impl_6__match_unary (rhs) with - | t_UNARY_UNARY_ZERO => - lhs - | t_UNARY_UNARY_SUCC (n) => - impl_13__shr__shr_helper (n) (impl_8__half (lhs)) - end. - -Definition impl_13__shr (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := - impl_13__shr__shr_helper (impl_5__from_int (rhs)) (self). - -Fixpoint impl_14__bitxor__bitxor_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := - match impl_8__match_positive (lhs) with - | t_POSITIVE_POSITIVE_XH => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_9__ZERO - | t_POSITIVE_POSITIVE_XO (q) => - impl_4__to_int (impl_8__xI (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_4__to_int (impl_8__xO (q)) - end - | t_POSITIVE_POSITIVE_XO (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_4__to_int (impl_8__xI (p)) - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__double (impl_14__bitxor__bitxor_binary (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_4__to_int (impl_8__succ_double (impl_14__bitxor__bitxor_binary (p) (q))) - end - | t_POSITIVE_POSITIVE_XI (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_4__to_int (impl_8__xO (p)) - | t_POSITIVE_POSITIVE_XO (q) => - impl_4__to_int (impl_8__succ_double (impl_14__bitxor__bitxor_binary (p) (q))) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__double (impl_14__bitxor__bitxor_binary (p) (q)) - end - end. - -Definition impl_14__bitxor (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := - match impl_9__match_pos (self) with - | t_POS_POS_ZERO => - rhs - | t_POS_POS_POS (p) => - match impl_9__match_pos (rhs) with - | t_POS_POS_ZERO => - impl_4__to_int (p) - | t_POS_POS_POS (q) => - impl_14__bitxor__bitxor_binary (p) (q) - end - end. - -Fixpoint impl_15__bitand__bitand_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := - match impl_8__match_positive (lhs) with - | t_POSITIVE_POSITIVE_XH => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XO (q) => - impl_9__ZERO - | t_POSITIVE_POSITIVE_XI (_) - | t_POSITIVE_POSITIVE_XH => - impl_9__ONE - end - | t_POSITIVE_POSITIVE_XO (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_9__ZERO - | t_POSITIVE_POSITIVE_XO (q) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__double (impl_15__bitand__bitand_binary (p) (q)) - end - | t_POSITIVE_POSITIVE_XI (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_9__ONE - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__double (impl_15__bitand__bitand_binary (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_4__to_int (impl_8__succ_double (impl_15__bitand__bitand_binary (p) (q))) - end - end. - -Definition impl_15__bitand (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := - match impl_9__match_pos (self) with - | t_POS_POS_ZERO => - impl_9__ZERO - | t_POS_POS_POS (p) => - match impl_9__match_pos (rhs) with - | t_POS_POS_ZERO => - impl_9__ZERO - | t_POS_POS_POS (q) => - impl_15__bitand__bitand_binary (p) (q) - end - end. - -Fixpoint impl_16__bitor__bitor_binary (lhs : t_Positive) (rhs : t_Positive) : t_Positive := - match impl_8__match_positive (lhs) with - | t_POSITIVE_POSITIVE_XH => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__xI (q) - | t_POSITIVE_POSITIVE_XH => - impl_8__xH - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__xI (q) - end - | t_POSITIVE_POSITIVE_XO (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_8__xI (p) - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__xO (impl_16__bitor__bitor_binary (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__xI (impl_16__bitor__bitor_binary (p) (q)) - end - | t_POSITIVE_POSITIVE_XI (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_8__xI (p) - | t_POSITIVE_POSITIVE_XO (q) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__xI (impl_16__bitor__bitor_binary (p) (q)) - end - end. - -Definition impl_16__bitor (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := - match impl_9__match_pos (self) with - | t_POS_POS_ZERO => - rhs - | t_POS_POS_POS (p) => - match impl_9__match_pos (rhs) with - | t_POS_POS_ZERO => - impl_4__to_int (p) - | t_POS_POS_POS (q) => - impl_4__to_int (impl_16__bitor__bitor_binary (p) (q)) - end - end. - -Instance t_PartialOrd_895391065 : t_PartialOrd (t_Positive) (t_Positive) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_Positive) (other : t_Positive) => - t_Option_Option_Some (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))); - t_PartialOrd_f_lt := fun (self : t_Positive) (other : t_Positive) => - match t_Option_Option_Some (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_Positive) (other : t_Positive) => - match t_Option_Option_Some (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_Positive) (other : t_Positive) => - match t_Option_Option_Some (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_Positive) (other : t_Positive) => - match t_Option_Option_Some (impl__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Instance t_PartialOrd_414924529 : t_PartialOrd (t_HaxInt) (t_HaxInt) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_HaxInt) (other : t_HaxInt) => - t_Option_Option_Some (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))); - t_PartialOrd_f_lt := fun (self : t_HaxInt) (other : t_HaxInt) => - match t_Option_Option_Some (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_HaxInt) (other : t_HaxInt) => - match t_Option_Option_Some (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_HaxInt) (other : t_HaxInt) => - match t_Option_Option_Some (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_HaxInt) (other : t_HaxInt) => - match t_Option_Option_Some (impl_2__cmp (t_Clone_f_clone (self)) (t_Clone_f_clone (other))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Fixpoint impl_4__add (self : t_Positive) (rhs : t_Positive) : t_Positive := - match impl_8__match_positive (self) with - | t_POSITIVE_POSITIVE_XH => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_8__xO (impl_8__xH) - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__xI (q) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__xO (impl_4__succ (q)) - end - | t_POSITIVE_POSITIVE_XO (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_8__xI (p) - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__xO (impl_4__add (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__xI (impl_4__add (p) (q)) - end - | t_POSITIVE_POSITIVE_XI (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_8__xO (impl_4__succ (p)) - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__xI (impl_4__add (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__xO (impl_4__add__add_carry (p) (q)) - end - end - -with impl_4__add__add_carry (lhs : t_Positive) (rhs : t_Positive) : t_Positive := - match impl_8__match_positive (lhs) with - | t_POSITIVE_POSITIVE_XH => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_8__xI (impl_8__xH) - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__xO (impl_4__succ (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__xI (impl_4__succ (q)) - end - | t_POSITIVE_POSITIVE_XO (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_8__xO (impl_4__succ (p)) - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__xI (impl_4__add (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__xO (impl_4__add__add_carry (p) (q)) - end - | t_POSITIVE_POSITIVE_XI (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_8__xI (impl_4__succ (p)) - | t_POSITIVE_POSITIVE_XO (q) => - impl_8__xO (impl_4__add__add_carry (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_8__xI (impl_4__add__add_carry (p) (q)) - end - end. - -Definition impl_6__add (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := - match impl_9__match_pos (self) with - | t_POS_POS_ZERO => - rhs - | t_POS_POS_POS (p) => - match impl_9__match_pos (rhs) with - | t_POS_POS_ZERO => - impl_4__to_int (p) - | t_POS_POS_POS (q) => - impl_4__to_int (impl_4__add (p) (q)) - end - end. - -Fixpoint impl_7__sub__sub_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := - match impl_8__match_positive (lhs) with - | t_POSITIVE_POSITIVE_XH => - impl_9__ZERO - | t_POSITIVE_POSITIVE_XO (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_4__to_int (impl_7__sub__pred_double (p)) - | t_POSITIVE_POSITIVE_XO (q) => - impl_7__sub__double_mask (impl_7__sub__sub_binary (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_7__sub__succ_double_mask (impl_7__sub__sub_carry (p) (q)) - end - | t_POSITIVE_POSITIVE_XI (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_4__to_int (impl_8__xO (p)) - | t_POSITIVE_POSITIVE_XO (q) => - impl_7__sub__succ_double_mask (impl_7__sub__sub_binary (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_7__sub__double_mask (impl_7__sub__sub_binary (p) (q)) - end - end - -with impl_7__sub__sub_carry (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := - match impl_8__match_positive (lhs) with - | t_POSITIVE_POSITIVE_XH => - impl_9__ZERO - | t_POSITIVE_POSITIVE_XO (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_7__sub__double_pred_mask (p) - | t_POSITIVE_POSITIVE_XO (q) => - impl_7__sub__succ_double_mask (impl_7__sub__sub_carry (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_7__sub__double_mask (impl_7__sub__sub_carry (p) (q)) - end - | t_POSITIVE_POSITIVE_XI (p) => - match impl_8__match_positive (rhs) with - | t_POSITIVE_POSITIVE_XH => - impl_4__to_int (impl_7__sub__pred_double (p)) - | t_POSITIVE_POSITIVE_XO (q) => - impl_7__sub__double_mask (impl_7__sub__sub_binary (p) (q)) - | t_POSITIVE_POSITIVE_XI (q) => - impl_7__sub__succ_double_mask (impl_7__sub__sub_carry (p) (q)) - end - end. - -Definition impl_7__sub (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := - match impl_9__match_pos (self) with - | t_POS_POS_ZERO => - impl_9__ZERO - | t_POS_POS_POS (p) => - match impl_9__match_pos (rhs) with - | t_POS_POS_ZERO => - impl_4__to_int (p) - | t_POS_POS_POS (q) => - impl_7__sub__sub_binary (p) (q) - end - end. - -Fixpoint impl_5__mul (self : t_Positive) (rhs : t_Positive) : t_Positive := - match impl_8__match_positive (self) with - | t_POSITIVE_POSITIVE_XH => - rhs - | t_POSITIVE_POSITIVE_XO (p) => - impl_8__xO (impl_5__mul (p) (rhs)) - | t_POSITIVE_POSITIVE_XI (p) => - impl_4__add (t_Clone_f_clone (rhs)) (impl_8__xO (impl_5__mul (p) (rhs))) - end. - -Definition impl_11__mul (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := - match impl_9__match_pos (self) with - | t_POS_POS_ZERO => - impl_9__ZERO - | t_POS_POS_POS (p) => - match impl_9__match_pos (rhs) with - | t_POS_POS_ZERO => - impl_9__ZERO - | t_POS_POS_POS (q) => - impl_4__to_int (impl_5__mul (p) (q)) - end - end. - -Fixpoint impl_10__divmod__divmod_binary (a : t_Positive) (b : t_Positive) : (t_HaxInt*t_HaxInt) := - match impl_8__match_positive (a) with - | t_POSITIVE_POSITIVE_XH => - match impl_8__match_positive (b) with - | t_POSITIVE_POSITIVE_XH => - (impl_9__ONE,impl_9__ZERO) - | t_POSITIVE_POSITIVE_XO (q) - | t_POSITIVE_POSITIVE_XI (q) => - (impl_9__ZERO,impl_9__ONE) - end - | t_POSITIVE_POSITIVE_XO (a) => - let '(q,r) := impl_10__divmod__divmod_binary (a) (t_Clone_f_clone (b)) in - let r := impl_8__double (r) in - if - t_PartialOrd_f_le (impl_4__to_int (t_Clone_f_clone (b))) (t_Clone_f_clone (r)) - then - (impl_4__to_int (impl_8__succ_double (q)),impl_7__sub (r) (impl_4__to_int (b))) - else - (impl_8__double (q),r) - | t_POSITIVE_POSITIVE_XI (a) => - let '(q,r) := impl_10__divmod__divmod_binary (a) (t_Clone_f_clone (b)) in - let r := impl_4__to_int (impl_8__succ_double (r)) in - if - t_PartialOrd_f_le (impl_4__to_int (t_Clone_f_clone (b))) (t_Clone_f_clone (r)) - then - (impl_4__to_int (impl_8__succ_double (q)),impl_7__sub (r) (impl_4__to_int (b))) - else - (impl_8__double (q),r) - end. - -Definition impl_10__divmod (a : t_HaxInt) (b : t_HaxInt) : (t_HaxInt*t_HaxInt) := - match impl_9__match_pos (a) with - | t_POS_POS_ZERO => - (impl_9__ZERO,impl_9__ZERO) - | t_POS_POS_POS (p) => - match impl_9__match_pos (b) with - | t_POS_POS_ZERO => - (impl_9__ZERO,impl_4__to_int (p)) - | t_POS_POS_POS (q) => - impl_10__divmod__divmod_binary (p) (q) - end - end. - -Definition impl_10__div (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := - let '(q,r) := impl_10__divmod (self) (rhs) in - q. - -Definition impl_10__rem (self : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := - let '(q,r) := impl_10__divmod (self) (rhs) in - r. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_spec.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_spec.v deleted file mode 100644 index e8c46c4f8..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Base_spec.v +++ /dev/null @@ -1,129 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import String. - -From Core Require Import Core_Base_Int. -Export Core_Base_Int. - -From Core Require Import Core_Clone (t_Clone). -Export Core_Clone (t_Clone). -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import String. - -From Core Require Import Core_Base_Int. -Export Core_Base_Int. - -From Core Require Import Core_Clone (t_Clone). -Export Core_Clone (t_Clone). - -Definition impl_9__ONE : t_HaxInt := 1%N. - -Definition impl_9__ZERO : t_HaxInt := 0%N. - -Definition v_BITS_128_ : t_HaxInt := 128%N. - -Definition v_BITS_16_ : t_HaxInt := 16%N. - -Definition v_BITS_32_ : t_HaxInt := 32%N. - -Definition v_BITS_64_ : t_HaxInt := 64%N. - -Definition v_BITS_8_ : t_HaxInt := 8%N. - -Definition v_WORDSIZE_128_ : t_HaxInt := N.pow 2 128. - -Definition v_WORDSIZE_128_SUB_1_ : t_HaxInt := (N.pow 2 128 - 1)%N. - -Definition v_WORDSIZE_16_ : t_HaxInt := N.pow 2 16. - -Definition v_WORDSIZE_16_SUB_1_ : t_HaxInt := (N.pow 2 16 - 1)%N. - -Definition v_WORDSIZE_32_ : t_HaxInt := N.pow 2 32. - -Definition v_WORDSIZE_32_SUB_1_ : t_HaxInt := (N.pow 2 32 - 1)%N. - -Definition v_WORDSIZE_64_ : t_HaxInt := N.pow 2 64. - -Definition v_WORDSIZE_64_SUB_1_ : t_HaxInt := (N.pow 2 64 - 1)%N. - -Definition v_WORDSIZE_8_ : t_HaxInt := N.pow 2 8. - -Definition v_WORDSIZE_8_SUB_1_ : t_HaxInt := (N.pow 2 8 - 1)%N. - -Instance t_Clone_599065907 : t_Clone (t_HaxInt) := - { - t_Clone_f_clone := fun (self : t_HaxInt) => self; - }. - -Definition impl_7__div2 (self : t_HaxInt) : t_HaxInt := N.div self 2. - -Definition impl_9__is_zero (self : t_HaxInt) : bool := match self with | N0 => true | _ => false end. - -Definition impl_9__pred (self : t_HaxInt) `{negb (impl_9__is_zero (self)) = true} : t_HaxInt := - N.pred self. - -Definition impl_9__succ (self : t_HaxInt) : t_HaxInt := - N.succ self. - -Instance t_Clone_793353639 : t_Clone (t_Positive) := - { - t_Clone_f_clone := fun (self : t_Positive) => - self; - }. - -Instance t_Clone_620939287 : t_Clone (t_Unary) := - { - t_Clone_f_clone := fun (self : t_Unary) => - self; - }. - -Definition impl_4__from_int (x : t_HaxInt) : t_Positive := - match x with | N0 => xH | Npos p => p end. - -Definition impl_4__to_int (self : t_Positive) : t_HaxInt := - Npos self. - -Definition impl_5__from_int (x : t_HaxInt) : t_Unary := - N.to_nat x. - -Definition impl_5__to_int (self : t_Unary) : t_HaxInt := - N.of_nat self. - -Definition impl_6__match_unary (self : t_Unary) : t_UNARY := - self. - -Definition impl_8__is_xH (self : t_Positive) : bool := - match self with xH => true | _ => false end. - -Definition impl_8__is_xI (self : t_Positive) : bool := - match self with xI _ => true | _ => false end. - -Definition impl_8__is_xO (self : t_Positive) : bool := - match self with xO _ => true | _ => false end. - -Definition impl_8__match_positive (self : t_Positive) : t_POSITIVE := - self. - -Definition impl_8__xH : t_Positive := - xH. - -Definition impl_8__xI (self : t_Positive) : t_Positive := - xI self. - -Definition impl_8__xO (self : t_Positive) : t_Positive := - xO self. - -Definition impl_9__match_pos (self : t_HaxInt) : t_POS := - if - impl_9__is_zero ((self)) - then - t_POS_POS_ZERO - else - t_POS_POS_POS (impl_4__from_int (self)). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Number_conversion.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Number_conversion.v deleted file mode 100644 index 4f1df3ef3..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Int_Number_conversion.v +++ /dev/null @@ -1,80 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import String. - -From Core Require Import Core_Base_Int. -Export Core_Base_Int. - -From Core Require Import Core_Primitive. -Export Core_Primitive. - -From Core Require Import Core_Cmp. -Export Core_Cmp. - -From Core Require Import Core_Convert. -Export Core_Convert. - -(* NotImplementedYet *) - -Instance t_From_62544291 : t_From (t_HaxInt) (t_u8) := - { - t_From_f_from := fun (x : t_u8) => t_U8_f_v (t_u8_0 x); - }. - -Instance t_From_1006987144 : t_From (t_u8) (t_HaxInt) := - { - t_From_f_from := fun (x : t_HaxInt) => Build_t_u8 (Build_t_U8 x) - }. - -Instance t_From_1039663005 : t_From (t_HaxInt) (t_u16) := - { - t_From_f_from := fun (x : t_u16) => t_U16_f_v (t_u16_0 x); - }. - -Instance t_From_1052282100 : t_From (t_u16) (t_HaxInt) := - { - t_From_f_from := fun (x : t_HaxInt) => Build_t_u16 (Build_t_U16 x); - }. - -Instance t_From_529475850 : t_From (t_HaxInt) (t_u32) := - { - t_From_f_from := fun (x : t_u32) => t_U32_f_v (t_u32_0 x); - }. - -Instance t_From_447931916 : t_From (t_u32) (t_HaxInt) := - { - t_From_f_from := fun (x : t_HaxInt) => Build_t_u32 (Build_t_U32 x); - }. - -Instance t_From_616445870 : t_From (t_HaxInt) (t_u64) := - { - t_From_f_from := fun (x : t_u64) => t_U64_f_v (t_u64_0 x); - }. - -Instance t_From_70650389 : t_From (t_u64) (t_HaxInt) := - { - t_From_f_from := fun (x : t_HaxInt) => Build_t_u64 (Build_t_U64 x); - }. - -Instance t_From_184355489 : t_From (t_HaxInt) (t_u128) := - { - t_From_f_from := fun (x : t_u128) => t_U128_f_v (t_u128_0 x); - }. - -Instance t_From_844812452 : t_From (t_u128) (t_HaxInt) := - { - t_From_f_from := fun (x : t_HaxInt) => Build_t_u128 (Build_t_U128 x); - }. - -Instance t_From_946823391 : t_From (t_HaxInt) (t_usize) := - { - t_From_f_from := fun (x : t_usize) => t_U64_f_v (t_usize_0 x); - }. - -Instance t_From_655514338 : t_From (t_usize) (t_HaxInt) := - { - t_From_f_from := fun (x : t_HaxInt) => Build_t_usize (Build_t_U64 x); - }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v new file mode 100644 index 000000000..683efe3f2 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v @@ -0,0 +1,347 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super_Spec. +Export Super_Spec. + +Require Import Super. +Export Super. + +Require Import primitive. +Export primitive. + +Require Import Core_Cmp. +Export Core_Cmp. + +Require Import Core_Convert. +Export Core_Convert. + +(*Not implemented yet? todo(item)*) + +Definition impl_24__from_u128_binary (x : int128) : t_Positive_t := + if eq x (@repr WORDSIZE128 1) + then xH + else if eq (rem x (@repr WORDSIZE128 2)) (@repr WORDSIZE128 0) + then xO (impl_24__from_u128_binary (div x (@repr WORDSIZE128 2))) + else xI (impl_24__from_u128_binary (div x (@repr WORDSIZE128 2))). + +#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t int128 := { + f_from (x : int128) := if eq x (@repr WORDSIZE128 0) + then v_HaxInt_ZERO + else positive_to_int (impl_24__from_u128_binary x); +}. + +#[global] Instance t_Z_t_t_From : t_From t_Z_t int128 := { + f_from (x : int128) := match f_cmp x (@repr WORDSIZE128 0) with + | Ordering_Equal => + Z_ZEROt_Z_t + | Ordering_Less => + Z_NEG (impl_24__from_u128_binary (impl__i128__unsigned_abs x)) + | Ordering_Greater => + Z_POS (impl_24__from_u128_binary (impl__i128__unsigned_abs x)) + end; +}. + +Definition impl_24__from_u16_binary (x : int16) : t_Positive_t := + if eq x (@repr WORDSIZE16 1) + then xH + else if eq (rem x (@repr WORDSIZE16 2)) (@repr WORDSIZE16 0) + then xO (impl_24__from_u16_binary (div x (@repr WORDSIZE16 2))) + else xI (impl_24__from_u16_binary (div x (@repr WORDSIZE16 2))). + +#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t int16 := { + f_from (x : int16) := if eq x (@repr WORDSIZE16 0) + then v_HaxInt_ZERO + else positive_to_int (impl_24__from_u16_binary x); +}. + +#[global] Instance t_Z_t_t_From : t_From t_Z_t int16 := { + f_from (x : int16) := match f_cmp x (@repr WORDSIZE16 0) with + | Ordering_Equal => + Z_ZEROt_Z_t + | Ordering_Less => + Z_NEG (impl_24__from_u16_binary (impl__i16__unsigned_abs x)) + | Ordering_Greater => + Z_POS (impl_24__from_u16_binary (impl__i16__unsigned_abs x)) + end; +}. + +Definition impl_24__from_u32_binary (x : int32) : t_Positive_t := + if eq x (@repr WORDSIZE32 1) + then xH + else if eq (rem x (@repr WORDSIZE32 2)) (@repr WORDSIZE32 0) + then xO (impl_24__from_u32_binary (div x (@repr WORDSIZE32 2))) + else xI (impl_24__from_u32_binary (div x (@repr WORDSIZE32 2))). + +#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t int32 := { + f_from (x : int32) := if eq x (@repr WORDSIZE32 0) + then v_HaxInt_ZERO + else positive_to_int (impl_24__from_u32_binary x); +}. + +#[global] Instance t_Z_t_t_From : t_From t_Z_t int32 := { + f_from (x : int32) := match f_cmp x (@repr WORDSIZE32 0) with + | Ordering_Equal => + Z_ZEROt_Z_t + | Ordering_Less => + Z_NEG (impl_24__from_u32_binary (impl__i32__unsigned_abs x)) + | Ordering_Greater => + Z_POS (impl_24__from_u32_binary (impl__i32__unsigned_abs x)) + end; +}. + +Definition impl_24__from_u64_binary (x : int64) : t_Positive_t := + if eq x (@repr WORDSIZE64 1) + then xH + else if eq (rem x (@repr WORDSIZE64 2)) (@repr WORDSIZE64 0) + then xO (impl_24__from_u64_binary (div x (@repr WORDSIZE64 2))) + else xI (impl_24__from_u64_binary (div x (@repr WORDSIZE64 2))). + +#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t int64 := { + f_from (x : int64) := if eq x (@repr WORDSIZE64 0) + then v_HaxInt_ZERO + else positive_to_int (impl_24__from_u64_binary x); +}. + +#[global] Instance t_Z_t_t_From : t_From t_Z_t int64 := { + f_from (x : int64) := match f_cmp x (@repr WORDSIZE64 0) with + | Ordering_Equal => + Z_ZEROt_Z_t + | Ordering_Less => + Z_NEG (impl_24__from_u64_binary (impl__i64__unsigned_abs x)) + | Ordering_Greater => + Z_POS (impl_24__from_u64_binary (impl__i64__unsigned_abs x)) + end; +}. + +Definition impl_24__from_u8_binary (x : int8) : t_Positive_t := + if eq x (@repr WORDSIZE8 1) + then xH + else if eq (rem x (@repr WORDSIZE8 2)) (@repr WORDSIZE8 0) + then xO (impl_24__from_u8_binary (div x (@repr WORDSIZE8 2))) + else xI (impl_24__from_u8_binary (div x (@repr WORDSIZE8 2))). + +#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t int8 := { + f_from (x : int8) := if eq x (@repr WORDSIZE8 0) + then v_HaxInt_ZERO + else positive_to_int (impl_24__from_u8_binary x); +}. + +#[global] Instance t_Z_t_t_From : t_From t_Z_t int8 := { + f_from (x : int8) := match f_cmp x (@repr WORDSIZE8 0) with + | Ordering_Equal => + Z_ZEROt_Z_t + | Ordering_Less => + Z_NEG (impl_24__from_u8_binary (impl__i8__unsigned_abs x)) + | Ordering_Greater => + Z_POS (impl_24__from_u8_binary (impl__i8__unsigned_abs x)) + end; +}. + +Definition impl_24__from_usize_binary (x : uint_size) : t_Positive_t := + if eq x (@repr WORDSIZE32 1) + then xH + else if eq (rem x (@repr WORDSIZE32 2)) (@repr WORDSIZE32 0) + then xO (impl_24__from_usize_binary (div x (@repr WORDSIZE32 2))) + else xI (impl_24__from_usize_binary (div x (@repr WORDSIZE32 2))). + +#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t uint_size := { + f_from (x : uint_size) := if eq x (@repr WORDSIZE32 0) + then v_HaxInt_ZERO + else positive_to_int (impl_24__from_usize_binary x); +}. + +#[global] Instance t_Z_t_t_From : t_From t_Z_t uint_size := { + f_from (x : uint_size) := match f_cmp x (@repr WORDSIZE32 0) with + | Ordering_Equal => + Z_ZEROt_Z_t + | Ordering_Less => + Z_NEG (impl_24__from_usize_binary (impl__isize__unsigned_abs x)) + | Ordering_Greater => + Z_POS (impl_24__from_usize_binary (impl__isize__unsigned_abs x)) + end; +}. + +Definition impl_24__to_u128_binary (self : t_Positive_t) : int128 := + match match_positive self with + | POSITIVE_XH => + (@repr WORDSIZE128 1) + | POSITIVE_XO p => + mul (impl_24__to_u128_binary p) (@repr WORDSIZE128 2) + | POSITIVE_XI p => + add (mul (impl_24__to_u128_binary p) (@repr WORDSIZE128 2)) (@repr WORDSIZE128 1) + end. + +#[global] Instance int128_t_From : t_From int128 t_HaxInt_t := { + f_from (x : t_HaxInt_t) := match match_pos x with + | POS_ZERO => + (@repr WORDSIZE128 0) + | POS_POS p => + impl_24__to_u128_binary p + end; +}. + +#[global] Instance int128_t_From : t_From int128 t_Z_t := { + f_from (x : t_Z_t) := match x with + | Z_NEG x => + sub (neg (cast (sub (impl_24__to_u128_binary x) (@repr WORDSIZE128 1)))) (@repr WORDSIZE128 1) + | Z_ZERO => + (@repr WORDSIZE128 0) + | Z_POS x => + cast (impl_24__to_u128_binary x) + end; +}. + +Definition impl_24__to_u16_binary (self : t_Positive_t) : int16 := + match match_positive self with + | POSITIVE_XH => + (@repr WORDSIZE16 1) + | POSITIVE_XO p => + mul (impl_24__to_u16_binary p) (@repr WORDSIZE16 2) + | POSITIVE_XI p => + add (mul (impl_24__to_u16_binary p) (@repr WORDSIZE16 2)) (@repr WORDSIZE16 1) + end. + +#[global] Instance int16_t_From : t_From int16 t_HaxInt_t := { + f_from (x : t_HaxInt_t) := match match_pos x with + | POS_ZERO => + (@repr WORDSIZE16 0) + | POS_POS p => + impl_24__to_u16_binary p + end; +}. + +#[global] Instance int16_t_From : t_From int16 t_Z_t := { + f_from (x : t_Z_t) := match x with + | Z_NEG x => + sub (neg (cast (sub (impl_24__to_u16_binary x) (@repr WORDSIZE16 1)))) (@repr WORDSIZE16 1) + | Z_ZERO => + (@repr WORDSIZE16 0) + | Z_POS x => + cast (impl_24__to_u16_binary x) + end; +}. + +Definition impl_24__to_u32_binary (self : t_Positive_t) : int32 := + match match_positive self with + | POSITIVE_XH => + (@repr WORDSIZE32 1) + | POSITIVE_XO p => + mul (impl_24__to_u32_binary p) (@repr WORDSIZE32 2) + | POSITIVE_XI p => + add (mul (impl_24__to_u32_binary p) (@repr WORDSIZE32 2)) (@repr WORDSIZE32 1) + end. + +#[global] Instance int32_t_From : t_From int32 t_HaxInt_t := { + f_from (x : t_HaxInt_t) := match match_pos x with + | POS_ZERO => + (@repr WORDSIZE32 0) + | POS_POS p => + impl_24__to_u32_binary p + end; +}. + +#[global] Instance int32_t_From : t_From int32 t_Z_t := { + f_from (x : t_Z_t) := match x with + | Z_NEG x => + sub (neg (cast (sub (impl_24__to_u32_binary x) (@repr WORDSIZE32 1)))) (@repr WORDSIZE32 1) + | Z_ZERO => + (@repr WORDSIZE32 0) + | Z_POS x => + cast (impl_24__to_u32_binary x) + end; +}. + +Definition impl_24__to_u64_binary (self : t_Positive_t) : int64 := + match match_positive self with + | POSITIVE_XH => + (@repr WORDSIZE64 1) + | POSITIVE_XO p => + mul (impl_24__to_u64_binary p) (@repr WORDSIZE64 2) + | POSITIVE_XI p => + add (mul (impl_24__to_u64_binary p) (@repr WORDSIZE64 2)) (@repr WORDSIZE64 1) + end. + +#[global] Instance int64_t_From : t_From int64 t_HaxInt_t := { + f_from (x : t_HaxInt_t) := match match_pos x with + | POS_ZERO => + (@repr WORDSIZE64 0) + | POS_POS p => + impl_24__to_u64_binary p + end; +}. + +#[global] Instance int64_t_From : t_From int64 t_Z_t := { + f_from (x : t_Z_t) := match x with + | Z_NEG x => + sub (neg (cast (sub (impl_24__to_u64_binary x) (@repr WORDSIZE64 1)))) (@repr WORDSIZE64 1) + | Z_ZERO => + (@repr WORDSIZE64 0) + | Z_POS x => + cast (impl_24__to_u64_binary x) + end; +}. + +Definition impl_24__to_u8_binary (self : t_Positive_t) : int8 := + match match_positive self with + | POSITIVE_XH => + (@repr WORDSIZE8 1) + | POSITIVE_XO p => + mul (impl_24__to_u8_binary p) (@repr WORDSIZE8 2) + | POSITIVE_XI p => + add (mul (impl_24__to_u8_binary p) (@repr WORDSIZE8 2)) (@repr WORDSIZE8 1) + end. + +#[global] Instance int8_t_From : t_From int8 t_HaxInt_t := { + f_from (x : t_HaxInt_t) := match match_pos x with + | POS_ZERO => + (@repr WORDSIZE8 0) + | POS_POS p => + impl_24__to_u8_binary p + end; +}. + +#[global] Instance int8_t_From : t_From int8 t_Z_t := { + f_from (x : t_Z_t) := match x with + | Z_NEG x => + sub (neg (cast (sub (impl_24__to_u8_binary x) (@repr WORDSIZE8 1)))) (@repr WORDSIZE8 1) + | Z_ZERO => + (@repr WORDSIZE8 0) + | Z_POS x => + cast (impl_24__to_u8_binary x) + end; +}. + +Definition impl_24__to_usize_binary (self : t_Positive_t) : uint_size := + match match_positive self with + | POSITIVE_XH => + (@repr WORDSIZE32 1) + | POSITIVE_XO p => + mul (impl_24__to_usize_binary p) (@repr WORDSIZE32 2) + | POSITIVE_XI p => + add (mul (impl_24__to_usize_binary p) (@repr WORDSIZE32 2)) (@repr WORDSIZE32 1) + end. + +#[global] Instance uint_size_t_From : t_From uint_size t_HaxInt_t := { + f_from (x : t_HaxInt_t) := match match_pos x with + | POS_ZERO => + (@repr WORDSIZE32 0) + | POS_POS p => + impl_24__to_usize_binary p + end; +}. + +#[global] Instance uint_size_t_From : t_From uint_size t_Z_t := { + f_from (x : t_Z_t) := match x with + | Z_NEG x => + sub (neg (cast (sub (impl_24__to_usize_binary x) (@repr WORDSIZE32 1)))) (@repr WORDSIZE32 1) + | Z_ZERO => + (@repr WORDSIZE32 0) + | Z_POS x => + cast (impl_24__to_usize_binary x) + end; +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v new file mode 100644 index 000000000..c651e9211 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v @@ -0,0 +1,397 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super_Spec. +Export Super_Spec. + +Require Import Super_Binary. +Export Super_Binary. + +Require Import Ordering. +Export Ordering. + +Definition haxint_shr__half (s : t_HaxInt_t) : t_HaxInt_t := + match match_pos s with + | POS_ZERO => + v_HaxInt_ZERO + | POS_POS n => + match match_positive n with + | POSITIVE_XH => + v_HaxInt_ZERO + | POSITIVE_XO p => + positive_to_int p + | POSITIVE_XI p => + positive_to_int p + end + end. + +Definition haxint_sub__succ_double_mask (lhs : t_HaxInt_t) : t_HaxInt_t := + match match_pos lhs with + | POS_ZERO => + positive_to_int xH + | POS_POS p => + positive_to_int (xI p) + end. + +Definition haxint_succ_double (s : t_HaxInt_t) : t_Positive_t := + match match_pos s with + | POS_ZERO => + xH + | POS_POS p => + xI p + end. + +Definition haxint_double (s : t_HaxInt_t) : t_HaxInt_t := + match match_pos s with + | POS_ZERO => + v_HaxInt_ZERO + | POS_POS p => + positive_to_int (xO p) + end. + +Definition haxint_sub__double_mask (lhs : t_HaxInt_t) : t_HaxInt_t := + match match_pos lhs with + | POS_ZERO => + v_HaxInt_ZERO + | POS_POS p => + positive_to_int (xO p) + end. + +Definition bitand_binary (lhs : t_Positive_t) (rhs : t_Positive_t) : t_HaxInt_t := + match match_positive lhs with + | POSITIVE_XH => + match match_positive rhs with + | POSITIVE_XO q => + v_HaxInt_ZERO + | POSITIVE_XI _ | POSITIVE_XH => + v_HaxInt_ONE + end + | POSITIVE_XO p => + match match_positive rhs with + | POSITIVE_XH => + v_HaxInt_ZERO + | POSITIVE_XO q | POSITIVE_XI q => + haxint_double (bitand_binary p q) + end + | POSITIVE_XI p => + match match_positive rhs with + | POSITIVE_XH => + v_HaxInt_ONE + | POSITIVE_XO q => + haxint_double (bitand_binary p q) + | POSITIVE_XI q => + positive_to_int (haxint_succ_double (bitand_binary p q)) + end + end. + +Definition bitor_binary (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Positive_t := + match match_positive lhs with + | POSITIVE_XH => + match match_positive rhs with + | POSITIVE_XO q => + xI q + | POSITIVE_XH => + xH + | POSITIVE_XI q => + xI q + end + | POSITIVE_XO p => + match match_positive rhs with + | POSITIVE_XH => + xI p + | POSITIVE_XO q => + xO (bitor_binary p q) + | POSITIVE_XI q => + xI (bitor_binary p q) + end + | POSITIVE_XI p => + match match_positive rhs with + | POSITIVE_XH => + xI p + | POSITIVE_XO q | POSITIVE_XI q => + xI (bitor_binary p q) + end + end. + +Definition haxint_bitand (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := + match match_pos lhs with + | POS_ZERO => + v_HaxInt_ZERO + | POS_POS p => + match match_pos rhs with + | POS_ZERO => + v_HaxInt_ZERO + | POS_POS q => + bitand_binary p q + end + end. + +Definition haxint_bitor (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := + match match_pos lhs with + | POS_ZERO => + rhs + | POS_POS p => + match match_pos rhs with + | POS_ZERO => + positive_to_int p + | POS_POS q => + positive_to_int (bitor_binary p q) + end + end. + +Definition haxint_bitxor__bitxor_binary (lhs : t_Positive_t) (rhs : t_Positive_t) : t_HaxInt_t := + match match_positive lhs with + | POSITIVE_XH => + match match_positive rhs with + | POSITIVE_XH => + v_HaxInt_ZERO + | POSITIVE_XO q => + positive_to_int (xI q) + | POSITIVE_XI q => + positive_to_int (xO q) + end + | POSITIVE_XO p => + match match_positive rhs with + | POSITIVE_XH => + positive_to_int (xI p) + | POSITIVE_XO q => + haxint_double (haxint_bitxor__bitxor_binary p q) + | POSITIVE_XI q => + positive_to_int (haxint_succ_double (haxint_bitxor__bitxor_binary p q)) + end + | POSITIVE_XI p => + match match_positive rhs with + | POSITIVE_XH => + positive_to_int (xO p) + | POSITIVE_XO q => + positive_to_int (haxint_succ_double (haxint_bitxor__bitxor_binary p q)) + | POSITIVE_XI q => + haxint_double (haxint_bitxor__bitxor_binary p q) + end + end. + +Definition haxint_bitxor (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := + match match_pos lhs with + | POS_ZERO => + rhs + | POS_POS p => + match match_pos rhs with + | POS_ZERO => + positive_to_int p + | POS_POS q => + haxint_bitxor__bitxor_binary p q + end + end. + +Definition haxint_cmp (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_Ordering_t := + match match_pos lhs with + | POS_ZERO => + match match_pos rhs with + | POS_ZERO => + Ordering_Equalt_Ordering_t + | POS_POS q => + Ordering_Lesst_Ordering_t + end + | POS_POS p => + match match_pos rhs with + | POS_ZERO => + Ordering_Greatert_Ordering_t + | POS_POS q => + positive_cmp p q + end + end. + +Definition haxint_le (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : bool := + match Option_Some (haxint_cmp lhs rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end. + +Definition haxint_lt (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : bool := + match Option_Some (haxint_cmp lhs rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end. + +Definition haxint_shl__shl_helper (rhs : t_Unary_t) (lhs : t_HaxInt_t) : t_HaxInt_t := + if is_zero (f_clone lhs) + then lhs + else match match_unary rhs with + | UNARY_ZERO => + lhs + | UNARY_SUCC n => + haxint_shl__shl_helper n (haxint_double lhs) + end. + +Definition haxint_shl (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := + haxint_shl__shl_helper (unary_from_int rhs) lhs. + +Definition haxint_shr__shr_helper (rhs : t_Unary_t) (lhs : t_HaxInt_t) : t_HaxInt_t := + if is_zero (f_clone lhs) + then lhs + else match match_unary rhs with + | UNARY_ZERO => + lhs + | UNARY_SUCC n => + haxint_shr__shr_helper n (haxint_shr__half lhs) + end. + +Definition haxint_shr (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := + haxint_shr__shr_helper (unary_from_int rhs) lhs. + +Definition haxint_sub__double_pred_mask (lhs : t_Positive_t) : t_HaxInt_t := + match match_positive lhs with + | POSITIVE_XH => + v_HaxInt_ZERO + | POSITIVE_XO p => + positive_to_int (xO (positive_pred_double p)) + | POSITIVE_XI p => + positive_to_int (xO (xO p)) + end. + +Definition power_of_two (s : t_Unary_t) : t_Positive_t := + match match_unary s with + | UNARY_ZERO => + xH + | UNARY_SUCC x => + xO (power_of_two x) + end. + +Definition haxint_add (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := + match match_pos lhs with + | POS_ZERO => + rhs + | POS_POS p => + match match_pos rhs with + | POS_ZERO => + positive_to_int p + | POS_POS q => + positive_to_int (positive_add p q) + end + end. + +Definition haxint_sub (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := + match match_pos lhs with + | POS_ZERO => + v_HaxInt_ZERO + | POS_POS p => + match match_pos rhs with + | POS_ZERO => + positive_to_int p + | POS_POS q => + haxint_sub__sub_binary p q + end + end. + +Definition haxint_divmod__divmod_binary (a : t_Positive_t) (b : t_Positive_t) : t_HaxInt_t × t_HaxInt_t := + match match_positive a with + | POSITIVE_XH => + match match_positive b with + | POSITIVE_XH => + (v_HaxInt_ONE,v_HaxInt_ZERO) + | POSITIVE_XO q | POSITIVE_XI q => + (v_HaxInt_ZERO,v_HaxInt_ONE) + end + | POSITIVE_XO a_ => + let '(q,r) := haxint_divmod__divmod_binary a_ (f_clone b) : t_HaxInt_t × t_HaxInt_t in + let r_ := haxint_double r : t_HaxInt_t in + if haxint_le (positive_to_int (f_clone b)) (f_clone r_) + then (positive_to_int (haxint_succ_double q),haxint_sub r_ (positive_to_int b)) + else (haxint_double q,r_) + | POSITIVE_XI a_ => + let '(q,r) := haxint_divmod__divmod_binary a_ (f_clone b) : t_HaxInt_t × t_HaxInt_t in + let r_ := positive_to_int (haxint_succ_double r) : t_HaxInt_t in + if haxint_le (positive_to_int (f_clone b)) (f_clone r_) + then (positive_to_int (haxint_succ_double q),haxint_sub r_ (positive_to_int b)) + else (haxint_double q,r_) + end. + +Definition haxint_divmod (a : t_HaxInt_t) (b : t_HaxInt_t) : t_HaxInt_t × t_HaxInt_t := + match match_pos a with + | POS_ZERO => + (v_HaxInt_ZERO,v_HaxInt_ZERO) + | POS_POS p => + match match_pos b with + | POS_ZERO => + (v_HaxInt_ZERO,positive_to_int p) + | POS_POS q => + haxint_divmod__divmod_binary p q + end + end. + +Definition haxint_div (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := + let '(q,_) := haxint_divmod lhs rhs : t_HaxInt_t × t_HaxInt_t in + q. + +Definition haxint_mul (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := + match match_pos lhs with + | POS_ZERO => + v_HaxInt_ZERO + | POS_POS p => + match match_pos rhs with + | POS_ZERO => + v_HaxInt_ZERO + | POS_POS q => + positive_to_int (positive_mul p q) + end + end. + +Definition haxint_rem (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := + let '(_,r) := haxint_divmod lhs rhs : t_HaxInt_t × t_HaxInt_t in + r. + +Definition haxint_sub__sub_binary (lhs : t_Positive_t) (rhs : t_Positive_t) : t_HaxInt_t := + match match_positive lhs with + | POSITIVE_XH => + v_HaxInt_ZERO + | POSITIVE_XO p => + match match_positive rhs with + | POSITIVE_XH => + positive_to_int (positive_pred_double p) + | POSITIVE_XO q => + haxint_sub__double_mask (haxint_sub__sub_binary p q) + | POSITIVE_XI q => + haxint_sub__succ_double_mask (haxint_sub__sub_carry p q) + end + | POSITIVE_XI p => + match match_positive rhs with + | POSITIVE_XH => + positive_to_int (xO p) + | POSITIVE_XO q => + haxint_sub__succ_double_mask (haxint_sub__sub_binary p q) + | POSITIVE_XI q => + haxint_sub__double_mask (haxint_sub__sub_binary p q) + end + end. + +Definition haxint_sub__sub_carry (lhs : t_Positive_t) (rhs : t_Positive_t) : t_HaxInt_t := + match match_positive lhs with + | POSITIVE_XH => + v_HaxInt_ZERO + | POSITIVE_XO p => + match match_positive rhs with + | POSITIVE_XH => + haxint_sub__double_pred_mask p + | POSITIVE_XO q => + haxint_sub__succ_double_mask (haxint_sub__sub_carry p q) + | POSITIVE_XI q => + haxint_sub__double_mask (haxint_sub__sub_carry p q) + end + | POSITIVE_XI p => + match match_positive rhs with + | POSITIVE_XH => + positive_to_int (positive_pred_double p) + | POSITIVE_XO q => + haxint_sub__double_mask (haxint_sub__sub_binary p q) + | POSITIVE_XI q => + haxint_sub__succ_double_mask (haxint_sub__sub_carry p q) + end + end. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v index a92c32d89..1fd749f0e 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v @@ -1,30 +1,129 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. -From Core Require Import Core_Clone (t_Clone). -Export Core_Clone (t_Clone). +Require Import Super_Spec. +Export Super_Spec. -From Core Require Import Core_Cmp (t_PartialEq). -Export Core_Cmp (t_PartialEq). +Require Import haxint_lt. +Export haxint_lt. -From Core Require Import Core_Marker (t_Sized). -Export Core_Marker (t_Sized). +Require Import Clone. +Export Clone. -From Core Require Import Core_Base_Int. -Export Core_Base_Int. +Require Import Core_Cmp. +Export Core_Cmp. -(* NotImplementedYet *) +Require Import Sized. +Export Sized. -(* NotImplementedYet *) +Require Import panicking. +Export panicking. -Definition t_Seq `{v_T : Type} `{t_Sized v_T} : Type := list v_T. -Arguments t_Seq:clear implicits. -Arguments t_Seq (_) {_}. +Definition hd__panic_cold_explicit (_ : unit) : t_Never_t := + panic_explicit tt. -Notation "'t_LIST'" := t_Seq. -Notation "'t_LIST_LIST_NIL'" := nil. -Notation "'t_LIST_LIST_CONS'" := cons. +Definition set_index__set_index_unary__panic_cold_explicit (_ : unit) : t_Never_t := + panic_explicit tt. + +Definition hd (s : t_Seq_t T) : T := + match match_list s with + | LIST_NIL => + never_to_any (hd__panic_cold_explicit tt) + | LIST_CONS hd _ => + hd + end. + +Definition is_empty (s : t_Seq_t T) : bool := + match match_list s with + | LIST_NIL => + true + | LIST_CONS _ _ => + false + end. + +Definition tl (s : t_Seq_t T) : t_Seq_t T := + match match_list s with + | LIST_NIL => + nil tt + | LIST_CONS _ tl => + tl + end. + +Definition eq_inner (s : t_Seq_t T) (other : t_Seq_t T) : bool := + match match_list (f_clone s) with + | LIST_NIL => + is_empty (f_clone other) + | LIST_CONS x xs => + match match_list (f_clone other) with + | LIST_NIL => + false + | LIST_CONS y ys => + andb (x=.?y) (eq_inner xs ys) + end + end. + +#[global] Instance t_Seq_t T_t_PartialEq (T : _) : t_PartialEq (t_Seq_t T) (t_Seq_t T) := { + f_eq (self : t_Seq_t T) (other : t_Seq_t T) := eq_inner (f_clone self) (f_clone other); + f_ne (self : t_Seq_t T) (other : t_Seq_t T) := not (eq_inner (f_clone self) (f_clone other)); +}. + +Definition get_index__get_index_unary (l : t_Seq_t T) (i : t_Unary_t) : T := + match match_unary i with + | UNARY_ZERO => + hd l + | UNARY_SUCC n => + get_index__get_index_unary (tl l) n + end. + +Definition get_index (s : t_Seq_t T) (i : t_HaxInt_t) : T := + get_index__get_index_unary s (unary_from_int i). + +Definition len (s : t_Seq_t T) : t_HaxInt_t := + match match_list s with + | LIST_NIL => + v_HaxInt_ZERO + | LIST_CONS _ tl => + succ (len tl) + end. + +Definition repeat__repeat_unary (n : t_Unary_t) (v : T) : t_Seq_t T := + match match_unary n with + | UNARY_ZERO => + nil tt + | UNARY_SUCC m => + cons (repeat__repeat_unary m (f_clone v)) v + end. + +Definition repeat (n : t_HaxInt_t) (v : T) : t_Seq_t T := + repeat__repeat_unary (unary_from_int n) v. + +Definition rev__rev_accum (s : t_Seq_t T) (accum : t_Seq_t T) : t_Seq_t T := + match match_list s with + | LIST_NIL => + accum + | LIST_CONS hd tl => + rev__rev_accum tl (cons accum hd) + end. + +Definition rev (s : t_Seq_t T) : t_Seq_t T := + rev__rev_accum s (nil tt). + +Definition set_index__set_index_unary (x : t_Seq_t T) (i : t_Unary_t) (v : T) : t_Seq_t T := + match match_list x with + | LIST_NIL => + never_to_any (set_index__set_index_unary__panic_cold_explicit tt) + | LIST_CONS hd tl => + match match_unary i with + | UNARY_ZERO => + cons tl v + | UNARY_SUCC n => + cons (set_index__set_index_unary tl n v) hd + end + end. + +Definition set_index (s : t_Seq_t T) (i : t_HaxInt_t) (v : T) : t_Seq_t T := + set_index__set_index_unary s (unary_from_int i) v. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_impl.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_impl.v deleted file mode 100644 index 013f2e2e0..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_impl.v +++ /dev/null @@ -1,142 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import String. - - -From Core Require Import Core_Base_Seq. -Export Core_Base_Seq. - -From Core Require Import Core_Base_Seq_Base_spec. -Export Core_Base_Seq_Base_spec. - -From Core Require Import Core_Panicking. -Export Core_Panicking. - -From Core Require Import Core_Marker. -Export Core_Marker. - -From Core Require Import Core_Clone. -Export Core_Clone. - -From Core Require Import Core_Cmp. -Export Core_Cmp. - -From Core Require Import Core_Base_Int_Base_impl. -Export Core_Base_Int_Base_impl. - -Definition impl_2__is_empty `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) : bool := - match impl_1__match_list (self) with - | t_LIST_LIST_NIL => - true - | t_LIST_LIST_CONS (_) (_) => - false - end. - -Definition impl_2__tl `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) `{negb (impl_2__is_empty (self)) = true} : t_Seq (v_T) := - match impl_1__match_list (self) with - | t_LIST_LIST_NIL => - impl_1__NIL - | t_LIST_LIST_CONS (_) (tl) => - tl - end. - -Definition impl_2__hd__panic_cold_explicit (_ : unit) `{false = true} : t_Never := - panic_explicit (H := H) (tt). - -Definition impl_2__hd `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) `{negb (impl_2__is_empty (self)) = true} : v_T := - match impl_1__match_list (self) as k return negb (impl_2__is_empty k) = true -> _ with - | t_LIST_LIST_NIL => - fun F => - never_to_any (impl_2__hd__panic_cold_explicit (H := F) (tt)) - | t_LIST_LIST_CONS (hd) (_) => - fun _ => - hd - end H1. - -Definition impl_2__set_index__set_index_unary__panic_cold_explicit (_ : unit) `{false = true} : t_Never := - panic_explicit (H := H) (tt). - -Fixpoint impl__eq_inner `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} `{t_PartialEq v_T v_T} (self : t_Seq (v_T)) (other : t_Seq (v_T)) : bool := - match impl_1__match_list (t_Clone_f_clone (self)) with - | t_LIST_LIST_NIL => - impl_2__is_empty (t_Clone_f_clone (other)) - | t_LIST_LIST_CONS (x) (xs) => - match impl_1__match_list (t_Clone_f_clone (other)) with - | t_LIST_LIST_NIL => - false - | t_LIST_LIST_CONS (y) (ys) => - andb (t_PartialEq_f_eq (x) (y)) (impl__eq_inner (xs) (ys)) - end - end. - -Instance t_PartialEq_531240694 `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} `{t_PartialEq v_T v_T} : t_PartialEq (t_Seq (v_T)) (t_Seq (v_T)) := - { - t_PartialEq_f_eq := fun (self : t_Seq (v_T)) (other : t_Seq (v_T)) => - impl__eq_inner (self) (other); - t_PartialEq_f_ne := fun (self : t_Seq (v_T)) (other : t_Seq (v_T)) => - negb (impl__eq_inner (self) (other)); - }. - -Fixpoint impl_2__len `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) : t_HaxInt := - match impl_1__match_list (self) with - | t_LIST_LIST_NIL => - impl_9__ZERO - | t_LIST_LIST_CONS (_) (tl) => - impl_9__succ (impl_2__len (tl)) - end. - -Fixpoint impl_2__rev_accum `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) (accum : t_Seq (v_T)) : t_Seq (v_T) := - match impl_1__match_list (self) with - | t_LIST_LIST_NIL => - accum - | t_LIST_LIST_CONS (hd) (tl) => - impl_2__rev_accum (tl) (impl_1__cons (accum) (hd)) - end. - -Definition impl_2__rev `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) : t_Seq (v_T) := - impl_2__rev_accum (self) (impl_1__NIL). - -Program Fixpoint impl_2__get_index__get_index_unary `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (l : t_Seq (v_T)) (i : t_Unary) `{t_PartialOrd_f_lt (impl_5__to_int i) ((impl_2__len (l))) = true} : v_T := - match impl_6__match_unary (i) with - | t_UNARY_UNARY_ZERO => - impl_2__hd (l) - | t_UNARY_UNARY_SUCC (n) => - impl_2__get_index__get_index_unary (impl_2__tl (l)) (n) - end. -Admit Obligations. - -Program Definition impl_2__get_index `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) (i : t_HaxInt) `{t_PartialOrd_f_lt (i) (impl_2__len (self)) = true} : v_T := - impl_2__get_index__get_index_unary (H1 := _) (self) (impl_5__from_int (i)). -Admit Obligations. - -Fixpoint impl_2__repeat__repeat_unary `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (n : t_Unary) (v : v_T) : t_Seq (v_T) := - match impl_6__match_unary (n) with - | t_UNARY_UNARY_ZERO => - impl_1__NIL - | t_UNARY_UNARY_SUCC (m) => - impl_1__cons (impl_2__repeat__repeat_unary (m) (t_Clone_f_clone (v))) (v) - end. - -Definition impl_2__repeat `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (n : t_HaxInt) (v : v_T) : t_Seq (v_T) := - impl_2__repeat__repeat_unary (impl_5__from_int (n)) (v). - -Program Fixpoint impl_2__set_index__set_index_unary `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (x : t_Seq (v_T)) (i : t_Unary) (v : v_T) `{t_PartialOrd_f_lt (impl_5__to_int i) ((impl_2__len (x))) = true} : t_Seq (v_T) := - match impl_1__match_list (x) with - | t_LIST_LIST_NIL => - never_to_any (impl_2__set_index__set_index_unary__panic_cold_explicit (H := _) (tt)) - | t_LIST_LIST_CONS (hd) (tl) => - match impl_6__match_unary (i) with - | t_UNARY_UNARY_ZERO => - impl_1__cons (tl) (v) - | t_UNARY_UNARY_SUCC (n) => - impl_1__cons (impl_2__set_index__set_index_unary (tl) (n) (v)) (hd) - end - end. -Admit Obligations. - -Program Definition impl_2__set_index `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) (i : t_HaxInt) (v : v_T) `{t_PartialOrd_f_lt (i) (impl_2__len (self)) = true} : t_Seq (v_T) := - impl_2__set_index__set_index_unary (H1 := _) (self) (impl_5__from_int (i)) (v). -Admit Obligations. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_spec.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_spec.v deleted file mode 100644 index 895d9f453..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Seq_Base_spec.v +++ /dev/null @@ -1,20 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import String. - -From Core Require Import Core_Base_Seq. -Export Core_Base_Seq. - -Instance t_Clone_528107485 `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} : t_Clone (t_Seq (v_T)) := - { - t_Clone_f_clone := fun (self : t_Seq (v_T)) => self; - }. - -Definition impl_1__NIL `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} : t_Seq (v_T) := nil. - -Definition impl_1__cons `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) (t : v_T) : t_Seq (v_T) := cons t self. - -Definition impl_1__match_list `{v_T : Type} `{t_Sized v_T} `{t_Clone v_T} (self : t_Seq (v_T)) : t_LIST (v_T) := self. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v new file mode 100644 index 000000000..5a60b002d --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v @@ -0,0 +1,39 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Haxint. +Export Haxint. + +Require Import haxint_succ. +Export haxint_succ. + +Require Import Unary. +Export Unary. + +Require Import Binary. +Export Binary. + +Require Import Z. +Export Z. + +Require Import Seq. +Export Seq. + +Require Import Constants. +Export Constants. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v new file mode 100644 index 000000000..9867e9049 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v @@ -0,0 +1,16 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Pos. +Export Pos. + +Require Import Positive. +Export Positive. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v new file mode 100644 index 000000000..6de0da6dc --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v @@ -0,0 +1,21 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super_Super_Haxint. +Export Super_Super_Haxint. + +Require Import Super_Positive. +Export Super_Positive. + +Inductive t_POS : Type := +| POS_ZERO : t_POS +| POS_POS : t_Positive_t -> t_POS. + +Definition match_pos (s : t_HaxInt_t) : t_POS_t := + if is_zero (f_clone s) + then POS_ZEROt_POS_t + else POS_POS (positive_from_int s). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v new file mode 100644 index 000000000..63f17fccb --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v @@ -0,0 +1,53 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super_Super_Haxint. +Export Super_Super_Haxint. + +Record t_Positive : Type := { + 0 : t_HaxInt_t; +}. + +#[global] Instance t_Positive_t_t_Clone : t_Clone t_Positive_t := { + f_clone (self : t_Positive_t) := never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))); +}. + +Inductive t_POSITIVE : Type := +| POSITIVE_XH : t_POSITIVE +| POSITIVE_XO : t_Positive_t -> t_POSITIVE +| POSITIVE_XI : t_Positive_t -> t_POSITIVE. + +Definition match_positive__is_xH (s : t_Positive_t) : bool := + never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). + +Definition match_positive__is_xI (s : t_Positive_t) : bool := + never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). + +Definition match_positive__is_xO (s : t_Positive_t) : bool := + never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). + +Definition positive_from_int (x : t_HaxInt_t) : t_Positive_t := + Positive x. + +Definition positive_to_int (s : t_Positive_t) : t_HaxInt_t := + 0 s. + +Definition match_positive (s : t_Positive_t) : t_POSITIVE_t := + if match_positive__is_xH (f_clone s) + then POSITIVE_XHt_POSITIVE_t + else if match_positive__is_xO (f_clone s) + then POSITIVE_XO (positive_from_int (div2 (positive_to_int s))) + else POSITIVE_XI (positive_from_int (div2 (positive_to_int s))). + +Definition xH : t_Positive_t := + Positive v_HaxInt_ONE. + +Definition xI (s : t_Positive_t) : t_Positive_t := + never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). + +Definition xO (s : t_Positive_t) : t_Positive_t := + never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v new file mode 100644 index 000000000..964c8feb5 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v @@ -0,0 +1,117 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super_Haxint. +Export Super_Haxint. + +Definition v_BITS_128_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 128)]))). + +Definition v_BITS_16_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 16)]))). + +Definition v_BITS_32_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 32)]))). + +Definition v_BITS_64_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 64)]))). + +Definition v_BITS_8_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 8)]))). + +Definition v_WORDSIZE_128_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 1)]))). + +Definition v_WORDSIZE_128_SUB_1_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255)]))). + +Definition v_WORDSIZE_16_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 1)]))). + +Definition v_WORDSIZE_16_SUB_1_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 255); + (@repr WORDSIZE8 255)]))). + +Definition v_WORDSIZE_32_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 1)]))). + +Definition v_WORDSIZE_32_SUB_1_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255)]))). + +Definition v_WORDSIZE_4_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 128)]))). + +Definition v_WORDSIZE_4_SUB_1_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 127)]))). + +Definition v_WORDSIZE_64_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 0); + (@repr WORDSIZE8 1)]))). + +Definition v_WORDSIZE_64_SUB_1_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255); + (@repr WORDSIZE8 255)]))). + +Definition v_WORDSIZE_8_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 0); + (@repr WORDSIZE8 1)]))). + +Definition v_WORDSIZE_8_SUB_1_ : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 255)]))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v new file mode 100644 index 000000000..42fb1d8a5 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v @@ -0,0 +1,29 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Record t_HaxInt : Type := { + f_v : t_Cow_t (seq int8); +}. + +Definition v_HaxInt_ONE : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 1)]))). + +Definition v_HaxInt_TWO : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 2)]))). + +Definition v_HaxInt_ZERO : t_HaxInt_t := + Build_HaxInt (f_v := Cow_Borrowed (unsize !TODO empty array!)). + +#[global] Instance t_HaxInt_t_t_Clone : t_Clone t_HaxInt_t := { + f_clone (self : t_HaxInt_t) := never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))); +}. + +Definition div2 (s : t_HaxInt_t) : t_HaxInt_t := + never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). + +Definition is_zero (s : t_HaxInt_t) : bool := + never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v new file mode 100644 index 000000000..6e268f9f6 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v @@ -0,0 +1,32 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Record t_Seq (T : _) : Type := { + f_v : t_Vec_t T t_Global_t; +}. + +#[global] Instance t_Seq_t T_t_Clone (T : _) : t_Clone (t_Seq_t T) := { + f_clone (self : t_Seq_t T) := Build_Seq (f_v := f_clone (f_v self)); +}. + +Inductive t_LIST (T : _) : Type := +| LIST_NIL : t_LIST (T : _) +| LIST_CONS : (T × t_Seq_t T) -> t_LIST (T : _). +Arguments LIST_NIL {_}. +Arguments LIST_CONS {_} (T × t_Seq_t T). + +Definition nil (_ : unit) : t_Seq_t T := + Build_Seq (f_v := impl__new tt). + +Definition cons (s : t_Seq_t T) (t : T) : t_Seq_t T := + Build_Seq (f_v := impl__concat (unsize (array_from_list [(array_from_list [t]).[RangeFullt_RangeFull_t]; + (f_v s).[RangeFullt_RangeFull_t]]))). + +Definition match_list (s : t_Seq_t T) : t_LIST_t T := + if eq (impl_1__len (f_v s)) (@repr WORDSIZE32 0) + then LIST_NILt_LIST_t T + else LIST_CONSt_LIST_t T. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v new file mode 100644 index 000000000..e50fd5b1c --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v @@ -0,0 +1,38 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super_Haxint. +Export Super_Haxint. + +Record t_Unary : Type := { + 0 : t_HaxInt_t; +}. + +#[global] Instance t_Unary_t_t_Clone : t_Clone t_Unary_t := { + f_clone (self : t_Unary_t) := never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))); +}. + +Inductive t_UNARY : Type := +| UNARY_ZERO : t_UNARY +| UNARY_SUCC : t_Unary_t -> t_UNARY. + +Definition pred (x : t_Unary_t) : t_Unary_t := + never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). + +Definition succ (x : t_Unary_t) : t_Unary_t := + never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). + +Definition unary_from_int (x : t_HaxInt_t) : t_Unary_t := + Unary x. + +Definition unary_to_int (s : t_Unary_t) : t_HaxInt_t := + 0 s. + +Definition match_unary (s : t_Unary_t) : t_UNARY_t := + if is_zero (unary_to_int (f_clone s)) + then UNARY_ZEROt_UNARY_t + else UNARY_SUCC (pred s). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v new file mode 100644 index 000000000..ddd0783bc --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v @@ -0,0 +1,20 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super_Binary. +Export Super_Binary. + +Inductive t_Z : Type := +| Z_NEG : t_Positive_t -> t_Z +| Z_ZERO : t_Z +| Z_POS : t_Positive_t -> t_Z. + +Definition v_Z_ONE : t_Z_t := + Z_POS xH. + +Definition v_Z_TWO : t_Z_t := + Z_POS (Positive v_HaxInt_TWO). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v new file mode 100644 index 000000000..5a695d161 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v @@ -0,0 +1,357 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super_Spec. +Export Super_Spec. + +Require Import Super_Binary. +Export Super_Binary. + +Require Import Ordering. +Export Ordering. + +Definition z_add__z_double (s : t_Z_t) : t_Z_t := + match s with + | Z_ZERO => + Z_ZEROt_Z_t + | Z_POS p => + Z_POS (xO p) + | Z_NEG p => + Z_NEG (xO p) + end. + +Definition z_bitor__haxint_ldiff__n_double (x : t_POS_t) : t_POS_t := + match x with + | POS_ZERO => + POS_ZEROt_POS_t + | POS_POS p => + POS_POS (xO p) + end. + +Definition z_bitor__haxint_ldiff__n_succ_double (x : t_POS_t) : t_POS_t := + match x with + | POS_ZERO => + POS_POS xH + | POS_POS p => + POS_POS (xI p) + end. + +Definition z_bitor__n_succ (x : t_POS_t) : t_Positive_t := + match x with + | POS_ZERO => + xH + | POS_POS p => + positive_from_int (succ (positive_to_int p)) + end. + +Definition z_neg (x : t_Z_t) : t_Z_t := + match x with + | Z_NEG p => + Z_POS p + | Z_ZERO => + Z_ZEROt_Z_t + | Z_POS p => + Z_NEG p + end. + +Definition z_add__z_pred_double (s : t_Z_t) : t_Z_t := + match s with + | Z_ZERO => + Z_NEG xH + | Z_POS p => + Z_POS (positive_pred_double p) + | Z_NEG p => + Z_NEG (xI p) + end. + +Definition z_add__z_succ_double (s : t_Z_t) : t_Z_t := + match s with + | Z_ZERO => + Z_POS xH + | Z_POS p => + Z_POS (xI p) + | Z_NEG p => + Z_NEG (positive_pred_double p) + end. + +Definition z_bitor__haxint_ldiff__positive_ldiff (lhs : t_Positive_t) (rhs : t_Positive_t) : t_POS_t := + match match_positive lhs with + | POSITIVE_XH => + match match_positive rhs with + | POSITIVE_XH => + POS_ZEROt_POS_t + | POSITIVE_XO _ => + POS_POS xH + | POSITIVE_XI _ => + POS_ZEROt_POS_t + end + | POSITIVE_XO p => + match match_positive rhs with + | POSITIVE_XH => + POS_POS (xO p) + | POSITIVE_XO q => + z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q) + | POSITIVE_XI q => + z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q) + end + | POSITIVE_XI p => + match match_positive rhs with + | POSITIVE_XH => + POS_POS (xO p) + | POSITIVE_XO q => + z_bitor__haxint_ldiff__n_succ_double (z_bitor__haxint_ldiff__positive_ldiff p q) + | POSITIVE_XI q => + z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q) + end + end. + +Definition z_bitor__haxint_ldiff (lhs : t_POS_t) (rhs : t_POS_t) : t_POS_t := + match lhs with + | POS_ZERO => + POS_ZEROt_POS_t + | POS_POS p => + match rhs with + | POS_ZERO => + POS_POS p + | POS_POS q => + z_bitor__haxint_ldiff__positive_ldiff p q + end + end. + +Definition z_bitor__n_and (lhs : t_POS_t) (rhs : t_POS_t) : t_POS_t := + match lhs with + | POS_ZERO => + POS_ZEROt_POS_t + | POS_POS p => + match rhs with + | POS_ZERO => + POS_ZEROt_POS_t + | POS_POS q => + POS_POS (positive_from_int (bitand_binary p q)) + end + end. + +Definition z_bitor__positive_pred_N (x : t_Positive_t) : t_POS_t := + match match_positive x with + | POSITIVE_XH => + POS_ZEROt_POS_t + | POSITIVE_XI p => + POS_POS (xO p) + | POSITIVE_XO p => + POS_POS (positive_pred_double p) + end. + +Definition z_bitor (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := + match lhs with + | Z_ZERO => + rhs + | Z_POS x => + match rhs with + | Z_ZERO => + Z_POS x + | Z_POS y => + Z_POS (bitor_binary x y) + | Z_NEG y => + Z_NEG (z_bitor__n_succ (z_bitor__haxint_ldiff (z_bitor__positive_pred_N y) (POS_POS x))) + end + | Z_NEG x => + match rhs with + | Z_ZERO => + Z_NEG x + | Z_POS y => + Z_NEG (z_bitor__n_succ (z_bitor__haxint_ldiff (z_bitor__positive_pred_N x) (POS_POS y))) + | Z_NEG y => + Z_NEG (z_bitor__n_succ (z_bitor__n_and (z_bitor__positive_pred_N x) (z_bitor__positive_pred_N y))) + end + end. + +Definition z_cmp (lhs : t_Z_t) (rhs : t_Z_t) : t_Ordering_t := + match lhs with + | Z_NEG p => + match rhs with + | Z_NEG q => + match positive_cmp p q with + | Ordering_Equal => + Ordering_Equalt_Ordering_t + | Ordering_Less => + Ordering_Greatert_Ordering_t + | Ordering_Greater => + Ordering_Lesst_Ordering_t + end + | _ => + Ordering_Lesst_Ordering_t + end + | Z_ZERO => + match rhs with + | Z_ZERO => + Ordering_Equalt_Ordering_t + | Z_POS _ => + Ordering_Lesst_Ordering_t + | Z_NEG _ => + Ordering_Greatert_Ordering_t + end + | Z_POS p => + match rhs with + | Z_POS q => + positive_cmp p q + | _ => + Ordering_Greatert_Ordering_t + end + end. + +Definition z_le (lhs : t_Z_t) (rhs : t_Z_t) : bool := + match Option_Some (z_cmp lhs rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end. + +Definition z_lt (lhs : t_Z_t) (rhs : t_Z_t) : bool := + match Option_Some (z_cmp lhs rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end. + +Definition z_add__pos_z_sub (x : t_Positive_t) (y : t_Positive_t) : t_Z_t := + match match_positive x with + | POSITIVE_XH => + match match_positive y with + | POSITIVE_XH => + Z_ZEROt_Z_t + | POSITIVE_XO q => + Z_NEG (positive_pred_double q) + | POSITIVE_XI q => + Z_NEG (xO q) + end + | POSITIVE_XO p => + match match_positive y with + | POSITIVE_XH => + Z_POS (positive_pred_double p) + | POSITIVE_XO q => + z_add__z_double (z_add__pos_z_sub p q) + | POSITIVE_XI q => + z_add__z_pred_double (z_add__pos_z_sub p q) + end + | POSITIVE_XI p => + match match_positive y with + | POSITIVE_XH => + Z_POS (xO p) + | POSITIVE_XO q => + z_add__z_succ_double (z_add__pos_z_sub p q) + | POSITIVE_XI q => + z_add__z_double (z_add__pos_z_sub p q) + end + end. + +Definition z_add (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := + match lhs with + | Z_NEG p => + match rhs with + | Z_NEG q => + Z_NEG (positive_add p q) + | Z_ZERO => + Z_NEG p + | Z_POS q => + z_add__pos_z_sub q p + end + | Z_ZERO => + rhs + | Z_POS p => + match rhs with + | Z_NEG q => + z_add__pos_z_sub p q + | Z_ZERO => + Z_POS p + | Z_POS q => + Z_POS (positive_add p q) + end + end. + +Definition z_sub (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := + z_add lhs (z_neg rhs). + +Definition z_mul (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := + match lhs with + | Z_NEG p => + match rhs with + | Z_NEG q => + Z_POS (positive_mul p q) + | Z_ZERO => + Z_ZEROt_Z_t + | Z_POS q => + Z_NEG (positive_mul p q) + end + | Z_ZERO => + Z_ZEROt_Z_t + | Z_POS p => + match rhs with + | Z_NEG q => + Z_NEG (positive_mul p q) + | Z_ZERO => + Z_ZEROt_Z_t + | Z_POS q => + Z_POS (positive_mul p q) + end + end. + +Definition pos_div_eucl (a : t_Positive_t) (b : t_Z_t) : t_Z_t × t_Z_t := + match match_positive a with + | POSITIVE_XH => + if z_le v_Z_TWO (f_clone b) + then (Z_ZEROt_Z_t,v_Z_ONE) + else (v_Z_ONE,Z_ZEROt_Z_t) + | POSITIVE_XO p => + let '(q,r) := pos_div_eucl p (f_clone b) : t_Z_t × t_Z_t in + let r_ := z_mul v_Z_TWO r : t_Z_t in + if z_lt (f_clone r_) (f_clone b) + then (z_mul v_Z_TWO q,r_) + else (z_add (z_mul v_Z_TWO q) v_Z_ONE,z_sub r_ b) + | POSITIVE_XI p => + let '(q,r) := pos_div_eucl p (f_clone b) : t_Z_t × t_Z_t in + let r_ := z_add (z_mul v_Z_TWO r) v_Z_ONE : t_Z_t in + if z_lt (f_clone r_) (f_clone b) + then (z_mul v_Z_TWO q,r_) + else (z_add (z_mul v_Z_TWO q) v_Z_ONE,z_sub r_ b) + end. + +Definition z_divmod (a : t_Z_t) (b : t_Z_t) : t_Z_t × t_Z_t := + match a with + | Z_ZERO => + (Z_ZEROt_Z_t,Z_ZEROt_Z_t) + | Z_POS a_ => + match f_clone b with + | Z_ZERO => + (Z_ZEROt_Z_t,Z_POS a_) + | Z_POS b_ => + pos_div_eucl a_ b + | Z_NEG b_ => + let '(q,r) := pos_div_eucl a_ (Z_POS b_) : t_Z_t × t_Z_t in + (z_neg q,r) + end + | Z_NEG a_ => + match f_clone b with + | Z_ZERO => + (Z_ZEROt_Z_t,Z_NEG a_) + | Z_POS _ => + let '(q,r) := pos_div_eucl a_ (f_clone b) : t_Z_t × t_Z_t in + (z_neg q,z_neg r) + | Z_NEG b_ => + let '(q,r) := pos_div_eucl a_ (Z_POS b_) : t_Z_t × t_Z_t in + (q,z_neg r) + end + end. + +Definition z_div (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := + let '(q,_) := z_divmod lhs rhs : t_Z_t × t_Z_t in + q. + +Definition z_rem (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := + let '(_,r) := z_divmod lhs rhs : t_Z_t × t_Z_t in + r. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v new file mode 100644 index 000000000..fb2a526ab --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v @@ -0,0 +1,16 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Int. +Export Int. + +Require Import Coerce. +Export Coerce. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v new file mode 100644 index 000000000..8ecbc22d5 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v @@ -0,0 +1,12 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +(*item error backend*) + +Class t_Concretization (Self : _) := { + f_concretize : (Self -> T) ; +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v new file mode 100644 index 000000000..2316b0a45 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v @@ -0,0 +1,1129 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Core_Cmp. +Export Core_Cmp. + +Require Import Core_Ops. +Export Core_Ops. + +Require Import Crate_Base. +Export Crate_Base. + +Require Import Abstraction. +Export Abstraction. + +Require Import Concretization. +Export Concretization. + +Require Import Option. +Export Option. + +Require Import None. +Export None. + +Require Import Some. +Export Some. + +Require Import Clone. +Export Clone. + +Require Import From. +Export From. + +Class t_Constants := { + f_ZERO : Self ; + f_ONE : Self ; + f_MIN : Self ; + f_MAX : Self ; +}. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +Definition impl_41__WORDSIZE : t_HaxInt_t := + v_WORDSIZE_128_. + +Definition impl_55__WORDSIZE : t_HaxInt_t := + v_WORDSIZE_64_. + +Definition impl_69__WORDSIZE : t_HaxInt_t := + v_WORDSIZE_32_. + +Definition impl_83__WORDSIZE : t_HaxInt_t := + v_WORDSIZE_16_. + +Definition impl_97__WORDSIZE : t_HaxInt_t := + v_WORDSIZE_8_. + +Definition impl_111__WORDSIZE : t_HaxInt_t := + v_WORDSIZE_128_. + +Definition impl_138__WORDSIZE : t_HaxInt_t := + v_WORDSIZE_64_. + +Definition impl_165__WORDSIZE : t_HaxInt_t := + v_WORDSIZE_32_. + +Definition impl_192__WORDSIZE : t_HaxInt_t := + v_WORDSIZE_16_. + +Definition impl_219__WORDSIZE : t_HaxInt_t := + v_WORDSIZE_8_. + +Record t_U128 : Type := { + f_v : t_HaxInt_t; +}. + +#[global] Instance t_U128_t_t_Constants : t_Constants t_U128_t := { + f_ZERO := Build_U128 (f_v := v_HaxInt_ZERO); + f_ONE := Build_U128 (f_v := v_HaxInt_ONE); + f_MIN := Build_U128 (f_v := v_HaxInt_ZERO); + f_MAX := Build_U128 (f_v := v_WORDSIZE_128_SUB_1_); +}. + +#[global] Instance t_U128_t_t_Clone : t_Clone t_U128_t := { + f_clone (self : t_U128_t) := Build_U128 (f_v := f_clone (f_v self)); +}. + +Record t_U16 : Type := { + f_v : t_HaxInt_t; +}. + +#[global] Instance t_U16_t_t_Constants : t_Constants t_U16_t := { + f_ZERO := Build_U16 (f_v := v_HaxInt_ZERO); + f_ONE := Build_U16 (f_v := v_HaxInt_ONE); + f_MIN := Build_U16 (f_v := v_HaxInt_ZERO); + f_MAX := Build_U16 (f_v := v_WORDSIZE_16_SUB_1_); +}. + +#[global] Instance t_U16_t_t_Clone : t_Clone t_U16_t := { + f_clone (self : t_U16_t) := Build_U16 (f_v := f_clone (f_v self)); +}. + +Record t_U32 : Type := { + f_v : t_HaxInt_t; +}. + +Definition impl_41__BITS : t_U32_t := + Build_U32 (f_v := v_BITS_128_). + +Definition impl_55__BITS : t_U32_t := + Build_U32 (f_v := v_BITS_64_). + +Definition impl_69__BITS : t_U32_t := + Build_U32 (f_v := v_BITS_32_). + +Definition impl_83__BITS : t_U32_t := + Build_U32 (f_v := v_BITS_16_). + +Definition impl_97__BITS : t_U32_t := + Build_U32 (f_v := v_BITS_8_). + +Definition impl_111__BITS : t_U32_t := + Build_U32 (f_v := v_BITS_128_). + +Definition impl_138__BITS : t_U32_t := + Build_U32 (f_v := v_BITS_64_). + +#[global] Instance t_U32_t_t_Constants : t_Constants t_U32_t := { + f_ZERO := Build_U32 (f_v := v_HaxInt_ZERO); + f_ONE := Build_U32 (f_v := v_HaxInt_ONE); + f_MIN := Build_U32 (f_v := v_HaxInt_ZERO); + f_MAX := Build_U32 (f_v := v_WORDSIZE_32_SUB_1_); +}. + +Definition impl_165__BITS : t_U32_t := + Build_U32 (f_v := v_BITS_32_). + +#[global] Instance t_U32_t_t_Clone : t_Clone t_U32_t := { + f_clone (self : t_U32_t) := Build_U32 (f_v := f_clone (f_v self)); +}. + +Definition impl_192__BITS : t_U32_t := + Build_U32 (f_v := v_BITS_16_). + +Definition impl_219__BITS : t_U32_t := + Build_U32 (f_v := v_BITS_8_). + +Record t_U64 : Type := { + f_v : t_HaxInt_t; +}. + +#[global] Instance t_U64_t_t_Constants : t_Constants t_U64_t := { + f_ZERO := Build_U64 (f_v := v_HaxInt_ZERO); + f_ONE := Build_U64 (f_v := v_HaxInt_ONE); + f_MIN := Build_U64 (f_v := v_HaxInt_ZERO); + f_MAX := Build_U64 (f_v := v_WORDSIZE_64_SUB_1_); +}. + +#[global] Instance t_U64_t_t_Clone : t_Clone t_U64_t := { + f_clone (self : t_U64_t) := Build_U64 (f_v := f_clone (f_v self)); +}. + +Record t_U8 : Type := { + f_v : t_HaxInt_t; +}. + +#[global] Instance t_U8_t_t_Constants : t_Constants t_U8_t := { + f_ZERO := Build_U8 (f_v := v_HaxInt_ZERO); + f_ONE := Build_U8 (f_v := v_HaxInt_ONE); + f_MIN := Build_U8 (f_v := v_HaxInt_ZERO); + f_MAX := Build_U8 (f_v := v_WORDSIZE_8_SUB_1_); +}. + +#[global] Instance t_U8_t_t_Clone : t_Clone t_U8_t := { + f_clone (self : t_U8_t) := Build_U8 (f_v := f_clone (f_v self)); +}. + +(*item error backend*) + +#[global] Instance t_U128_t_t_PartialEq : t_PartialEq t_U128_t t_U128_t := { + f_eq (self : t_U128_t) (rhs : t_U128_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; + f_ne (self : t_U128_t) (rhs : t_U128_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; +}. + +#[global] Instance t_U128_t_t_PartialOrd : t_PartialOrd t_U128_t t_U128_t := { + f_partial_cmp (self : t_U128_t) (rhs : t_U128_t) := Option_Some (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); + f_lt (self : t_U128_t) (rhs : t_U128_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less => + true + | _ => + false + end; + f_le (self : t_U128_t) (rhs : t_U128_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_U128_t) (rhs : t_U128_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_U128_t) (rhs : t_U128_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +(*item error backend*) + +#[global] Instance t_U64_t_t_PartialEq : t_PartialEq t_U64_t t_U64_t := { + f_eq (self : t_U64_t) (rhs : t_U64_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; + f_ne (self : t_U64_t) (rhs : t_U64_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; +}. + +#[global] Instance t_U64_t_t_PartialOrd : t_PartialOrd t_U64_t t_U64_t := { + f_partial_cmp (self : t_U64_t) (rhs : t_U64_t) := Option_Some (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); + f_lt (self : t_U64_t) (rhs : t_U64_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less => + true + | _ => + false + end; + f_le (self : t_U64_t) (rhs : t_U64_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_U64_t) (rhs : t_U64_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_U64_t) (rhs : t_U64_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +(*item error backend*) + +#[global] Instance t_U32_t_t_PartialEq : t_PartialEq t_U32_t t_U32_t := { + f_eq (self : t_U32_t) (rhs : t_U32_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; + f_ne (self : t_U32_t) (rhs : t_U32_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; +}. + +#[global] Instance t_U32_t_t_PartialOrd : t_PartialOrd t_U32_t t_U32_t := { + f_partial_cmp (self : t_U32_t) (rhs : t_U32_t) := Option_Some (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); + f_lt (self : t_U32_t) (rhs : t_U32_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less => + true + | _ => + false + end; + f_le (self : t_U32_t) (rhs : t_U32_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_U32_t) (rhs : t_U32_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_U32_t) (rhs : t_U32_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +(*item error backend*) + +#[global] Instance t_U16_t_t_PartialEq : t_PartialEq t_U16_t t_U16_t := { + f_eq (self : t_U16_t) (rhs : t_U16_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; + f_ne (self : t_U16_t) (rhs : t_U16_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; +}. + +#[global] Instance t_U16_t_t_PartialOrd : t_PartialOrd t_U16_t t_U16_t := { + f_partial_cmp (self : t_U16_t) (rhs : t_U16_t) := Option_Some (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); + f_lt (self : t_U16_t) (rhs : t_U16_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less => + true + | _ => + false + end; + f_le (self : t_U16_t) (rhs : t_U16_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_U16_t) (rhs : t_U16_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_U16_t) (rhs : t_U16_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +(*item error backend*) + +#[global] Instance t_U8_t_t_PartialEq : t_PartialEq t_U8_t t_U8_t := { + f_eq (self : t_U8_t) (rhs : t_U8_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; + f_ne (self : t_U8_t) (rhs : t_U8_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; +}. + +#[global] Instance t_U8_t_t_PartialOrd : t_PartialOrd t_U8_t t_U8_t := { + f_partial_cmp (self : t_U8_t) (rhs : t_U8_t) := Option_Some (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); + f_lt (self : t_U8_t) (rhs : t_U8_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less => + true + | _ => + false + end; + f_le (self : t_U8_t) (rhs : t_U8_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_U8_t) (rhs : t_U8_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_U8_t) (rhs : t_U8_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_I128 : Type := { + f_v : t_Z_t; +}. + +#[global] Instance t_I128_t_t_Constants : t_Constants t_I128_t := { + f_ZERO := Build_I128 (f_v := Z_ZEROt_Z_t); + f_ONE := Build_I128 (f_v := Z_POS xH); + f_MIN := Build_I128 (f_v := Z_NEG (Positive v_WORDSIZE_64_)); + f_MAX := Build_I128 (f_v := Z_POS (Positive v_WORDSIZE_64_SUB_1_)); +}. + +#[global] Instance t_Z_t_t_Concretization : t_Concretization t_Z_t t_I128_t := { + f_concretize (self : t_Z_t) := Build_I128 (f_v := self); +}. + +#[global] Instance t_I128_t_t_Clone : t_Clone t_I128_t := { + f_clone (self : t_I128_t) := Build_I128 (f_v := f_clone (f_v self)); +}. + +Record t_I16 : Type := { + f_v : t_Z_t; +}. + +#[global] Instance t_I16_t_t_Constants : t_Constants t_I16_t := { + f_ZERO := Build_I16 (f_v := Z_ZEROt_Z_t); + f_ONE := Build_I16 (f_v := Z_POS xH); + f_MIN := Build_I16 (f_v := Z_NEG (Positive v_WORDSIZE_8_)); + f_MAX := Build_I16 (f_v := Z_POS (Positive v_WORDSIZE_8_SUB_1_)); +}. + +#[global] Instance t_Z_t_t_Concretization : t_Concretization t_Z_t t_I16_t := { + f_concretize (self : t_Z_t) := Build_I16 (f_v := self); +}. + +#[global] Instance t_I16_t_t_Clone : t_Clone t_I16_t := { + f_clone (self : t_I16_t) := Build_I16 (f_v := f_clone (f_v self)); +}. + +Record t_I32 : Type := { + f_v : t_Z_t; +}. + +#[global] Instance t_I32_t_t_Constants : t_Constants t_I32_t := { + f_ZERO := Build_I32 (f_v := Z_ZEROt_Z_t); + f_ONE := Build_I32 (f_v := Z_POS xH); + f_MIN := Build_I32 (f_v := Z_NEG (Positive v_WORDSIZE_16_)); + f_MAX := Build_I32 (f_v := Z_POS (Positive v_WORDSIZE_16_SUB_1_)); +}. + +#[global] Instance t_Z_t_t_Concretization : t_Concretization t_Z_t t_I32_t := { + f_concretize (self : t_Z_t) := Build_I32 (f_v := self); +}. + +#[global] Instance t_I32_t_t_Clone : t_Clone t_I32_t := { + f_clone (self : t_I32_t) := Build_I32 (f_v := f_clone (f_v self)); +}. + +Record t_I64 : Type := { + f_v : t_Z_t; +}. + +#[global] Instance t_I64_t_t_Constants : t_Constants t_I64_t := { + f_ZERO := Build_I64 (f_v := Z_ZEROt_Z_t); + f_ONE := Build_I64 (f_v := Z_POS xH); + f_MIN := Build_I64 (f_v := Z_NEG (Positive v_WORDSIZE_32_)); + f_MAX := Build_I64 (f_v := Z_POS (Positive v_WORDSIZE_32_SUB_1_)); +}. + +#[global] Instance t_Z_t_t_Concretization : t_Concretization t_Z_t t_I64_t := { + f_concretize (self : t_Z_t) := Build_I64 (f_v := self); +}. + +#[global] Instance t_I64_t_t_Clone : t_Clone t_I64_t := { + f_clone (self : t_I64_t) := Build_I64 (f_v := f_clone (f_v self)); +}. + +Record t_I8 : Type := { + f_v : t_Z_t; +}. + +#[global] Instance t_I8_t_t_Constants : t_Constants t_I8_t := { + f_ZERO := Build_I8 (f_v := Z_ZEROt_Z_t); + f_ONE := Build_I8 (f_v := Z_POS xH); + f_MIN := Build_I8 (f_v := Z_NEG (Positive v_WORDSIZE_4_)); + f_MAX := Build_I8 (f_v := Z_POS (Positive v_WORDSIZE_4_SUB_1_)); +}. + +#[global] Instance t_Z_t_t_Concretization : t_Concretization t_Z_t t_I8_t := { + f_concretize (self : t_Z_t) := Build_I8 (f_v := self); +}. + +#[global] Instance t_I8_t_t_Clone : t_Clone t_I8_t := { + f_clone (self : t_I8_t) := Build_I8 (f_v := f_clone (f_v self)); +}. + +(*item error backend*) + +#[global] Instance t_I8_t_t_From : t_From t_I8_t t_I128_t := { + f_from (x : t_I128_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I16_t_t_From : t_From t_I16_t t_I128_t := { + f_from (x : t_I128_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I32_t_t_From : t_From t_I32_t t_I128_t := { + f_from (x : t_I128_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I64_t_t_From : t_From t_I64_t t_I128_t := { + f_from (x : t_I128_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I128_t_t_PartialEq : t_PartialEq t_I128_t t_I128_t := { + f_eq (self : t_I128_t) (rhs : t_I128_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; + f_ne (self : t_I128_t) (rhs : t_I128_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; +}. + +#[global] Instance t_I128_t_t_PartialOrd : t_PartialOrd t_I128_t t_I128_t := { + f_partial_cmp (self : t_I128_t) (rhs : t_I128_t) := Option_Some (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); + f_lt (self : t_I128_t) (rhs : t_I128_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less => + true + | _ => + false + end; + f_le (self : t_I128_t) (rhs : t_I128_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_I128_t) (rhs : t_I128_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_I128_t) (rhs : t_I128_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +(*item error backend*) + +#[global] Instance t_I8_t_t_From : t_From t_I8_t t_I64_t := { + f_from (x : t_I64_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I16_t_t_From : t_From t_I16_t t_I64_t := { + f_from (x : t_I64_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I32_t_t_From : t_From t_I32_t t_I64_t := { + f_from (x : t_I64_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I128_t_t_From : t_From t_I128_t t_I64_t := { + f_from (x : t_I64_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I64_t_t_PartialEq : t_PartialEq t_I64_t t_I64_t := { + f_eq (self : t_I64_t) (rhs : t_I64_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; + f_ne (self : t_I64_t) (rhs : t_I64_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; +}. + +#[global] Instance t_I64_t_t_PartialOrd : t_PartialOrd t_I64_t t_I64_t := { + f_partial_cmp (self : t_I64_t) (rhs : t_I64_t) := Option_Some (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); + f_lt (self : t_I64_t) (rhs : t_I64_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less => + true + | _ => + false + end; + f_le (self : t_I64_t) (rhs : t_I64_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_I64_t) (rhs : t_I64_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_I64_t) (rhs : t_I64_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +(*item error backend*) + +#[global] Instance t_I8_t_t_From : t_From t_I8_t t_I32_t := { + f_from (x : t_I32_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I16_t_t_From : t_From t_I16_t t_I32_t := { + f_from (x : t_I32_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I64_t_t_From : t_From t_I64_t t_I32_t := { + f_from (x : t_I32_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I128_t_t_From : t_From t_I128_t t_I32_t := { + f_from (x : t_I32_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I32_t_t_PartialEq : t_PartialEq t_I32_t t_I32_t := { + f_eq (self : t_I32_t) (rhs : t_I32_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; + f_ne (self : t_I32_t) (rhs : t_I32_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; +}. + +#[global] Instance t_I32_t_t_PartialOrd : t_PartialOrd t_I32_t t_I32_t := { + f_partial_cmp (self : t_I32_t) (rhs : t_I32_t) := Option_Some (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); + f_lt (self : t_I32_t) (rhs : t_I32_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less => + true + | _ => + false + end; + f_le (self : t_I32_t) (rhs : t_I32_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_I32_t) (rhs : t_I32_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_I32_t) (rhs : t_I32_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +(*item error backend*) + +#[global] Instance t_I8_t_t_From : t_From t_I8_t t_I16_t := { + f_from (x : t_I16_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I32_t_t_From : t_From t_I32_t t_I16_t := { + f_from (x : t_I16_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I64_t_t_From : t_From t_I64_t t_I16_t := { + f_from (x : t_I16_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I128_t_t_From : t_From t_I128_t t_I16_t := { + f_from (x : t_I16_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I16_t_t_PartialEq : t_PartialEq t_I16_t t_I16_t := { + f_eq (self : t_I16_t) (rhs : t_I16_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; + f_ne (self : t_I16_t) (rhs : t_I16_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; +}. + +#[global] Instance t_I16_t_t_PartialOrd : t_PartialOrd t_I16_t t_I16_t := { + f_partial_cmp (self : t_I16_t) (rhs : t_I16_t) := Option_Some (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); + f_lt (self : t_I16_t) (rhs : t_I16_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less => + true + | _ => + false + end; + f_le (self : t_I16_t) (rhs : t_I16_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_I16_t) (rhs : t_I16_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_I16_t) (rhs : t_I16_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +(*item error backend*) + +#[global] Instance t_I16_t_t_From : t_From t_I16_t t_I8_t := { + f_from (x : t_I8_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I32_t_t_From : t_From t_I32_t t_I8_t := { + f_from (x : t_I8_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I64_t_t_From : t_From t_I64_t t_I8_t := { + f_from (x : t_I8_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I128_t_t_From : t_From t_I128_t t_I8_t := { + f_from (x : t_I8_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_I8_t_t_PartialEq : t_PartialEq t_I8_t t_I8_t := { + f_eq (self : t_I8_t) (rhs : t_I8_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; + f_ne (self : t_I8_t) (rhs : t_I8_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; +}. + +#[global] Instance t_I8_t_t_PartialOrd : t_PartialOrd t_I8_t t_I8_t := { + f_partial_cmp (self : t_I8_t) (rhs : t_I8_t) := Option_Some (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); + f_lt (self : t_I8_t) (rhs : t_I8_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less => + true + | _ => + false + end; + f_le (self : t_I8_t) (rhs : t_I8_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_I8_t) (rhs : t_I8_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_I8_t) (rhs : t_I8_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with + | Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +#[global] Instance t_HaxInt_t_t_Concretization : t_Concretization t_HaxInt_t t_U128_t := { + f_concretize (self : t_HaxInt_t) := Build_U128 (f_v := haxint_rem self v_WORDSIZE_128_); +}. + +#[global] Instance t_U128_t_t_From : t_From t_U128_t t_U8_t := { + f_from (x : t_U8_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U128_t_t_From : t_From t_U128_t t_U16_t := { + f_from (x : t_U16_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U128_t_t_From : t_From t_U128_t t_U32_t := { + f_from (x : t_U32_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U128_t_t_From : t_From t_U128_t t_U64_t := { + f_from (x : t_U64_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_HaxInt_t_t_Concretization : t_Concretization t_HaxInt_t t_U64_t := { + f_concretize (self : t_HaxInt_t) := Build_U64 (f_v := haxint_rem self v_WORDSIZE_64_); +}. + +#[global] Instance t_U64_t_t_From : t_From t_U64_t t_U8_t := { + f_from (x : t_U8_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U64_t_t_From : t_From t_U64_t t_U16_t := { + f_from (x : t_U16_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U64_t_t_From : t_From t_U64_t t_U32_t := { + f_from (x : t_U32_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U64_t_t_From : t_From t_U64_t t_U128_t := { + f_from (x : t_U128_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_HaxInt_t_t_Concretization : t_Concretization t_HaxInt_t t_U32_t := { + f_concretize (self : t_HaxInt_t) := Build_U32 (f_v := haxint_rem self v_WORDSIZE_32_); +}. + +#[global] Instance t_U32_t_t_From : t_From t_U32_t t_U8_t := { + f_from (x : t_U8_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U32_t_t_From : t_From t_U32_t t_U16_t := { + f_from (x : t_U16_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U32_t_t_From : t_From t_U32_t t_U64_t := { + f_from (x : t_U64_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U32_t_t_From : t_From t_U32_t t_U128_t := { + f_from (x : t_U128_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_HaxInt_t_t_Concretization : t_Concretization t_HaxInt_t t_U16_t := { + f_concretize (self : t_HaxInt_t) := Build_U16 (f_v := haxint_rem self v_WORDSIZE_16_); +}. + +#[global] Instance t_U16_t_t_From : t_From t_U16_t t_U8_t := { + f_from (x : t_U8_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U16_t_t_From : t_From t_U16_t t_U32_t := { + f_from (x : t_U32_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U16_t_t_From : t_From t_U16_t t_U64_t := { + f_from (x : t_U64_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U16_t_t_From : t_From t_U16_t t_U128_t := { + f_from (x : t_U128_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_HaxInt_t_t_Concretization : t_Concretization t_HaxInt_t t_U8_t := { + f_concretize (self : t_HaxInt_t) := Build_U8 (f_v := haxint_rem self v_WORDSIZE_8_); +}. + +#[global] Instance t_U8_t_t_From : t_From t_U8_t t_U16_t := { + f_from (x : t_U16_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U8_t_t_From : t_From t_U8_t t_U32_t := { + f_from (x : t_U32_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U8_t_t_From : t_From t_U8_t t_U64_t := { + f_from (x : t_U64_t) := f_concretize (f_lift x); +}. + +#[global] Instance t_U8_t_t_From : t_From t_U8_t t_U128_t := { + f_from (x : t_U128_t) := f_concretize (f_lift x); +}. + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I128_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I128_proofs.v new file mode 100644 index 000000000..e88d23e63 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I128_proofs.v @@ -0,0 +1,12 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Definition abstract_concretize_cancel (x : t_I128_t) : unit := + tt. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I16_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I16_proofs.v new file mode 100644 index 000000000..0039a2e3b --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I16_proofs.v @@ -0,0 +1,12 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Definition abstract_concretize_cancel (x : t_I16_t) : unit := + tt. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I32_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I32_proofs.v new file mode 100644 index 000000000..a945858f6 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I32_proofs.v @@ -0,0 +1,12 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Definition abstract_concretize_cancel (x : t_I32_t) : unit := + tt. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I64_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I64_proofs.v new file mode 100644 index 000000000..c0379e924 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I64_proofs.v @@ -0,0 +1,12 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Definition abstract_concretize_cancel (x : t_I64_t) : unit := + tt. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I8_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I8_proofs.v new file mode 100644 index 000000000..a723368eb --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I8_proofs.v @@ -0,0 +1,12 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Definition abstract_concretize_cancel (x : t_I8_t) : unit := + tt. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U128_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U128_proofs.v new file mode 100644 index 000000000..d73195c5c --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U128_proofs.v @@ -0,0 +1,24 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Definition abstract_concretize_cancel (x : t_U128_t) : unit := + tt. + +Definition mod_add (x : t_U128_t) (y : t_U128_t) (z : t_U128_t) : unit := + tt. + +Definition mod_mul (x : t_U128_t) (y : t_U128_t) (z : t_U128_t) : unit := + tt. + +Definition mod_one (x : t_U128_t) : unit := + tt. + +Definition mod_sub (x : t_U128_t) (y : t_U128_t) (z : t_U128_t) : unit := + tt. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U16_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U16_proofs.v new file mode 100644 index 000000000..ebd8996bf --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U16_proofs.v @@ -0,0 +1,24 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Definition abstract_concretize_cancel (x : t_U16_t) : unit := + tt. + +Definition mod_add (x : t_U16_t) (y : t_U16_t) (z : t_U16_t) : unit := + tt. + +Definition mod_mul (x : t_U16_t) (y : t_U16_t) (z : t_U16_t) : unit := + tt. + +Definition mod_one (x : t_U16_t) : unit := + tt. + +Definition mod_sub (x : t_U16_t) (y : t_U16_t) (z : t_U16_t) : unit := + tt. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U32_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U32_proofs.v new file mode 100644 index 000000000..6e47d7273 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U32_proofs.v @@ -0,0 +1,24 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Definition abstract_concretize_cancel (x : t_U32_t) : unit := + tt. + +Definition mod_add (x : t_U32_t) (y : t_U32_t) (z : t_U32_t) : unit := + tt. + +Definition mod_mul (x : t_U32_t) (y : t_U32_t) (z : t_U32_t) : unit := + tt. + +Definition mod_one (x : t_U32_t) : unit := + tt. + +Definition mod_sub (x : t_U32_t) (y : t_U32_t) (z : t_U32_t) : unit := + tt. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U64_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U64_proofs.v new file mode 100644 index 000000000..8a7fc84a7 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U64_proofs.v @@ -0,0 +1,24 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Definition abstract_concretize_cancel (x : t_U64_t) : unit := + tt. + +Definition mod_add (x : t_U64_t) (y : t_U64_t) (z : t_U64_t) : unit := + tt. + +Definition mod_mul (x : t_U64_t) (y : t_U64_t) (z : t_U64_t) : unit := + tt. + +Definition mod_one (x : t_U64_t) : unit := + tt. + +Definition mod_sub (x : t_U64_t) (y : t_U64_t) (z : t_U64_t) : unit := + tt. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U8_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U8_proofs.v new file mode 100644 index 000000000..14aa7fb8c --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U8_proofs.v @@ -0,0 +1,24 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Definition abstract_concretize_cancel (x : t_U8_t) : unit := + tt. + +Definition mod_add (x : t_U8_t) (y : t_U8_t) (z : t_U8_t) : unit := + tt. + +Definition mod_mul (x : t_U8_t) (y : t_U8_t) (z : t_U8_t) : unit := + tt. + +Definition mod_one (x : t_U8_t) : unit := + tt. + +Definition mod_sub (x : t_U8_t) (y : t_U8_t) (z : t_U8_t) : unit := + tt. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Clone.v b/proof-libs/coq/coq/generated-core/src/Core_Clone.v index 020e2c3af..e4a4b8397 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Clone.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Clone.v @@ -1,13 +1,10 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. -Class t_Clone `{v_Self : Type} : Type := - { - t_Clone_f_clone : v_Self -> v_Self; - }. -Arguments t_Clone:clear implicits. -Arguments t_Clone (_). +Class t_Clone := { + f_clone : (Self -> Self) ; +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Cmp.v b/proof-libs/coq/coq/generated-core/src/Core_Cmp.v index a38506da5..793bba79f 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Cmp.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Cmp.v @@ -1,165 +1,153 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. +Require Import Option. +Export Option. -From Core Require Import Core_Option (t_Option). -Export Core_Option (t_Option). +Definition discriminant_Ordering_Equal : int8 := + (@repr WORDSIZE8 0). -Definition discriminant_t_Ordering_Ordering_Equal := - 0%N. - -Definition discriminant_t_Ordering_Ordering_Greater := - 1%N. +Definition discriminant_Ordering_Greater : int8 := + (@repr WORDSIZE8 1). Inductive t_Ordering : Type := -| t_Ordering_Ordering_Less -| t_Ordering_Ordering_Equal -| t_Ordering_Ordering_Greater. -Arguments t_Ordering:clear implicits. -Arguments t_Ordering. +| Ordering_Less : t_Ordering +| Ordering_Equal : t_Ordering +| Ordering_Greater : t_Ordering. -Definition impl__Ordering__is_eq (self : t_Ordering) : bool := +Definition impl__Ordering__is_eq (self : t_Ordering_t) : bool := match self with - | t_Ordering_Ordering_Equal => + | Ordering_Equal => true - | _ => + | _ => false end. -Definition impl__Ordering__is_gt (self : t_Ordering) : bool := +Definition impl__Ordering__is_gt (self : t_Ordering_t) : bool := match self with - | t_Ordering_Ordering_Greater => + | Ordering_Greater => true - | _ => + | _ => false end. -Definition impl__Ordering__is_lt (self : t_Ordering) : bool := +Definition impl__Ordering__is_lt (self : t_Ordering_t) : bool := match self with - | t_Ordering_Ordering_Less => + | Ordering_Less => true - | _ => + | _ => false end. -Definition impl__Ordering__reverse (self : t_Ordering) : t_Ordering := +Definition impl__Ordering__reverse (self : t_Ordering_t) : t_Ordering_t := match self with - | t_Ordering_Ordering_Less => - t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal => - t_Ordering_Ordering_Equal - | t_Ordering_Ordering_Greater => - t_Ordering_Ordering_Less + | Ordering_Less => + Ordering_Greatert_Ordering_t + | Ordering_Equal => + Ordering_Equalt_Ordering_t + | Ordering_Greater => + Ordering_Lesst_Ordering_t end. -Definition discriminant_t_Ordering_Ordering_Less := - 1%N. +Definition discriminant_Ordering_Less : int8 := + (@repr WORDSIZE8 1). -Definition t_Ordering_cast_to_repr (x : t_Ordering) := +Definition t_Ordering_cast_to_repr (x : t_Ordering_t) : int8 := match x with - | t_Ordering_Ordering_Less => - discriminant_t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal => - discriminant_t_Ordering_Ordering_Equal - | t_Ordering_Ordering_Greater => - discriminant_t_Ordering_Ordering_Greater + | Ordering_Less => + discriminant_Ordering_Less + | Ordering_Equal => + discriminant_Ordering_Equal + | Ordering_Greater => + discriminant_Ordering_Greater end. -Class t_PartialEq `{v_Self : Type} `{v_Rhs : Type} : Type := - { - t_PartialEq_f_eq : v_Self -> v_Rhs -> bool; - t_PartialEq_f_ne : v_Self -> v_Rhs -> bool; - }. -Arguments t_PartialEq:clear implicits. -Arguments t_PartialEq (_) (_). - -Definition impl__Ordering__is_ge (self : t_Ordering) : bool := - negb (match self with - | t_Ordering_Ordering_Less => +Class t_PartialEq (Self : _) := { + f_eq : (Self -> Rhs -> bool) ; + f_ne : (Self -> Rhs -> bool) ; +}. + +Definition impl__Ordering__is_ge (self : t_Ordering_t) : bool := + not match self with + | Ordering_Less => true - | _ => + | _ => false - end). + end. -Definition impl__Ordering__is_le (self : t_Ordering) : bool := - negb (match self with - | t_Ordering_Ordering_Greater => +Definition impl__Ordering__is_le (self : t_Ordering_t) : bool := + not match self with + | Ordering_Greater => true - | _ => + | _ => false - end). + end. -Definition impl__Ordering__is_ne (self : t_Ordering) : bool := - negb (match self with - | t_Ordering_Ordering_Equal => +Definition impl__Ordering__is_ne (self : t_Ordering_t) : bool := + not match self with + | Ordering_Equal => true - | _ => + | _ => false - end). - -Instance t_PartialEq_322340293 : t_PartialEq (t_Ordering) (t_Ordering) := - { - t_PartialEq_f_eq := fun (self : t_Ordering) (other : t_Ordering) => - match self with - | t_Ordering_Ordering_Less => - match other with - | t_Ordering_Ordering_Less => - true - | _ => - false - end - | t_Ordering_Ordering_Equal => - match other with - | t_Ordering_Ordering_Equal => - true - | _ => - false - end - | t_Ordering_Ordering_Greater => - match other with - | t_Ordering_Ordering_Greater => - true - | _ => - false - end - end; - t_PartialEq_f_ne := fun (self : t_Ordering) (other : t_Ordering) => - negb (match self with - | t_Ordering_Ordering_Less => - match other with - | t_Ordering_Ordering_Less => - true - | _ => - false - end - | t_Ordering_Ordering_Equal => - match other with - | t_Ordering_Ordering_Equal => - true - | _ => - false - end - | t_Ordering_Ordering_Greater => - match other with - | t_Ordering_Ordering_Greater => - true - | _ => - false - end - end); - }. - -Class t_PartialOrd `{v_Self : Type} `{v_Rhs : Type} `{t_PartialEq v_Self v_Rhs} : Type := - { - t_PartialOrd_f_partial_cmp : v_Self -> v_Rhs -> t_Option (t_Ordering); - t_PartialOrd_f_lt : v_Self -> v_Rhs -> bool; - t_PartialOrd_f_le : v_Self -> v_Rhs -> bool; - t_PartialOrd_f_gt : v_Self -> v_Rhs -> bool; - t_PartialOrd_f_ge : v_Self -> v_Rhs -> bool; - }. -Arguments t_PartialOrd:clear implicits. -Arguments t_PartialOrd (_) (_) {_}. + end. + +#[global] Instance t_Ordering_t_t_PartialEq : t_PartialEq t_Ordering_t t_Ordering_t := { + f_eq (self : t_Ordering_t) (other : t_Ordering_t) := match self with + | Ordering_Less => + match other with + | Ordering_Less => + true + | _ => + false + end + | Ordering_Equal => + match other with + | Ordering_Equal => + true + | _ => + false + end + | Ordering_Greater => + match other with + | Ordering_Greater => + true + | _ => + false + end + end; + f_ne (self : t_Ordering_t) (other : t_Ordering_t) := not match self with + | Ordering_Less => + match other with + | Ordering_Less => + true + | _ => + false + end + | Ordering_Equal => + match other with + | Ordering_Equal => + true + | _ => + false + end + | Ordering_Greater => + match other with + | Ordering_Greater => + true + | _ => + false + end + end; +}. + +Class t_PartialOrd (Self : _) := { + f_partial_cmp : (Self -> Rhs -> t_Option_t t_Ordering_t) ; + f_lt : (Self -> Rhs -> bool) ; + f_le : (Self -> Rhs -> bool) ; + f_gt : (Self -> Rhs -> bool) ; + f_ge : (Self -> Rhs -> bool) ; +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Coerce.v b/proof-libs/coq/coq/generated-core/src/Core_Coerce.v deleted file mode 100644 index 0c7d5730e..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Coerce.v +++ /dev/null @@ -1,21 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import String. - -Class t_Concretization `{v_Self : Type} `{v_T : Type} : Type := - { - t_Concretization_f_concretize : v_Self -> v_T; - }. -Arguments t_Concretization:clear implicits. -Arguments t_Concretization (_) (_). - -Class t_Abstraction `{v_Self : Type} : Type := - { - t_Abstraction_f_AbstractType : Type; - t_Abstraction_f_lift : v_Self -> t_Abstraction_f_AbstractType; - }. -Arguments t_Abstraction:clear implicits. -Arguments t_Abstraction (_). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Convert.v b/proof-libs/coq/coq/generated-core/src/Core_Convert.v index 92e7f58d5..2468032dc 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Convert.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Convert.v @@ -1,32 +1,22 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. -Class t_From `{v_Self : Type} `{v_T : Type} : Type := - { - t_From_f_from : v_T -> v_Self; - }. -Arguments t_From:clear implicits. -Arguments t_From (_) (_). +Class t_From (Self : _) := { + f_from : (T -> Self) ; +}. -Instance t_From_888864539 `{v_T : Type} : t_From (v_T) (v_T) := - { - t_From_f_from := fun (t : v_T) => - t; - }. +#[global] Instance T_t_From (T : _) : t_From T T := { + f_from (t : T) := t; +}. -Class t_Into `{v_Self : Type} `{v_T : Type} : Type := - { - t_Into_f_into : v_Self -> v_T; - }. -Arguments t_Into:clear implicits. -Arguments t_Into (_) (_). +Class t_Into (Self : _) := { + f_into : (Self -> T) ; +}. -Instance t_Into_28327994 `{v_T : Type} `{v_U : Type} `{t_From v_U v_T} : t_Into (v_T) (v_U) := - { - t_Into_f_into := fun (self : v_T) => - t_From_f_from (self); - }. +#[global] Instance T_t_Into (T : _) (U : _) : t_Into T U := { + f_into (self : T) := f_from self; +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Fmt.v b/proof-libs/coq/coq/generated-core/src/Core_Fmt.v new file mode 100644 index 000000000..d2a03bcbb --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Fmt.v @@ -0,0 +1,8 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Int.v b/proof-libs/coq/coq/generated-core/src/Core_Int.v deleted file mode 100644 index 1c9f74592..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Int.v +++ /dev/null @@ -1,1321 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import String. - - -From Core Require Import Core_Marker. -Export Core_Marker. - -From Core Require Import Core_Ops_Arith. -Export Core_Ops_Arith. - -From Core Require Import Core_Ops_Bit. -Export Core_Ops_Bit. - - -From Core Require Import Core_Cmp. -Export Core_Cmp. - - -From Core Require Import Core_Base_Int_Base_spec. -Export Core_Base_Int_Base_spec. - -From Core Require Import Core_Base_Int_Base_impl. -Export Core_Base_Int_Base_impl. - - -From Core Require Import Core_Coerce. -Export Core_Coerce. - - -From Core Require Import Core_Option. -Export Core_Option. - -From Core Require Import Core_Clone. -Export Core_Clone. - -From Core Require Import Core_Convert. -Export Core_Convert. - -Class t_Constants `{v_Self : Type} : Type := - { - t_Constants_f_ZERO : v_Self; - t_Constants_f_ONE : v_Self; - t_Constants_f_MIN : v_Self; - t_Constants_f_MAX : v_Self; - }. -Arguments t_Constants:clear implicits. -Arguments t_Constants (_). - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -Definition impl_21__WORDSIZE : t_HaxInt := - v_WORDSIZE_8_. - -Definition impl_48__WORDSIZE : t_HaxInt := - v_WORDSIZE_16_. - -Definition impl_75__WORDSIZE : t_HaxInt := - v_WORDSIZE_32_. - -Definition impl_102__WORDSIZE : t_HaxInt := - v_WORDSIZE_64_. - -Definition impl_129__WORDSIZE : t_HaxInt := - v_WORDSIZE_128_. - -Record t_U128 : Type := - { - t_U128_f_v : t_HaxInt - }. -Arguments t_U128:clear implicits. -Arguments t_U128. - -Instance t_Constants_262847618 : t_Constants (t_U128) := - { - t_Constants_f_ZERO := Build_t_U128 (impl_9__ZERO); - t_Constants_f_ONE := Build_t_U128 (impl_9__ONE); - t_Constants_f_MIN := Build_t_U128 (impl_9__ZERO); - t_Constants_f_MAX := Build_t_U128 (v_WORDSIZE_128_SUB_1_); - }. - -Instance t_Clone_864982688 : t_Clone (t_U128) := - { - t_Clone_f_clone := fun (self : t_U128) => - Build_t_U128 (t_Clone_f_clone (t_U128_f_v self)); - }. - -Record t_U16 : Type := - { - t_U16_f_v : t_HaxInt - }. -Arguments t_U16:clear implicits. -Arguments t_U16. - -Instance t_Constants_109024683 : t_Constants (t_U16) := - { - t_Constants_f_ZERO := Build_t_U16 (impl_9__ZERO); - t_Constants_f_ONE := Build_t_U16 (impl_9__ONE); - t_Constants_f_MIN := Build_t_U16 (impl_9__ZERO); - t_Constants_f_MAX := Build_t_U16 (v_WORDSIZE_16_SUB_1_); - }. - -Instance t_Clone_516308087 : t_Clone (t_U16) := - { - t_Clone_f_clone := fun (self : t_U16) => - Build_t_U16 (t_Clone_f_clone (t_U16_f_v self)); - }. - -Record t_U32 : Type := - { - t_U32_f_v : t_HaxInt - }. -Arguments t_U32:clear implicits. -Arguments t_U32. - -Definition impl_21__BITS : t_U32 := - Build_t_U32 (v_BITS_8_). - -Definition impl_48__BITS : t_U32 := - Build_t_U32 (v_BITS_16_). - -Instance t_Constants_516415142 : t_Constants (t_U32) := - { - t_Constants_f_ZERO := Build_t_U32 (impl_9__ZERO); - t_Constants_f_ONE := Build_t_U32 (impl_9__ONE); - t_Constants_f_MIN := Build_t_U32 (impl_9__ZERO); - t_Constants_f_MAX := Build_t_U32 (v_WORDSIZE_32_SUB_1_); - }. - -Definition impl_75__BITS : t_U32 := - Build_t_U32 (v_BITS_32_). - -Instance t_Clone_816356986 : t_Clone (t_U32) := - { - t_Clone_f_clone := fun (self : t_U32) => - Build_t_U32 (t_Clone_f_clone (t_U32_f_v self)); - }. - -Definition impl_102__BITS : t_U32 := - Build_t_U32 (v_BITS_64_). - -Definition impl_129__BITS : t_U32 := - Build_t_U32 (v_BITS_128_). - -Record t_U64 : Type := - { - t_U64_f_v : t_HaxInt - }. -Arguments t_U64:clear implicits. -Arguments t_U64. - -Instance t_Constants_576498638 : t_Constants (t_U64) := - { - t_Constants_f_ZERO := Build_t_U64 (impl_9__ZERO); - t_Constants_f_ONE := Build_t_U64 (impl_9__ONE); - t_Constants_f_MIN := Build_t_U64 (impl_9__ZERO); - t_Constants_f_MAX := Build_t_U64 (v_WORDSIZE_64_SUB_1_); - }. - -Instance t_Clone_899858620 : t_Clone (t_U64) := - { - t_Clone_f_clone := fun (self : t_U64) => - Build_t_U64 (t_Clone_f_clone (t_U64_f_v self)); - }. - -Record t_U8 : Type := - { - t_U8_f_v : t_HaxInt - }. -Arguments t_U8:clear implicits. -Arguments t_U8. - -Instance t_Constants_524257484 : t_Constants (t_U8) := - { - t_Constants_f_ZERO := Build_t_U8 (impl_9__ZERO); - t_Constants_f_ONE := Build_t_U8 (impl_9__ONE); - t_Constants_f_MIN := Build_t_U8 (impl_9__ZERO); - t_Constants_f_MAX := Build_t_U8 (v_WORDSIZE_8_SUB_1_); - }. - -Instance t_Clone_1016243736 : t_Clone (t_U8) := - { - t_Clone_f_clone := fun (self : t_U8) => - Build_t_U8 (t_Clone_f_clone (t_U8_f_v self)); - }. - -Instance t_Abstraction_566214702 : t_Abstraction (t_U8) := - { - t_Abstraction_f_AbstractType := t_HaxInt; - t_Abstraction_f_lift := fun (self : t_U8) => - t_U8_f_v self; - }. - -Instance t_PartialEq_118986006 : t_PartialEq (t_U8) (t_U8) := - { - t_PartialEq_f_eq := fun (self : t_U8) (rhs : t_U8) => - t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); - t_PartialEq_f_ne := fun (self : t_U8) (rhs : t_U8) => - negb (t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs)))); - }. - -Instance t_PartialOrd_672693761 : t_PartialOrd (t_U8) (t_U8) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_U8) (rhs : t_U8) => - t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); - t_PartialOrd_f_lt := fun (self : t_U8) (rhs : t_U8) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_U8) (rhs : t_U8) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_U8) (rhs : t_U8) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_U8) (rhs : t_U8) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Instance t_Abstraction_134234872 : t_Abstraction (t_U16) := - { - t_Abstraction_f_AbstractType := t_HaxInt; - t_Abstraction_f_lift := fun (self : t_U16) => - t_U16_f_v self; - }. - -Instance t_PartialEq_712273567 : t_PartialEq (t_U16) (t_U16) := - { - t_PartialEq_f_eq := fun (self : t_U16) (rhs : t_U16) => - t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); - t_PartialEq_f_ne := fun (self : t_U16) (rhs : t_U16) => - negb (t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs)))); - }. - -Instance t_PartialOrd_17851967 : t_PartialOrd (t_U16) (t_U16) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_U16) (rhs : t_U16) => - t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); - t_PartialOrd_f_lt := fun (self : t_U16) (rhs : t_U16) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_U16) (rhs : t_U16) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_U16) (rhs : t_U16) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_U16) (rhs : t_U16) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Instance t_Abstraction_699270934 : t_Abstraction (t_U32) := - { - t_Abstraction_f_AbstractType := t_HaxInt; - t_Abstraction_f_lift := fun (self : t_U32) => - t_U32_f_v self; - }. - -Instance t_PartialEq_334097439 : t_PartialEq (t_U32) (t_U32) := - { - t_PartialEq_f_eq := fun (self : t_U32) (rhs : t_U32) => - t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); - t_PartialEq_f_ne := fun (self : t_U32) (rhs : t_U32) => - negb (t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs)))); - }. - -Instance t_PartialOrd_768426650 : t_PartialOrd (t_U32) (t_U32) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_U32) (rhs : t_U32) => - t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); - t_PartialOrd_f_lt := fun (self : t_U32) (rhs : t_U32) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_U32) (rhs : t_U32) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_U32) (rhs : t_U32) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_U32) (rhs : t_U32) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Instance t_Abstraction_374630185 : t_Abstraction (t_U64) := - { - t_Abstraction_f_AbstractType := t_HaxInt; - t_Abstraction_f_lift := fun (self : t_U64) => - t_U64_f_v self; - }. - -Instance t_PartialEq_164055385 : t_PartialEq (t_U64) (t_U64) := - { - t_PartialEq_f_eq := fun (self : t_U64) (rhs : t_U64) => - t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); - t_PartialEq_f_ne := fun (self : t_U64) (rhs : t_U64) => - negb (t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs)))); - }. - -Instance t_PartialOrd_565848459 : t_PartialOrd (t_U64) (t_U64) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_U64) (rhs : t_U64) => - t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); - t_PartialOrd_f_lt := fun (self : t_U64) (rhs : t_U64) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_U64) (rhs : t_U64) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_U64) (rhs : t_U64) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_U64) (rhs : t_U64) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Instance t_Abstraction_462669591 : t_Abstraction (t_U128) := - { - t_Abstraction_f_AbstractType := t_HaxInt; - t_Abstraction_f_lift := fun (self : t_U128) => - t_U128_f_v self; - }. - -Instance t_PartialEq_1056014937 : t_PartialEq (t_U128) (t_U128) := - { - t_PartialEq_f_eq := fun (self : t_U128) (rhs : t_U128) => - t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); - t_PartialEq_f_ne := fun (self : t_U128) (rhs : t_U128) => - negb (t_PartialEq_f_eq (t_PartialEq := t_PartialEq_822848086) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs)))); - }. - -Instance t_PartialOrd_967097068 : t_PartialOrd (t_U128) (t_U128) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_U128) (rhs : t_U128) => - t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))); - t_PartialOrd_f_lt := fun (self : t_U128) (rhs : t_U128) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_U128) (rhs : t_U128) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_U128) (rhs : t_U128) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_U128) (rhs : t_U128) => - match t_PartialOrd_f_partial_cmp (t_PartialOrd := t_PartialOrd_414924529) (t_Abstraction_f_lift (t_Clone_f_clone (self))) (t_Abstraction_f_lift (t_Clone_f_clone (rhs))) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Instance t_Concretization_265873841 : t_Concretization (t_HaxInt) (t_U8) := - { - t_Concretization_f_concretize := fun (self : t_HaxInt) => - Build_t_U8 (impl_10__rem (self) (v_WORDSIZE_8_)); - }. - -Instance t_From_51944146 : t_From (t_U8) (t_U16) := - { - t_From_f_from := fun (x : t_U16) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_1017513021 : t_From (t_U8) (t_U32) := - { - t_From_f_from := fun (x : t_U32) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_23951205 : t_From (t_U8) (t_U64) := - { - t_From_f_from := fun (x : t_U64) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_800503147 : t_From (t_U8) (t_U128) := - { - t_From_f_from := fun (x : t_U128) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_Concretization_369613743 : t_Concretization (t_HaxInt) (t_U16) := - { - t_Concretization_f_concretize := fun (self : t_HaxInt) => - Build_t_U16 (impl_10__rem (self) (v_WORDSIZE_16_)); - }. - -Instance t_From_926291537 : t_From (t_U16) (t_U8) := - { - t_From_f_from := fun (x : t_U8) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_784540441 : t_From (t_U16) (t_U32) := - { - t_From_f_from := fun (x : t_U32) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_426489148 : t_From (t_U16) (t_U64) := - { - t_From_f_from := fun (x : t_U64) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_948759743 : t_From (t_U16) (t_U128) := - { - t_From_f_from := fun (x : t_U128) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_Concretization_34651280 : t_Concretization (t_HaxInt) (t_U32) := - { - t_Concretization_f_concretize := fun (self : t_HaxInt) => - Build_t_U32 (impl_10__rem (self) (v_WORDSIZE_32_)); - }. - -Instance t_From_35635710 : t_From (t_U32) (t_U8) := - { - t_From_f_from := fun (x : t_U8) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_487860229 : t_From (t_U32) (t_U16) := - { - t_From_f_from := fun (x : t_U16) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_726835366 : t_From (t_U32) (t_U64) := - { - t_From_f_from := fun (x : t_U64) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_452621038 : t_From (t_U32) (t_U128) := - { - t_From_f_from := fun (x : t_U128) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_Concretization_841277766 : t_Concretization (t_HaxInt) (t_U64) := - { - t_Concretization_f_concretize := fun (self : t_HaxInt) => - Build_t_U64 (impl_10__rem (self) (v_WORDSIZE_64_)); - }. - -Instance t_From_520130596 : t_From (t_U64) (t_U8) := - { - t_From_f_from := fun (x : t_U8) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_627850588 : t_From (t_U64) (t_U16) := - { - t_From_f_from := fun (x : t_U16) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_184030199 : t_From (t_U64) (t_U32) := - { - t_From_f_from := fun (x : t_U32) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_203853320 : t_From (t_U64) (t_U128) := - { - t_From_f_from := fun (x : t_U128) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_Concretization_814811766 : t_Concretization (t_HaxInt) (t_U128) := - { - t_Concretization_f_concretize := fun (self : t_HaxInt) => - Build_t_U128 (impl_10__rem (self) (v_WORDSIZE_128_)); - }. - -Instance t_From_473330350 : t_From (t_U128) (t_U8) := - { - t_From_f_from := fun (x : t_U8) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_119329024 : t_From (t_U128) (t_U16) := - { - t_From_f_from := fun (x : t_U16) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_763371499 : t_From (t_U128) (t_U32) := - { - t_From_f_from := fun (x : t_U32) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_From_576231031 : t_From (t_U128) (t_U64) := - { - t_From_f_from := fun (x : t_U64) => - t_Concretization_f_concretize (t_Abstraction_f_lift (x) : t_HaxInt); - }. - -Instance t_Neg_351404352 : t_Neg (t_U8) := - { - t_Neg_f_Output := t_U8; - t_Neg_f_neg := fun (self : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_7__sub (v_WORDSIZE_8_) (impl_10__rem (t_Abstraction_f_lift (self)) (v_WORDSIZE_8_))); - }. - -Instance t_Mul_960114544 : t_Mul (t_U8) (t_U8) := - { - t_Mul_f_Output := t_U8; - t_Mul_f_mul := fun (self : t_U8) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_11__mul (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Rem_707040129 : t_Rem (t_U8) (t_U8) := - { - t_Rem_f_Output := t_U8; - t_Rem_f_rem := fun (self : t_U8) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_10__rem (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Add_121545721 : t_Add (t_U8) (t_U8) := - { - t_Add_f_Output := t_U8; - t_Add_f_add := fun (self : t_U8) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_6__add (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Div_98187967 : t_Div (t_U8) (t_U8) := - { - t_Div_f_Output := t_U8; - t_Div_f_div := fun (self : t_U8) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_10__div (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_377719001 : t_Shl (t_U8) (t_U8) := - { - t_Shl_f_Output := t_U8; - t_Shl_f_shl := fun (self : t_U8) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_251987868 : t_Shl (t_U8) (t_U16) := - { - t_Shl_f_Output := t_U8; - t_Shl_f_shl := fun (self : t_U8) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_1004268259 : t_Shl (t_U8) (t_U32) := - { - t_Shl_f_Output := t_U8; - t_Shl_f_shl := fun (self : t_U8) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_400796854 : t_Shl (t_U8) (t_U64) := - { - t_Shl_f_Output := t_U8; - t_Shl_f_shl := fun (self : t_U8) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_79328015 : t_Shl (t_U8) (t_U128) := - { - t_Shl_f_Output := t_U8; - t_Shl_f_shl := fun (self : t_U8) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_319870959 : t_Shr (t_U8) (t_U8) := - { - t_Shr_f_Output := t_U8; - t_Shr_f_shr := fun (self : t_U8) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_879984593 : t_Shr (t_U8) (t_U16) := - { - t_Shr_f_Output := t_U8; - t_Shr_f_shr := fun (self : t_U8) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_88869181 : t_Shr (t_U8) (t_U32) := - { - t_Shr_f_Output := t_U8; - t_Shr_f_shr := fun (self : t_U8) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_77214537 : t_Shr (t_U8) (t_U64) := - { - t_Shr_f_Output := t_U8; - t_Shr_f_shr := fun (self : t_U8) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_346939843 : t_Shr (t_U8) (t_U128) := - { - t_Shr_f_Output := t_U8; - t_Shr_f_shr := fun (self : t_U8) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitXor_428151757 : t_BitXor (t_U8) (t_U8) := - { - t_BitXor_f_Output := t_U8; - t_BitXor_f_bitxor := fun (self : t_U8) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_14__bitxor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitAnd_719505946 : t_BitAnd (t_U8) (t_U8) := - { - t_BitAnd_f_Output := t_U8; - t_BitAnd_f_bitand := fun (self : t_U8) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_15__bitand (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitOr_516494164 : t_BitOr (t_U8) (t_U8) := - { - t_BitOr_f_Output := t_U8; - t_BitOr_f_bitor := fun (self : t_U8) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_265873841) (impl_16__bitor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Neg_758687224 : t_Neg (t_U16) := - { - t_Neg_f_Output := t_U16; - t_Neg_f_neg := fun (self : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_7__sub (v_WORDSIZE_16_) (impl_10__rem (t_Abstraction_f_lift (self)) (v_WORDSIZE_16_))); - }. - -Instance t_Mul_467924553 : t_Mul (t_U16) (t_U16) := - { - t_Mul_f_Output := t_U16; - t_Mul_f_mul := fun (self : t_U16) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_11__mul (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Rem_333671536 : t_Rem (t_U16) (t_U16) := - { - t_Rem_f_Output := t_U16; - t_Rem_f_rem := fun (self : t_U16) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_10__rem (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Add_71250682 : t_Add (t_U16) (t_U16) := - { - t_Add_f_Output := t_U16; - t_Add_f_add := fun (self : t_U16) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_6__add (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Div_638997407 : t_Div (t_U16) (t_U16) := - { - t_Div_f_Output := t_U16; - t_Div_f_div := fun (self : t_U16) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_10__div (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_189335836 : t_Shl (t_U16) (t_U8) := - { - t_Shl_f_Output := t_U16; - t_Shl_f_shl := fun (self : t_U16) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_400009554 : t_Shl (t_U16) (t_U16) := - { - t_Shl_f_Output := t_U16; - t_Shl_f_shl := fun (self : t_U16) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_40960466 : t_Shl (t_U16) (t_U32) := - { - t_Shl_f_Output := t_U16; - t_Shl_f_shl := fun (self : t_U16) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_472600731 : t_Shl (t_U16) (t_U64) := - { - t_Shl_f_Output := t_U16; - t_Shl_f_shl := fun (self : t_U16) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_114665376 : t_Shl (t_U16) (t_U128) := - { - t_Shl_f_Output := t_U16; - t_Shl_f_shl := fun (self : t_U16) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_327818009 : t_Shr (t_U16) (t_U8) := - { - t_Shr_f_Output := t_U16; - t_Shr_f_shr := fun (self : t_U16) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_212310233 : t_Shr (t_U16) (t_U16) := - { - t_Shr_f_Output := t_U16; - t_Shr_f_shr := fun (self : t_U16) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_591081376 : t_Shr (t_U16) (t_U32) := - { - t_Shr_f_Output := t_U16; - t_Shr_f_shr := fun (self : t_U16) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_428437762 : t_Shr (t_U16) (t_U64) := - { - t_Shr_f_Output := t_U16; - t_Shr_f_shr := fun (self : t_U16) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_847453429 : t_Shr (t_U16) (t_U128) := - { - t_Shr_f_Output := t_U16; - t_Shr_f_shr := fun (self : t_U16) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitXor_448510460 : t_BitXor (t_U16) (t_U16) := - { - t_BitXor_f_Output := t_U16; - t_BitXor_f_bitxor := fun (self : t_U16) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_14__bitxor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitAnd_493952949 : t_BitAnd (t_U16) (t_U16) := - { - t_BitAnd_f_Output := t_U16; - t_BitAnd_f_bitand := fun (self : t_U16) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_15__bitand (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitOr_196126415 : t_BitOr (t_U16) (t_U16) := - { - t_BitOr_f_Output := t_U16; - t_BitOr_f_bitor := fun (self : t_U16) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_369613743) (impl_16__bitor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Neg_28434759 : t_Neg (t_U32) := - { - t_Neg_f_Output := t_U32; - t_Neg_f_neg := fun (self : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_7__sub (v_WORDSIZE_32_) (impl_10__rem (t_Abstraction_f_lift (self)) (v_WORDSIZE_32_))); - }. - -Instance t_Mul_694927493 : t_Mul (t_U32) (t_U32) := - { - t_Mul_f_Output := t_U32; - t_Mul_f_mul := fun (self : t_U32) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_11__mul (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Rem_64936096 : t_Rem (t_U32) (t_U32) := - { - t_Rem_f_Output := t_U32; - t_Rem_f_rem := fun (self : t_U32) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_10__rem (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Add_54748823 : t_Add (t_U32) (t_U32) := - { - t_Add_f_Output := t_U32; - t_Add_f_add := fun (self : t_U32) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_6__add (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Div_579184696 : t_Div (t_U32) (t_U32) := - { - t_Div_f_Output := t_U32; - t_Div_f_div := fun (self : t_U32) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_10__div (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_582224230 : t_Shl (t_U32) (t_U8) := - { - t_Shl_f_Output := t_U32; - t_Shl_f_shl := fun (self : t_U32) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_784746781 : t_Shl (t_U32) (t_U16) := - { - t_Shl_f_Output := t_U32; - t_Shl_f_shl := fun (self : t_U32) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_969375690 : t_Shl (t_U32) (t_U32) := - { - t_Shl_f_Output := t_U32; - t_Shl_f_shl := fun (self : t_U32) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_522639233 : t_Shl (t_U32) (t_U64) := - { - t_Shl_f_Output := t_U32; - t_Shl_f_shl := fun (self : t_U32) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_521929493 : t_Shl (t_U32) (t_U128) := - { - t_Shl_f_Output := t_U32; - t_Shl_f_shl := fun (self : t_U32) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_13621365 : t_Shr (t_U32) (t_U8) := - { - t_Shr_f_Output := t_U32; - t_Shr_f_shr := fun (self : t_U32) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_425099630 : t_Shr (t_U32) (t_U16) := - { - t_Shr_f_Output := t_U32; - t_Shr_f_shr := fun (self : t_U32) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_488072124 : t_Shr (t_U32) (t_U32) := - { - t_Shr_f_Output := t_U32; - t_Shr_f_shr := fun (self : t_U32) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_176245311 : t_Shr (t_U32) (t_U64) := - { - t_Shr_f_Output := t_U32; - t_Shr_f_shr := fun (self : t_U32) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_128161029 : t_Shr (t_U32) (t_U128) := - { - t_Shr_f_Output := t_U32; - t_Shr_f_shr := fun (self : t_U32) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitXor_302699331 : t_BitXor (t_U32) (t_U32) := - { - t_BitXor_f_Output := t_U32; - t_BitXor_f_bitxor := fun (self : t_U32) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_14__bitxor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitAnd_259909825 : t_BitAnd (t_U32) (t_U32) := - { - t_BitAnd_f_Output := t_U32; - t_BitAnd_f_bitand := fun (self : t_U32) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_15__bitand (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitOr_944485878 : t_BitOr (t_U32) (t_U32) := - { - t_BitOr_f_Output := t_U32; - t_BitOr_f_bitor := fun (self : t_U32) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_34651280) (impl_16__bitor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Neg_262148082 : t_Neg (t_U64) := - { - t_Neg_f_Output := t_U64; - t_Neg_f_neg := fun (self : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_7__sub (v_WORDSIZE_64_) (impl_10__rem (t_Abstraction_f_lift (self)) (v_WORDSIZE_64_))); - }. - -Instance t_Mul_542100838 : t_Mul (t_U64) (t_U64) := - { - t_Mul_f_Output := t_U64; - t_Mul_f_mul := fun (self : t_U64) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_11__mul (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Rem_476079061 : t_Rem (t_U64) (t_U64) := - { - t_Rem_f_Output := t_U64; - t_Rem_f_rem := fun (self : t_U64) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_10__rem (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Add_680559927 : t_Add (t_U64) (t_U64) := - { - t_Add_f_Output := t_U64; - t_Add_f_add := fun (self : t_U64) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_6__add (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Div_288928025 : t_Div (t_U64) (t_U64) := - { - t_Div_f_Output := t_U64; - t_Div_f_div := fun (self : t_U64) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_10__div (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_458903955 : t_Shl (t_U64) (t_U8) := - { - t_Shl_f_Output := t_U64; - t_Shl_f_shl := fun (self : t_U64) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_547067457 : t_Shl (t_U64) (t_U16) := - { - t_Shl_f_Output := t_U64; - t_Shl_f_shl := fun (self : t_U64) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_467944790 : t_Shl (t_U64) (t_U32) := - { - t_Shl_f_Output := t_U64; - t_Shl_f_shl := fun (self : t_U64) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_188141782 : t_Shl (t_U64) (t_U64) := - { - t_Shl_f_Output := t_U64; - t_Shl_f_shl := fun (self : t_U64) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_936592019 : t_Shl (t_U64) (t_U128) := - { - t_Shl_f_Output := t_U64; - t_Shl_f_shl := fun (self : t_U64) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_362241607 : t_Shr (t_U64) (t_U8) := - { - t_Shr_f_Output := t_U64; - t_Shr_f_shr := fun (self : t_U64) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_336624052 : t_Shr (t_U64) (t_U16) := - { - t_Shr_f_Output := t_U64; - t_Shr_f_shr := fun (self : t_U64) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_87524769 : t_Shr (t_U64) (t_U32) := - { - t_Shr_f_Output := t_U64; - t_Shr_f_shr := fun (self : t_U64) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_998089409 : t_Shr (t_U64) (t_U64) := - { - t_Shr_f_Output := t_U64; - t_Shr_f_shr := fun (self : t_U64) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_1000705430 : t_Shr (t_U64) (t_U128) := - { - t_Shr_f_Output := t_U64; - t_Shr_f_shr := fun (self : t_U64) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitXor_68539793 : t_BitXor (t_U64) (t_U64) := - { - t_BitXor_f_Output := t_U64; - t_BitXor_f_bitxor := fun (self : t_U64) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_14__bitxor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitAnd_91153110 : t_BitAnd (t_U64) (t_U64) := - { - t_BitAnd_f_Output := t_U64; - t_BitAnd_f_bitand := fun (self : t_U64) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_15__bitand (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitOr_746401002 : t_BitOr (t_U64) (t_U64) := - { - t_BitOr_f_Output := t_U64; - t_BitOr_f_bitor := fun (self : t_U64) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_841277766) (impl_16__bitor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Neg_446348865 : t_Neg (t_U128) := - { - t_Neg_f_Output := t_U128; - t_Neg_f_neg := fun (self : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_7__sub (v_WORDSIZE_128_) (impl_10__rem (t_Abstraction_f_lift (self)) (v_WORDSIZE_128_))); - }. - -Instance t_Mul_529926072 : t_Mul (t_U128) (t_U128) := - { - t_Mul_f_Output := t_U128; - t_Mul_f_mul := fun (self : t_U128) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_11__mul (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Rem_813931227 : t_Rem (t_U128) (t_U128) := - { - t_Rem_f_Output := t_U128; - t_Rem_f_rem := fun (self : t_U128) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_10__rem (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Add_509210048 : t_Add (t_U128) (t_U128) := - { - t_Add_f_Output := t_U128; - t_Add_f_add := fun (self : t_U128) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_6__add (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Div_733456046 : t_Div (t_U128) (t_U128) := - { - t_Div_f_Output := t_U128; - t_Div_f_div := fun (self : t_U128) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_10__div (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_634756453 : t_Shl (t_U128) (t_U8) := - { - t_Shl_f_Output := t_U128; - t_Shl_f_shl := fun (self : t_U128) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_17499927 : t_Shl (t_U128) (t_U16) := - { - t_Shl_f_Output := t_U128; - t_Shl_f_shl := fun (self : t_U128) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_839364374 : t_Shl (t_U128) (t_U32) := - { - t_Shl_f_Output := t_U128; - t_Shl_f_shl := fun (self : t_U128) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_268379728 : t_Shl (t_U128) (t_U64) := - { - t_Shl_f_Output := t_U128; - t_Shl_f_shl := fun (self : t_U128) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shl_50621237 : t_Shl (t_U128) (t_U128) := - { - t_Shl_f_Output := t_U128; - t_Shl_f_shl := fun (self : t_U128) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_12__shl (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_205513961 : t_Shr (t_U128) (t_U8) := - { - t_Shr_f_Output := t_U128; - t_Shr_f_shr := fun (self : t_U128) (rhs : t_U8) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_691521055 : t_Shr (t_U128) (t_U16) := - { - t_Shr_f_Output := t_U128; - t_Shr_f_shr := fun (self : t_U128) (rhs : t_U16) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_345208632 : t_Shr (t_U128) (t_U32) := - { - t_Shr_f_Output := t_U128; - t_Shr_f_shr := fun (self : t_U128) (rhs : t_U32) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_1027860982 : t_Shr (t_U128) (t_U64) := - { - t_Shr_f_Output := t_U128; - t_Shr_f_shr := fun (self : t_U128) (rhs : t_U64) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Shr_54460338 : t_Shr (t_U128) (t_U128) := - { - t_Shr_f_Output := t_U128; - t_Shr_f_shr := fun (self : t_U128) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_13__shr (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitXor_579850070 : t_BitXor (t_U128) (t_U128) := - { - t_BitXor_f_Output := t_U128; - t_BitXor_f_bitxor := fun (self : t_U128) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_14__bitxor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitAnd_550145691 : t_BitAnd (t_U128) (t_U128) := - { - t_BitAnd_f_Output := t_U128; - t_BitAnd_f_bitand := fun (self : t_U128) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_15__bitand (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_BitOr_123199302 : t_BitOr (t_U128) (t_U128) := - { - t_BitOr_f_Output := t_U128; - t_BitOr_f_bitor := fun (self : t_U128) (rhs : t_U128) => - t_Concretization_f_concretize (t_Concretization := t_Concretization_814811766) (impl_16__bitor (t_Abstraction_f_lift (self)) (t_Abstraction_f_lift (rhs))); - }. - -Instance t_Sub_209890052 : t_Sub (t_U8) (t_U8) := - { - t_Sub_f_Output := t_U8; - t_Sub_f_sub := fun (self : t_U8) (rhs : t_U8) => - t_Add_f_add (t_Add := t_Add_121545721) (self) (t_Neg_f_neg (rhs)); - }. - -Instance t_Not_3946298 : t_Not (t_U8) := - { - t_Not_f_Output := t_U8; - t_Not_f_not := fun (self : t_U8) => - t_BitXor_f_bitxor (self) (t_Constants_f_MAX : t_U8); - }. - -Instance t_Sub_307813249 : t_Sub (t_U16) (t_U16) := - { - t_Sub_f_Output := t_U16; - t_Sub_f_sub := fun (self : t_U16) (rhs : t_U16) => - t_Add_f_add (t_Add := t_Add_71250682) (self) (t_Neg_f_neg (rhs)); - }. - -Instance t_Not_887206550 : t_Not (t_U16) := - { - t_Not_f_Output := t_U16; - t_Not_f_not := fun (self : t_U16) => - t_BitXor_f_bitxor (self) (t_Constants_f_MAX); - }. - -Instance t_Sub_967239595 : t_Sub (t_U32) (t_U32) := - { - t_Sub_f_Output := t_U32; - t_Sub_f_sub := fun (self : t_U32) (rhs : t_U32) => - t_Add_f_add (t_Add := t_Add_54748823) (self) (t_Neg_f_neg (rhs)); - }. - -Instance t_Not_966968542 : t_Not (t_U32) := - { - t_Not_f_Output := t_U32; - t_Not_f_not := fun (self : t_U32) => - t_BitXor_f_bitxor (self) (t_Constants_f_MAX); - }. - -Instance t_Sub_324061209 : t_Sub (t_U64) (t_U64) := - { - t_Sub_f_Output := t_U64; - t_Sub_f_sub := fun (self : t_U64) (rhs : t_U64) => - t_Add_f_add (t_Add := t_Add_680559927) (self) (t_Neg_f_neg (rhs)); - }. - -Instance t_Not_807247311 : t_Not (t_U64) := - { - t_Not_f_Output := t_U64; - t_Not_f_not := fun (self : t_U64) => - t_BitXor_f_bitxor (self) (t_Constants_f_MAX); - }. - -Instance t_Sub_549381231 : t_Sub (t_U128) (t_U128) := - { - t_Sub_f_Output := t_U128; - t_Sub_f_sub := fun (self : t_U128) (rhs : t_U128) => - t_Add_f_add (t_Add := t_Add_509210048) (self) (t_Neg_f_neg (rhs)); - }. - -Instance t_Not_651062842 : t_Not (t_U128) := - { - t_Not_f_Output := t_U128; - t_Not_f_not := fun (self : t_U128) => - t_BitXor_f_bitxor (self) (t_Constants_f_MAX); - }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v b/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v index e7216d21d..9b17d9779 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v @@ -1,119 +1,589 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. -From Core Require Import Core_Primitive. -Export Core_Primitive. +Require Import Crate_Primitive. +Export Crate_Primitive. -From Core Require Import Core_Int. -Export Core_Int. +Require Import Crate_Base_interface_Int. +Export Crate_Base_interface_Int. -From Core Require Import Core_Coerce. -Export Core_Coerce. +Require Import Crate_Base_interface_Coerce. +Export Crate_Base_interface_Coerce. -(* NotImplementedYet *) +Require Import Crate_Base. +Export Crate_Base. -Definition unchecked_add_u128 (x : t_u128) (y : t_u128) : t_u128 := - Build_t_u128 (Build_t_U128 (impl_6__add (t_Abstraction_f_lift (t_u128_0 x)) (t_Abstraction_f_lift (t_u128_0 y)))). +Require Import Add. +Export Add. -Definition unchecked_add_u16 (x : t_u16) (y : t_u16) : t_u16 := - Build_t_u16 (Build_t_U16 (impl_6__add (t_Abstraction_f_lift (t_u16_0 x)) (t_Abstraction_f_lift (t_u16_0 y)))). +(*Not implemented yet? todo(item)*) -Definition unchecked_add_u32 (x : t_u32) (y : t_u32) : t_u32 := - Build_t_u32 (Build_t_U32 (impl_6__add (t_Abstraction_f_lift (t_u32_0 x)) (t_Abstraction_f_lift (t_u32_0 y)))). +(*Not implemented yet? todo(item)*) -Definition unchecked_add_u64 (x : t_u64) (y : t_u64) : t_u64 := - Build_t_u64 (Build_t_U64 (impl_6__add (t_Abstraction_f_lift (t_u64_0 x)) (t_Abstraction_f_lift (t_u64_0 y)))). +Definition unchecked_add_u128 (x : t_u128_t) (y : t_u128_t) : t_u128_t := + C_u128 (Build_U128 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). -Definition unchecked_add_u8 (x : t_u8) (y : t_u8) : t_u8 := - Build_t_u8 (Build_t_U8 (impl_6__add (t_Abstraction_f_lift (t_u8_0 x)) (t_Abstraction_f_lift (t_u8_0 y)))). +Definition unchecked_add_u16 (x : t_u16_t) (y : t_u16_t) : t_u16_t := + C_u16 (Build_U16 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). -Definition unchecked_add_usize (x : t_usize) (y : t_usize) : t_usize := - Build_t_usize (Build_t_U64 (impl_6__add (t_Abstraction_f_lift (t_usize_0 x)) (t_Abstraction_f_lift (t_usize_0 y)))). +Definition unchecked_add_u32 (x : t_u32_t) (y : t_u32_t) : t_u32_t := + C_u32 (Build_U32 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). -Definition add_with_overflow_u128 (x : t_u128) (y : t_u128) : (t_u128*bool) := - let overflow := impl_6__add (t_Abstraction_f_lift (t_u128_0 x)) (t_Abstraction_f_lift (t_u128_0 y)) in - let res : t_U128 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in - (Build_t_u128 (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction := t_Abstraction_462669591) (res)) (overflow)). +Definition unchecked_add_u64 (x : t_u64_t) (y : t_u64_t) : t_u64_t := + C_u64 (Build_U64 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). -Definition add_with_overflow_u16 (x : t_u16) (y : t_u16) : (t_u16*bool) := - let overflow := impl_6__add (t_Abstraction_f_lift (t_u16_0 x)) (t_Abstraction_f_lift (t_u16_0 y)) in - let res : t_U16 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in - (Build_t_u16 (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction:=t_Abstraction_134234872) (res)) (overflow)). +Definition unchecked_add_u8 (x : t_u8_t) (y : t_u8_t) : t_u8_t := + C_u8 (Build_U8 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). -Definition add_with_overflow_u32 (x : t_u32) (y : t_u32) : (t_u32*bool) := - let overflow := impl_6__add (t_Abstraction_f_lift (t_u32_0 x)) (t_Abstraction_f_lift (t_u32_0 y)) in - let res : t_U32 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in - (Build_t_u32 (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction:=t_Abstraction_699270934) (res)) (overflow)). +Definition unchecked_add_usize (x : t_usize_t) (y : t_usize_t) : t_usize_t := + C_usize (Build_U64 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). -Definition add_with_overflow_u64 (x : t_u64) (y : t_u64) : (t_u64*bool) := - let overflow := impl_6__add (t_Abstraction_f_lift (t_u64_0 x)) (t_Abstraction_f_lift (t_u64_0 y)) in - let res : t_U64 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in - (Build_t_u64 (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction:=t_Abstraction_374630185) (res)) (overflow)). +Definition add_with_overflow_i128 (x : t_i128_t) (y : t_i128_t) : t_i128_t × bool := + let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in + let (res : t_I128_t) := f_concretize (f_clone overflow) : t_I128_t in + (C_i128 (f_clone res),z_lt (f_lift res) overflow). -Definition add_with_overflow_u8 (x : t_u8) (y : t_u8) : (t_u8*bool) := - let overflow := impl_6__add (t_Abstraction_f_lift (t_u8_0 x)) (t_Abstraction_f_lift (t_u8_0 y)) in - let res : t_U8 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in - (Build_t_u8 (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction := t_Abstraction_566214702) (res)) (overflow)). +Definition unchecked_add_i128 (x : t_i128_t) (y : t_i128_t) : t_i128_t := + C_i128 (Build_I128 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). -Definition add_with_overflow_usize (x : t_usize) (y : t_usize) : (t_usize*bool) := - let overflow := impl_6__add (t_Abstraction_f_lift (t_usize_0 x)) (t_Abstraction_f_lift (t_usize_0 y)) in - let res : t_U64 := t_Concretization_f_concretize (t_Clone_f_clone (overflow)) in - (Build_t_usize (t_Clone_f_clone (res)),t_PartialOrd_f_lt (t_Abstraction_f_lift (t_Abstraction := t_Abstraction_374630185) (res)) (overflow)). +Definition add_with_overflow_i16 (x : t_i16_t) (y : t_i16_t) : t_i16_t × bool := + let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in + let (res : t_I16_t) := f_concretize (f_clone overflow) : t_I16_t in + (C_i16 (f_clone res),z_lt (f_lift res) overflow). -Definition wrapping_add_u128 (a : t_u128) (b : t_u128) : t_u128 := - Build_t_u128 (t_Add_f_add (t_u128_0 a) (t_u128_0 b)). +Definition unchecked_add_i16 (x : t_i16_t) (y : t_i16_t) : t_i16_t := + C_i16 (Build_I16 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). -Definition wrapping_add_u16 (a : t_u16) (b : t_u16) : t_u16 := - Build_t_u16 (t_Add_f_add (t_u16_0 a) (t_u16_0 b)). +Definition add_with_overflow_i32 (x : t_i32_t) (y : t_i32_t) : t_i32_t × bool := + let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in + let (res : t_I32_t) := f_concretize (f_clone overflow) : t_I32_t in + (C_i32 (f_clone res),z_lt (f_lift res) overflow). -Definition wrapping_add_u32 (a : t_u32) (b : t_u32) : t_u32 := - Build_t_u32 (t_Add_f_add (t_u32_0 a) (t_u32_0 b)). +Definition unchecked_add_i32 (x : t_i32_t) (y : t_i32_t) : t_i32_t := + C_i32 (Build_I32 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). -Definition wrapping_add_u64 (a : t_u64) (b : t_u64) : t_u64 := - Build_t_u64 (t_Add_f_add (t_u64_0 a) (t_u64_0 b)). +Definition add_with_overflow_i64 (x : t_i64_t) (y : t_i64_t) : t_i64_t × bool := + let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in + let (res : t_I64_t) := f_concretize (f_clone overflow) : t_I64_t in + (C_i64 (f_clone res),z_lt (f_lift res) overflow). -Definition wrapping_add_u8 (a : t_u8) (b : t_u8) : t_u8 := - Build_t_u8 (t_Add_f_add (t_u8_0 a) (t_u8_0 b)). +Definition unchecked_add_i64 (x : t_i64_t) (y : t_i64_t) : t_i64_t := + C_i64 (Build_I64 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). -Definition wrapping_add_usize (a : t_usize) (b : t_usize) : t_usize := - Build_t_usize (t_Add_f_add (t_usize_0 a) (t_usize_0 b)). +Definition add_with_overflow_i8 (x : t_i8_t) (y : t_i8_t) : t_i8_t × bool := + let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in + let (res : t_I8_t) := f_concretize (f_clone overflow) : t_I8_t in + (C_i8 (f_clone res),z_lt (f_lift res) overflow). -Definition wrapping_mul_u128 (a : t_u128) (b : t_u128) : t_u128 := - Build_t_u128 (t_Mul_f_mul (t_u128_0 a) (t_u128_0 b)). +Definition unchecked_add_i8 (x : t_i8_t) (y : t_i8_t) : t_i8_t := + C_i8 (Build_I8 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). -Definition wrapping_mul_u16 (a : t_u16) (b : t_u16) : t_u16 := - Build_t_u16 (t_Mul_f_mul (t_u16_0 a) (t_u16_0 b)). +Definition add_with_overflow_isize (x : t_isize_t) (y : t_isize_t) : t_isize_t × bool := + let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in + let (res : t_I64_t) := f_concretize (f_clone overflow) : t_I64_t in + (C_isize (f_clone res),z_lt (f_lift res) overflow). -Definition wrapping_mul_u32 (a : t_u32) (b : t_u32) : t_u32 := - Build_t_u32 (t_Mul_f_mul (t_u32_0 a) (t_u32_0 b)). +Definition unchecked_add_isize (x : t_isize_t) (y : t_isize_t) : t_isize_t := + C_isize (Build_I64 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). -Definition wrapping_mul_u64 (a : t_u64) (b : t_u64) : t_u64 := - Build_t_u64 (t_Mul_f_mul (t_u64_0 a) (t_u64_0 b)). +Definition add_with_overflow_u128 (x : t_u128_t) (y : t_u128_t) : t_u128_t × bool := + let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in + let (res : t_U128_t) := f_concretize (f_clone overflow) : t_U128_t in + (C_u128 (f_clone res),haxint_lt (f_lift res) overflow). -Definition wrapping_mul_u8 (a : t_u8) (b : t_u8) : t_u8 := - Build_t_u8 (t_Mul_f_mul (t_u8_0 a) (t_u8_0 b)). +Definition add_with_overflow_u16 (x : t_u16_t) (y : t_u16_t) : t_u16_t × bool := + let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in + let (res : t_U16_t) := f_concretize (f_clone overflow) : t_U16_t in + (C_u16 (f_clone res),haxint_lt (f_lift res) overflow). -Definition wrapping_mul_usize (a : t_usize) (b : t_usize) : t_usize := - Build_t_usize (t_Mul_f_mul (t_usize_0 a) (t_usize_0 b)). +Definition add_with_overflow_u32 (x : t_u32_t) (y : t_u32_t) : t_u32_t × bool := + let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in + let (res : t_U32_t) := f_concretize (f_clone overflow) : t_U32_t in + (C_u32 (f_clone res),haxint_lt (f_lift res) overflow). -Definition wrapping_sub_u128 (a : t_u128) (b : t_u128) : t_u128 := - Build_t_u128 (t_Sub_f_sub (t_u128_0 a) (t_u128_0 b)). +Definition add_with_overflow_u64 (x : t_u64_t) (y : t_u64_t) : t_u64_t × bool := + let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in + let (res : t_U64_t) := f_concretize (f_clone overflow) : t_U64_t in + (C_u64 (f_clone res),haxint_lt (f_lift res) overflow). -Definition wrapping_sub_u16 (a : t_u16) (b : t_u16) : t_u16 := - Build_t_u16 (t_Sub_f_sub (t_u16_0 a) (t_u16_0 b)). +Definition add_with_overflow_u8 (x : t_u8_t) (y : t_u8_t) : t_u8_t × bool := + let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in + let (res : t_U8_t) := f_concretize (f_clone overflow) : t_U8_t in + (C_u8 (f_clone res),haxint_lt (f_lift res) overflow). -Definition wrapping_sub_u32 (a : t_u32) (b : t_u32) : t_u32 := - Build_t_u32 (t_Sub_f_sub (t_u32_0 a) (t_u32_0 b)). +Definition add_with_overflow_usize (x : t_usize_t) (y : t_usize_t) : t_usize_t × bool := + let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in + let (res : t_U64_t) := f_concretize (f_clone overflow) : t_U64_t in + (C_usize (f_clone res),haxint_lt (f_lift res) overflow). -Definition wrapping_sub_u64 (a : t_u64) (b : t_u64) : t_u64 := - Build_t_u64 (t_Sub_f_sub (t_u64_0 a) (t_u64_0 b)). +Definition unchecked_div_u128 (x : t_u128_t) (y : t_u128_t) : t_u128_t := + C_u128 (Build_U128 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). -Definition wrapping_sub_u8 (a : t_u8) (b : t_u8) : t_u8 := - Build_t_u8 (t_Sub_f_sub (t_u8_0 a) (t_u8_0 b)). +Definition unchecked_div_u16 (x : t_u16_t) (y : t_u16_t) : t_u16_t := + C_u16 (Build_U16 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). -Definition wrapping_sub_usize (a : t_usize) (b : t_usize) : t_usize := - Build_t_usize (t_Sub_f_sub (t_usize_0 a) (t_usize_0 b)). +Definition unchecked_div_u32 (x : t_u32_t) (y : t_u32_t) : t_u32_t := + C_u32 (Build_U32 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). + +Definition unchecked_div_u64 (x : t_u64_t) (y : t_u64_t) : t_u64_t := + C_u64 (Build_U64 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). + +Definition unchecked_div_u8 (x : t_u8_t) (y : t_u8_t) : t_u8_t := + C_u8 (Build_U8 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). + +Definition unchecked_div_usize (x : t_usize_t) (y : t_usize_t) : t_usize_t := + C_usize (Build_U64 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). + +Definition wrapping_add_i128 (a : t_i128_t) (b : t_i128_t) : t_i128_t := + C_i128 ((0 a).+(0 b)). + +Definition wrapping_add_i16 (a : t_i16_t) (b : t_i16_t) : t_i16_t := + C_i16 ((0 a).+(0 b)). + +Definition wrapping_add_i32 (a : t_i32_t) (b : t_i32_t) : t_i32_t := + C_i32 ((0 a).+(0 b)). + +Definition wrapping_add_i64 (a : t_i64_t) (b : t_i64_t) : t_i64_t := + C_i64 ((0 a).+(0 b)). + +Definition wrapping_add_i8 (a : t_i8_t) (b : t_i8_t) : t_i8_t := + C_i8 ((0 a).+(0 b)). + +Definition wrapping_add_isize (a : t_isize_t) (b : t_isize_t) : t_isize_t := + C_isize ((0 a).+(0 b)). + +Definition wrapping_sub_i128 (a : t_i128_t) (b : t_i128_t) : t_i128_t := + C_i128 ((0 a).-(0 b)). + +Definition wrapping_sub_i16 (a : t_i16_t) (b : t_i16_t) : t_i16_t := + C_i16 ((0 a).-(0 b)). + +Definition wrapping_sub_i32 (a : t_i32_t) (b : t_i32_t) : t_i32_t := + C_i32 ((0 a).-(0 b)). + +Definition wrapping_sub_i64 (a : t_i64_t) (b : t_i64_t) : t_i64_t := + C_i64 ((0 a).-(0 b)). + +Definition wrapping_sub_i8 (a : t_i8_t) (b : t_i8_t) : t_i8_t := + C_i8 ((0 a).-(0 b)). + +Definition wrapping_sub_isize (a : t_isize_t) (b : t_isize_t) : t_isize_t := + C_isize ((0 a).-(0 b)). + +Definition unchecked_div_i128 (x : t_i128_t) (y : t_i128_t) : t_i128_t := + C_i128 (Build_I128 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). + +Definition unchecked_div_i16 (x : t_i16_t) (y : t_i16_t) : t_i16_t := + C_i16 (Build_I16 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). + +Definition unchecked_div_i32 (x : t_i32_t) (y : t_i32_t) : t_i32_t := + C_i32 (Build_I32 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). + +Definition unchecked_div_i64 (x : t_i64_t) (y : t_i64_t) : t_i64_t := + C_i64 (Build_I64 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). + +Definition unchecked_div_i8 (x : t_i8_t) (y : t_i8_t) : t_i8_t := + C_i8 (Build_I8 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). + +Definition unchecked_div_isize (x : t_isize_t) (y : t_isize_t) : t_isize_t := + C_isize (Build_I64 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). + +Definition wrapping_add_u128 (a : t_u128_t) (b : t_u128_t) : t_u128_t := + C_u128 ((0 a).+(0 b)). + +Definition wrapping_add_u16 (a : t_u16_t) (b : t_u16_t) : t_u16_t := + C_u16 ((0 a).+(0 b)). + +Definition wrapping_add_u32 (a : t_u32_t) (b : t_u32_t) : t_u32_t := + C_u32 ((0 a).+(0 b)). + +Definition wrapping_add_u64 (a : t_u64_t) (b : t_u64_t) : t_u64_t := + C_u64 ((0 a).+(0 b)). + +Definition wrapping_add_u8 (a : t_u8_t) (b : t_u8_t) : t_u8_t := + C_u8 ((0 a).+(0 b)). + +Definition wrapping_add_usize (a : t_usize_t) (b : t_usize_t) : t_usize_t := + C_usize ((0 a).+(0 b)). + +Definition wrapping_mul_i128 (a : t_i128_t) (b : t_i128_t) : t_i128_t := + C_i128 ((0 a).*(0 b)). + +Definition wrapping_mul_i16 (a : t_i16_t) (b : t_i16_t) : t_i16_t := + C_i16 ((0 a).*(0 b)). + +Definition wrapping_mul_i32 (a : t_i32_t) (b : t_i32_t) : t_i32_t := + C_i32 ((0 a).*(0 b)). + +Definition wrapping_mul_i64 (a : t_i64_t) (b : t_i64_t) : t_i64_t := + C_i64 ((0 a).*(0 b)). + +Definition wrapping_mul_i8 (a : t_i8_t) (b : t_i8_t) : t_i8_t := + C_i8 ((0 a).*(0 b)). + +Definition wrapping_mul_isize (a : t_isize_t) (b : t_isize_t) : t_isize_t := + C_isize ((0 a).*(0 b)). + +Definition wrapping_mul_u128 (a : t_u128_t) (b : t_u128_t) : t_u128_t := + C_u128 ((0 a).*(0 b)). + +Definition wrapping_mul_u16 (a : t_u16_t) (b : t_u16_t) : t_u16_t := + C_u16 ((0 a).*(0 b)). + +Definition wrapping_mul_u32 (a : t_u32_t) (b : t_u32_t) : t_u32_t := + C_u32 ((0 a).*(0 b)). + +Definition wrapping_mul_u64 (a : t_u64_t) (b : t_u64_t) : t_u64_t := + C_u64 ((0 a).*(0 b)). + +Definition wrapping_mul_u8 (a : t_u8_t) (b : t_u8_t) : t_u8_t := + C_u8 ((0 a).*(0 b)). + +Definition wrapping_mul_usize (a : t_usize_t) (b : t_usize_t) : t_usize_t := + C_usize ((0 a).*(0 b)). + +Definition wrapping_sub_u128 (a : t_u128_t) (b : t_u128_t) : t_u128_t := + C_u128 ((0 a).-(0 b)). + +Definition wrapping_sub_u16 (a : t_u16_t) (b : t_u16_t) : t_u16_t := + C_u16 ((0 a).-(0 b)). + +Definition wrapping_sub_u32 (a : t_u32_t) (b : t_u32_t) : t_u32_t := + C_u32 ((0 a).-(0 b)). + +Definition wrapping_sub_u64 (a : t_u64_t) (b : t_u64_t) : t_u64_t := + C_u64 ((0 a).-(0 b)). + +Definition wrapping_sub_u8 (a : t_u8_t) (b : t_u8_t) : t_u8_t := + C_u8 ((0 a).-(0 b)). + +Definition wrapping_sub_usize (a : t_usize_t) (b : t_usize_t) : t_usize_t := + C_usize ((0 a).-(0 b)). + +Definition rotate_left_u128 (x : t_u128_t) (shift : t_u32_t) : t_u128_t := + let (shift : t_u32_t) := shift.%impl_10__BITS : t_u32_t in + let (left : t_u128_t) := (f_clone x) shift_left (f_clone shift) : t_u128_t in + let (right : t_u128_t) := (f_clone x) shift_right (impl_10__BITS.-(f_clone shift)) : t_u128_t in + left.|right. + +Definition rotate_left_u16 (x : t_u16_t) (shift : t_u32_t) : t_u16_t := + let (shift : t_u32_t) := shift.%impl_7__BITS : t_u32_t in + let (left : t_u16_t) := (f_clone x) shift_left (f_clone shift) : t_u16_t in + let (right : t_u16_t) := (f_clone x) shift_right (impl_7__BITS.-(f_clone shift)) : t_u16_t in + left.|right. + +Definition rotate_left_u32 (x : t_u32_t) (shift : t_u32_t) : t_u32_t := + let (shift : t_u32_t) := shift.%impl_8__BITS : t_u32_t in + let (left : t_u32_t) := (f_clone x) shift_left (f_clone shift) : t_u32_t in + let (right : t_u32_t) := (f_clone x) shift_right (impl_8__BITS.-(f_clone shift)) : t_u32_t in + left.|right. + +Definition rotate_left_u64 (x : t_u64_t) (shift : t_u32_t) : t_u64_t := + let (shift : t_u32_t) := shift.%impl_9__BITS : t_u32_t in + let (left : t_u64_t) := (f_clone x) shift_left (f_clone shift) : t_u64_t in + let (right : t_u64_t) := (f_clone x) shift_right (impl_9__BITS.-(f_clone shift)) : t_u64_t in + left.|right. + +Definition rotate_left_u8 (x : t_u8_t) (shift : t_u32_t) : t_u8_t := + let (shift : t_u32_t) := shift.%impl_6__BITS : t_u32_t in + let (left : t_u8_t) := (f_clone x) shift_left (f_clone shift) : t_u8_t in + let (right : t_u8_t) := (f_clone x) shift_right (impl_6__BITS.-(f_clone shift)) : t_u8_t in + left.|right. + +Definition rotate_left_usize (x : t_usize_t) (shift : t_u32_t) : t_usize_t := + let (shift : t_u32_t) := shift.%impl_11__BITS : t_u32_t in + let (left : t_usize_t) := (f_clone x) shift_left (f_clone shift) : t_usize_t in + let (right : t_usize_t) := (f_clone x) shift_right (impl_11__BITS.-(f_clone shift)) : t_usize_t in + left.|right. + +Definition rotate_right_u128 (x : t_u128_t) (shift : t_u32_t) : t_u128_t := + let (shift : t_u32_t) := shift.%impl_10__BITS : t_u32_t in + let (left : t_u128_t) := (f_clone x) shift_right (f_clone shift) : t_u128_t in + let (right : t_u128_t) := (f_clone x) shift_left (impl_10__BITS.-(f_clone shift)) : t_u128_t in + left.|right. + +Definition rotate_right_u16 (x : t_u16_t) (shift : t_u32_t) : t_u16_t := + let (shift : t_u32_t) := shift.%impl_7__BITS : t_u32_t in + let (left : t_u16_t) := (f_clone x) shift_right (f_clone shift) : t_u16_t in + let (right : t_u16_t) := (f_clone x) shift_left (impl_7__BITS.-(f_clone shift)) : t_u16_t in + left.|right. + +Definition rotate_right_u32 (x : t_u32_t) (shift : t_u32_t) : t_u32_t := + let (shift : t_u32_t) := shift.%impl_8__BITS : t_u32_t in + let (left : t_u32_t) := (f_clone x) shift_right (f_clone shift) : t_u32_t in + let (right : t_u32_t) := (f_clone x) shift_left (impl_8__BITS.-(f_clone shift)) : t_u32_t in + left.|right. + +Definition rotate_right_u64 (x : t_u64_t) (shift : t_u32_t) : t_u64_t := + let (shift : t_u32_t) := shift.%impl_9__BITS : t_u32_t in + let (left : t_u64_t) := (f_clone x) shift_right (f_clone shift) : t_u64_t in + let (right : t_u64_t) := (f_clone x) shift_left (impl_9__BITS.-(f_clone shift)) : t_u64_t in + left.|right. + +Definition rotate_right_u8 (x : t_u8_t) (shift : t_u32_t) : t_u8_t := + let (shift : t_u32_t) := shift.%impl_6__BITS : t_u32_t in + let (left : t_u8_t) := (f_clone x) shift_right (f_clone shift) : t_u8_t in + let (right : t_u8_t) := (f_clone x) shift_left (impl_6__BITS.-(f_clone shift)) : t_u8_t in + left.|right. + +Definition rotate_right_usize (x : t_usize_t) (shift : t_u32_t) : t_usize_t := + let (shift : t_u32_t) := shift.%impl_11__BITS : t_u32_t in + let (left : t_usize_t) := (f_clone x) shift_right (f_clone shift) : t_usize_t in + let (right : t_usize_t) := (f_clone x) shift_left (impl_11__BITS.-(f_clone shift)) : t_usize_t in + left.|right. + +Definition bswap_u128 (x : t_u128_t) : t_u128_t := + let (count : t_u128_t) := f_into (@repr WORDSIZE128 0) : t_u128_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_10__BITS) (fun count => fun _ => + true) count (fun count => fun i => + let (low_bit : t_u128_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE128 1))) : t_u128_t in + let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_u128_t in + count) : t_u128_t in + count. + +Definition bswap_u16 (x : t_u16_t) : t_u16_t := + let (count : t_u16_t) := f_into (@repr WORDSIZE16 0) : t_u16_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_7__BITS) (fun count => fun _ => + true) count (fun count => fun i => + let (low_bit : t_u16_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE16 1))) : t_u16_t in + let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_u16_t in + count) : t_u16_t in + count. + +Definition bswap_u32 (x : t_u32_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_8__BITS) (fun count => fun _ => + true) count (fun count => fun i => + let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))) : t_u32_t in + let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_u32_t in + count) : t_u32_t in + count. + +Definition bswap_u64 (x : t_u64_t) : t_u64_t := + let (count : t_u64_t) := f_into (@repr WORDSIZE64 0) : t_u64_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_9__BITS) (fun count => fun _ => + true) count (fun count => fun i => + let (low_bit : t_u64_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE64 1))) : t_u64_t in + let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_u64_t in + count) : t_u64_t in + count. + +Definition bswap_u8 (x : t_u8_t) : t_u8_t := + let (count : t_u8_t) := f_into (@repr WORDSIZE8 0) : t_u8_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_6__BITS) (fun count => fun _ => + true) count (fun count => fun i => + let (low_bit : t_u8_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE8 1))) : t_u8_t in + let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_u8_t in + count) : t_u8_t in + count. + +Definition bswap_usize (x : t_usize_t) : t_usize_t := + let (count : t_usize_t) := f_into (@repr WORDSIZE32 0) : t_usize_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_11__BITS) (fun count => fun _ => + true) count (fun count => fun i => + let (low_bit : t_usize_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))) : t_usize_t in + let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_usize_t in + count) : t_usize_t in + count. + +Definition ctlz_u128 (x : t_u128_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_10__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_10__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in + if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition ctlz_u16 (x : t_u16_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_7__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_7__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in + if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition ctlz_u32 (x : t_u32_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_8__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_8__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in + if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition ctlz_u64 (x : t_u64_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_9__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_9__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in + if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition ctlz_u8 (x : t_u8_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_6__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_6__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in + if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition ctlz_usize (x : t_usize_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_11__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_11__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in + if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition ctpop_u128 (x : t_u128_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_10__BITS) (fun count => fun _ => + true) count (fun count => fun i => + count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE128 1))))) : t_u32_t in + count. + +Definition ctpop_u16 (x : t_u16_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_7__BITS) (fun count => fun _ => + true) count (fun count => fun i => + count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE16 1))))) : t_u32_t in + count. + +Definition ctpop_u32 (x : t_u32_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_8__BITS) (fun count => fun _ => + true) count (fun count => fun i => + count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))))) : t_u32_t in + count. + +Definition ctpop_u64 (x : t_u64_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_9__BITS) (fun count => fun _ => + true) count (fun count => fun i => + count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE64 1))))) : t_u32_t in + count. + +Definition ctpop_u8 (x : t_u8_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_6__BITS) (fun count => fun _ => + true) count (fun count => fun i => + count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE8 1))))) : t_u32_t in + count. + +Definition ctpop_usize (x : t_usize_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let count := fold_range (@repr WORDSIZE32 0) (f_into impl_11__BITS) (fun count => fun _ => + true) count (fun count => fun i => + count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))))) : t_u32_t in + count. + +Definition cttz_u128 (x : t_u128_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_10__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE128 1))) : t_u32_t in + if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition cttz_u16 (x : t_u16_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_7__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE16 1))) : t_u32_t in + if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition cttz_u32 (x : t_u32_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_8__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))) : t_u32_t in + if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition cttz_u64 (x : t_u64_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_9__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE64 1))) : t_u32_t in + if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition cttz_u8 (x : t_u8_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_6__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE8 1))) : t_u32_t in + if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. + +Definition cttz_usize (x : t_usize_t) : t_u32_t := + let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in + let done := false : bool in + let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_11__BITS) (fun '(count,done) => fun _ => + true) (count,done) (fun '(count,done) => fun i => + let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))) : t_u32_t in + if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done + then let done := true : bool in + (count,done) + else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in + (count,done)) : t_u32_t × bool in + count. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter.v b/proof-libs/coq/coq/generated-core/src/Core_Iter.v new file mode 100644 index 000000000..aa43cfb33 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter.v @@ -0,0 +1,24 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Iterator. +Export Iterator. + +Require Import Step. +Export Step. + +Require Import TrustedStep. +Export TrustedStep. + +Require Import IntoIterator. +Export IntoIterator. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Range.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Range.v new file mode 100644 index 000000000..c81311e2d --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Range.v @@ -0,0 +1,107 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import num. +Export num. + +Require Import u8. +Export u8. + +Require Import u16. +Export u16. + +Require Import u32. +Export u32. + +Require Import u64. +Export u64. + +Require Import u128. +Export u128. + +Require Import usize. +Export usize. + +(*Not implemented yet? todo(item)*) + +(*item error backend*) + +Class t_Step := { + f_steps_between : (Self -> Self -> t_Option_t t_usize_t) ; + f_forward_checked : (Self -> t_usize_t -> t_Option_t Self) ; +}. + +(*item error backend*) + +(*item error backend*) + +#[global] Instance t_u8_t_t_Step : t_Step t_u8_t := { + f_steps_between (start : t_u8_t) (end : t_u8_t) := if start<=.?end + then Option_Some (f_into ((f_clone end).-(f_clone start))) + else Option_Nonet_Option_t t_usize_t; + f_forward_checked (start : t_u8_t) (n : t_usize_t) := match f_try_from n with + | Result_Ok n => + impl_6__checked_add start n + | Result_Err _ => + Option_Nonet_Option_t t_u8_t + end; +}. + +#[global] Instance t_u16_t_t_Step : t_Step t_u16_t := { + f_steps_between (start : t_u16_t) (end : t_u16_t) := if start<=.?end + then Option_Some (f_into ((f_clone end).-(f_clone start))) + else Option_Nonet_Option_t t_usize_t; + f_forward_checked (start : t_u16_t) (n : t_usize_t) := match f_try_from n with + | Result_Ok n => + impl_7__checked_add start n + | Result_Err _ => + Option_Nonet_Option_t t_u16_t + end; +}. + +#[global] Instance t_u32_t_t_Step : t_Step t_u32_t := { + f_steps_between (start : t_u32_t) (end : t_u32_t) := if start<=.?end + then Option_Some (f_into ((f_clone end).-(f_clone start))) + else Option_Nonet_Option_t t_usize_t; + f_forward_checked (start : t_u32_t) (n : t_usize_t) := match f_try_from n with + | Result_Ok n => + impl_8__checked_add start n + | Result_Err _ => + Option_Nonet_Option_t t_u32_t + end; +}. + +#[global] Instance t_u64_t_t_Step : t_Step t_u64_t := { + f_steps_between (start : t_u64_t) (end : t_u64_t) := if start<=.?end + then Option_Some (f_into ((f_clone end).-(f_clone start))) + else Option_Nonet_Option_t t_usize_t; + f_forward_checked (start : t_u64_t) (n : t_usize_t) := match f_try_from n with + | Result_Ok n => + impl_9__checked_add start n + | Result_Err _ => + Option_Nonet_Option_t t_u64_t + end; +}. + +#[global] Instance t_u128_t_t_Step : t_Step t_u128_t := { + f_steps_between (start : t_u128_t) (end : t_u128_t) := if start<=.?end + then impl__ok (f_try_from ((f_clone end).-(f_clone start))) + else Option_Nonet_Option_t t_usize_t; + f_forward_checked (start : t_u128_t) (n : t_usize_t) := Option_Nonet_Option_t t_u128_t; +}. + +#[global] Instance t_usize_t_t_Step : t_Step t_usize_t := { + f_steps_between (start : t_usize_t) (end : t_usize_t) := if start<=.?end + then Option_Some (f_into ((f_clone end).-(f_clone start))) + else Option_Nonet_Option_t t_usize_t; + f_forward_checked (start : t_usize_t) (n : t_usize_t) := match f_try_from n with + | Result_Ok n => + impl_11__checked_add start n + | Result_Err _ => + Option_Nonet_Option_t t_usize_t + end; +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits.v new file mode 100644 index 000000000..ac0e36a06 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits.v @@ -0,0 +1,32 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import IntoIterator. +Export IntoIterator. + +Require Import ExactSizeIterator. +Export ExactSizeIterator. + +Require Import Iterator. +Export Iterator. + +Require Import FusedIterator. +Export FusedIterator. + +Require Import TrustedLen. +Export TrustedLen. + +Require Import TrustedStep. +Export TrustedStep. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Collect.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Collect.v new file mode 100644 index 000000000..ed9cc4cf8 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Collect.v @@ -0,0 +1,17 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Iterator. +Export Iterator. + +(*item error backend*) + +Class t_FromIterator (Self : _) := { + f_from_iter : (T -> Self) ; +}. + +(*item error backend*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Exact_size.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Exact_size.v new file mode 100644 index 000000000..8556e1121 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Exact_size.v @@ -0,0 +1,14 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Iterator. +Export Iterator. + +Class t_ExactSizeIterator := { + f_len : (Self -> uint_size) ; + f_is_empty : (Self -> bool) ; +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v new file mode 100644 index 000000000..df485cf86 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v @@ -0,0 +1,20 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Core_Marker. +Export Core_Marker. + +Require Import Core_Option. +Export Core_Option. + +Require Import Core_Primitive. +Export Core_Primitive. + +Require Import FnMut. +Export FnMut. + +(*item error backend*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Marker.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Marker.v new file mode 100644 index 000000000..b536c6c6f --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Marker.v @@ -0,0 +1,21 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Step. +Export Step. + +Class t_TrustedFused := { +}. + +Class t_FusedIterator := { +}. + +Class t_TrustedLen := { +}. + +Class t_TrustedStep := { +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Marker.v b/proof-libs/coq/coq/generated-core/src/Core_Marker.v index 1ad36f565..555d59245 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Marker.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Marker.v @@ -1,31 +1,21 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. -From Core Require Import Core_Clone (t_Clone). -Export Core_Clone (t_Clone). +Require Import Clone. +Export Clone. -Class t_Copy `{v_Self : Type} `{t_Clone v_Self} : Type := - { - }. -Arguments t_Copy:clear implicits. -Arguments t_Copy (_) {_}. +Class t_Copy := { +}. -Class t_Destruct `{v_Self : Type} : Type := - { - }. -Arguments t_Destruct:clear implicits. -Arguments t_Destruct (_). +Class t_Destruct := { +}. -Class t_Sized `{v_Self : Type} : Type := - { - }. -Arguments t_Sized:clear implicits. -Arguments t_Sized (_). +Class t_Sized := { +}. -(* *** *) - -Instance t_Sized_any T : t_Sized T := {}. +Class t_Tuple := { +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Num.v b/proof-libs/coq/coq/generated-core/src/Core_Num.v index f229d38db..557160159 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Num.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Num.v @@ -1,317 +1,835 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. -From Core Require Import Core_Int. -Export Core_Int. +Require Import Crate_Base_interface_Int. +Export Crate_Base_interface_Int. -From Core Require Import Core_Primitive. -Export Core_Primitive. +Require Import Crate_Primitive. +Export Crate_Primitive. -From Core Require Import Core_Intrinsics. -Export Core_Intrinsics. +Require Import intrinsics. +Export intrinsics. -(* NotImplementedYet *) +Require Import Index. +Export Index. -Definition impl_4__MAX : t_u128 := - Build_t_u128 (t_Constants_f_MAX). +Require Import Crate_Base_Seq. +Export Crate_Base_Seq. -Definition impl_4__MIN : t_u128 := - Build_t_u128 (t_Constants_f_MIN). +(*Not implemented yet? todo(item)*) -Definition impl_1__MAX : t_u16 := - Build_t_u16 (t_Constants_f_MAX). +(*Not implemented yet? todo(item)*) -Definition impl_1__MIN : t_u16 := - Build_t_u16 (t_Constants_f_MIN). +Definition impl_10__MAX : t_u128_t := + C_u128 f_MAX. -Definition impl__BITS : t_u32 := - Build_t_u32 (impl_21__BITS). +Definition impl_10__MIN : t_u128_t := + C_u128 f_MIN. -Definition impl_1__BITS : t_u32 := - Build_t_u32 (impl_48__BITS). +Definition impl_10__from_le (x : t_u128_t) : t_u128_t := + x. -Definition impl_2__BITS : t_u32 := - Build_t_u32 (impl_75__BITS). +Definition impl_10__to_le (self : t_u128_t) : t_u128_t := + self. -Definition impl_2__MAX : t_u32 := - Build_t_u32 (t_Constants_f_MAX). +Definition impl_7__MAX : t_u16_t := + C_u16 f_MAX. -Definition impl_2__MIN : t_u32 := - Build_t_u32 (t_Constants_f_MIN). +Definition impl_7__MIN : t_u16_t := + C_u16 f_MIN. -Definition impl_3__BITS : t_u32 := - Build_t_u32 (impl_102__BITS). +Definition impl_7__from_le (x : t_u16_t) : t_u16_t := + x. -Definition impl_4__BITS : t_u32 := - Build_t_u32 (impl_129__BITS). +Definition impl_7__to_le (self : t_u16_t) : t_u16_t := + self. -Definition impl_5__BITS : t_u32 := - Build_t_u32 (impl_102__BITS). +Definition impl__i8__BITS : t_u32_t := + C_u32 impl_97__BITS. -Definition impl_3__MAX : t_u64 := - Build_t_u64 (t_Constants_f_MAX). +Definition impl__i16__BITS : t_u32_t := + C_u32 impl_83__BITS. -Definition impl_3__MIN : t_u64 := - Build_t_u64 (t_Constants_f_MIN). +Definition impl__i32__BITS : t_u32_t := + C_u32 impl_69__BITS. -Definition impl__MAX : t_u8 := - Build_t_u8 (t_Constants_f_MAX). +Definition impl__i64__BITS : t_u32_t := + C_u32 impl_55__BITS. -Definition impl__MIN : t_u8 := - Build_t_u8 (t_Constants_f_MIN). +Definition impl__i128__BITS : t_u32_t := + C_u32 impl_41__BITS. -Definition impl_5__MAX : t_usize := - Build_t_usize (t_Constants_f_MAX). +Definition impl__isize__BITS : t_u32_t := + C_u32 impl_55__BITS. -Definition impl_5__MIN : t_usize := - Build_t_usize (t_Constants_f_MIN). +Definition impl_6__BITS : t_u32_t := + C_u32 impl_219__BITS. -Definition impl__overflowing_add (self : t_u8) (rhs : t_u8) : (t_u8*bool) := - add_with_overflow_u8 (self) (rhs). +Definition impl_7__BITS : t_u32_t := + C_u32 impl_192__BITS. -Definition impl_1__overflowing_add (self : t_u16) (rhs : t_u16) : (t_u16*bool) := - add_with_overflow_u16 (self) (rhs). +Definition impl_8__BITS : t_u32_t := + C_u32 impl_165__BITS. -Definition impl_2__overflowing_add (self : t_u32) (rhs : t_u32) : (t_u32*bool) := - add_with_overflow_u32 (self) (rhs). +Definition impl_8__MAX : t_u32_t := + C_u32 f_MAX. -Definition impl_3__overflowing_add (self : t_u64) (rhs : t_u64) : (t_u64*bool) := - add_with_overflow_u64 (self) (rhs). +Definition impl_8__MIN : t_u32_t := + C_u32 f_MIN. -Definition impl_4__overflowing_add (self : t_u128) (rhs : t_u128) : (t_u128*bool) := - add_with_overflow_u128 (self) (rhs). +Definition impl_8__from_le (x : t_u32_t) : t_u32_t := + x. -Definition impl_5__overflowing_add (self : t_usize) (rhs : t_usize) : (t_usize*bool) := - add_with_overflow_usize (self) (rhs). +Definition impl_8__to_le (self : t_u32_t) : t_u32_t := + self. -(* Definition impl__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 1%N))) : t_u8 := *) -(* let ret := t_Constants_f_ZERO in *) -(* let index := t_Constants_f_ZERO in *) -(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 1%N)) (fun '(index,ret) _ => *) -(* true) ((index,ret)) (fun '(index,ret) i => *) -(* let val_i : t_U8 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) -(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) -(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) -(* (index,ret)) in *) -(* Build_t_u8 (ret). *) +Definition impl_9__BITS : t_u32_t := + C_u32 impl_138__BITS. -(* Definition impl__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 1%N))) : t_u8 := *) -(* impl__from_le_bytes (impl_2__reverse (bytes)). *) +Definition impl_10__BITS : t_u32_t := + C_u32 impl_111__BITS. -Definition impl__wrapping_add (self : t_u8) (rhs : t_u8) : t_u8 := - wrapping_add_u8 (self) (rhs). +Definition impl_11__BITS : t_u32_t := + C_u32 impl_138__BITS. -Definition impl__wrapping_mul (self : t_u8) (rhs : t_u8) : t_u8 := - wrapping_mul_u8 (self) (rhs). +Definition impl_9__MAX : t_u64_t := + C_u64 f_MAX. -(* Definition impl_1__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 2%N))) : t_u16 := *) -(* let ret := t_Constants_f_ZERO in *) -(* let index := t_Constants_f_ZERO in *) -(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 2%N)) (fun '(index,ret) _ => *) -(* true) ((index,ret)) (fun '(index,ret) i => *) -(* let val_i : t_U16 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) -(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) -(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) -(* (index,ret)) in *) -(* Build_t_u16 (ret). *) +Definition impl_9__MIN : t_u64_t := + C_u64 f_MIN. -(* Definition impl_1__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 2%N))) : t_u16 := *) -(* impl_1__from_le_bytes (impl_2__reverse (bytes)). *) +Definition impl_9__from_le (x : t_u64_t) : t_u64_t := + x. -Definition impl_1__wrapping_add (self : t_u16) (rhs : t_u16) : t_u16 := - wrapping_add_u16 (self) (rhs). +Definition impl_9__to_le (self : t_u64_t) : t_u64_t := + self. -Definition impl_1__wrapping_mul (self : t_u16) (rhs : t_u16) : t_u16 := - wrapping_mul_u16 (self) (rhs). +Definition impl_6__MAX : t_u8_t := + C_u8 f_MAX. -(* Definition impl_2__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 4%N))) : t_u32 := *) -(* let ret := t_Constants_f_ZERO in *) -(* let index := t_Constants_f_ZERO in *) -(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 4%N)) (fun '(index,ret) _ => *) -(* true) ((index,ret)) (fun '(index,ret) i => *) -(* let val_i : t_U32 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) -(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) -(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) -(* (index,ret)) in *) -(* Build_t_u32 (ret). *) +Definition impl_6__MIN : t_u8_t := + C_u8 f_MIN. -(* Definition impl_2__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 4%N))) : t_u32 := *) -(* impl_2__from_le_bytes (impl_2__reverse (bytes)). *) +Definition impl_6__from_le (x : t_u8_t) : t_u8_t := + x. -Definition impl_2__wrapping_add (self : t_u32) (rhs : t_u32) : t_u32 := - wrapping_add_u32 (self) (rhs). +Definition impl_6__to_le (self : t_u8_t) : t_u8_t := + self. -Definition impl_2__wrapping_mul (self : t_u32) (rhs : t_u32) : t_u32 := - wrapping_mul_u32 (self) (rhs). +Definition impl_11__MAX : t_usize_t := + C_usize f_MAX. -(* Definition impl_3__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 8%N))) : t_u64 := *) -(* let ret := t_Constants_f_ZERO in *) -(* let index := t_Constants_f_ZERO in *) -(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 8%N)) (fun '(index,ret) _ => *) -(* true) ((index,ret)) (fun '(index,ret) i => *) -(* let val_i : t_U64 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) -(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) -(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) -(* (index,ret)) in *) -(* Build_t_u64 (ret). *) +Definition impl_11__MIN : t_usize_t := + C_usize f_MIN. -(* Definition impl_3__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 8%N))) : t_u64 := *) -(* impl_3__from_le_bytes (impl_2__reverse (bytes)). *) +Definition impl_11__from_le (x : t_usize_t) : t_usize_t := + x. -Definition impl_3__wrapping_add (self : t_u64) (rhs : t_u64) : t_u64 := - wrapping_add_u64 (self) (rhs). +Definition impl_11__to_le (self : t_usize_t) : t_usize_t := + self. -Definition impl_3__wrapping_mul (self : t_u64) (rhs : t_u64) : t_u64 := - wrapping_mul_u64 (self) (rhs). +Definition impl_6__checked_add (self : t_u8_t) (rhs : t_u8_t) : t_Option_t t_u8_t := + Option_Some (unchecked_add_u8 self rhs). -(* Definition impl_4__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 16%N))) : t_u128 := *) -(* let ret := t_Constants_f_ZERO in *) -(* let index := t_Constants_f_ZERO in *) -(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 16%N)) (fun '(index,ret) _ => *) -(* true) ((index,ret)) (fun '(index,ret) i => *) -(* let val_i : t_U128 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) -(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) -(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) -(* (index,ret)) in *) -(* Build_t_u128 (ret). *) +Definition impl_7__checked_add (self : t_u16_t) (rhs : t_u16_t) : t_Option_t t_u16_t := + Option_Some (unchecked_add_u16 self rhs). -(* Definition impl_4__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 16%N))) : t_u128 := *) -(* impl_4__from_le_bytes (impl_2__reverse (bytes)). *) +Definition impl_8__checked_add (self : t_u32_t) (rhs : t_u32_t) : t_Option_t t_u32_t := + Option_Some (unchecked_add_u32 self rhs). -Definition impl_4__wrapping_add (self : t_u128) (rhs : t_u128) : t_u128 := - wrapping_add_u128 (self) (rhs). +Definition impl_9__checked_add (self : t_u64_t) (rhs : t_u64_t) : t_Option_t t_u64_t := + Option_Some (unchecked_add_u64 self rhs). -Definition impl_4__wrapping_mul (self : t_u128) (rhs : t_u128) : t_u128 := - wrapping_mul_u128 (self) (rhs). +Definition impl_10__checked_add (self : t_u128_t) (rhs : t_u128_t) : t_Option_t t_u128_t := + Option_Some (unchecked_add_u128 self rhs). -(* Definition impl_5__from_le_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 8%N))) : t_usize := *) -(* let ret := t_Constants_f_ZERO in *) -(* let index := t_Constants_f_ZERO in *) -(* let '(index,ret) := fold_range (Build_t_usize (Build_t_U64 0%N)) (Build_t_usize (Build_t_U64 8%N)) (fun '(index,ret) _ => *) -(* true) ((index,ret)) (fun '(index,ret) i => *) -(* let val_i : t_U64 := t_Into_f_into (t_u8_0 impl_2__index (t_Clone_f_clone (bytes)) (i)) in *) -(* let ret := t_Add_f_add (ret) (t_Shl_f_shl (val_i) (t_Mul_f_mul (impl_21__BITS) (t_Clone_f_clone (index)))) in *) -(* let index := t_Add_f_add (index) (t_Constants_f_ONE) in *) -(* (index,ret)) in *) -(* Build_t_usize (ret). *) +Definition impl_11__checked_add (self : t_usize_t) (rhs : t_usize_t) : t_Option_t t_usize_t := + Option_Some (unchecked_add_usize self rhs). -(* Definition impl_5__from_be_bytes (bytes : t_Array (t_u8) (Build_t_usize (Build_t_U64 8%N))) : t_usize := *) -(* impl_5__from_le_bytes (impl_2__reverse (bytes)). *) +Definition impl__i128__MAX : t_i128_t := + C_i128 f_MAX. -Definition impl_5__wrapping_add (self : t_usize) (rhs : t_usize) : t_usize := - wrapping_add_usize (self) (rhs). +Definition impl__i128__MIN : t_i128_t := + C_i128 f_MIN. -Definition impl_5__wrapping_mul (self : t_usize) (rhs : t_usize) : t_usize := - wrapping_mul_usize (self) (rhs). +Definition impl__i16__MAX : t_i16_t := + C_i16 f_MAX. -Definition impl__wrapping_sub (self : t_u8) (rhs : t_u8) : t_u8 := - wrapping_sub_u8 (self) (rhs). +Definition impl__i16__MIN : t_i16_t := + C_i16 f_MIN. -Definition impl__wrapping_neg (self : t_u8) : t_u8 := - impl__wrapping_sub (Build_t_u8 (t_Constants_f_ZERO)) (self). +Definition impl__i32__MAX : t_i32_t := + C_i32 f_MAX. -Definition impl_1__wrapping_sub (self : t_u16) (rhs : t_u16) : t_u16 := - wrapping_sub_u16 (self) (rhs). +Definition impl__i32__MIN : t_i32_t := + C_i32 f_MIN. -Definition impl_1__wrapping_neg (self : t_u16) : t_u16 := - impl_1__wrapping_sub (Build_t_u16 (t_Constants_f_ZERO)) (self). +Definition impl__i64__MAX : t_i64_t := + C_i64 f_MAX. -Definition impl_2__wrapping_sub (self : t_u32) (rhs : t_u32) : t_u32 := - wrapping_sub_u32 (self) (rhs). +Definition impl__i64__MIN : t_i64_t := + C_i64 f_MIN. -Definition impl_2__wrapping_neg (self : t_u32) : t_u32 := - impl_2__wrapping_sub (Build_t_u32 (t_Constants_f_ZERO)) (self). +Definition impl__i8__MAX : t_i8_t := + C_i8 f_MAX. -Definition impl_3__wrapping_sub (self : t_u64) (rhs : t_u64) : t_u64 := - wrapping_sub_u64 (self) (rhs). +Definition impl__i8__MIN : t_i8_t := + C_i8 f_MIN. -Definition impl_3__wrapping_neg (self : t_u64) : t_u64 := - impl_3__wrapping_sub (Build_t_u64 (t_Constants_f_ZERO)) (self). +Definition impl__isize__MAX : t_isize_t := + C_isize f_MAX. -Definition impl_4__wrapping_sub (self : t_u128) (rhs : t_u128) : t_u128 := - wrapping_sub_u128 (self) (rhs). +Definition impl__isize__MIN : t_isize_t := + C_isize f_MIN. -Definition impl_4__wrapping_neg (self : t_u128) : t_u128 := - impl_4__wrapping_sub (Build_t_u128 (t_Constants_f_ZERO)) (self). +Definition impl__i8__is_negative (self : t_i8_t) : bool := + self<.?(f_into (@repr WORDSIZE8 0)). -Definition impl_5__wrapping_sub (self : t_usize) (rhs : t_usize) : t_usize := - wrapping_sub_usize (self) (rhs). +Definition impl__i8__is_positive (self : t_i8_t) : bool := + self>.?(f_into (@repr WORDSIZE8 0)). -Definition impl_5__wrapping_neg (self : t_usize) : t_usize := - impl_5__wrapping_sub (Build_t_usize (t_Constants_f_ZERO)) (self). +Definition impl__i8__signum (self : t_i8_t) : t_i8_t := + if (f_clone self)<.?(f_into (@repr WORDSIZE8 0)) + then f_into (@repr WORDSIZE8 1) + else if self=.?(f_into (@repr WORDSIZE8 0)) + then f_into (@repr WORDSIZE8 0) + else f_into (@repr WORDSIZE8 1). -Definition impl__wrapping_rem (self : t_u8) (rhs : t_u8) : t_u8 := - t_Rem_f_rem (self) (rhs). +Definition impl__i16__is_negative (self : t_i16_t) : bool := + self<.?(f_into (@repr WORDSIZE16 0)). -Definition impl__wrapping_rem_euclid (self : t_u8) (rhs : t_u8) : t_u8 := - t_Rem_f_rem (self) (rhs). +Definition impl__i16__is_positive (self : t_i16_t) : bool := + self>.?(f_into (@repr WORDSIZE16 0)). -Definition impl__wrapping_div (self : t_u8) (rhs : t_u8) : t_u8 := - t_Div_f_div (self) (rhs). +Definition impl__i16__signum (self : t_i16_t) : t_i16_t := + if (f_clone self)<.?(f_into (@repr WORDSIZE16 0)) + then f_into (@repr WORDSIZE16 1) + else if self=.?(f_into (@repr WORDSIZE16 0)) + then f_into (@repr WORDSIZE16 0) + else f_into (@repr WORDSIZE16 1). -Definition impl__wrapping_div_euclid (self : t_u8) (rhs : t_u8) : t_u8 := - t_Div_f_div (self) (rhs). +Definition impl__i32__is_negative (self : t_i32_t) : bool := + self<.?(f_into (@repr WORDSIZE32 0)). -Definition impl_1__wrapping_rem (self : t_u16) (rhs : t_u16) : t_u16 := - t_Rem_f_rem (self) (rhs). +Definition impl__i32__is_positive (self : t_i32_t) : bool := + self>.?(f_into (@repr WORDSIZE32 0)). -Definition impl_1__wrapping_rem_euclid (self : t_u16) (rhs : t_u16) : t_u16 := - t_Rem_f_rem (self) (rhs). +Definition impl__i32__signum (self : t_i32_t) : t_i32_t := + if (f_clone self)<.?(f_into (@repr WORDSIZE32 0)) + then f_into (@repr WORDSIZE32 1) + else if self=.?(f_into (@repr WORDSIZE32 0)) + then f_into (@repr WORDSIZE32 0) + else f_into (@repr WORDSIZE32 1). -Definition impl_1__wrapping_div (self : t_u16) (rhs : t_u16) : t_u16 := - t_Div_f_div (self) (rhs). +Definition impl__i64__is_negative (self : t_i64_t) : bool := + self<.?(f_into (@repr WORDSIZE64 0)). -Definition impl_1__wrapping_div_euclid (self : t_u16) (rhs : t_u16) : t_u16 := - t_Div_f_div (self) (rhs). +Definition impl__i64__is_positive (self : t_i64_t) : bool := + self>.?(f_into (@repr WORDSIZE64 0)). -Definition impl_2__wrapping_rem (self : t_u32) (rhs : t_u32) : t_u32 := - t_Rem_f_rem (self) (rhs). +Definition impl__i64__signum (self : t_i64_t) : t_i64_t := + if (f_clone self)<.?(f_into (@repr WORDSIZE64 0)) + then f_into (@repr WORDSIZE64 1) + else if self=.?(f_into (@repr WORDSIZE64 0)) + then f_into (@repr WORDSIZE64 0) + else f_into (@repr WORDSIZE64 1). -Definition impl_2__wrapping_rem_euclid (self : t_u32) (rhs : t_u32) : t_u32 := - t_Rem_f_rem (self) (rhs). +Definition impl__i128__is_negative (self : t_i128_t) : bool := + self<.?(f_into (@repr WORDSIZE128 0)). -Definition impl_2__wrapping_div (self : t_u32) (rhs : t_u32) : t_u32 := - t_Div_f_div (self) (rhs). +Definition impl__i128__is_positive (self : t_i128_t) : bool := + self>.?(f_into (@repr WORDSIZE128 0)). -Definition impl_2__wrapping_div_euclid (self : t_u32) (rhs : t_u32) : t_u32 := - t_Div_f_div (self) (rhs). +Definition impl__i128__signum (self : t_i128_t) : t_i128_t := + if (f_clone self)<.?(f_into (@repr WORDSIZE128 0)) + then f_into (@repr WORDSIZE128 1) + else if self=.?(f_into (@repr WORDSIZE128 0)) + then f_into (@repr WORDSIZE128 0) + else f_into (@repr WORDSIZE128 1). -Definition impl_3__wrapping_rem (self : t_u64) (rhs : t_u64) : t_u64 := - t_Rem_f_rem (self) (rhs). +Definition impl__isize__is_negative (self : t_isize_t) : bool := + self<.?(f_into (@repr WORDSIZE32 0)). -Definition impl_3__wrapping_rem_euclid (self : t_u64) (rhs : t_u64) : t_u64 := - t_Rem_f_rem (self) (rhs). +Definition impl__isize__is_positive (self : t_isize_t) : bool := + self>.?(f_into (@repr WORDSIZE32 0)). -Definition impl_3__wrapping_div (self : t_u64) (rhs : t_u64) : t_u64 := - t_Div_f_div (self) (rhs). +Definition impl__isize__signum (self : t_isize_t) : t_isize_t := + if (f_clone self)<.?(f_into (@repr WORDSIZE32 0)) + then f_into (@repr WORDSIZE32 1) + else if self=.?(f_into (@repr WORDSIZE32 0)) + then f_into (@repr WORDSIZE32 0) + else f_into (@repr WORDSIZE32 1). -Definition impl_3__wrapping_div_euclid (self : t_u64) (rhs : t_u64) : t_u64 := - t_Div_f_div (self) (rhs). +Definition impl__i8__wrapping_add (self : t_i8_t) (rhs : t_i8_t) : t_i8_t := + wrapping_add_i8 self rhs. -Definition impl_4__wrapping_rem (self : t_u128) (rhs : t_u128) : t_u128 := - t_Rem_f_rem (self) (rhs). +Definition impl__i8__wrapping_sub (self : t_i8_t) (rhs : t_i8_t) : t_i8_t := + wrapping_sub_i8 self rhs. -Definition impl_4__wrapping_rem_euclid (self : t_u128) (rhs : t_u128) : t_u128 := - t_Rem_f_rem (self) (rhs). +Definition impl__i8__wrapping_neg (self : t_i8_t) : t_i8_t := + impl__i8__wrapping_sub (f_into (@repr WORDSIZE8 0)) self. -Definition impl_4__wrapping_div (self : t_u128) (rhs : t_u128) : t_u128 := - t_Div_f_div (self) (rhs). +Definition impl__i8__wrapping_abs (self : t_i8_t) : t_i8_t := + if impl__i8__is_negative (f_clone self) + then impl__i8__wrapping_neg self + else self. -Definition impl_4__wrapping_div_euclid (self : t_u128) (rhs : t_u128) : t_u128 := - t_Div_f_div (self) (rhs). +Definition impl__i16__wrapping_add (self : t_i16_t) (rhs : t_i16_t) : t_i16_t := + wrapping_add_i16 self rhs. -Definition impl_5__wrapping_rem (self : t_usize) (rhs : t_usize) : t_usize := - t_Rem_f_rem (self) (rhs). +Definition impl__i16__wrapping_sub (self : t_i16_t) (rhs : t_i16_t) : t_i16_t := + wrapping_sub_i16 self rhs. -Definition impl_5__wrapping_rem_euclid (self : t_usize) (rhs : t_usize) : t_usize := - t_Rem_f_rem (self) (rhs). +Definition impl__i16__wrapping_neg (self : t_i16_t) : t_i16_t := + impl__i16__wrapping_sub (f_into (@repr WORDSIZE16 0)) self. -Definition impl_5__wrapping_div (self : t_usize) (rhs : t_usize) : t_usize := - t_Div_f_div (self) (rhs). +Definition impl__i16__wrapping_abs (self : t_i16_t) : t_i16_t := + if impl__i16__is_negative (f_clone self) + then impl__i16__wrapping_neg self + else self. -Definition impl_5__wrapping_div_euclid (self : t_usize) (rhs : t_usize) : t_usize := - t_Div_f_div (self) (rhs). +Definition impl__i32__wrapping_add (self : t_i32_t) (rhs : t_i32_t) : t_i32_t := + wrapping_add_i32 self rhs. + +Definition impl__i32__wrapping_sub (self : t_i32_t) (rhs : t_i32_t) : t_i32_t := + wrapping_sub_i32 self rhs. + +Definition impl__i32__wrapping_neg (self : t_i32_t) : t_i32_t := + impl__i32__wrapping_sub (f_into (@repr WORDSIZE32 0)) self. + +Definition impl__i32__wrapping_abs (self : t_i32_t) : t_i32_t := + if impl__i32__is_negative (f_clone self) + then impl__i32__wrapping_neg self + else self. + +Definition impl__i64__wrapping_add (self : t_i64_t) (rhs : t_i64_t) : t_i64_t := + wrapping_add_i64 self rhs. + +Definition impl__i64__wrapping_sub (self : t_i64_t) (rhs : t_i64_t) : t_i64_t := + wrapping_sub_i64 self rhs. + +Definition impl__i64__wrapping_neg (self : t_i64_t) : t_i64_t := + impl__i64__wrapping_sub (f_into (@repr WORDSIZE64 0)) self. + +Definition impl__i64__wrapping_abs (self : t_i64_t) : t_i64_t := + if impl__i64__is_negative (f_clone self) + then impl__i64__wrapping_neg self + else self. + +Definition impl__i128__wrapping_add (self : t_i128_t) (rhs : t_i128_t) : t_i128_t := + wrapping_add_i128 self rhs. + +Definition impl__i128__wrapping_sub (self : t_i128_t) (rhs : t_i128_t) : t_i128_t := + wrapping_sub_i128 self rhs. + +Definition impl__i128__wrapping_neg (self : t_i128_t) : t_i128_t := + impl__i128__wrapping_sub (f_into (@repr WORDSIZE128 0)) self. + +Definition impl__i128__wrapping_abs (self : t_i128_t) : t_i128_t := + if impl__i128__is_negative (f_clone self) + then impl__i128__wrapping_neg self + else self. + +Definition impl__isize__wrapping_add (self : t_isize_t) (rhs : t_isize_t) : t_isize_t := + wrapping_add_isize self rhs. + +Definition impl__isize__wrapping_sub (self : t_isize_t) (rhs : t_isize_t) : t_isize_t := + wrapping_sub_isize self rhs. + +Definition impl__isize__wrapping_neg (self : t_isize_t) : t_isize_t := + impl__isize__wrapping_sub (f_into (@repr WORDSIZE32 0)) self. + +Definition impl__isize__wrapping_abs (self : t_isize_t) : t_isize_t := + if impl__isize__is_negative (f_clone self) + then impl__isize__wrapping_neg self + else self. + +Definition impl_6__checked_div (self : t_u8_t) (rhs : t_u8_t) : t_Option_t t_u8_t := + if rhs=.?(f_into (@repr WORDSIZE8 0)) + then Option_Nonet_Option_t t_u8_t + else Option_Some (unchecked_div_u8 self rhs). + +Definition impl_6__overflowing_add (self : t_u8_t) (rhs : t_u8_t) : t_u8_t × bool := + add_with_overflow_u8 self rhs. + +Definition impl_7__checked_div (self : t_u16_t) (rhs : t_u16_t) : t_Option_t t_u16_t := + if rhs=.?(f_into (@repr WORDSIZE16 0)) + then Option_Nonet_Option_t t_u16_t + else Option_Some (unchecked_div_u16 self rhs). + +Definition impl_7__overflowing_add (self : t_u16_t) (rhs : t_u16_t) : t_u16_t × bool := + add_with_overflow_u16 self rhs. + +Definition impl_8__checked_div (self : t_u32_t) (rhs : t_u32_t) : t_Option_t t_u32_t := + if rhs=.?(f_into (@repr WORDSIZE32 0)) + then Option_Nonet_Option_t t_u32_t + else Option_Some (unchecked_div_u32 self rhs). + +Definition impl_8__overflowing_add (self : t_u32_t) (rhs : t_u32_t) : t_u32_t × bool := + add_with_overflow_u32 self rhs. + +Definition impl_9__checked_div (self : t_u64_t) (rhs : t_u64_t) : t_Option_t t_u64_t := + if rhs=.?(f_into (@repr WORDSIZE64 0)) + then Option_Nonet_Option_t t_u64_t + else Option_Some (unchecked_div_u64 self rhs). + +Definition impl_9__overflowing_add (self : t_u64_t) (rhs : t_u64_t) : t_u64_t × bool := + add_with_overflow_u64 self rhs. + +Definition impl_10__checked_div (self : t_u128_t) (rhs : t_u128_t) : t_Option_t t_u128_t := + if rhs=.?(f_into (@repr WORDSIZE128 0)) + then Option_Nonet_Option_t t_u128_t + else Option_Some (unchecked_div_u128 self rhs). + +Definition impl_10__overflowing_add (self : t_u128_t) (rhs : t_u128_t) : t_u128_t × bool := + add_with_overflow_u128 self rhs. + +Definition impl_11__checked_div (self : t_usize_t) (rhs : t_usize_t) : t_Option_t t_usize_t := + if rhs=.?(f_into (@repr WORDSIZE32 0)) + then Option_Nonet_Option_t t_usize_t + else Option_Some (unchecked_div_usize self rhs). + +Definition impl_11__overflowing_add (self : t_usize_t) (rhs : t_usize_t) : t_usize_t × bool := + add_with_overflow_usize self rhs. + +Definition impl_6__wrapping_add (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := + wrapping_add_u8 self rhs. + +Definition impl_6__wrapping_mul (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := + wrapping_mul_u8 self rhs. + +Definition impl_7__wrapping_add (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := + wrapping_add_u16 self rhs. + +Definition impl_7__wrapping_mul (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := + wrapping_mul_u16 self rhs. + +Definition impl_8__wrapping_add (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := + wrapping_add_u32 self rhs. + +Definition impl_8__wrapping_mul (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := + wrapping_mul_u32 self rhs. + +Definition impl_9__wrapping_add (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := + wrapping_add_u64 self rhs. + +Definition impl_9__wrapping_mul (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := + wrapping_mul_u64 self rhs. + +Definition impl_10__wrapping_add (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := + wrapping_add_u128 self rhs. + +Definition impl_10__wrapping_mul (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := + wrapping_mul_u128 self rhs. + +Definition impl_11__wrapping_add (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := + wrapping_add_usize self rhs. + +Definition impl_11__wrapping_mul (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := + wrapping_mul_usize self rhs. + +Definition impl__i8__abs (self : t_i8_t) : t_i8_t := + if impl__i8__is_negative (f_clone self) + then f_neg self + else self. + +Definition impl__i16__abs (self : t_i16_t) : t_i16_t := + if impl__i16__is_negative (f_clone self) + then f_neg self + else self. + +Definition impl__i32__abs (self : t_i32_t) : t_i32_t := + if impl__i32__is_negative (f_clone self) + then f_neg self + else self. + +Definition impl__i64__abs (self : t_i64_t) : t_i64_t := + if impl__i64__is_negative (f_clone self) + then f_neg self + else self. + +Definition impl__i128__abs (self : t_i128_t) : t_i128_t := + if impl__i128__is_negative (f_clone self) + then f_neg self + else self. + +Definition impl__isize__abs (self : t_isize_t) : t_isize_t := + if impl__isize__is_negative (f_clone self) + then f_neg self + else self. + +Definition impl_6__wrapping_sub (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := + wrapping_sub_u8 self rhs. + +Definition impl_6__wrapping_neg (self : t_u8_t) : t_u8_t := + impl_6__wrapping_sub (C_u8 f_ZERO) self. + +Definition impl_7__wrapping_sub (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := + wrapping_sub_u16 self rhs. + +Definition impl_7__wrapping_neg (self : t_u16_t) : t_u16_t := + impl_7__wrapping_sub (C_u16 f_ZERO) self. + +Definition impl_8__wrapping_sub (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := + wrapping_sub_u32 self rhs. + +Definition impl_8__wrapping_neg (self : t_u32_t) : t_u32_t := + impl_8__wrapping_sub (C_u32 f_ZERO) self. + +Definition impl_9__wrapping_sub (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := + wrapping_sub_u64 self rhs. + +Definition impl_9__wrapping_neg (self : t_u64_t) : t_u64_t := + impl_9__wrapping_sub (C_u64 f_ZERO) self. + +Definition impl_10__wrapping_sub (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := + wrapping_sub_u128 self rhs. + +Definition impl_10__wrapping_neg (self : t_u128_t) : t_u128_t := + impl_10__wrapping_sub (C_u128 f_ZERO) self. + +Definition impl_11__wrapping_sub (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := + wrapping_sub_usize self rhs. + +Definition impl_11__wrapping_neg (self : t_usize_t) : t_usize_t := + impl_11__wrapping_sub (C_usize f_ZERO) self. + +Definition impl_6__wrapping_div (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := + self./rhs. + +Definition impl_6__wrapping_div_euclid (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := + self./rhs. + +Definition impl_7__wrapping_div (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := + self./rhs. + +Definition impl_7__wrapping_div_euclid (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := + self./rhs. + +Definition impl_8__wrapping_div (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := + self./rhs. + +Definition impl_8__wrapping_div_euclid (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := + self./rhs. + +Definition impl_9__wrapping_div (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := + self./rhs. + +Definition impl_9__wrapping_div_euclid (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := + self./rhs. + +Definition impl_10__wrapping_div (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := + self./rhs. + +Definition impl_10__wrapping_div_euclid (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := + self./rhs. + +Definition impl_11__wrapping_div (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := + self./rhs. + +Definition impl_11__wrapping_div_euclid (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := + self./rhs. + +Definition impl_6__wrapping_rem (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := + self.%rhs. + +Definition impl_6__wrapping_rem_euclid (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := + self.%rhs. + +Definition impl_7__wrapping_rem (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := + self.%rhs. + +Definition impl_7__wrapping_rem_euclid (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := + self.%rhs. + +Definition impl_8__wrapping_rem (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := + self.%rhs. + +Definition impl_8__wrapping_rem_euclid (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := + self.%rhs. + +Definition impl_9__wrapping_rem (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := + self.%rhs. + +Definition impl_9__wrapping_rem_euclid (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := + self.%rhs. + +Definition impl_10__wrapping_rem (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := + self.%rhs. + +Definition impl_10__wrapping_rem_euclid (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := + self.%rhs. + +Definition impl_11__wrapping_rem (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := + self.%rhs. + +Definition impl_11__wrapping_rem_euclid (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := + self.%rhs. + +Definition impl_6__rotate_left (self : t_u8_t) (n : t_u32_t) : t_u8_t := + run (let hoist1 := ControlFlow_Break (rotate_left_u8 self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist1)). + +Definition impl_6__rotate_right (self : t_u8_t) (n : t_u32_t) : t_u8_t := + run (let hoist2 := ControlFlow_Break (rotate_right_u8 self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist2)). + +Definition impl_7__rotate_left (self : t_u16_t) (n : t_u32_t) : t_u16_t := + run (let hoist3 := ControlFlow_Break (rotate_left_u16 self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist3)). + +Definition impl_7__rotate_right (self : t_u16_t) (n : t_u32_t) : t_u16_t := + run (let hoist4 := ControlFlow_Break (rotate_right_u16 self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist4)). + +Definition impl_8__rotate_left (self : t_u32_t) (n : t_u32_t) : t_u32_t := + run (let hoist5 := ControlFlow_Break (rotate_left_u32 self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist5)). + +Definition impl_8__rotate_right (self : t_u32_t) (n : t_u32_t) : t_u32_t := + run (let hoist6 := ControlFlow_Break (rotate_right_u32 self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist6)). + +Definition impl_9__rotate_left (self : t_u64_t) (n : t_u32_t) : t_u64_t := + run (let hoist7 := ControlFlow_Break (rotate_left_u64 self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist7)). + +Definition impl_9__rotate_right (self : t_u64_t) (n : t_u32_t) : t_u64_t := + run (let hoist8 := ControlFlow_Break (rotate_right_u64 self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist8)). + +Definition impl_10__rotate_left (self : t_u128_t) (n : t_u32_t) : t_u128_t := + run (let hoist9 := ControlFlow_Break (rotate_left_u128 self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist9)). + +Definition impl_10__rotate_right (self : t_u128_t) (n : t_u32_t) : t_u128_t := + run (let hoist10 := ControlFlow_Break (rotate_right_u128 self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist10)). + +Definition impl_11__rotate_left (self : t_usize_t) (n : t_u32_t) : t_usize_t := + run (let hoist11 := ControlFlow_Break (rotate_left_usize self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist11)). + +Definition impl_11__rotate_right (self : t_usize_t) (n : t_u32_t) : t_usize_t := + run (let hoist12 := ControlFlow_Break (rotate_right_usize self n) : t_Never_t in + ControlFlow_Continue (never_to_any hoist12)). + +Definition impl_6__count_ones (self : t_u8_t) : t_u32_t := + run (let hoist13 := ControlFlow_Break (ctpop_u8 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist13)). + +Definition impl_6__leading_zeros (self : t_u8_t) : t_u32_t := + run (let hoist14 := ControlFlow_Break (ctlz_u8 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist14)). + +Definition impl_6__swap_bytes (self : t_u8_t) : t_u8_t := + f_into (bswap_u8 self). + +Definition impl_6__from_be (x : t_u8_t) : t_u8_t := + impl_6__swap_bytes x. + +Definition impl_6__to_be (self : t_u8_t) : t_u8_t := + impl_6__swap_bytes self. + +Definition impl_6__trailing_zeros (self : t_u8_t) : t_u32_t := + run (let hoist15 := ControlFlow_Break (cttz_u8 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist15)). + +Definition impl_7__count_ones (self : t_u16_t) : t_u32_t := + run (let hoist16 := ControlFlow_Break (ctpop_u16 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist16)). + +Definition impl_7__leading_zeros (self : t_u16_t) : t_u32_t := + run (let hoist17 := ControlFlow_Break (ctlz_u16 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist17)). + +Definition impl_7__swap_bytes (self : t_u16_t) : t_u16_t := + f_into (bswap_u16 self). + +Definition impl_7__from_be (x : t_u16_t) : t_u16_t := + impl_7__swap_bytes x. + +Definition impl_7__to_be (self : t_u16_t) : t_u16_t := + impl_7__swap_bytes self. + +Definition impl_7__trailing_zeros (self : t_u16_t) : t_u32_t := + run (let hoist18 := ControlFlow_Break (cttz_u16 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist18)). + +Definition impl_8__count_ones (self : t_u32_t) : t_u32_t := + run (let hoist19 := ControlFlow_Break (ctpop_u32 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist19)). + +Definition impl_8__leading_zeros (self : t_u32_t) : t_u32_t := + run (let hoist20 := ControlFlow_Break (ctlz_u32 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist20)). + +Definition impl_8__swap_bytes (self : t_u32_t) : t_u32_t := + f_into (bswap_u32 self). + +Definition impl_8__from_be (x : t_u32_t) : t_u32_t := + impl_8__swap_bytes x. + +Definition impl_8__to_be (self : t_u32_t) : t_u32_t := + impl_8__swap_bytes self. + +Definition impl_8__trailing_zeros (self : t_u32_t) : t_u32_t := + run (let hoist21 := ControlFlow_Break (cttz_u32 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist21)). + +Definition impl_9__count_ones (self : t_u64_t) : t_u32_t := + run (let hoist22 := ControlFlow_Break (ctpop_u64 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist22)). + +Definition impl_9__leading_zeros (self : t_u64_t) : t_u32_t := + run (let hoist23 := ControlFlow_Break (ctlz_u64 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist23)). + +Definition impl_9__swap_bytes (self : t_u64_t) : t_u64_t := + f_into (bswap_u64 self). + +Definition impl_9__from_be (x : t_u64_t) : t_u64_t := + impl_9__swap_bytes x. + +Definition impl_9__to_be (self : t_u64_t) : t_u64_t := + impl_9__swap_bytes self. + +Definition impl_9__trailing_zeros (self : t_u64_t) : t_u32_t := + run (let hoist24 := ControlFlow_Break (cttz_u64 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist24)). + +Definition impl_10__count_ones (self : t_u128_t) : t_u32_t := + run (let hoist25 := ControlFlow_Break (ctpop_u128 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist25)). + +Definition impl_10__leading_zeros (self : t_u128_t) : t_u32_t := + run (let hoist26 := ControlFlow_Break (ctlz_u128 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist26)). + +Definition impl_10__swap_bytes (self : t_u128_t) : t_u128_t := + f_into (bswap_u128 self). + +Definition impl_10__from_be (x : t_u128_t) : t_u128_t := + impl_10__swap_bytes x. + +Definition impl_10__to_be (self : t_u128_t) : t_u128_t := + impl_10__swap_bytes self. + +Definition impl_10__trailing_zeros (self : t_u128_t) : t_u32_t := + run (let hoist27 := ControlFlow_Break (cttz_u128 self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist27)). + +Definition impl_11__count_ones (self : t_usize_t) : t_u32_t := + run (let hoist28 := ControlFlow_Break (ctpop_usize self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist28)). + +Definition impl_11__leading_zeros (self : t_usize_t) : t_u32_t := + run (let hoist29 := ControlFlow_Break (ctlz_usize self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist29)). + +Definition impl_11__swap_bytes (self : t_usize_t) : t_usize_t := + f_into (bswap_usize self). + +Definition impl_11__from_be (x : t_usize_t) : t_usize_t := + impl_11__swap_bytes x. + +Definition impl_11__to_be (self : t_usize_t) : t_usize_t := + impl_11__swap_bytes self. + +Definition impl_11__trailing_zeros (self : t_usize_t) : t_u32_t := + run (let hoist30 := ControlFlow_Break (cttz_usize self) : t_Never_t in + ControlFlow_Continue (never_to_any hoist30)). + +Definition impl__i8__rem_euclid (self : t_i8_t) (rhs : t_i8_t) : t_i8_t := + let r := self.%(f_clone rhs) : t_i8_t in + if r<.?(f_into (@repr WORDSIZE8 0)) + then impl__i8__wrapping_add r (impl__i8__wrapping_abs rhs) + else r. + +Definition impl__i16__rem_euclid (self : t_i16_t) (rhs : t_i16_t) : t_i16_t := + let r := self.%(f_clone rhs) : t_i16_t in + if r<.?(f_into (@repr WORDSIZE16 0)) + then impl__i16__wrapping_add r (impl__i16__wrapping_abs rhs) + else r. + +Definition impl__i32__rem_euclid (self : t_i32_t) (rhs : t_i32_t) : t_i32_t := + let r := self.%(f_clone rhs) : t_i32_t in + if r<.?(f_into (@repr WORDSIZE32 0)) + then impl__i32__wrapping_add r (impl__i32__wrapping_abs rhs) + else r. + +Definition impl__i64__rem_euclid (self : t_i64_t) (rhs : t_i64_t) : t_i64_t := + let r := self.%(f_clone rhs) : t_i64_t in + if r<.?(f_into (@repr WORDSIZE64 0)) + then impl__i64__wrapping_add r (impl__i64__wrapping_abs rhs) + else r. + +Definition impl__i128__rem_euclid (self : t_i128_t) (rhs : t_i128_t) : t_i128_t := + let r := self.%(f_clone rhs) : t_i128_t in + if r<.?(f_into (@repr WORDSIZE128 0)) + then impl__i128__wrapping_add r (impl__i128__wrapping_abs rhs) + else r. + +Definition impl__isize__rem_euclid (self : t_isize_t) (rhs : t_isize_t) : t_isize_t := + let r := self.%(f_clone rhs) : t_isize_t in + if r<.?(f_into (@repr WORDSIZE32 0)) + then impl__isize__wrapping_add r (impl__isize__wrapping_abs rhs) + else r. + +Definition impl_6__count_zeros (self : t_u8_t) : t_u32_t := + impl_6__count_ones (f_not self). + +Definition impl_6__leading_ones (self : t_u8_t) : t_u32_t := + impl_6__leading_zeros (f_not self). + +Definition impl_6__trailing_ones (self : t_u8_t) : t_u32_t := + impl_6__trailing_zeros (f_not self). + +Definition impl_7__count_zeros (self : t_u16_t) : t_u32_t := + impl_7__count_ones (f_not self). + +Definition impl_7__leading_ones (self : t_u16_t) : t_u32_t := + impl_7__leading_zeros (f_not self). + +Definition impl_7__trailing_ones (self : t_u16_t) : t_u32_t := + impl_7__trailing_zeros (f_not self). + +Definition impl_8__count_zeros (self : t_u32_t) : t_u32_t := + impl_8__count_ones (f_not self). + +Definition impl_8__leading_ones (self : t_u32_t) : t_u32_t := + impl_8__leading_zeros (f_not self). + +Definition impl_8__trailing_ones (self : t_u32_t) : t_u32_t := + impl_8__trailing_zeros (f_not self). + +Definition impl_9__count_zeros (self : t_u64_t) : t_u32_t := + impl_9__count_ones (f_not self). + +Definition impl_9__leading_ones (self : t_u64_t) : t_u32_t := + impl_9__leading_zeros (f_not self). + +Definition impl_9__trailing_ones (self : t_u64_t) : t_u32_t := + impl_9__trailing_zeros (f_not self). + +Definition impl_10__count_zeros (self : t_u128_t) : t_u32_t := + impl_10__count_ones (f_not self). + +Definition impl_10__leading_ones (self : t_u128_t) : t_u32_t := + impl_10__leading_zeros (f_not self). + +Definition impl_10__trailing_ones (self : t_u128_t) : t_u32_t := + impl_10__trailing_zeros (f_not self). + +Definition impl_11__count_zeros (self : t_usize_t) : t_u32_t := + impl_11__count_ones (f_not self). + +Definition impl_11__leading_ones (self : t_usize_t) : t_u32_t := + impl_11__leading_zeros (f_not self). + +Definition impl_11__trailing_ones (self : t_usize_t) : t_u32_t := + impl_11__trailing_zeros (f_not self). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Num_Int_macros.v b/proof-libs/coq/coq/generated-core/src/Core_Num_Int_macros.v new file mode 100644 index 000000000..d2a03bcbb --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Num_Int_macros.v @@ -0,0 +1,8 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v b/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v new file mode 100644 index 000000000..d2a03bcbb --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v @@ -0,0 +1,8 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops.v b/proof-libs/coq/coq/generated-core/src/Core_Ops.v index f3f969e13..c07523131 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops.v @@ -1,52 +1,63 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. -From Core Require Import Core_Ops_Arith. -Export Core_Ops_Arith. +Require Import Add. +Export Add. -(* From Core Require Import Core_Ops_Arith (t_Add). *) -(* Export Core_Ops_Arith (t_Add). *) +Require Import Div. +Export Div. -(* From Core Require Import Core_Ops_Arith (t_Div). *) -(* Export Core_Ops_Arith (t_Div). *) +Require Import Mul. +Export Mul. -(* From Core Require Import Core_Ops_Arith (t_Mul). *) -(* Export Core_Ops_Arith (t_Mul). *) +Require Import Neg. +Export Neg. -(* From Core Require Import Core_Ops_Arith (t_Neg). *) -(* Export Core_Ops_Arith (t_Neg). *) +Require Import Rem. +Export Rem. -(* From Core Require Import Core_Ops_Arith (t_Rem). *) -(* Export Core_Ops_Arith (t_Rem). *) +Require Import Sub. +Export Sub. -(* From Core Require Import Core_Ops_Arith (t_Sub). *) -(* Export Core_Ops_Arith (t_Sub). *) +Require Import BitAnd. +Export BitAnd. -From Core Require Import Core_Ops_Bit. -Export Core_Ops_Bit. +Require Import BitOr. +Export BitOr. -(* From Core Require Import Core_Ops_Bit (t_BitAnd). *) -(* Export Core_Ops_Bit (t_BitAnd). *) +Require Import BitXor. +Export BitXor. -(* From Core Require Import Core_Ops_Bit (t_BitOr). *) -(* Export Core_Ops_Bit (t_BitOr). *) +Require Import Not. +Export Not. -(* From Core Require Import Core_Ops_Bit (t_BitXor). *) -(* Export Core_Ops_Bit (t_BitXor). *) +Require Import Shl. +Export Shl. -(* From Core Require Import Core_Ops_Bit (t_Not). *) -(* Export Core_Ops_Bit (t_Not). *) +Require Import Shr. +Export Shr. -(* From Core Require Import Core_Ops_Bit (t_Shl). *) -(* Export Core_Ops_Bit (t_Shl). *) +Require Import Index. +Export Index. -(* From Core Require Import Core_Ops_Bit (t_Shr). *) -(* Export Core_Ops_Bit (t_Shr). *) +Require Import Range. +Export Range. -(* NotImplementedYet *) +Require Import IndexRange. +Export IndexRange. -(* NotImplementedYet *) +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v index 9a8eb127a..db646ea1a 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v @@ -1,59 +1,25 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. - -From Core Require Import Core_Marker (t_Sized). -Export Core_Marker (t_Sized). - -(* NotImplementedYet *) - -Class t_Add `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := - { - t_Add_f_Output : Type; - t_Add_f_add : v_Self -> v_Rhs -> t_Add_f_Output; - }. -Arguments t_Add:clear implicits. -Arguments t_Add (_) (_) {_}. - -Class t_Div `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := - { - t_Div_f_Output : Type; - t_Div_f_div : v_Self -> v_Rhs -> t_Div_f_Output; - }. -Arguments t_Div:clear implicits. -Arguments t_Div (_) (_) {_}. - -Class t_Mul `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := - { - t_Mul_f_Output : Type; - t_Mul_f_mul : v_Self -> v_Rhs -> t_Mul_f_Output; - }. -Arguments t_Mul:clear implicits. -Arguments t_Mul (_) (_) {_}. - -Class t_Neg `{v_Self : Type} : Type := - { - t_Neg_f_Output : Type; - t_Neg_f_neg : v_Self -> t_Neg_f_Output; - }. -Arguments t_Neg:clear implicits. -Arguments t_Neg (_). - -Class t_Rem `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := - { - t_Rem_f_Output : Type; - t_Rem_f_rem : v_Self -> v_Rhs -> t_Rem_f_Output; - }. -Arguments t_Rem:clear implicits. -Arguments t_Rem (_) (_) {_}. - -Class t_Sub `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := - { - t_Sub_f_Output : Type; - t_Sub_f_sub : v_Self -> v_Rhs -> t_Sub_f_Output; - }. -Arguments t_Sub:clear implicits. -Arguments t_Sub (_) (_) {_}. + +Require Import Sized. +Export Sized. + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith_Impls_for_prims.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith_Impls_for_prims.v new file mode 100644 index 000000000..4751e5712 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith_Impls_for_prims.v @@ -0,0 +1,186 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import u8. +Export u8. + +Require Import u16. +Export u16. + +Require Import u32. +Export u32. + +Require Import u64. +Export u64. + +Require Import u128. +Export u128. + +Require Import usize. +Export usize. + +Require Import i8. +Export i8. + +Require Import i16. +Export i16. + +Require Import i32. +Export i32. + +Require Import i64. +Export i64. + +Require Import i128. +Export i128. + +Require Import isize. +Export isize. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v index 6ec42a34d..3b8209eb8 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v @@ -1,57 +1,23 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. - -From Core Require Import Core_Marker (t_Sized). -Export Core_Marker (t_Sized). - -Class t_BitAnd `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := - { - t_BitAnd_f_Output : Type; - t_BitAnd_f_bitand : v_Self -> v_Rhs -> t_BitAnd_f_Output; - }. -Arguments t_BitAnd:clear implicits. -Arguments t_BitAnd (_) (_) {_}. - -Class t_BitOr `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := - { - t_BitOr_f_Output : Type; - t_BitOr_f_bitor : v_Self -> v_Rhs -> t_BitOr_f_Output; - }. -Arguments t_BitOr:clear implicits. -Arguments t_BitOr (_) (_) {_}. - -Class t_BitXor `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := - { - t_BitXor_f_Output : Type; - t_BitXor_f_bitxor : v_Self -> v_Rhs -> t_BitXor_f_Output; - }. -Arguments t_BitXor:clear implicits. -Arguments t_BitXor (_) (_) {_}. - -Class t_Not `{v_Self : Type} : Type := - { - t_Not_f_Output : Type; - t_Not_f_not : v_Self -> t_Not_f_Output; - }. -Arguments t_Not:clear implicits. -Arguments t_Not (_). - -Class t_Shl `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := - { - t_Shl_f_Output : Type; - t_Shl_f_shl : v_Self -> v_Rhs -> t_Shl_f_Output; - }. -Arguments t_Shl:clear implicits. -Arguments t_Shl (_) (_) {_}. - -Class t_Shr `{v_Self : Type} `{v_Rhs : Type} `{t_Sized v_Rhs} : Type := - { - t_Shr_f_Output : Type; - t_Shr_f_shr : v_Self -> v_Rhs -> t_Shr_f_Output; - }. -Arguments t_Shr:clear implicits. -Arguments t_Shr (_) (_) {_}. + +Require Import Sized. +Export Sized. + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit_Impls_for_prims.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit_Impls_for_prims.v new file mode 100644 index 000000000..539e62da6 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit_Impls_for_prims.v @@ -0,0 +1,262 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import u8. +Export u8. + +Require Import u16. +Export u16. + +Require Import u32. +Export u32. + +Require Import u64. +Export u64. + +Require Import u128. +Export u128. + +Require Import usize. +Export usize. + +Require Import i8. +Export i8. + +Require Import i16. +Export i16. + +Require Import i32. +Export i32. + +Require Import i64. +Export i64. + +Require Import i128. +Export i128. + +Require Import isize. +Export isize. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v new file mode 100644 index 000000000..53b3db33d --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v @@ -0,0 +1,21 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Tuple. +Export Tuple. + +(*item error backend*) + +Class t_FnMut (Self : _) := { + f_call_mut : (Self -> Args -> Self × _) ; +}. + +Class t_Fn (Self : _) := { + f_call : (Self -> Args -> _) ; +}. + +(*Not implemented yet? todo(item)*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v new file mode 100644 index 000000000..250122964 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v @@ -0,0 +1,8 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +(*item error backend*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v new file mode 100644 index 000000000..e8f1e95df --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v @@ -0,0 +1,35 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Core_Primitive. +Export Core_Primitive. + +Require Import Iterator. +Export Iterator. + +Record t_IndexRange : Type := { + f_start : uint_size; + f_end : uint_size; +}. + +Definition impl__IndexRange__len (self : t_IndexRange_t) : uint_size := + sub (f_end self) (f_start self). + +Definition impl__IndexRange__next_unchecked (self : t_IndexRange_t) : t_IndexRange_t × uint_size := + let value := f_start self : uint_size in + let self := Build_t_IndexRange (f_start := add value (@repr WORDSIZE32 1)) : t_IndexRange_t in + let hax_temp_output := value : uint_size in + (self,hax_temp_output). + +Definition impl__IndexRange__zero_to (end : uint_size) : t_IndexRange_t := + Build_IndexRange (f_start := (@repr WORDSIZE32 0)) (f_end := end). + +(*item error backend*) + +#[global] Instance t_IndexRange_t_t_ExactSizeIterator : t_ExactSizeIterator t_IndexRange_t := { + f_len (self : t_IndexRange_t) := impl__IndexRange__len self; +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v new file mode 100644 index 000000000..759db1f41 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v @@ -0,0 +1,11 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Record t_Range (Idx : _) : Type := { + f_start : Idx; + f_end : Idx; +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Option.v b/proof-libs/coq/coq/generated-core/src/Core_Option.v index 665b6adf9..6ecfbcca6 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Option.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Option.v @@ -1,12 +1,58 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. -Inductive t_Option `{v_T : Type} : Type := -| t_Option_Option_None -| t_Option_Option_Some : v_T -> _. -Arguments t_Option:clear implicits. -Arguments t_Option (_). +Require Import panic. +Export panic. + +Require Import panic_display. +Export panic_display. + +Inductive t_Option (T : _) : Type := +| Option_None : t_Option (T : _) +| Option_Some : T -> t_Option (T : _). +Arguments Option_None {_}. +Arguments Option_Some {_} T. + +#[global] Instance t_Option_t T_t_Clone (T : _) : t_Clone (t_Option_t T) := { + f_clone (self : t_Option_t T) := match self with + | Option_Some x => + Option_Some (f_clone x) + | Option_None => + Option_Nonet_Option_t T + end; +}. + +Definition impl_1__is_some (self : t_Option_t T) : bool := + match self with + | Option_Some _ => + true + | _ => + false + end. + +Definition impl_1__map (self : t_Option_t T) (f : F) : t_Option_t U := + match self with + | Option_Some x => + Option_Some (f_call_once f x) + | Option_None => + Option_Nonet_Option_t U + end. + +Definition unwrap_failed (_ : unit) : t_Never_t := + panic called `Option::unwrap()` on a `None` value. + +Definition impl_1__unwrap (self : t_Option_t T) : T := + match self with + | Option_Some val => + val + | Option_None => + never_to_any (unwrap_failed tt) + end. + +(*item error backend*) + +(*item error backend*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Panicking.v b/proof-libs/coq/coq/generated-core/src/Core_Panicking.v index 086ae44e0..6ff112b62 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Panicking.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Panicking.v @@ -1,20 +1,54 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. -From Core Require Import Core_Marker. -Export Core_Marker. +Require Import fmt. +Export fmt. -Definition t_Never : Type := False. +Require Import Location. +Export Location. -Definition never_to_any `{v_T : Type} `{t_Sized v_T} (x : t_Never) : v_T := - (match x with end). +Require Import PanicInfo. +Export PanicInfo. -Fixpoint panic (expr : string) `{false = true} : t_Never := - never_to_any (Bool.diff_false_true H). +Inductive t_AssertKind : Type := +| AssertKind_Eq : t_AssertKind +| AssertKind_Ne : t_AssertKind +| AssertKind_Match : t_AssertKind. -Definition panic_explicit (_ : unit) `{false = true} : t_Never := - never_to_any (Bool.diff_false_true H). +Definition t_AssertKind_cast_to_repr (x : t_AssertKind_t) : uint_size := + match x with + | AssertKind_Eq => + (@repr WORDSIZE32 0) + | AssertKind_Ne => + (@repr WORDSIZE32 1) + | AssertKind_Match => + (@repr WORDSIZE32 3) + end. + +Inductive t_Never : Type := +. + +Definition t_Never_cast_to_repr (x : t_Never_t) : t_Never_t := + match x with + + end. + +Definition never_to_any (x : t_Never_t) : T := + never_to_any match x with + + end. + +Definition panic_fmt (fmt : t_Arguments_t) : t_Never_t := + panic_fmt fmt. + +(*item error backend*) + +Definition panic_display (x : T) : t_Never_t := + panic_fmt (impl_2__new_v1 (array_from_list []) (array_from_list [impl_1__new_display x])). + +Definition panic_explicit (_ : unit) : t_Never_t := + panic_display explicit panic. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Primitive.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive.v index 7c5050da2..13bfebe0c 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Primitive.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive.v @@ -1,552 +1,580 @@ (* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. -Require Import String. - -From Core Require Import Core_Int. -Export Core_Int. - - -From Core Require Import Core_Ops_Arith. -Export Core_Ops_Arith. - - -From Core Require Import Core_Ops_Bit. -Export Core_Ops_Bit. - - -From Core Require Import Core_Cmp. -Export Core_Cmp. - - -From Core Require Import Core_Base_Int_Base_impl. -Export Core_Base_Int_Base_impl. - -From Core Require Import Core_Base_Seq_Base_impl. -Export Core_Base_Seq_Base_impl. - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -Record t_u128 : Type := - { - t_u128_0 : t_U128 - }. -Arguments t_u128:clear implicits. -Arguments t_u128. - -Instance t_Clone_687423776 : t_Clone (t_u128) := - { - t_Clone_f_clone := fun (self : t_u128) => - Build_t_u128 (t_Clone_f_clone (t_u128_0 self)); - }. - -Instance t_PartialEq_359515708 : t_PartialEq (t_u128) (t_u128) := - { - t_PartialEq_f_eq := fun (self : t_u128) (rhs : t_u128) => - t_PartialEq_f_eq (t_u128_0 self) (t_u128_0 rhs); - t_PartialEq_f_ne := fun (self : t_u128) (rhs : t_u128) => - negb (t_PartialEq_f_eq (t_u128_0 self) (t_u128_0 rhs)); - }. - -Instance t_PartialOrd_133463987 : t_PartialOrd (t_u128) (t_u128) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_u128) (rhs : t_u128) => - t_PartialOrd_f_partial_cmp (t_u128_0 self) (t_u128_0 rhs); - t_PartialOrd_f_lt := fun (self : t_u128) (rhs : t_u128) => - match t_PartialOrd_f_partial_cmp (t_u128_0 self) (t_u128_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_u128) (rhs : t_u128) => - match t_PartialOrd_f_partial_cmp (t_u128_0 self) (t_u128_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_u128) (rhs : t_u128) => - match t_PartialOrd_f_partial_cmp (t_u128_0 self) (t_u128_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_u128) (rhs : t_u128) => - match t_PartialOrd_f_partial_cmp (t_u128_0 self) (t_u128_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Record t_u16 : Type := - { - t_u16_0 : t_U16 - }. -Arguments t_u16:clear implicits. -Arguments t_u16. - -Instance t_Clone_676169635 : t_Clone (t_u16) := - { - t_Clone_f_clone := fun (self : t_u16) => - Build_t_u16 (t_Clone_f_clone (t_u16_0 self)); - }. - -Instance t_PartialEq_499855381 : t_PartialEq (t_u16) (t_u16) := - { - t_PartialEq_f_eq := fun (self : t_u16) (rhs : t_u16) => - t_PartialEq_f_eq (t_u16_0 self) (t_u16_0 rhs); - t_PartialEq_f_ne := fun (self : t_u16) (rhs : t_u16) => - negb (t_PartialEq_f_eq (t_u16_0 self) (t_u16_0 rhs)); - }. - -Instance t_PartialOrd_901197325 : t_PartialOrd (t_u16) (t_u16) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_u16) (rhs : t_u16) => - t_PartialOrd_f_partial_cmp (t_u16_0 self) (t_u16_0 rhs); - t_PartialOrd_f_lt := fun (self : t_u16) (rhs : t_u16) => - match t_PartialOrd_f_partial_cmp (t_u16_0 self) (t_u16_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_u16) (rhs : t_u16) => - match t_PartialOrd_f_partial_cmp (t_u16_0 self) (t_u16_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_u16) (rhs : t_u16) => - match t_PartialOrd_f_partial_cmp (t_u16_0 self) (t_u16_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_u16) (rhs : t_u16) => - match t_PartialOrd_f_partial_cmp (t_u16_0 self) (t_u16_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Record t_u32 : Type := - { - t_u32_0 : t_U32 - }. -Arguments t_u32:clear implicits. -Arguments t_u32. - -Instance t_Clone_148051061 : t_Clone (t_u32) := - { - t_Clone_f_clone := fun (self : t_u32) => - Build_t_u32 (t_Clone_f_clone (t_u32_0 self)); - }. - -Instance t_PartialEq_988555028 : t_PartialEq (t_u32) (t_u32) := - { - t_PartialEq_f_eq := fun (self : t_u32) (rhs : t_u32) => - t_PartialEq_f_eq (t_u32_0 self) (t_u32_0 rhs); - t_PartialEq_f_ne := fun (self : t_u32) (rhs : t_u32) => - negb (t_PartialEq_f_eq (t_u32_0 self) (t_u32_0 rhs)); - }. - -Instance t_PartialOrd_675443355 : t_PartialOrd (t_u32) (t_u32) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_u32) (rhs : t_u32) => - t_PartialOrd_f_partial_cmp (t_u32_0 self) (t_u32_0 rhs); - t_PartialOrd_f_lt := fun (self : t_u32) (rhs : t_u32) => - match t_PartialOrd_f_partial_cmp (t_u32_0 self) (t_u32_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_u32) (rhs : t_u32) => - match t_PartialOrd_f_partial_cmp (t_u32_0 self) (t_u32_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_u32) (rhs : t_u32) => - match t_PartialOrd_f_partial_cmp (t_u32_0 self) (t_u32_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_u32) (rhs : t_u32) => - match t_PartialOrd_f_partial_cmp (t_u32_0 self) (t_u32_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Record t_u64 : Type := - { - t_u64_0 : t_U64 - }. -Arguments t_u64:clear implicits. -Arguments t_u64. - -Instance t_Clone_732456945 : t_Clone (t_u64) := - { - t_Clone_f_clone := fun (self : t_u64) => - Build_t_u64 (t_Clone_f_clone (t_u64_0 self)); - }. - -Instance t_PartialEq_387792562 : t_PartialEq (t_u64) (t_u64) := - { - t_PartialEq_f_eq := fun (self : t_u64) (rhs : t_u64) => - t_PartialEq_f_eq (t_u64_0 self) (t_u64_0 rhs); - t_PartialEq_f_ne := fun (self : t_u64) (rhs : t_u64) => - negb (t_PartialEq_f_eq (t_u64_0 self) (t_u64_0 rhs)); - }. - -Instance t_PartialOrd_864557835 : t_PartialOrd (t_u64) (t_u64) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_u64) (rhs : t_u64) => - t_PartialOrd_f_partial_cmp (t_u64_0 self) (t_u64_0 rhs); - t_PartialOrd_f_lt := fun (self : t_u64) (rhs : t_u64) => - match t_PartialOrd_f_partial_cmp (t_u64_0 self) (t_u64_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_u64) (rhs : t_u64) => - match t_PartialOrd_f_partial_cmp (t_u64_0 self) (t_u64_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_u64) (rhs : t_u64) => - match t_PartialOrd_f_partial_cmp (t_u64_0 self) (t_u64_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_u64) (rhs : t_u64) => - match t_PartialOrd_f_partial_cmp (t_u64_0 self) (t_u64_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Record t_u8 : Type := - { - t_u8_0 : t_U8 - }. -Arguments t_u8:clear implicits. -Arguments t_u8. - -Instance t_Clone_448525304 : t_Clone (t_u8) := - { - t_Clone_f_clone := fun (self : t_u8) => - Build_t_u8 (t_Clone_f_clone (t_u8_0 self)); - }. - -Instance t_PartialEq_92335612 : t_PartialEq (t_u8) (t_u8) := - { - t_PartialEq_f_eq := fun (self : t_u8) (rhs : t_u8) => - t_PartialEq_f_eq (t_u8_0 self) (t_u8_0 rhs); - t_PartialEq_f_ne := fun (self : t_u8) (rhs : t_u8) => - negb (t_PartialEq_f_eq (t_u8_0 self) (t_u8_0 rhs)); - }. - -Instance t_PartialOrd_414384327 : t_PartialOrd (t_u8) (t_u8) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_u8) (rhs : t_u8) => - t_PartialOrd_f_partial_cmp (t_u8_0 self) (t_u8_0 rhs); - t_PartialOrd_f_lt := fun (self : t_u8) (rhs : t_u8) => - match t_PartialOrd_f_partial_cmp (t_u8_0 self) (t_u8_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_u8) (rhs : t_u8) => - match t_PartialOrd_f_partial_cmp (t_u8_0 self) (t_u8_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_u8) (rhs : t_u8) => - match t_PartialOrd_f_partial_cmp (t_u8_0 self) (t_u8_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_u8) (rhs : t_u8) => - match t_PartialOrd_f_partial_cmp (t_u8_0 self) (t_u8_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Record t_usize : Type := - { - t_usize_0 : t_U64 - }. -Arguments t_usize:clear implicits. -Arguments t_usize. - -Instance t_Clone_323393662 : t_Clone (t_usize) := - { - t_Clone_f_clone := fun (self : t_usize) => - Build_t_usize (t_Clone_f_clone (t_usize_0 self)); - }. - -Instance t_PartialEq_585670484 : t_PartialEq (t_usize) (t_usize) := - { - t_PartialEq_f_eq := fun (self : t_usize) (rhs : t_usize) => - t_PartialEq_f_eq (t_usize_0 self) (t_usize_0 rhs); - t_PartialEq_f_ne := fun (self : t_usize) (rhs : t_usize) => - negb (t_PartialEq_f_eq (t_usize_0 self) (t_usize_0 rhs)); - }. - -Instance t_PartialOrd_249911946 : t_PartialOrd (t_usize) (t_usize) := - { - t_PartialOrd_f_partial_cmp := fun (self : t_usize) (rhs : t_usize) => - t_PartialOrd_f_partial_cmp (t_usize_0 self) (t_usize_0 rhs); - t_PartialOrd_f_lt := fun (self : t_usize) (rhs : t_usize) => - match t_PartialOrd_f_partial_cmp (t_usize_0 self) (t_usize_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less) => - true - | _ => - false - end; - t_PartialOrd_f_le := fun (self : t_usize) (rhs : t_usize) => - match t_PartialOrd_f_partial_cmp (t_usize_0 self) (t_usize_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Less - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - t_PartialOrd_f_gt := fun (self : t_usize) (rhs : t_usize) => - match t_PartialOrd_f_partial_cmp (t_usize_0 self) (t_usize_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater) => - true - | _ => - false - end; - t_PartialOrd_f_ge := fun (self : t_usize) (rhs : t_usize) => - match t_PartialOrd_f_partial_cmp (t_usize_0 self) (t_usize_0 rhs) with - | t_Option_Option_Some (t_Ordering_Ordering_Greater - | t_Ordering_Ordering_Equal) => - true - | _ => - false - end; - }. - -Instance t_Mul_310564612 : t_Mul (t_u8) (t_u8) := - { - t_Mul_f_Output := t_u8; - t_Mul_f_mul := fun (self : t_u8) (rhs : t_u8) => - Build_t_u8 (t_Mul_f_mul (t_u8_0 self) (t_u8_0 rhs)); - }. - -Instance t_Rem_765572693 : t_Rem (t_u8) (t_u8) := - { - t_Rem_f_Output := t_u8; - t_Rem_f_rem := fun (self : t_u8) (rhs : t_u8) => - Build_t_u8 (t_Rem_f_rem (t_u8_0 self) (t_u8_0 rhs)); - }. - -Instance t_Add_960049504 : t_Add (t_u8) (t_u8) := - { - t_Add_f_Output := t_u8; - t_Add_f_add := fun (self : t_u8) (rhs : t_u8) => - Build_t_u8 (t_Add_f_add (t_u8_0 self) (t_u8_0 rhs)); - }. - -Instance t_Div_866285265 : t_Div (t_u8) (t_u8) := - { - t_Div_f_Output := t_u8; - t_Div_f_div := fun (self : t_u8) (rhs : t_u8) => - Build_t_u8 (t_Div_f_div (t_u8_0 self) (t_u8_0 rhs)); - }. - -Instance t_Mul_257417847 : t_Mul (t_u16) (t_u16) := - { - t_Mul_f_Output := t_u16; - t_Mul_f_mul := fun (self : t_u16) (rhs : t_u16) => - Build_t_u16 (t_Mul_f_mul (t_u16_0 self) (t_u16_0 rhs)); - }. - -Instance t_Rem_318118895 : t_Rem (t_u16) (t_u16) := - { - t_Rem_f_Output := t_u16; - t_Rem_f_rem := fun (self : t_u16) (rhs : t_u16) => - Build_t_u16 (t_Rem_f_rem (t_u16_0 self) (t_u16_0 rhs)); - }. - -Instance t_Add_554073404 : t_Add (t_u16) (t_u16) := - { - t_Add_f_Output := t_u16; - t_Add_f_add := fun (self : t_u16) (rhs : t_u16) => - Build_t_u16 (t_Add_f_add (t_u16_0 self) (t_u16_0 rhs)); - }. - -Instance t_Div_1045893244 : t_Div (t_u16) (t_u16) := - { - t_Div_f_Output := t_u16; - t_Div_f_div := fun (self : t_u16) (rhs : t_u16) => - Build_t_u16 (t_Div_f_div (t_u16_0 self) (t_u16_0 rhs)); - }. - -Instance t_Mul_800987573 : t_Mul (t_u32) (t_u32) := - { - t_Mul_f_Output := t_u32; - t_Mul_f_mul := fun (self : t_u32) (rhs : t_u32) => - Build_t_u32 (t_Mul_f_mul (t_u32_0 self) (t_u32_0 rhs)); - }. - -Instance t_Rem_666023061 : t_Rem (t_u32) (t_u32) := - { - t_Rem_f_Output := t_u32; - t_Rem_f_rem := fun (self : t_u32) (rhs : t_u32) => - Build_t_u32 (t_Rem_f_rem (t_u32_0 self) (t_u32_0 rhs)); - }. - -Instance t_Add_446443714 : t_Add (t_u32) (t_u32) := - { - t_Add_f_Output := t_u32; - t_Add_f_add := fun (self : t_u32) (rhs : t_u32) => - Build_t_u32 (t_Add_f_add (t_u32_0 self) (t_u32_0 rhs)); - }. - -Instance t_Div_688119654 : t_Div (t_u32) (t_u32) := - { - t_Div_f_Output := t_u32; - t_Div_f_div := fun (self : t_u32) (rhs : t_u32) => - Build_t_u32 (t_Div_f_div (t_u32_0 self) (t_u32_0 rhs)); - }. - -Instance t_Mul_33292302 : t_Mul (t_u64) (t_u64) := - { - t_Mul_f_Output := t_u64; - t_Mul_f_mul := fun (self : t_u64) (rhs : t_u64) => - Build_t_u64 (t_Mul_f_mul (t_u64_0 self) (t_u64_0 rhs)); - }. - -Instance t_Rem_647345183 : t_Rem (t_u64) (t_u64) := - { - t_Rem_f_Output := t_u64; - t_Rem_f_rem := fun (self : t_u64) (rhs : t_u64) => - Build_t_u64 (t_Rem_f_rem (t_u64_0 self) (t_u64_0 rhs)); - }. - -Instance t_Add_843567851 : t_Add (t_u64) (t_u64) := - { - t_Add_f_Output := t_u64; - t_Add_f_add := fun (self : t_u64) (rhs : t_u64) => - Build_t_u64 (t_Add_f_add (t_u64_0 self) (t_u64_0 rhs)); - }. - -Instance t_Div_1022519543 : t_Div (t_u64) (t_u64) := - { - t_Div_f_Output := t_u64; - t_Div_f_div := fun (self : t_u64) (rhs : t_u64) => - Build_t_u64 (t_Div_f_div (t_u64_0 self) (t_u64_0 rhs)); - }. - -Instance t_Mul_338793759 : t_Mul (t_u128) (t_u128) := - { - t_Mul_f_Output := t_u128; - t_Mul_f_mul := fun (self : t_u128) (rhs : t_u128) => - Build_t_u128 (t_Mul_f_mul (t_u128_0 self) (t_u128_0 rhs)); - }. - -Instance t_Rem_265261400 : t_Rem (t_u128) (t_u128) := - { - t_Rem_f_Output := t_u128; - t_Rem_f_rem := fun (self : t_u128) (rhs : t_u128) => - Build_t_u128 (t_Rem_f_rem (t_u128_0 self) (t_u128_0 rhs)); - }. - -Instance t_Add_6018763 : t_Add (t_u128) (t_u128) := - { - t_Add_f_Output := t_u128; - t_Add_f_add := fun (self : t_u128) (rhs : t_u128) => - Build_t_u128 (t_Add_f_add (t_u128_0 self) (t_u128_0 rhs)); - }. - -Instance t_Div_344800454 : t_Div (t_u128) (t_u128) := - { - t_Div_f_Output := t_u128; - t_Div_f_div := fun (self : t_u128) (rhs : t_u128) => - Build_t_u128 (t_Div_f_div (t_u128_0 self) (t_u128_0 rhs)); - }. - -Instance t_Mul_628159638 : t_Mul (t_usize) (t_usize) := - { - t_Mul_f_Output := t_usize; - t_Mul_f_mul := fun (self : t_usize) (rhs : t_usize) => - Build_t_usize (t_Mul_f_mul (t_usize_0 self) (t_usize_0 rhs)); - }. - -Instance t_Rem_315243380 : t_Rem (t_usize) (t_usize) := - { - t_Rem_f_Output := t_usize; - t_Rem_f_rem := fun (self : t_usize) (rhs : t_usize) => - Build_t_usize (t_Rem_f_rem (t_usize_0 self) (t_usize_0 rhs)); - }. - -Instance t_Add_1007246287 : t_Add (t_usize) (t_usize) := - { - t_Add_f_Output := t_usize; - t_Add_f_add := fun (self : t_usize) (rhs : t_usize) => - Build_t_usize (t_Add_f_add (t_usize_0 self) (t_usize_0 rhs)); - }. - -Instance t_Div_611868226 : t_Div (t_usize) (t_usize) := - { - t_Div_f_Output := t_usize; - t_Div_f_div := fun (self : t_usize) (rhs : t_usize) => - Build_t_usize (t_Div_f_div (t_usize_0 self) (t_usize_0 rhs)); - }. - -Record t_Array `{v_T : Type} `{v_N : t_usize} `{t_Sized v_T} : Type := - { - t_Array_f_v : t_Seq (v_T) - }. -Arguments t_Array:clear implicits. -Arguments t_Array (_) (_) {_}. -Arguments Build_t_Array {_} {_} {_}. + +Require Import Add. +Export Add. + +Require Import Div. +Export Div. + +Require Import Mul. +Export Mul. + +Require Import Neg. +Export Neg. + +Require Import Rem. +Export Rem. + +Require Import Sub. +Export Sub. + +Require Import BitAnd. +Export BitAnd. + +Require Import BitOr. +Export BitOr. + +Require Import BitXor. +Export BitXor. + +Require Import Not. +Export Not. + +Require Import Shl. +Export Shl. + +Require Import Shr. +Export Shr. + +Require Import Ordering. +Export Ordering. + +Require Import PartialEq. +Export PartialEq. + +Require Import PartialOrd. +Export PartialOrd. + +Require Import Crate_Base. +Export Crate_Base. + +Require Import Crate_Base_Number_conversion. +Export Crate_Base_Number_conversion. + +Require Import Crate_Base_interface_Int. +Export Crate_Base_interface_Int. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +Record t_Slice (T : _) : Type := { + f_v : t_Seq_t T; +}. + +#[global] Instance t_Slice_t T_t_From (T : _) : t_From (t_Slice_t T) (seq T) := { + f_from (x : seq T) := Build_Slice (f_v := Build_Seq (f_v := impl__to_vec x)); +}. + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +Record t_u128 : Type := { + 0 : t_U128_t; +}. + +#[global] Instance t_u128_t_t_Clone : t_Clone t_u128_t := { + f_clone (self : t_u128_t) := C_u128 (f_clone (0 self)); +}. + +#[global] Instance t_u128_t_t_PartialEq : t_PartialEq t_u128_t t_u128_t := { + f_eq (self : t_u128_t) (rhs : t_u128_t) := (0 self)=.?(0 rhs); + f_ne (self : t_u128_t) (rhs : t_u128_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_u128_t_t_PartialOrd : t_PartialOrd t_u128_t t_u128_t := { + f_partial_cmp (self : t_u128_t) (rhs : t_u128_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_u128_t) (rhs : t_u128_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_u128_t) (rhs : t_u128_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_u128_t) (rhs : t_u128_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_u128_t) (rhs : t_u128_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_u16 : Type := { + 0 : t_U16_t; +}. + +#[global] Instance t_u16_t_t_Clone : t_Clone t_u16_t := { + f_clone (self : t_u16_t) := C_u16 (f_clone (0 self)); +}. + +#[global] Instance t_u16_t_t_PartialEq : t_PartialEq t_u16_t t_u16_t := { + f_eq (self : t_u16_t) (rhs : t_u16_t) := (0 self)=.?(0 rhs); + f_ne (self : t_u16_t) (rhs : t_u16_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_u16_t_t_PartialOrd : t_PartialOrd t_u16_t t_u16_t := { + f_partial_cmp (self : t_u16_t) (rhs : t_u16_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_u16_t) (rhs : t_u16_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_u16_t) (rhs : t_u16_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_u16_t) (rhs : t_u16_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_u16_t) (rhs : t_u16_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_u32 : Type := { + 0 : t_U32_t; +}. + +#[global] Instance t_u32_t_t_Clone : t_Clone t_u32_t := { + f_clone (self : t_u32_t) := C_u32 (f_clone (0 self)); +}. + +#[global] Instance t_u32_t_t_PartialEq : t_PartialEq t_u32_t t_u32_t := { + f_eq (self : t_u32_t) (rhs : t_u32_t) := (0 self)=.?(0 rhs); + f_ne (self : t_u32_t) (rhs : t_u32_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_u32_t_t_PartialOrd : t_PartialOrd t_u32_t t_u32_t := { + f_partial_cmp (self : t_u32_t) (rhs : t_u32_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_u32_t) (rhs : t_u32_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_u32_t) (rhs : t_u32_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_u32_t) (rhs : t_u32_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_u32_t) (rhs : t_u32_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_u64 : Type := { + 0 : t_U64_t; +}. + +#[global] Instance t_u64_t_t_Clone : t_Clone t_u64_t := { + f_clone (self : t_u64_t) := C_u64 (f_clone (0 self)); +}. + +#[global] Instance t_u64_t_t_PartialEq : t_PartialEq t_u64_t t_u64_t := { + f_eq (self : t_u64_t) (rhs : t_u64_t) := (0 self)=.?(0 rhs); + f_ne (self : t_u64_t) (rhs : t_u64_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_u64_t_t_PartialOrd : t_PartialOrd t_u64_t t_u64_t := { + f_partial_cmp (self : t_u64_t) (rhs : t_u64_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_u64_t) (rhs : t_u64_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_u64_t) (rhs : t_u64_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_u64_t) (rhs : t_u64_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_u64_t) (rhs : t_u64_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_u8 : Type := { + 0 : t_U8_t; +}. + +#[global] Instance t_u8_t_t_Clone : t_Clone t_u8_t := { + f_clone (self : t_u8_t) := C_u8 (f_clone (0 self)); +}. + +#[global] Instance t_u8_t_t_PartialEq : t_PartialEq t_u8_t t_u8_t := { + f_eq (self : t_u8_t) (rhs : t_u8_t) := (0 self)=.?(0 rhs); + f_ne (self : t_u8_t) (rhs : t_u8_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_u8_t_t_PartialOrd : t_PartialOrd t_u8_t t_u8_t := { + f_partial_cmp (self : t_u8_t) (rhs : t_u8_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_u8_t) (rhs : t_u8_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_u8_t) (rhs : t_u8_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_u8_t) (rhs : t_u8_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_u8_t) (rhs : t_u8_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_usize : Type := { + 0 : t_U64_t; +}. + +#[global] Instance t_usize_t_t_Clone : t_Clone t_usize_t := { + f_clone (self : t_usize_t) := C_usize (f_clone (0 self)); +}. + +#[global] Instance t_usize_t_t_PartialEq : t_PartialEq t_usize_t t_usize_t := { + f_eq (self : t_usize_t) (rhs : t_usize_t) := (0 self)=.?(0 rhs); + f_ne (self : t_usize_t) (rhs : t_usize_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_usize_t_t_PartialOrd : t_PartialOrd t_usize_t t_usize_t := { + f_partial_cmp (self : t_usize_t) (rhs : t_usize_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_usize_t) (rhs : t_usize_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_usize_t) (rhs : t_usize_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_usize_t) (rhs : t_usize_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_usize_t) (rhs : t_usize_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_i128 : Type := { + 0 : t_I128_t; +}. + +#[global] Instance t_i128_t_t_Clone : t_Clone t_i128_t := { + f_clone (self : t_i128_t) := C_i128 (f_clone (0 self)); +}. + +#[global] Instance t_i128_t_t_PartialEq : t_PartialEq t_i128_t t_i128_t := { + f_eq (self : t_i128_t) (rhs : t_i128_t) := (0 self)=.?(0 rhs); + f_ne (self : t_i128_t) (rhs : t_i128_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_i128_t_t_PartialOrd : t_PartialOrd t_i128_t t_i128_t := { + f_partial_cmp (self : t_i128_t) (rhs : t_i128_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_i128_t) (rhs : t_i128_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_i128_t) (rhs : t_i128_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_i128_t) (rhs : t_i128_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_i128_t) (rhs : t_i128_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_i16 : Type := { + 0 : t_I16_t; +}. + +#[global] Instance t_i16_t_t_Clone : t_Clone t_i16_t := { + f_clone (self : t_i16_t) := C_i16 (f_clone (0 self)); +}. + +#[global] Instance t_i16_t_t_PartialEq : t_PartialEq t_i16_t t_i16_t := { + f_eq (self : t_i16_t) (rhs : t_i16_t) := (0 self)=.?(0 rhs); + f_ne (self : t_i16_t) (rhs : t_i16_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_i16_t_t_PartialOrd : t_PartialOrd t_i16_t t_i16_t := { + f_partial_cmp (self : t_i16_t) (rhs : t_i16_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_i16_t) (rhs : t_i16_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_i16_t) (rhs : t_i16_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_i16_t) (rhs : t_i16_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_i16_t) (rhs : t_i16_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_i32 : Type := { + 0 : t_I32_t; +}. + +#[global] Instance t_i32_t_t_Clone : t_Clone t_i32_t := { + f_clone (self : t_i32_t) := C_i32 (f_clone (0 self)); +}. + +#[global] Instance t_i32_t_t_PartialEq : t_PartialEq t_i32_t t_i32_t := { + f_eq (self : t_i32_t) (rhs : t_i32_t) := (0 self)=.?(0 rhs); + f_ne (self : t_i32_t) (rhs : t_i32_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_i32_t_t_PartialOrd : t_PartialOrd t_i32_t t_i32_t := { + f_partial_cmp (self : t_i32_t) (rhs : t_i32_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_i32_t) (rhs : t_i32_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_i32_t) (rhs : t_i32_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_i32_t) (rhs : t_i32_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_i32_t) (rhs : t_i32_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_i64 : Type := { + 0 : t_I64_t; +}. + +#[global] Instance t_i64_t_t_Clone : t_Clone t_i64_t := { + f_clone (self : t_i64_t) := C_i64 (f_clone (0 self)); +}. + +#[global] Instance t_i64_t_t_PartialEq : t_PartialEq t_i64_t t_i64_t := { + f_eq (self : t_i64_t) (rhs : t_i64_t) := (0 self)=.?(0 rhs); + f_ne (self : t_i64_t) (rhs : t_i64_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_i64_t_t_PartialOrd : t_PartialOrd t_i64_t t_i64_t := { + f_partial_cmp (self : t_i64_t) (rhs : t_i64_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_i64_t) (rhs : t_i64_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_i64_t) (rhs : t_i64_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_i64_t) (rhs : t_i64_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_i64_t) (rhs : t_i64_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_i8 : Type := { + 0 : t_I8_t; +}. + +#[global] Instance t_i8_t_t_Clone : t_Clone t_i8_t := { + f_clone (self : t_i8_t) := C_i8 (f_clone (0 self)); +}. + +#[global] Instance t_i8_t_t_PartialEq : t_PartialEq t_i8_t t_i8_t := { + f_eq (self : t_i8_t) (rhs : t_i8_t) := (0 self)=.?(0 rhs); + f_ne (self : t_i8_t) (rhs : t_i8_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_i8_t_t_PartialOrd : t_PartialOrd t_i8_t t_i8_t := { + f_partial_cmp (self : t_i8_t) (rhs : t_i8_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_i8_t) (rhs : t_i8_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_i8_t) (rhs : t_i8_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_i8_t) (rhs : t_i8_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_i8_t) (rhs : t_i8_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. + +Record t_isize : Type := { + 0 : t_I64_t; +}. + +#[global] Instance t_isize_t_t_Clone : t_Clone t_isize_t := { + f_clone (self : t_isize_t) := C_isize (f_clone (0 self)); +}. + +#[global] Instance t_isize_t_t_PartialEq : t_PartialEq t_isize_t t_isize_t := { + f_eq (self : t_isize_t) (rhs : t_isize_t) := (0 self)=.?(0 rhs); + f_ne (self : t_isize_t) (rhs : t_isize_t) := not ((0 self)=.?(0 rhs)); +}. + +#[global] Instance t_isize_t_t_PartialOrd : t_PartialOrd t_isize_t t_isize_t := { + f_partial_cmp (self : t_isize_t) (rhs : t_isize_t) := f_partial_cmp (0 self) (0 rhs); + f_lt (self : t_isize_t) (rhs : t_isize_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less => + true + | _ => + false + end; + f_le (self : t_isize_t) (rhs : t_isize_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Less | Ordering_Equal => + true + | _ => + false + end; + f_gt (self : t_isize_t) (rhs : t_isize_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater => + true + | _ => + false + end; + f_ge (self : t_isize_t) (rhs : t_isize_t) := match f_partial_cmp (0 self) (0 rhs) with + | Option_Some Ordering_Greater | Ordering_Equal => + true + | _ => + false + end; +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v new file mode 100644 index 000000000..d0f04c916 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v @@ -0,0 +1,190 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Require Import primitive. +Export primitive. + +Require Import Core_Cmp. +Export Core_Cmp. + +Require Import Core_Convert. +Export Core_Convert. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +#[global] Instance t_u128_t_t_From : t_From t_u128_t int128 := { + f_from (x : int128) := C_u128 (Build_U128 (f_v := f_into x)); +}. + +#[global] Instance int128_t_From : t_From int128 t_u128_t := { + f_from (x : t_u128_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_u16_t_t_From : t_From t_u16_t int16 := { + f_from (x : int16) := C_u16 (Build_U16 (f_v := f_into x)); +}. + +#[global] Instance int16_t_From : t_From int16 t_u16_t := { + f_from (x : t_u16_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_u32_t_t_From : t_From t_u32_t int32 := { + f_from (x : int32) := C_u32 (Build_U32 (f_v := f_into x)); +}. + +#[global] Instance int32_t_From : t_From int32 t_u32_t := { + f_from (x : t_u32_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_u64_t_t_From : t_From t_u64_t int64 := { + f_from (x : int64) := C_u64 (Build_U64 (f_v := f_into x)); +}. + +#[global] Instance int64_t_From : t_From int64 t_u64_t := { + f_from (x : t_u64_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_u8_t_t_From : t_From t_u8_t int8 := { + f_from (x : int8) := C_u8 (Build_U8 (f_v := f_into x)); +}. + +#[global] Instance int8_t_From : t_From int8 t_u8_t := { + f_from (x : t_u8_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_usize_t_t_From : t_From t_usize_t uint_size := { + f_from (x : uint_size) := C_usize (Build_U64 (f_v := f_into x)); +}. + +#[global] Instance uint_size_t_From : t_From uint_size t_usize_t := { + f_from (x : t_usize_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_usize_t_t_From : t_From t_usize_t t_u64_t := { + f_from (x : t_u64_t) := C_usize (f_into (0 x)); +}. + +#[global] Instance t_u64_t_t_From : t_From t_u64_t t_usize_t := { + f_from (x : t_usize_t) := C_u64 (f_into (0 x)); +}. + +#[global] Instance t_u16_t_t_From : t_From t_u16_t t_u8_t := { + f_from (x : t_u8_t) := C_u16 (f_into (0 x)); +}. + +#[global] Instance t_u32_t_t_From : t_From t_u32_t t_u8_t := { + f_from (x : t_u8_t) := C_u32 (f_into (0 x)); +}. + +#[global] Instance t_u64_t_t_From : t_From t_u64_t t_u8_t := { + f_from (x : t_u8_t) := C_u64 (f_into (0 x)); +}. + +#[global] Instance t_u128_t_t_From : t_From t_u128_t t_u8_t := { + f_from (x : t_u8_t) := C_u128 (f_into (0 x)); +}. + +#[global] Instance t_usize_t_t_From : t_From t_usize_t t_u8_t := { + f_from (x : t_u8_t) := C_usize (f_into (0 x)); +}. + +#[global] Instance t_u8_t_t_From : t_From t_u8_t t_u16_t := { + f_from (x : t_u16_t) := C_u8 (f_into (0 x)); +}. + +#[global] Instance t_u32_t_t_From : t_From t_u32_t t_u16_t := { + f_from (x : t_u16_t) := C_u32 (f_into (0 x)); +}. + +#[global] Instance t_u64_t_t_From : t_From t_u64_t t_u16_t := { + f_from (x : t_u16_t) := C_u64 (f_into (0 x)); +}. + +#[global] Instance t_u128_t_t_From : t_From t_u128_t t_u16_t := { + f_from (x : t_u16_t) := C_u128 (f_into (0 x)); +}. + +#[global] Instance t_usize_t_t_From : t_From t_usize_t t_u16_t := { + f_from (x : t_u16_t) := C_usize (f_into (0 x)); +}. + +#[global] Instance t_u8_t_t_From : t_From t_u8_t t_u32_t := { + f_from (x : t_u32_t) := C_u8 (f_into (0 x)); +}. + +#[global] Instance t_u16_t_t_From : t_From t_u16_t t_u32_t := { + f_from (x : t_u32_t) := C_u16 (f_into (0 x)); +}. + +#[global] Instance t_u64_t_t_From : t_From t_u64_t t_u32_t := { + f_from (x : t_u32_t) := C_u64 (f_into (0 x)); +}. + +#[global] Instance t_u128_t_t_From : t_From t_u128_t t_u32_t := { + f_from (x : t_u32_t) := C_u128 (f_into (0 x)); +}. + +#[global] Instance t_usize_t_t_From : t_From t_usize_t t_u32_t := { + f_from (x : t_u32_t) := C_usize (f_into (0 x)); +}. + +#[global] Instance t_u8_t_t_From : t_From t_u8_t t_u64_t := { + f_from (x : t_u64_t) := C_u8 (f_into (0 x)); +}. + +#[global] Instance t_u16_t_t_From : t_From t_u16_t t_u64_t := { + f_from (x : t_u64_t) := C_u16 (f_into (0 x)); +}. + +#[global] Instance t_u32_t_t_From : t_From t_u32_t t_u64_t := { + f_from (x : t_u64_t) := C_u32 (f_into (0 x)); +}. + +#[global] Instance t_u128_t_t_From : t_From t_u128_t t_u64_t := { + f_from (x : t_u64_t) := C_u128 (f_into (0 x)); +}. + +#[global] Instance t_u8_t_t_From : t_From t_u8_t t_u128_t := { + f_from (x : t_u128_t) := C_u8 (f_into (0 x)); +}. + +#[global] Instance t_u16_t_t_From : t_From t_u16_t t_u128_t := { + f_from (x : t_u128_t) := C_u16 (f_into (0 x)); +}. + +#[global] Instance t_u32_t_t_From : t_From t_u32_t t_u128_t := { + f_from (x : t_u128_t) := C_u32 (f_into (0 x)); +}. + +#[global] Instance t_u64_t_t_From : t_From t_u64_t t_u128_t := { + f_from (x : t_u128_t) := C_u64 (f_into (0 x)); +}. + +#[global] Instance t_usize_t_t_From : t_From t_usize_t t_u128_t := { + f_from (x : t_u128_t) := C_usize (f_into (0 x)); +}. + +#[global] Instance t_u8_t_t_From : t_From t_u8_t t_usize_t := { + f_from (x : t_usize_t) := C_u8 (f_into (0 x)); +}. + +#[global] Instance t_u16_t_t_From : t_From t_u16_t t_usize_t := { + f_from (x : t_usize_t) := C_u16 (f_into (0 x)); +}. + +#[global] Instance t_u32_t_t_From : t_From t_u32_t t_usize_t := { + f_from (x : t_usize_t) := C_u32 (f_into (0 x)); +}. + +#[global] Instance t_u128_t_t_From : t_From t_u128_t t_usize_t := { + f_from (x : t_usize_t) := C_u128 (f_into (0 x)); +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v new file mode 100644 index 000000000..e9c31dec1 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v @@ -0,0 +1,190 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Super. +Export Super. + +Require Import primitive. +Export primitive. + +Require Import Core_Cmp. +Export Core_Cmp. + +Require Import Core_Convert. +Export Core_Convert. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +#[global] Instance t_i8_t_t_From : t_From t_i8_t int8 := { + f_from (x : int8) := C_i8 (Build_I8 (f_v := f_into x)); +}. + +#[global] Instance int8_t_From : t_From int8 t_i8_t := { + f_from (x : t_i8_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_i16_t_t_From : t_From t_i16_t int16 := { + f_from (x : int16) := C_i16 (Build_I16 (f_v := f_into x)); +}. + +#[global] Instance int16_t_From : t_From int16 t_i16_t := { + f_from (x : t_i16_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_i32_t_t_From : t_From t_i32_t int32 := { + f_from (x : int32) := C_i32 (Build_I32 (f_v := f_into x)); +}. + +#[global] Instance int32_t_From : t_From int32 t_i32_t := { + f_from (x : t_i32_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_i64_t_t_From : t_From t_i64_t int64 := { + f_from (x : int64) := C_i64 (Build_I64 (f_v := f_into x)); +}. + +#[global] Instance int64_t_From : t_From int64 t_i64_t := { + f_from (x : t_i64_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_i128_t_t_From : t_From t_i128_t int128 := { + f_from (x : int128) := C_i128 (Build_I128 (f_v := f_into x)); +}. + +#[global] Instance int128_t_From : t_From int128 t_i128_t := { + f_from (x : t_i128_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_isize_t_t_From : t_From t_isize_t uint_size := { + f_from (x : uint_size) := C_isize (Build_I64 (f_v := f_into x)); +}. + +#[global] Instance uint_size_t_From : t_From uint_size t_isize_t := { + f_from (x : t_isize_t) := f_into (f_v (0 x)); +}. + +#[global] Instance t_i16_t_t_From : t_From t_i16_t t_i8_t := { + f_from (x : t_i8_t) := C_i16 (f_into (0 x)); +}. + +#[global] Instance t_i32_t_t_From : t_From t_i32_t t_i8_t := { + f_from (x : t_i8_t) := C_i32 (f_into (0 x)); +}. + +#[global] Instance t_i64_t_t_From : t_From t_i64_t t_i8_t := { + f_from (x : t_i8_t) := C_i64 (f_into (0 x)); +}. + +#[global] Instance t_i128_t_t_From : t_From t_i128_t t_i8_t := { + f_from (x : t_i8_t) := C_i128 (f_into (0 x)); +}. + +#[global] Instance t_isize_t_t_From : t_From t_isize_t t_i8_t := { + f_from (x : t_i8_t) := C_isize (f_into (0 x)); +}. + +#[global] Instance t_i8_t_t_From : t_From t_i8_t t_i16_t := { + f_from (x : t_i16_t) := C_i8 (f_into (0 x)); +}. + +#[global] Instance t_i32_t_t_From : t_From t_i32_t t_i16_t := { + f_from (x : t_i16_t) := C_i32 (f_into (0 x)); +}. + +#[global] Instance t_i64_t_t_From : t_From t_i64_t t_i16_t := { + f_from (x : t_i16_t) := C_i64 (f_into (0 x)); +}. + +#[global] Instance t_i128_t_t_From : t_From t_i128_t t_i16_t := { + f_from (x : t_i16_t) := C_i128 (f_into (0 x)); +}. + +#[global] Instance t_isize_t_t_From : t_From t_isize_t t_i16_t := { + f_from (x : t_i16_t) := C_isize (f_into (0 x)); +}. + +#[global] Instance t_i8_t_t_From : t_From t_i8_t t_i32_t := { + f_from (x : t_i32_t) := C_i8 (f_into (0 x)); +}. + +#[global] Instance t_i16_t_t_From : t_From t_i16_t t_i32_t := { + f_from (x : t_i32_t) := C_i16 (f_into (0 x)); +}. + +#[global] Instance t_i64_t_t_From : t_From t_i64_t t_i32_t := { + f_from (x : t_i32_t) := C_i64 (f_into (0 x)); +}. + +#[global] Instance t_i128_t_t_From : t_From t_i128_t t_i32_t := { + f_from (x : t_i32_t) := C_i128 (f_into (0 x)); +}. + +#[global] Instance t_isize_t_t_From : t_From t_isize_t t_i32_t := { + f_from (x : t_i32_t) := C_isize (f_into (0 x)); +}. + +#[global] Instance t_i8_t_t_From : t_From t_i8_t t_i64_t := { + f_from (x : t_i64_t) := C_i8 (f_into (0 x)); +}. + +#[global] Instance t_i16_t_t_From : t_From t_i16_t t_i64_t := { + f_from (x : t_i64_t) := C_i16 (f_into (0 x)); +}. + +#[global] Instance t_i32_t_t_From : t_From t_i32_t t_i64_t := { + f_from (x : t_i64_t) := C_i32 (f_into (0 x)); +}. + +#[global] Instance t_i128_t_t_From : t_From t_i128_t t_i64_t := { + f_from (x : t_i64_t) := C_i128 (f_into (0 x)); +}. + +#[global] Instance t_isize_t_t_From : t_From t_isize_t t_i64_t := { + f_from (x : t_i64_t) := C_isize (f_into (0 x)); +}. + +#[global] Instance t_i8_t_t_From : t_From t_i8_t t_i128_t := { + f_from (x : t_i128_t) := C_i8 (f_into (0 x)); +}. + +#[global] Instance t_i16_t_t_From : t_From t_i16_t t_i128_t := { + f_from (x : t_i128_t) := C_i16 (f_into (0 x)); +}. + +#[global] Instance t_i32_t_t_From : t_From t_i32_t t_i128_t := { + f_from (x : t_i128_t) := C_i32 (f_into (0 x)); +}. + +#[global] Instance t_i64_t_t_From : t_From t_i64_t t_i128_t := { + f_from (x : t_i128_t) := C_i64 (f_into (0 x)); +}. + +#[global] Instance t_isize_t_t_From : t_From t_isize_t t_i128_t := { + f_from (x : t_i128_t) := C_isize (f_into (0 x)); +}. + +#[global] Instance t_i8_t_t_From : t_From t_i8_t t_isize_t := { + f_from (x : t_isize_t) := C_i8 (f_into (0 x)); +}. + +#[global] Instance t_i16_t_t_From : t_From t_i16_t t_isize_t := { + f_from (x : t_isize_t) := C_i16 (f_into (0 x)); +}. + +#[global] Instance t_i32_t_t_From : t_From t_i32_t t_isize_t := { + f_from (x : t_isize_t) := C_i32 (f_into (0 x)); +}. + +#[global] Instance t_i64_t_t_From : t_From t_i64_t t_isize_t := { + f_from (x : t_isize_t) := C_i64 (f_into (0 x)); +}. + +#[global] Instance t_i128_t_t_From : t_From t_i128_t t_isize_t := { + f_from (x : t_isize_t) := C_i128 (f_into (0 x)); +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Result.v b/proof-libs/coq/coq/generated-core/src/Core_Result.v new file mode 100644 index 000000000..acfb3a5f7 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Result.v @@ -0,0 +1,20 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Inductive t_Result (T : _) (E : _) : Type := +| Result_Ok : T -> t_Result (T : _) (E : _) +| Result_Err : E -> t_Result (T : _) (E : _). +Arguments Result_Ok {_} {_} T. +Arguments Result_Err {_} {_} E. + +Definition impl__ok (self : t_Result_t T E) : t_Option_t T := + match self with + | Result_Ok x => + Option_Some x + | Result_Err _ => + Option_Nonet_Option_t T + end. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice.v b/proof-libs/coq/coq/generated-core/src/Core_Slice.v new file mode 100644 index 000000000..067c6cb00 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice.v @@ -0,0 +1,25 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import Slice. +Export Slice. + +Require Import Iter. +Export Iter. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +Definition impl__len (self : t_Slice_t T) : uint_size := + f_from (len (f_clone (f_v self))). + +Definition impl__is_empty (self : t_Slice_t T) : bool := + eq (impl__len self) (@repr WORDSIZE32 0). + +Definition impl__iter (self : t_Slice_t T) : t_Iter_t T := + impl__new self. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice_Index.v b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index.v new file mode 100644 index 000000000..699e3d29a --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index.v @@ -0,0 +1,22 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import ops. +Export ops. + +Require Import Slice. +Export Slice. + +(*Not implemented yet? todo(item)*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) + +(*item error backend*) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice_Index_Private_slice_index.v b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index_Private_slice_index.v new file mode 100644 index 000000000..2c398344a --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index_Private_slice_index.v @@ -0,0 +1,39 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import ops. +Export ops. + +Class t_Sealed := { +}. + +#[global] Instance t_RangeTo_t uint_size_t_Sealed : t_Sealed (t_RangeTo_t uint_size) := { +}. + +#[global] Instance t_RangeFrom_t uint_size_t_Sealed : t_Sealed (t_RangeFrom_t uint_size) := { +}. + +#[global] Instance t_RangeFull_t_t_Sealed : t_Sealed t_RangeFull_t := { +}. + +#[global] Instance t_RangeInclusive_t uint_size_t_Sealed : t_Sealed (t_RangeInclusive_t uint_size) := { +}. + +#[global] Instance t_RangeToInclusive_t uint_size_t_Sealed : t_Sealed (t_RangeToInclusive_t uint_size) := { +}. + +#[global] Instance t_Bound_t uint_size × t_Bound_t uint_size_t_Sealed : t_Sealed (t_Bound_t uint_size × t_Bound_t uint_size) := { +}. + +#[global] Instance t_Range_t uint_size_t_Sealed : t_Sealed (t_Range_t uint_size) := { +}. + +#[global] Instance t_IndexRange_t_t_Sealed : t_Sealed t_IndexRange_t := { +}. + +#[global] Instance t_usize_t_t_Sealed : t_Sealed t_usize_t := { +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v new file mode 100644 index 000000000..31e08ace3 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v @@ -0,0 +1,26 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +Require Import PhantomData. +Export PhantomData. + +Require Import Slice. +Export Slice. + +(*Not implemented yet? todo(item)*) + +Record t_Iter (T : _) : Type := { + f_data : t_Slice_t T; + f__marker : t_PhantomData_t T; +}. + +Definition impl__new (slice : t_Slice_t T) : t_Iter_t T := + Build_Iter (f_data := f_clone slice) (f__marker := PhantomDatat_PhantomData_t T). + +#[global] Instance t_Iter_t T_t_Clone (T : _) : t_Clone (t_Iter_t T) := { + f_clone (self : t_Iter_t T) := Build_Iter (f_data := f_clone (f_data self)) (f__marker := f__marker self); +}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter_Macros.v b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter_Macros.v new file mode 100644 index 000000000..5c969987f --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter_Macros.v @@ -0,0 +1,12 @@ +(* File automatically generated by Hacspec *) +From Hacspec Require Import Hacspec_Lib MachineIntegers. +From Coq Require Import ZArith. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) From e4a6b7077f1be68b1d4351cd54cd78c2d4647f41 Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Fri, 22 Nov 2024 13:30:47 +0100 Subject: [PATCH 22/59] _CoqProject file --- proof-libs/coq/coq/generated-core/_CoqProject | 64 ++++++++++++++----- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/proof-libs/coq/coq/generated-core/_CoqProject b/proof-libs/coq/coq/generated-core/_CoqProject index d24f4b58d..3bbb2fdda 100644 --- a/proof-libs/coq/coq/generated-core/_CoqProject +++ b/proof-libs/coq/coq/generated-core/_CoqProject @@ -6,36 +6,66 @@ ./src/Core_Marker.v +./src/Core_Panicking.v + + +./src/Core_Ops_Arith.v +./src/Core_Ops_Bit.v +./src/Core_Ops_Index.v +./src/Core_Ops_Function.v + ./src/Core_Option.v ./src/Core_Cmp.v +./src/Core_Result.v + ./src/Core_Base_Int.v -./src/Core_Base_Int_Base_spec.v -./src/Core_Base_Int_Base_impl.v +./src/Core_Base_Int_Base_src.v +# ./src/Core_Base_Int_Base_impl.v -./src/Core_Coerce.v -./src/Core_Convert.v +# ./src/Core_Coerce.v +# ./src/Core_Convert.v -./src/Core_Ops_Arith.v -./src/Core_Ops_Bit.v +# ./src/Core_Int.v -./src/Core_Ops.v +# ./src/Core_Base_Seq.v +# ./src/Core_Base_Seq_Base_src.v -./src/Core_Int.v +# ./src/Core_Base_Seq_Base_impl.v -./src/Core_Base_Seq.v -./src/Core_Base_Seq_Base_spec.v +# ./src/Core_Primitive.v -./src/Core_Panicking.v +# ./src/Core_Base_Int_Number_conversion.v + +# ./src/Core_Iter_Traits_Iterator.v +# ./src/Core_Iter_Traits_Collect.v +# ./src/Core_Iter_Traits_Exact_size.v + +# ./src/Core_Ops_Index_range.v +# ./src/Core_Ops.v + +# ./src/Core_Array_Iter.v +# ./src/Core_Array.v + +# ./src/Core_Intrinsics.v + +# ./src/Core_Ops_Range.v + +# ./src/Core_Iter_Range.v +# ./src/Core_Range.v + +# ./src/Core_Iter.v +# ./src/Core_Range_Legacy.v -./src/Core_Base_Seq_Base_impl.v +# ./src/Core_Range_Iter.v -./src/Core_Primitive.v +# ./src/Core_Slice.v +# ./src/Core_Slice_Index_Private_slice_index.v +# ./src/Core_Slice_Index.v -./src/Core_Base_Int_Number_conversion.v +# ./src/Core_Num.v -./src/Core_Array.v +# # Extra -./src/Core_Intrinsics.v +# ./src/Core.v -./src/Core_Num.v From 16f7492228fb2ecd3fc94e73ec1d15f85b33fb88 Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Fri, 22 Nov 2024 13:46:30 +0100 Subject: [PATCH 23/59] Correct version of generated core lib --- proof-libs/coq/coq/generated-core/src/Core.v | 105 +- .../coq/coq/generated-core/src/Core_Array.v | 89 +- .../coq/generated-core/src/Core_Array_Iter.v | 98 +- .../src/Core_Array_Rec_bundle_579704328.v | 4579 ++++++++++ .../coq/coq/generated-core/src/Core_Base.v | 91 +- .../coq/generated-core/src/Core_Base_Binary.v | 271 +- .../src/Core_Base_Number_conversion.v | 481 +- .../coq/generated-core/src/Core_Base_Pos.v | 636 +- .../coq/generated-core/src/Core_Base_Seq.v | 250 +- .../coq/generated-core/src/Core_Base_Spec.v | 95 +- .../src/Core_Base_Spec_Binary.v | 65 +- .../src/Core_Base_Spec_Binary_Pos.v | 78 +- .../src/Core_Base_Spec_Binary_Positive.v | 136 +- .../src/Core_Base_Spec_Constants.v | 218 +- .../src/Core_Base_Spec_Haxint.v | 92 +- .../generated-core/src/Core_Base_Spec_Seq.v | 85 +- .../generated-core/src/Core_Base_Spec_Unary.v | 110 +- .../coq/generated-core/src/Core_Base_Spec_Z.v | 74 +- .../coq/coq/generated-core/src/Core_Base_Z.v | 563 +- .../generated-core/src/Core_Base_interface.v | 65 +- .../src/Core_Base_interface_Coerce.v | 69 +- .../src/Core_Base_interface_Int.v | 3216 ++++--- .../src/Core_Base_interface_Int_I128_proofs.v | 63 +- .../src/Core_Base_interface_Int_I16_proofs.v | 63 +- .../src/Core_Base_interface_Int_I32_proofs.v | 63 +- .../src/Core_Base_interface_Int_I64_proofs.v | 63 +- .../src/Core_Base_interface_Int_I8_proofs.v | 63 +- .../src/Core_Base_interface_Int_U128_proofs.v | 87 +- .../src/Core_Base_interface_Int_U16_proofs.v | 87 +- .../src/Core_Base_interface_Int_U32_proofs.v | 87 +- .../src/Core_Base_interface_Int_U64_proofs.v | 87 +- .../src/Core_Base_interface_Int_U8_proofs.v | 87 +- .../coq/coq/generated-core/src/Core_Clone.v | 61 +- .../coq/coq/generated-core/src/Core_Cmp.v | 275 +- .../coq/coq/generated-core/src/Core_Convert.v | 85 +- .../coq/coq/generated-core/src/Core_Fmt.v | 55 +- .../coq/generated-core/src/Core_Intrinsics.v | 719 +- .../coq/coq/generated-core/src/Core_Iter.v | 77 +- .../coq/generated-core/src/Core_Iter_Range.v | 321 +- .../coq/generated-core/src/Core_Iter_Traits.v | 91 +- .../src/Core_Iter_Traits_Collect.v | 84 +- .../src/Core_Iter_Traits_Exact_size.v | 67 +- .../src/Core_Iter_Traits_Iterator.v | 79 +- .../src/Core_Iter_Traits_Marker.v | 81 +- .../coq/coq/generated-core/src/Core_Marker.v | 81 +- .../coq/coq/generated-core/src/Core_Num.v | 887 +- .../generated-core/src/Core_Num_Int_macros.v | 55 +- .../generated-core/src/Core_Num_Uint_macros.v | 55 +- .../coq/coq/generated-core/src/Core_Ops.v | 133 +- .../coq/generated-core/src/Core_Ops_Arith.v | 109 +- .../src/Core_Ops_Arith_Impls_for_prims.v | 249 +- .../coq/coq/generated-core/src/Core_Ops_Bit.v | 107 +- .../src/Core_Ops_Bit_Impls_for_prims.v | 325 +- .../generated-core/src/Core_Ops_Function.v | 83 +- .../coq/generated-core/src/Core_Ops_Index.v | 60 +- .../generated-core/src/Core_Ops_Index_range.v | 112 +- .../coq/generated-core/src/Core_Ops_Range.v | 67 +- .../coq/coq/generated-core/src/Core_Option.v | 128 +- .../coq/generated-core/src/Core_Panicking.v | 115 +- .../coq/generated-core/src/Core_Primitive.v | 797 +- .../src/Core_Primitive_Number_conversion.v | 241 +- .../src/Core_Primitive_Number_conversion_i.v | 241 +- .../coq/coq/generated-core/src/Core_Result.v | 73 +- .../coq/coq/generated-core/src/Core_Slice.v | 79 +- .../coq/generated-core/src/Core_Slice_Index.v | 71 +- .../Core_Slice_Index_Private_slice_index.v | 89 +- .../coq/generated-core/src/Core_Slice_Iter.v | 89 +- .../src/Core_Slice_Iter_Macros.v | 59 +- .../coq/coq/generated-core/src/_CoqProject | 72 + .../Core.Array.Rec_bundle_579704328.fst | 8018 +++++++++++++++++ .../fstar/generated-core/Core.Array.fst | 67 +- .../fstar/generated-core/Core.Base.Binary.fst | 2 +- .../Core.Base.Number_conversion.fst | 717 +- .../fstar/generated-core/Core.Base.Pos.fst | 42 +- .../fstar/generated-core/Core.Base.Seq.fst | 18 +- .../Core.Base.Spec.Binary.Positive.fst | 66 +- .../generated-core/Core.Base.Spec.Seq.fst | 96 +- .../generated-core/Core.Base.Spec.Unary.fst | 40 +- .../fstar/generated-core/Core.Base.Z.fst | 34 +- .../Core.Base_interface.Coerce.fst | 14 +- .../Core.Base_interface.Int.U128_proofs.fst | 11 +- .../Core.Base_interface.Int.U16_proofs.fst | 11 +- .../Core.Base_interface.Int.U32_proofs.fst | 11 +- .../Core.Base_interface.Int.U64_proofs.fst | 11 +- .../Core.Base_interface.Int.U8_proofs.fst | 11 +- .../Core.Base_interface.Int.fst | 3350 +++---- .../fstar/generated-core/Core.Intrinsics.fst | 2876 +----- .../fstar/generated-core/Core.Iter.Range.fst | 20 +- .../Core.Iter.Traits.Collect.fst | 4 +- .../Core.Iter.Traits.Marker.fst | 10 +- proof-libs/fstar/generated-core/Core.Num.fst | 1671 +--- .../Core.Ops.Arith.Impls_for_prims.fst | 1312 +-- .../Core.Ops.Bit.Impls_for_prims.fst | 1994 +--- .../generated-core/Core.Ops.Function.fst | 6 +- .../generated-core/Core.Ops.Index_range.fst | 8 +- .../Core.Primitive.Number_conversion.fst | 811 +- .../Core.Primitive.Number_conversion_i.fst | 796 +- .../fstar/generated-core/Core.Primitive.fst | 1464 +-- .../Core.Slice.Index.Private_slice_index.fst | 30 +- .../fstar/generated-core/Core.Slice.Index.fst | 67 +- .../fstar/generated-core/Core.Slice.fst | 12 +- 101 files changed, 24536 insertions(+), 17652 deletions(-) create mode 100644 proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v create mode 100644 proof-libs/coq/coq/generated-core/src/_CoqProject create mode 100644 proof-libs/fstar/generated-core/Core.Array.Rec_bundle_579704328.fst diff --git a/proof-libs/coq/coq/generated-core/src/Core.v b/proof-libs/coq/coq/generated-core/src/Core.v index deb61abc5..211e91b83 100644 --- a/proof-libs/coq/coq/generated-core/src/Core.v +++ b/proof-libs/coq/coq/generated-core/src/Core.v @@ -1,55 +1,108 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Primitive. -Export Primitive. +(* From Core Require Import Core. *) -(*Not implemented yet? todo(item)*) +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -(*Not implemented yet? todo(item)*) -(*Not implemented yet? todo(item)*) -(*Not implemented yet? todo(item)*) +From Core Require Import primitive. +Export primitive. -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array.v b/proof-libs/coq/coq/generated-core/src/Core_Array.v index 7d262d561..58124ad53 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Array.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Array.v @@ -1,33 +1,86 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Index. -Export Index. +(* From Core Require Import Core. *) -Require Import IndexMut. -Export IndexMut. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Slice. -Export Slice. -Require Import Array. -Export Array. -Require Import IntoIter. -Export IntoIter. +From Core Require Import Core_Ops (t_Index). +Export Core_Ops (t_Index). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Ops (t_IndexMut). +Export Core_Ops (t_IndexMut). -Record t_TryFromSliceError : Type := { - 0 : unit; -}. +From Core Require Import Core_Primitive (t_Slice). +Export Core_Primitive (t_Slice). -(*item error backend*) +From Core Require Import Core_Primitive (t_Array). +Export Core_Primitive (t_Array). -(*item error backend*) +From Core Require Import Self_Iter (t_IntoIter). +Export Self_Iter (t_IntoIter). -(*item error backend*) +Notation "'t_TryFromSliceError'" := (t_TryFromSliceError). + +Notation "'TryFromSliceError_0'" := (TryFromSliceError_0). + +(* NotImplementedYet *) + +Notation "'impl_2'" := (impl_2). + +Notation "'impl_1'" := (impl_1). + +Notation "'impl'" := (impl). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v b/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v index 0ed971717..7662013e8 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v @@ -1,32 +1,94 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import NonZero. -Export NonZero. +(* From Core Require Import Core. *) -Require Import IndexRange. -Export IndexRange. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Range. -Export Range. +From Core Require Import Core_Num (t_NonZero). +Export Core_Num (t_NonZero). -Require Import Array. -Export Array. -Require Import IntoIterator. -Export IntoIterator. -Require Import Core_Clone. -Export Core_Clone. +From Core Require Import Core_Ops (t_IndexRange). +Export Core_Ops (t_IndexRange). -Require Import Crate_Base. -Export Crate_Base. +From Core Require Import Core_Ops (t_Range). +Export Core_Ops (t_Range). -Require Import Hax_lib. -Export Hax_lib. +From Core Require Import Core_Primitive (t_Array). +Export Core_Primitive (t_Array). -(*item error backend*) +From Core Require Import Core_Iter (t_IntoIterator). +Export Core_Iter (t_IntoIterator). + +From Core Require Import Core (t_clone). +Export Core (t_clone). + +From Core Require Import Core (t_base). +Export Core (t_base). + +From Core Require Import hax_lib. +Export hax_lib. + +Record t_IntoIter (v_T : Type) (v_N : t_usize) `{t_Sized (v_T)} : Type := + { + IntoIter_f_data : t_Array ((v_T)) (v_N); + IntoIter_f_alive : t_IndexRange; + }. +Arguments Build_t_IntoIter (_) (_) {_}. +Arguments IntoIter_f_data {_} {_} {_}. +Arguments IntoIter_f_alive {_} {_} {_}. +#[export] Instance settable_t_IntoIter `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} : Settable _ := + settable! (Build_t_IntoIter v_T v_N) . diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v b/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v new file mode 100644 index 000000000..fc396b5d8 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v @@ -0,0 +1,4579 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +Record t_TryFromSliceError : Type := + { + TryFromSliceError_0 : unit; + }. +Arguments Build_t_TryFromSliceError. +Arguments TryFromSliceError_0. +#[export] Instance settable_t_TryFromSliceError : Settable _ := + settable! (Build_t_TryFromSliceError) . +Notation "'TryFromSliceError'" := Build_t_TryFromSliceError. + +Record t_Seq (v_T : Type) `{t_Sized (v_T)} : Type := + { + Seq_f_v : t_Vec ((v_T)) ((t_Global)); + }. +Arguments Build_t_Seq (_) {_}. +Arguments Seq_f_v {_} {_}. +#[export] Instance settable_t_Seq `{v_T : Type} `{t_Sized (v_T)} : Settable _ := + settable! (Build_t_Seq v_T) . + +Instance t_Clone_640571940 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Seq ((v_T)))) := + { + Clone_impl_f_clone := fun (self : t_Seq ((v_T)))=> + t_Seq (Clone_f_clone (Seq_f_v self)); + }. + +Inductive t_LIST (v_T : Type) `{t_Sized (v_T)} : Type := +| LIST_NIL +| LIST_CONS : v_T -> t_Seq ((v_T)) -> _. +Arguments LIST_NIL {_} {_}. +Arguments LIST_CONS {_} {_}. + +Definition nil `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} '(_ : unit) : t_Seq ((v_T)) := + t_Seq (impl__new (tt)). + +Record t_Slice (v_T : Type) `{t_Sized (v_T)} : Type := + { + Slice_f_v : t_Seq ((v_T)); + }. +Arguments Build_t_Slice (_) {_}. +Arguments Slice_f_v {_} {_}. +#[export] Instance settable_t_Slice `{v_T : Type} `{t_Sized (v_T)} : Settable _ := + settable! (Build_t_Slice v_T) . + +Instance t_From_692299963 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_From ((t_Slice ((v_T)))) ((t_Slice v_T)) := + { + From_impl_2_f_from := fun (x : t_Slice v_T)=> + t_Slice (t_Seq (impl__to_vec (x))); + }. + +Record t_Array (v_T : Type) (v_N : t_usize) `{t_Sized (v_T)} : Type := + { + Array_f_v : t_Slice ((v_T)); + }. +Arguments Build_t_Array (_) (_) {_}. +Arguments Array_f_v {_} {_} {_}. +#[export] Instance settable_t_Array `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} : Settable _ := + settable! (Build_t_Array v_T v_N) . + +Instance t_Clone_962303223 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Array ((v_T)) (v_N))) := + { + Clone_impl_2_f_clone := fun (self : t_Array ((v_T)) (v_N))=> + t_Array (Clone_f_clone (Array_f_v self)); + }. + +Definition cast `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} (self : t_Array ((v_T)) (v_N)) : t_Slice ((v_T)) := + Array_f_v self. + +Record t_i128 : Type := + { + i128_0 : t_I128; + }. +Arguments Build_t_i128. +Arguments i128_0. +#[export] Instance settable_t_i128 : Settable _ := + settable! (Build_t_i128) . +Notation "'i128'" := Build_t_i128. + +Instance t_Clone_173398349 : t_Clone ((t_i128)) := + { + Clone_impl_25_f_clone := fun (self : t_i128)=> + t_i128 (Clone_f_clone (i128_0 self)); + }. + +Record t_i16 : Type := + { + i16_0 : t_I16; + }. +Arguments Build_t_i16. +Arguments i16_0. +#[export] Instance settable_t_i16 : Settable _ := + settable! (Build_t_i16) . +Notation "'i16'" := Build_t_i16. + +Instance t_Clone_192670426 : t_Clone ((t_i16)) := + { + Clone_impl_19_f_clone := fun (self : t_i16)=> + t_i16 (Clone_f_clone (i16_0 self)); + }. + +Record t_i32 : Type := + { + i32_0 : t_I32; + }. +Arguments Build_t_i32. +Arguments i32_0. +#[export] Instance settable_t_i32 : Settable _ := + settable! (Build_t_i32) . +Notation "'i32'" := Build_t_i32. + +Instance t_Clone_502683757 : t_Clone ((t_i32)) := + { + Clone_impl_21_f_clone := fun (self : t_i32)=> + t_i32 (Clone_f_clone (i32_0 self)); + }. + +Record t_i64 : Type := + { + i64_0 : t_I64; + }. +Arguments Build_t_i64. +Arguments i64_0. +#[export] Instance settable_t_i64 : Settable _ := + settable! (Build_t_i64) . +Notation "'i64'" := Build_t_i64. + +Instance t_Clone_208076318 : t_Clone ((t_i64)) := + { + Clone_impl_23_f_clone := fun (self : t_i64)=> + t_i64 (Clone_f_clone (i64_0 self)); + }. + +Record t_i8 : Type := + { + i8_0 : t_I8; + }. +Arguments Build_t_i8. +Arguments i8_0. +#[export] Instance settable_t_i8 : Settable _ := + settable! (Build_t_i8) . +Notation "'i8'" := Build_t_i8. + +Instance t_Clone_654126073 : t_Clone ((t_i8)) := + { + Clone_impl_17_f_clone := fun (self : t_i8)=> + t_i8 (Clone_f_clone (i8_0 self)); + }. + +Record t_isize : Type := + { + isize_0 : t_I64; + }. +Arguments Build_t_isize. +Arguments isize_0. +#[export] Instance settable_t_isize : Settable _ := + settable! (Build_t_isize) . +Notation "'isize'" := Build_t_isize. + +Instance t_Clone_36465747 : t_Clone ((t_isize)) := + { + Clone_impl_27_f_clone := fun (self : t_isize)=> + t_isize (Clone_f_clone (isize_0 self)); + }. + +Instance t_From_200584765 : t_From ((t_isize)) ((t_i64)) := + { + From_impl_31_f_from := fun (x : t_i64)=> + t_isize (Into_f_into (i64_0 x)); + }. + +Instance t_From_705632684 : t_From ((t_i64)) ((t_isize)) := + { + From_impl_40_f_from := fun (x : t_isize)=> + t_i64 (Into_f_into (isize_0 x)); + }. + +Record t_u128 : Type := + { + u128_0 : t_U128; + }. +Arguments Build_t_u128. +Arguments u128_0. +#[export] Instance settable_t_u128 : Settable _ := + settable! (Build_t_u128) . +Notation "'u128'" := Build_t_u128. + +Definition from_le715594649 (x : t_u128) : t_u128 := + x. + +Definition to_le902648378 (self : t_u128) : t_u128 := + self. + +Record t_u16 : Type := + { + u16_0 : t_U16; + }. +Arguments Build_t_u16. +Arguments u16_0. +#[export] Instance settable_t_u16 : Settable _ := + settable! (Build_t_u16) . +Notation "'u16'" := Build_t_u16. + +Definition from_le793045973 (x : t_u16) : t_u16 := + x. + +Definition to_le1012469456 (self : t_u16) : t_u16 := + self. + +Record t_u32 : Type := + { + u32_0 : t_U32; + }. +Arguments Build_t_u32. +Arguments u32_0. +#[export] Instance settable_t_u32 : Settable _ := + settable! (Build_t_u32) . +Notation "'u32'" := Build_t_u32. + +Definition from_le706338679 (x : t_u32) : t_u32 := + x. + +Definition to_le724624277 (self : t_u32) : t_u32 := + self. + +Record t_u64 : Type := + { + u64_0 : t_U64; + }. +Arguments Build_t_u64. +Arguments u64_0. +#[export] Instance settable_t_u64 : Settable _ := + settable! (Build_t_u64) . +Notation "'u64'" := Build_t_u64. + +Definition from_le435089922 (x : t_u64) : t_u64 := + x. + +Definition to_le2703875 (self : t_u64) : t_u64 := + self. + +Record t_u8 : Type := + { + u8_0 : t_U8; + }. +Arguments Build_t_u8. +Arguments u8_0. +#[export] Instance settable_t_u8 : Settable _ := + settable! (Build_t_u8) . +Notation "'u8'" := Build_t_u8. + +Definition from_le529489651 (x : t_u8) : t_u8 := + x. + +Definition to_le523556665 (self : t_u8) : t_u8 := + self. + +Record t_usize : Type := + { + usize_0 : t_U64; + }. +Arguments Build_t_usize. +Arguments usize_0. +#[export] Instance settable_t_usize : Settable _ := + settable! (Build_t_usize) . +Notation "'usize'" := Build_t_usize. + +Definition from_le418743864 (x : t_usize) : t_usize := + x. + +Definition to_le946822077 (self : t_usize) : t_usize := + self. + +Instance t_From_1035345737 : t_From ((t_usize)) ((t_u64)) := + { + From_impl_31_f_from := fun (x : t_u64)=> + t_usize (Into_f_into (u64_0 x)); + }. + +Instance t_From_478985084 : t_From ((t_u64)) ((t_usize)) := + { + From_impl_40_f_from := fun (x : t_usize)=> + t_u64 (Into_f_into (usize_0 x)); + }. + +Class v_Sealed (v_Self : Type) : Type := + { + }. +Arguments v_Sealed (_). + +Instance v_Sealed_639968800 : v_Sealed ((t_usize)) := + { + }. + +Instance v_Sealed_740757788 : v_Sealed ((t_Range ((t_usize)))) := + { + }. + +Instance v_Sealed_1056036517 : v_Sealed ((t_RangeTo ((t_usize)))) := + { + }. + +Instance v_Sealed_277245654 : v_Sealed ((t_RangeFrom ((t_usize)))) := + { + }. + +Instance v_Sealed_1032594188 : v_Sealed ((t_RangeFull)) := + { + }. + +Instance v_Sealed_135080564 : v_Sealed ((t_RangeInclusive ((t_usize)))) := + { + }. + +Instance v_Sealed_919294089 : v_Sealed ((t_RangeToInclusive ((t_usize)))) := + { + }. + +Instance v_Sealed_254412259 : v_Sealed (((t_Bound ((t_usize))*t_Bound ((t_usize))))) := + { + }. + +Instance v_Sealed_463870686 : v_Sealed ((t_IndexRange)) := + { + }. + +Definition v_BITS80497669 : t_u32 := + t_u32 (impl_97__BITS). + +Definition v_MAX626626007 : t_i8 := + t_i8 (Constants_f_MAX). + +Definition v_MIN19747349 : t_i8 := + t_i8 (Constants_f_MIN). + +Definition v_BITS421056295 : t_u32 := + t_u32 (impl_83__BITS). + +Definition v_MAX474501300 : t_i16 := + t_i16 (Constants_f_MAX). + +Definition v_MIN776391606 : t_i16 := + t_i16 (Constants_f_MIN). + +Definition v_BITS465526498 : t_u32 := + t_u32 (impl_69__BITS). + +Definition v_MAX106630818 : t_i32 := + t_i32 (Constants_f_MAX). + +Definition v_MIN682967538 : t_i32 := + t_i32 (Constants_f_MIN). + +Definition v_BITS419886578 : t_u32 := + t_u32 (impl_55__BITS). + +Definition v_MAX527043787 : t_i64 := + t_i64 (Constants_f_MAX). + +Definition v_MIN654206259 : t_i64 := + t_i64 (Constants_f_MIN). + +Definition v_BITS992667165 : t_u32 := + t_u32 (impl_41__BITS). + +Definition v_MAX375377319 : t_i128 := + t_i128 (Constants_f_MAX). + +Definition v_MIN79612531 : t_i128 := + t_i128 (Constants_f_MIN). + +Definition v_BITS211584016 : t_u32 := + t_u32 (impl_55__BITS). + +Definition v_MAX937003029 : t_isize := + t_isize (Constants_f_MAX). + +Definition v_MIN1017039533 : t_isize := + t_isize (Constants_f_MIN). + +Definition v_BITS690311813 : t_u32 := + t_u32 (impl_219__BITS). + +Definition v_MAX310118176 : t_u8 := + t_u8 (Constants_f_MAX). + +Definition v_MIN41851434 : t_u8 := + t_u8 (Constants_f_MIN). + +Definition v_BITS277333551 : t_u32 := + t_u32 (impl_192__BITS). + +Definition v_MAX487295910 : t_u16 := + t_u16 (Constants_f_MAX). + +Definition v_MIN592300287 : t_u16 := + t_u16 (Constants_f_MIN). + +Definition v_BITS473478051 : t_u32 := + t_u32 (impl_165__BITS). + +Definition v_MAX826434525 : t_u32 := + t_u32 (Constants_f_MAX). + +Definition v_MIN932777089 : t_u32 := + t_u32 (Constants_f_MIN). + +Definition v_BITS177666292 : t_u32 := + t_u32 (impl_138__BITS). + +Definition v_MAX815180633 : t_u64 := + t_u64 (Constants_f_MAX). + +Definition v_MIN631333594 : t_u64 := + t_u64 (Constants_f_MIN). + +Definition v_BITS136999051 : t_u32 := + t_u32 (impl_111__BITS). + +Definition v_MAX404543799 : t_u128 := + t_u128 (Constants_f_MAX). + +Definition v_MIN668621698 : t_u128 := + t_u128 (Constants_f_MIN). + +Definition v_BITS229952196 : t_u32 := + t_u32 (impl_138__BITS). + +Definition v_MAX750570916 : t_usize := + t_usize (Constants_f_MAX). + +Definition v_MIN861571008 : t_usize := + t_usize (Constants_f_MIN). + +Instance t_Index_927562605 `{v_T : Type} `{v_I : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Sized (v_I)} `{t_Clone (v_T)} `{t_Index (t_Slice ((v_T))) (v_I)} : t_Index ((t_Array ((v_T)) (v_N))) ((v_I)) := + { + Index_impl_1_f_Output := Index_f_Output; + Index_impl_1_f_index := fun (self : t_Array ((v_T)) (v_N)) (index : v_I)=> + Index_f_index (cast (self)) (index); + }. + +Instance t_From_684363179 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_From ((t_Array (v_T) (v_N))) ((t_Array ((v_T)) (v_N))) := + { + From_impl_1_f_from := fun (x : t_Array ((v_T)) (v_N))=> + match TryInto_f_try_into (Seq_f_v Slice_f_v Array_f_v x) with + | Result_Ok (x) => + x + | _ => + never_to_any (panic_fmt (impl_2__new_const (["some error?"%string]))) + end; + }. + +Instance t_Clone_832469823 : t_Clone ((t_u8)) := + { + Clone_impl_5_f_clone := fun (self : t_u8)=> + t_u8 (Clone_f_clone (u8_0 self)); + }. + +Instance t_Clone_562622454 : t_Clone ((t_u16)) := + { + Clone_impl_7_f_clone := fun (self : t_u16)=> + t_u16 (Clone_f_clone (u16_0 self)); + }. + +Instance t_Clone_1034302141 : t_Clone ((t_u32)) := + { + Clone_impl_9_f_clone := fun (self : t_u32)=> + t_u32 (Clone_f_clone (u32_0 self)); + }. + +Instance t_Clone_189576787 : t_Clone ((t_u64)) := + { + Clone_impl_11_f_clone := fun (self : t_u64)=> + t_u64 (Clone_f_clone (u64_0 self)); + }. + +Instance t_Clone_296673181 : t_Clone ((t_u128)) := + { + Clone_impl_13_f_clone := fun (self : t_u128)=> + t_u128 (Clone_f_clone (u128_0 self)); + }. + +Instance t_Clone_466142540 : t_Clone ((t_usize)) := + { + Clone_impl_15_f_clone := fun (self : t_usize)=> + t_usize (Clone_f_clone (usize_0 self)); + }. + +Class v_SliceIndex (v_Self : Type) (v_T : Type) `{v_Sealed (v_Self)} : Type := + { + SliceIndex_f_Output : Type; + SliceIndex_f_index : v_Self -> v_T -> SliceIndex_f_Output; + }. +Arguments v_SliceIndex (_) (_) {_}. + +Instance t_Index_324031838 `{v_T : Type} `{v_I : Type} `{t_Sized (v_T)} `{t_Sized (v_I)} `{v_SliceIndex (v_I) (t_Slice ((v_T)))} : t_Index ((t_Slice ((v_T)))) ((v_I)) := + { + Index_impl_f_Output := SliceIndex_f_Output; + Index_impl_f_index := fun (self : t_Slice ((v_T))) (index : v_I)=> + SliceIndex_f_index (index) (self); + }. + +Definition cons `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) (t : v_T) : t_Seq ((v_T)) := + t_Seq (impl__concat (unsize ([Index_f_index ([t]) (Build_t_RangeFull); Index_f_index (Seq_f_v s) (Build_t_RangeFull)]))). + +Instance t_From_1005673342 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_From ((t_Array ((v_T)) (v_N))) ((t_Array (v_T) (v_N))) := + { + From_impl_f_from := fun (x : t_Array (v_T) (v_N))=> + t_Array (t_Slice (t_Seq (impl__to_vec (Index_f_index (x) (Build_t_RangeFull))))); + }. + +Instance v_SliceIndex_1030023794 `{v_T : Type} `{t_Sized (v_T)} : v_SliceIndex ((t_RangeFull)) ((t_Slice ((v_T)))) := + { + SliceIndex_impl_2_f_Output := t_Slice ((v_T)); + SliceIndex_impl_2_f_index := fun (self : t_RangeFull) (slice : t_Slice ((v_T)))=> + slice; + }. + +Instance t_AsRef_175264108 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_AsRef ((t_Array ((v_T)) (v_N))) ((t_Slice ((v_T)))) := + { + AsRef_impl_f_as_ref := fun (self : t_Array ((v_T)) (v_N))=> + Index_f_index (self) (Build_t_RangeFull); + }. + +Definition match_list `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : t_LIST ((v_T)) := + if + t_PartialEq_f_eq (impl_1__len (Seq_f_v s)) (0) + then + LIST_NIL + else + LIST_CONS (Clone_f_clone (Index_f_index (Seq_f_v s) (0))) (t_Seq (impl__concat (unsize ([Index_f_index (Seq_f_v s) (Build_t_RangeFrom (1))])))). + +Fixpoint from_u128_binary (x : t_u128) `{ne (x) (0) = true} : t_Positive := + if + t_PartialEq_f_eq (x) (1) + then + xH + else + if + t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) + then + xO (from_u128_binary (t_Div_f_div (x) (2))) + else + xI (from_u128_binary (t_Div_f_div (x) (2))). + +Instance t_From_383682059 : t_From ((t_HaxInt)) ((t_u128)) := + { + From_impl_8_f_from := fun (x : t_u128)=> + if + t_PartialEq_f_eq (x) (0) + then + v_HaxInt_ZERO + else + positive_to_int (from_u128_binary (x)); + }. + +Instance t_From_394907254 : t_From ((t_Z)) ((t_i128)) := + { + From_impl_20_f_from := fun (x : t_i128)=> + match Ord_f_cmp (x) (0) with + | Ordering_Equal => + Z_ZERO + | Ordering_Less => + Z_NEG (from_u128_binary (impl__i128__unsigned_abs (x))) + | Ordering_Greater => + Z_POS (from_u128_binary (impl__i128__unsigned_abs (x))) + end; + }. + +Fixpoint from_u16_binary (x : t_u16) `{ne (x) (0) = true} : t_Positive := + if + t_PartialEq_f_eq (x) (1) + then + xH + else + if + t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) + then + xO (from_u16_binary (t_Div_f_div (x) (2))) + else + xI (from_u16_binary (t_Div_f_div (x) (2))). + +Instance t_From_283547720 : t_From ((t_HaxInt)) ((t_u16)) := + { + From_impl_2_f_from := fun (x : t_u16)=> + if + t_PartialEq_f_eq (x) (0) + then + v_HaxInt_ZERO + else + positive_to_int (from_u16_binary (x)); + }. + +Instance t_From_960274744 : t_From ((t_Z)) ((t_i16)) := + { + From_impl_14_f_from := fun (x : t_i16)=> + match Ord_f_cmp (x) (0) with + | Ordering_Equal => + Z_ZERO + | Ordering_Less => + Z_NEG (from_u16_binary (impl__i16__unsigned_abs (x))) + | Ordering_Greater => + Z_POS (from_u16_binary (impl__i16__unsigned_abs (x))) + end; + }. + +Fixpoint from_u32_binary (x : t_u32) `{ne (x) (0) = true} : t_Positive := + if + t_PartialEq_f_eq (x) (1) + then + xH + else + if + t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) + then + xO (from_u32_binary (t_Div_f_div (x) (2))) + else + xI (from_u32_binary (t_Div_f_div (x) (2))). + +Instance t_From_247317262 : t_From ((t_HaxInt)) ((t_u32)) := + { + From_impl_4_f_from := fun (x : t_u32)=> + if + t_PartialEq_f_eq (x) (0) + then + v_HaxInt_ZERO + else + positive_to_int (from_u32_binary (x)); + }. + +Instance t_From_1033810922 : t_From ((t_Z)) ((t_i32)) := + { + From_impl_16_f_from := fun (x : t_i32)=> + match Ord_f_cmp (x) (0) with + | Ordering_Equal => + Z_ZERO + | Ordering_Less => + Z_NEG (from_u32_binary (impl__i32__unsigned_abs (x))) + | Ordering_Greater => + Z_POS (from_u32_binary (impl__i32__unsigned_abs (x))) + end; + }. + +Fixpoint from_u64_binary (x : t_u64) `{ne (x) (0) = true} : t_Positive := + if + t_PartialEq_f_eq (x) (1) + then + xH + else + if + t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) + then + xO (from_u64_binary (t_Div_f_div (x) (2))) + else + xI (from_u64_binary (t_Div_f_div (x) (2))). + +Instance t_From_703205527 : t_From ((t_HaxInt)) ((t_u64)) := + { + From_impl_6_f_from := fun (x : t_u64)=> + if + t_PartialEq_f_eq (x) (0) + then + v_HaxInt_ZERO + else + positive_to_int (from_u64_binary (x)); + }. + +Instance t_From_494553464 : t_From ((t_Z)) ((t_i64)) := + { + From_impl_18_f_from := fun (x : t_i64)=> + match Ord_f_cmp (x) (0) with + | Ordering_Equal => + Z_ZERO + | Ordering_Less => + Z_NEG (from_u64_binary (impl__i64__unsigned_abs (x))) + | Ordering_Greater => + Z_POS (from_u64_binary (impl__i64__unsigned_abs (x))) + end; + }. + +Fixpoint from_u8_binary (x : t_u8) `{ne (x) (0) = true} : t_Positive := + if + t_PartialEq_f_eq (x) (1) + then + xH + else + if + t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) + then + xO (from_u8_binary (t_Div_f_div (x) (2))) + else + xI (from_u8_binary (t_Div_f_div (x) (2))). + +Instance t_From_421078324 : t_From ((t_HaxInt)) ((t_u8)) := + { + From_impl_f_from := fun (x : t_u8)=> + if + t_PartialEq_f_eq (x) (0) + then + v_HaxInt_ZERO + else + positive_to_int (from_u8_binary (x)); + }. + +Instance t_From_976104611 : t_From ((t_Z)) ((t_i8)) := + { + From_impl_12_f_from := fun (x : t_i8)=> + match Ord_f_cmp (x) (0) with + | Ordering_Equal => + Z_ZERO + | Ordering_Less => + Z_NEG (from_u8_binary (impl__unsigned_abs (x))) + | Ordering_Greater => + Z_POS (from_u8_binary (impl__unsigned_abs (x))) + end; + }. + +Fixpoint from_usize_binary (x : t_usize) `{ne (x) (0) = true} : t_Positive := + if + t_PartialEq_f_eq (x) (1) + then + xH + else + if + t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) + then + xO (from_usize_binary (t_Div_f_div (x) (2))) + else + xI (from_usize_binary (t_Div_f_div (x) (2))). + +Instance t_From_226738852 : t_From ((t_HaxInt)) ((t_usize)) := + { + From_impl_10_f_from := fun (x : t_usize)=> + if + t_PartialEq_f_eq (x) (0) + then + v_HaxInt_ZERO + else + positive_to_int (from_usize_binary (x)); + }. + +Instance t_From_235021044 : t_From ((t_Z)) ((t_isize)) := + { + From_impl_22_f_from := fun (x : t_isize)=> + match Ord_f_cmp (x) (0) with + | Ordering_Equal => + Z_ZERO + | Ordering_Less => + Z_NEG (from_usize_binary (impl__isize__unsigned_abs (x))) + | Ordering_Greater => + Z_POS (from_usize_binary (impl__isize__unsigned_abs (x))) + end; + }. + +Fixpoint to_u128_binary (self : t_Positive) : t_u128 := + match match_positive (self) with + | POSITIVE_XH => + 1 + | POSITIVE_XO (p) => + t_Mul_f_mul (to_u128_binary (p)) (2) + | POSITIVE_XI (p) => + t_Add_f_add (t_Mul_f_mul (to_u128_binary (p)) (2)) (1) + end. + +Instance t_From_312029210 : t_From ((t_u128)) ((t_HaxInt)) := + { + From_impl_9_f_from := fun (x : t_HaxInt)=> + match match_pos (x) with + | POS_ZERO => + 0 + | POS_POS (p) => + to_u128_binary (p) + end; + }. + +Instance t_From_166626519 : t_From ((t_i128)) ((t_Z)) := + { + From_impl_21_f_from := fun (x : t_Z)=> + match x with + | Z_NEG (x) => + sub (neg (cast (sub (to_u128_binary (x)) (1)))) (1) + | Z_ZERO => + 0 + | Z_POS (x) => + cast (to_u128_binary (x)) + end; + }. + +Fixpoint to_u16_binary (self : t_Positive) : t_u16 := + match match_positive (self) with + | POSITIVE_XH => + 1 + | POSITIVE_XO (p) => + t_Mul_f_mul (to_u16_binary (p)) (2) + | POSITIVE_XI (p) => + t_Add_f_add (t_Mul_f_mul (to_u16_binary (p)) (2)) (1) + end. + +Instance t_From_863803022 : t_From ((t_u16)) ((t_HaxInt)) := + { + From_impl_3_f_from := fun (x : t_HaxInt)=> + match match_pos (x) with + | POS_ZERO => + 0 + | POS_POS (p) => + to_u16_binary (p) + end; + }. + +Instance t_From_217241508 : t_From ((t_i16)) ((t_Z)) := + { + From_impl_15_f_from := fun (x : t_Z)=> + match x with + | Z_NEG (x) => + sub (neg (cast (sub (to_u16_binary (x)) (1)))) (1) + | Z_ZERO => + 0 + | Z_POS (x) => + cast (to_u16_binary (x)) + end; + }. + +Fixpoint to_u32_binary (self : t_Positive) : t_u32 := + match match_positive (self) with + | POSITIVE_XH => + 1 + | POSITIVE_XO (p) => + t_Mul_f_mul (to_u32_binary (p)) (2) + | POSITIVE_XI (p) => + t_Add_f_add (t_Mul_f_mul (to_u32_binary (p)) (2)) (1) + end. + +Instance t_From_38549956 : t_From ((t_u32)) ((t_HaxInt)) := + { + From_impl_5_f_from := fun (x : t_HaxInt)=> + match match_pos (x) with + | POS_ZERO => + 0 + | POS_POS (p) => + to_u32_binary (p) + end; + }. + +Instance t_From_567539816 : t_From ((t_i32)) ((t_Z)) := + { + From_impl_17_f_from := fun (x : t_Z)=> + match x with + | Z_NEG (x) => + sub (neg (cast (sub (to_u32_binary (x)) (1)))) (1) + | Z_ZERO => + 0 + | Z_POS (x) => + cast (to_u32_binary (x)) + end; + }. + +Fixpoint to_u64_binary (self : t_Positive) : t_u64 := + match match_positive (self) with + | POSITIVE_XH => + 1 + | POSITIVE_XO (p) => + t_Mul_f_mul (to_u64_binary (p)) (2) + | POSITIVE_XI (p) => + t_Add_f_add (t_Mul_f_mul (to_u64_binary (p)) (2)) (1) + end. + +Instance t_From_100316698 : t_From ((t_u64)) ((t_HaxInt)) := + { + From_impl_7_f_from := fun (x : t_HaxInt)=> + match match_pos (x) with + | POS_ZERO => + 0 + | POS_POS (p) => + to_u64_binary (p) + end; + }. + +Instance t_From_99611562 : t_From ((t_i64)) ((t_Z)) := + { + From_impl_19_f_from := fun (x : t_Z)=> + match x with + | Z_NEG (x) => + sub (neg (cast (sub (to_u64_binary (x)) (1)))) (1) + | Z_ZERO => + 0 + | Z_POS (x) => + cast (to_u64_binary (x)) + end; + }. + +Fixpoint to_u8_binary (self : t_Positive) : t_u8 := + match match_positive (self) with + | POSITIVE_XH => + 1 + | POSITIVE_XO (p) => + t_Mul_f_mul (to_u8_binary (p)) (2) + | POSITIVE_XI (p) => + t_Add_f_add (t_Mul_f_mul (to_u8_binary (p)) (2)) (1) + end. + +Instance t_From_360336196 : t_From ((t_u8)) ((t_HaxInt)) := + { + From_impl_1_f_from := fun (x : t_HaxInt)=> + match match_pos (x) with + | POS_ZERO => + 0 + | POS_POS (p) => + to_u8_binary (p) + end; + }. + +Instance t_From_168893964 : t_From ((t_i8)) ((t_Z)) := + { + From_impl_13_f_from := fun (x : t_Z)=> + match x with + | Z_NEG (x) => + sub (neg (cast (sub (to_u8_binary (x)) (1)))) (1) + | Z_ZERO => + 0 + | Z_POS (x) => + cast (to_u8_binary (x)) + end; + }. + +Fixpoint to_usize_binary (self : t_Positive) : t_usize := + match match_positive (self) with + | POSITIVE_XH => + 1 + | POSITIVE_XO (p) => + t_Mul_f_mul (to_usize_binary (p)) (2) + | POSITIVE_XI (p) => + t_Add_f_add (t_Mul_f_mul (to_usize_binary (p)) (2)) (1) + end. + +Instance t_From_545039540 : t_From ((t_usize)) ((t_HaxInt)) := + { + From_impl_11_f_from := fun (x : t_HaxInt)=> + match match_pos (x) with + | POS_ZERO => + 0 + | POS_POS (p) => + to_usize_binary (p) + end; + }. + +Instance t_From_931346405 : t_From ((t_isize)) ((t_Z)) := + { + From_impl_23_f_from := fun (x : t_Z)=> + match x with + | Z_NEG (x) => + sub (neg (cast (sub (to_usize_binary (x)) (1)))) (1) + | Z_ZERO => + 0 + | Z_POS (x) => + cast (to_usize_binary (x)) + end; + }. + +Instance t_PartialEq_234431236 : t_PartialEq ((t_u8)) ((t_u8)) := + { + PartialEq_impl_29_f_eq := fun (self : t_u8) (rhs : t_u8)=> + PartialEq_f_eq (u8_0 self) (u8_0 rhs); + PartialEq_impl_29_f_ne := fun (self : t_u8) (rhs : t_u8)=> + negb (PartialEq_f_eq (u8_0 self) (u8_0 rhs)); + }. + +Instance t_PartialOrd_835131600 : t_PartialOrd ((t_u8)) ((t_u8)) := + { + PartialOrd_impl_30_f_partial_cmp := fun (self : t_u8) (rhs : t_u8)=> + PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs); + PartialOrd_impl_30_f_lt := fun (self : t_u8) (rhs : t_u8)=> + match PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_30_f_le := fun (self : t_u8) (rhs : t_u8)=> + match PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_30_f_gt := fun (self : t_u8) (rhs : t_u8)=> + match PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_30_f_ge := fun (self : t_u8) (rhs : t_u8)=> + match PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_965259828 : t_PartialEq ((t_u16)) ((t_u16)) := + { + PartialEq_impl_31_f_eq := fun (self : t_u16) (rhs : t_u16)=> + PartialEq_f_eq (u16_0 self) (u16_0 rhs); + PartialEq_impl_31_f_ne := fun (self : t_u16) (rhs : t_u16)=> + negb (PartialEq_f_eq (u16_0 self) (u16_0 rhs)); + }. + +Instance t_PartialOrd_116974173 : t_PartialOrd ((t_u16)) ((t_u16)) := + { + PartialOrd_impl_32_f_partial_cmp := fun (self : t_u16) (rhs : t_u16)=> + PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs); + PartialOrd_impl_32_f_lt := fun (self : t_u16) (rhs : t_u16)=> + match PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_32_f_le := fun (self : t_u16) (rhs : t_u16)=> + match PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_32_f_gt := fun (self : t_u16) (rhs : t_u16)=> + match PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_32_f_ge := fun (self : t_u16) (rhs : t_u16)=> + match PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_739399974 : t_PartialEq ((t_u32)) ((t_u32)) := + { + PartialEq_impl_33_f_eq := fun (self : t_u32) (rhs : t_u32)=> + PartialEq_f_eq (u32_0 self) (u32_0 rhs); + PartialEq_impl_33_f_ne := fun (self : t_u32) (rhs : t_u32)=> + negb (PartialEq_f_eq (u32_0 self) (u32_0 rhs)); + }. + +Instance t_PartialOrd_553141371 : t_PartialOrd ((t_u32)) ((t_u32)) := + { + PartialOrd_impl_34_f_partial_cmp := fun (self : t_u32) (rhs : t_u32)=> + PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs); + PartialOrd_impl_34_f_lt := fun (self : t_u32) (rhs : t_u32)=> + match PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_34_f_le := fun (self : t_u32) (rhs : t_u32)=> + match PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_34_f_gt := fun (self : t_u32) (rhs : t_u32)=> + match PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_34_f_ge := fun (self : t_u32) (rhs : t_u32)=> + match PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_464367537 : t_PartialEq ((t_u64)) ((t_u64)) := + { + PartialEq_impl_35_f_eq := fun (self : t_u64) (rhs : t_u64)=> + PartialEq_f_eq (u64_0 self) (u64_0 rhs); + PartialEq_impl_35_f_ne := fun (self : t_u64) (rhs : t_u64)=> + negb (PartialEq_f_eq (u64_0 self) (u64_0 rhs)); + }. + +Instance t_PartialOrd_207997255 : t_PartialOrd ((t_u64)) ((t_u64)) := + { + PartialOrd_impl_36_f_partial_cmp := fun (self : t_u64) (rhs : t_u64)=> + PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs); + PartialOrd_impl_36_f_lt := fun (self : t_u64) (rhs : t_u64)=> + match PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_36_f_le := fun (self : t_u64) (rhs : t_u64)=> + match PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_36_f_gt := fun (self : t_u64) (rhs : t_u64)=> + match PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_36_f_ge := fun (self : t_u64) (rhs : t_u64)=> + match PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_876938738 : t_PartialEq ((t_u128)) ((t_u128)) := + { + PartialEq_impl_37_f_eq := fun (self : t_u128) (rhs : t_u128)=> + PartialEq_f_eq (u128_0 self) (u128_0 rhs); + PartialEq_impl_37_f_ne := fun (self : t_u128) (rhs : t_u128)=> + negb (PartialEq_f_eq (u128_0 self) (u128_0 rhs)); + }. + +Instance t_PartialOrd_566729496 : t_PartialOrd ((t_u128)) ((t_u128)) := + { + PartialOrd_impl_38_f_partial_cmp := fun (self : t_u128) (rhs : t_u128)=> + PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs); + PartialOrd_impl_38_f_lt := fun (self : t_u128) (rhs : t_u128)=> + match PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_38_f_le := fun (self : t_u128) (rhs : t_u128)=> + match PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_38_f_gt := fun (self : t_u128) (rhs : t_u128)=> + match PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_38_f_ge := fun (self : t_u128) (rhs : t_u128)=> + match PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_1011013145 : t_PartialEq ((t_usize)) ((t_usize)) := + { + PartialEq_impl_39_f_eq := fun (self : t_usize) (rhs : t_usize)=> + PartialEq_f_eq (usize_0 self) (usize_0 rhs); + PartialEq_impl_39_f_ne := fun (self : t_usize) (rhs : t_usize)=> + negb (PartialEq_f_eq (usize_0 self) (usize_0 rhs)); + }. + +Instance t_PartialOrd_917114071 : t_PartialOrd ((t_usize)) ((t_usize)) := + { + PartialOrd_impl_40_f_partial_cmp := fun (self : t_usize) (rhs : t_usize)=> + PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs); + PartialOrd_impl_40_f_lt := fun (self : t_usize) (rhs : t_usize)=> + match PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_40_f_le := fun (self : t_usize) (rhs : t_usize)=> + match PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_40_f_gt := fun (self : t_usize) (rhs : t_usize)=> + match PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_40_f_ge := fun (self : t_usize) (rhs : t_usize)=> + match PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_515285814 : t_PartialEq ((t_i8)) ((t_i8)) := + { + PartialEq_impl_41_f_eq := fun (self : t_i8) (rhs : t_i8)=> + PartialEq_f_eq (i8_0 self) (i8_0 rhs); + PartialEq_impl_41_f_ne := fun (self : t_i8) (rhs : t_i8)=> + negb (PartialEq_f_eq (i8_0 self) (i8_0 rhs)); + }. + +Instance t_PartialOrd_610141491 : t_PartialOrd ((t_i8)) ((t_i8)) := + { + PartialOrd_impl_42_f_partial_cmp := fun (self : t_i8) (rhs : t_i8)=> + PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs); + PartialOrd_impl_42_f_lt := fun (self : t_i8) (rhs : t_i8)=> + match PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_42_f_le := fun (self : t_i8) (rhs : t_i8)=> + match PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_42_f_gt := fun (self : t_i8) (rhs : t_i8)=> + match PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_42_f_ge := fun (self : t_i8) (rhs : t_i8)=> + match PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_341364762 : t_PartialEq ((t_i16)) ((t_i16)) := + { + PartialEq_impl_43_f_eq := fun (self : t_i16) (rhs : t_i16)=> + PartialEq_f_eq (i16_0 self) (i16_0 rhs); + PartialEq_impl_43_f_ne := fun (self : t_i16) (rhs : t_i16)=> + negb (PartialEq_f_eq (i16_0 self) (i16_0 rhs)); + }. + +Instance t_PartialOrd_685280672 : t_PartialOrd ((t_i16)) ((t_i16)) := + { + PartialOrd_impl_44_f_partial_cmp := fun (self : t_i16) (rhs : t_i16)=> + PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs); + PartialOrd_impl_44_f_lt := fun (self : t_i16) (rhs : t_i16)=> + match PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_44_f_le := fun (self : t_i16) (rhs : t_i16)=> + match PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_44_f_gt := fun (self : t_i16) (rhs : t_i16)=> + match PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_44_f_ge := fun (self : t_i16) (rhs : t_i16)=> + match PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_335582486 : t_PartialEq ((t_i32)) ((t_i32)) := + { + PartialEq_impl_45_f_eq := fun (self : t_i32) (rhs : t_i32)=> + PartialEq_f_eq (i32_0 self) (i32_0 rhs); + PartialEq_impl_45_f_ne := fun (self : t_i32) (rhs : t_i32)=> + negb (PartialEq_f_eq (i32_0 self) (i32_0 rhs)); + }. + +Instance t_PartialOrd_776800970 : t_PartialOrd ((t_i32)) ((t_i32)) := + { + PartialOrd_impl_46_f_partial_cmp := fun (self : t_i32) (rhs : t_i32)=> + PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs); + PartialOrd_impl_46_f_lt := fun (self : t_i32) (rhs : t_i32)=> + match PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_46_f_le := fun (self : t_i32) (rhs : t_i32)=> + match PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_46_f_gt := fun (self : t_i32) (rhs : t_i32)=> + match PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_46_f_ge := fun (self : t_i32) (rhs : t_i32)=> + match PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_1019995697 : t_PartialEq ((t_i64)) ((t_i64)) := + { + PartialEq_impl_47_f_eq := fun (self : t_i64) (rhs : t_i64)=> + PartialEq_f_eq (i64_0 self) (i64_0 rhs); + PartialEq_impl_47_f_ne := fun (self : t_i64) (rhs : t_i64)=> + negb (PartialEq_f_eq (i64_0 self) (i64_0 rhs)); + }. + +Instance t_PartialOrd_354028907 : t_PartialOrd ((t_i64)) ((t_i64)) := + { + PartialOrd_impl_48_f_partial_cmp := fun (self : t_i64) (rhs : t_i64)=> + PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs); + PartialOrd_impl_48_f_lt := fun (self : t_i64) (rhs : t_i64)=> + match PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_48_f_le := fun (self : t_i64) (rhs : t_i64)=> + match PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_48_f_gt := fun (self : t_i64) (rhs : t_i64)=> + match PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_48_f_ge := fun (self : t_i64) (rhs : t_i64)=> + match PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_476424898 : t_PartialEq ((t_i128)) ((t_i128)) := + { + PartialEq_impl_49_f_eq := fun (self : t_i128) (rhs : t_i128)=> + PartialEq_f_eq (i128_0 self) (i128_0 rhs); + PartialEq_impl_49_f_ne := fun (self : t_i128) (rhs : t_i128)=> + negb (PartialEq_f_eq (i128_0 self) (i128_0 rhs)); + }. + +Instance t_PartialOrd_532073533 : t_PartialOrd ((t_i128)) ((t_i128)) := + { + PartialOrd_impl_50_f_partial_cmp := fun (self : t_i128) (rhs : t_i128)=> + PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs); + PartialOrd_impl_50_f_lt := fun (self : t_i128) (rhs : t_i128)=> + match PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_50_f_le := fun (self : t_i128) (rhs : t_i128)=> + match PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_50_f_gt := fun (self : t_i128) (rhs : t_i128)=> + match PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_50_f_ge := fun (self : t_i128) (rhs : t_i128)=> + match PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_PartialEq_675022234 : t_PartialEq ((t_isize)) ((t_isize)) := + { + PartialEq_impl_51_f_eq := fun (self : t_isize) (rhs : t_isize)=> + PartialEq_f_eq (isize_0 self) (isize_0 rhs); + PartialEq_impl_51_f_ne := fun (self : t_isize) (rhs : t_isize)=> + negb (PartialEq_f_eq (isize_0 self) (isize_0 rhs)); + }. + +Instance t_PartialOrd_661215608 : t_PartialOrd ((t_isize)) ((t_isize)) := + { + PartialOrd_impl_52_f_partial_cmp := fun (self : t_isize) (rhs : t_isize)=> + PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs); + PartialOrd_impl_52_f_lt := fun (self : t_isize) (rhs : t_isize)=> + match PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end; + PartialOrd_impl_52_f_le := fun (self : t_isize) (rhs : t_isize)=> + match PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs) with + | Option_Some (Ordering_Less + | Ordering_Equal) => + true + | _ => + false + end; + PartialOrd_impl_52_f_gt := fun (self : t_isize) (rhs : t_isize)=> + match PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs) with + | Option_Some (Ordering_Greater) => + true + | _ => + false + end; + PartialOrd_impl_52_f_ge := fun (self : t_isize) (rhs : t_isize)=> + match PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs) with + | Option_Some (Ordering_Greater + | Ordering_Equal) => + true + | _ => + false + end; + }. + +Instance t_From_236264222 : t_From ((t_u8)) ((t_u8)) := + { + From_impl_f_from := fun (x : t_u8)=> + t_u8 (Build_t_U8 (Into_f_into (x))); + }. + +Instance t_From_806913416 : t_From ((t_u8)) ((t_u8)) := + { + From_impl_1_f_from := fun (x : t_u8)=> + Into_f_into (U8_f_v u8_0 x); + }. + +Instance t_From_778759708 : t_From ((t_u16)) ((t_u16)) := + { + From_impl_2_f_from := fun (x : t_u16)=> + t_u16 (Build_t_U16 (Into_f_into (x))); + }. + +Instance t_From_481302543 : t_From ((t_u16)) ((t_u16)) := + { + From_impl_3_f_from := fun (x : t_u16)=> + Into_f_into (U16_f_v u16_0 x); + }. + +Instance t_From_278604088 : t_From ((t_u32)) ((t_u32)) := + { + From_impl_4_f_from := fun (x : t_u32)=> + t_u32 (Build_t_U32 (Into_f_into (x))); + }. + +Instance t_From_285996296 : t_From ((t_u32)) ((t_u32)) := + { + From_impl_5_f_from := fun (x : t_u32)=> + Into_f_into (U32_f_v u32_0 x); + }. + +Instance t_From_194556640 : t_From ((t_u64)) ((t_u64)) := + { + From_impl_6_f_from := fun (x : t_u64)=> + t_u64 (Build_t_U64 (Into_f_into (x))); + }. + +Instance t_From_155181094 : t_From ((t_u64)) ((t_u64)) := + { + From_impl_7_f_from := fun (x : t_u64)=> + Into_f_into (U64_f_v u64_0 x); + }. + +Instance t_From_159264478 : t_From ((t_u128)) ((t_u128)) := + { + From_impl_8_f_from := fun (x : t_u128)=> + t_u128 (Build_t_U128 (Into_f_into (x))); + }. + +Instance t_From_878174661 : t_From ((t_u128)) ((t_u128)) := + { + From_impl_9_f_from := fun (x : t_u128)=> + Into_f_into (U128_f_v u128_0 x); + }. + +Instance t_From_127325347 : t_From ((t_usize)) ((t_usize)) := + { + From_impl_10_f_from := fun (x : t_usize)=> + t_usize (Build_t_U64 (Into_f_into (x))); + }. + +Instance t_From_12689378 : t_From ((t_usize)) ((t_usize)) := + { + From_impl_11_f_from := fun (x : t_usize)=> + Into_f_into (U64_f_v usize_0 x); + }. + +Instance t_From_663475667 : t_From ((t_i8)) ((t_i8)) := + { + From_impl_f_from := fun (x : t_i8)=> + t_i8 (Build_t_I8 (Into_f_into (x))); + }. + +Definition is_negative350273175 (self : t_i8) : bool := + PartialOrd_f_lt (self) (Into_f_into (0)). + +Definition is_positive286955196 (self : t_i8) : bool := + PartialOrd_f_gt (self) (Into_f_into (0)). + +Definition signum721334203 (self : t_i8) : t_i8 := + if + PartialOrd_f_lt (Clone_f_clone (self)) (Into_f_into (0)) + then + Into_f_into (-1) + else + if + PartialEq_f_eq (self) (Into_f_into (0)) + then + Into_f_into (0) + else + Into_f_into (1). + +Instance t_From_687588567 : t_From ((t_i8)) ((t_i8)) := + { + From_impl_1_f_from := fun (x : t_i8)=> + Into_f_into (I8_f_v i8_0 x); + }. + +Instance t_From_257005484 : t_From ((t_i16)) ((t_i16)) := + { + From_impl_2_f_from := fun (x : t_i16)=> + t_i16 (Build_t_I16 (Into_f_into (x))); + }. + +Definition is_negative477067241 (self : t_i16) : bool := + PartialOrd_f_lt (self) (Into_f_into (0)). + +Definition is_positive821581438 (self : t_i16) : bool := + PartialOrd_f_gt (self) (Into_f_into (0)). + +Definition signum243706004 (self : t_i16) : t_i16 := + if + PartialOrd_f_lt (Clone_f_clone (self)) (Into_f_into (0)) + then + Into_f_into (-1) + else + if + PartialEq_f_eq (self) (Into_f_into (0)) + then + Into_f_into (0) + else + Into_f_into (1). + +Instance t_From_560870163 : t_From ((t_i16)) ((t_i16)) := + { + From_impl_3_f_from := fun (x : t_i16)=> + Into_f_into (I16_f_v i16_0 x); + }. + +Instance t_From_17641682 : t_From ((t_i32)) ((t_i32)) := + { + From_impl_4_f_from := fun (x : t_i32)=> + t_i32 (Build_t_I32 (Into_f_into (x))); + }. + +Definition is_negative1035644813 (self : t_i32) : bool := + PartialOrd_f_lt (self) (Into_f_into (0)). + +Definition is_positive401652342 (self : t_i32) : bool := + PartialOrd_f_gt (self) (Into_f_into (0)). + +Definition signum323641039 (self : t_i32) : t_i32 := + if + PartialOrd_f_lt (Clone_f_clone (self)) (Into_f_into (0)) + then + Into_f_into (-1) + else + if + PartialEq_f_eq (self) (Into_f_into (0)) + then + Into_f_into (0) + else + Into_f_into (1). + +Instance t_From_865467252 : t_From ((t_i32)) ((t_i32)) := + { + From_impl_5_f_from := fun (x : t_i32)=> + Into_f_into (I32_f_v i32_0 x); + }. + +Instance t_From_881024429 : t_From ((t_i64)) ((t_i64)) := + { + From_impl_6_f_from := fun (x : t_i64)=> + t_i64 (Build_t_I64 (Into_f_into (x))); + }. + +Definition is_negative1066124578 (self : t_i64) : bool := + PartialOrd_f_lt (self) (Into_f_into (0)). + +Definition is_positive16569358 (self : t_i64) : bool := + PartialOrd_f_gt (self) (Into_f_into (0)). + +Definition signum582963664 (self : t_i64) : t_i64 := + if + PartialOrd_f_lt (Clone_f_clone (self)) (Into_f_into (0)) + then + Into_f_into (-1) + else + if + PartialEq_f_eq (self) (Into_f_into (0)) + then + Into_f_into (0) + else + Into_f_into (1). + +Instance t_From_101582575 : t_From ((t_i64)) ((t_i64)) := + { + From_impl_7_f_from := fun (x : t_i64)=> + Into_f_into (I64_f_v i64_0 x); + }. + +Instance t_From_954204920 : t_From ((t_i128)) ((t_i128)) := + { + From_impl_8_f_from := fun (x : t_i128)=> + t_i128 (Build_t_I128 (Into_f_into (x))); + }. + +Definition is_negative221698470 (self : t_i128) : bool := + PartialOrd_f_lt (self) (Into_f_into (0)). + +Definition is_positive883218309 (self : t_i128) : bool := + PartialOrd_f_gt (self) (Into_f_into (0)). + +Definition signum408800799 (self : t_i128) : t_i128 := + if + PartialOrd_f_lt (Clone_f_clone (self)) (Into_f_into (0)) + then + Into_f_into (-1) + else + if + PartialEq_f_eq (self) (Into_f_into (0)) + then + Into_f_into (0) + else + Into_f_into (1). + +Instance t_From_515435087 : t_From ((t_i128)) ((t_i128)) := + { + From_impl_9_f_from := fun (x : t_i128)=> + Into_f_into (I128_f_v i128_0 x); + }. + +Instance t_From_1044036214 : t_From ((t_isize)) ((t_isize)) := + { + From_impl_10_f_from := fun (x : t_isize)=> + t_isize (Build_t_I64 (Into_f_into (x))); + }. + +Definition is_negative693446369 (self : t_isize) : bool := + PartialOrd_f_lt (self) (Into_f_into (0)). + +Definition is_positive169998680 (self : t_isize) : bool := + PartialOrd_f_gt (self) (Into_f_into (0)). + +Definition signum91486536 (self : t_isize) : t_isize := + if + PartialOrd_f_lt (Clone_f_clone (self)) (Into_f_into (0)) + then + Into_f_into (-1) + else + if + PartialEq_f_eq (self) (Into_f_into (0)) + then + Into_f_into (0) + else + Into_f_into (1). + +Instance t_From_202441647 : t_From ((t_isize)) ((t_isize)) := + { + From_impl_11_f_from := fun (x : t_isize)=> + Into_f_into (I64_f_v isize_0 x); + }. + +Instance t_From_100016775 : t_From ((t_i16)) ((t_i8)) := + { + From_impl_12_f_from := fun (x : t_i8)=> + t_i16 (Into_f_into (i8_0 x)); + }. + +Instance t_From_964712142 : t_From ((t_i32)) ((t_i8)) := + { + From_impl_13_f_from := fun (x : t_i8)=> + t_i32 (Into_f_into (i8_0 x)); + }. + +Instance t_From_512166668 : t_From ((t_i64)) ((t_i8)) := + { + From_impl_14_f_from := fun (x : t_i8)=> + t_i64 (Into_f_into (i8_0 x)); + }. + +Instance t_From_95828634 : t_From ((t_i128)) ((t_i8)) := + { + From_impl_15_f_from := fun (x : t_i8)=> + t_i128 (Into_f_into (i8_0 x)); + }. + +Instance t_From_48986939 : t_From ((t_isize)) ((t_i8)) := + { + From_impl_16_f_from := fun (x : t_i8)=> + t_isize (Into_f_into (i8_0 x)); + }. + +Instance t_From_325010041 : t_From ((t_i8)) ((t_i16)) := + { + From_impl_17_f_from := fun (x : t_i16)=> + t_i8 (Into_f_into (i16_0 x)); + }. + +Instance t_From_64357194 : t_From ((t_i32)) ((t_i16)) := + { + From_impl_18_f_from := fun (x : t_i16)=> + t_i32 (Into_f_into (i16_0 x)); + }. + +Instance t_From_840335964 : t_From ((t_i64)) ((t_i16)) := + { + From_impl_19_f_from := fun (x : t_i16)=> + t_i64 (Into_f_into (i16_0 x)); + }. + +Instance t_From_601385454 : t_From ((t_i128)) ((t_i16)) := + { + From_impl_20_f_from := fun (x : t_i16)=> + t_i128 (Into_f_into (i16_0 x)); + }. + +Instance t_From_755383497 : t_From ((t_isize)) ((t_i16)) := + { + From_impl_21_f_from := fun (x : t_i16)=> + t_isize (Into_f_into (i16_0 x)); + }. + +Instance t_From_926112880 : t_From ((t_i8)) ((t_i32)) := + { + From_impl_22_f_from := fun (x : t_i32)=> + t_i8 (Into_f_into (i32_0 x)); + }. + +Instance t_From_81353160 : t_From ((t_i16)) ((t_i32)) := + { + From_impl_23_f_from := fun (x : t_i32)=> + t_i16 (Into_f_into (i32_0 x)); + }. + +Instance t_From_549703007 : t_From ((t_i64)) ((t_i32)) := + { + From_impl_24_f_from := fun (x : t_i32)=> + t_i64 (Into_f_into (i32_0 x)); + }. + +Instance t_From_1001458175 : t_From ((t_i128)) ((t_i32)) := + { + From_impl_25_f_from := fun (x : t_i32)=> + t_i128 (Into_f_into (i32_0 x)); + }. + +Instance t_From_329934859 : t_From ((t_isize)) ((t_i32)) := + { + From_impl_26_f_from := fun (x : t_i32)=> + t_isize (Into_f_into (i32_0 x)); + }. + +Instance t_From_381441019 : t_From ((t_i8)) ((t_i64)) := + { + From_impl_27_f_from := fun (x : t_i64)=> + t_i8 (Into_f_into (i64_0 x)); + }. + +Instance t_From_728811179 : t_From ((t_i16)) ((t_i64)) := + { + From_impl_28_f_from := fun (x : t_i64)=> + t_i16 (Into_f_into (i64_0 x)); + }. + +Instance t_From_1003839356 : t_From ((t_i32)) ((t_i64)) := + { + From_impl_29_f_from := fun (x : t_i64)=> + t_i32 (Into_f_into (i64_0 x)); + }. + +Instance t_From_625109732 : t_From ((t_i128)) ((t_i64)) := + { + From_impl_30_f_from := fun (x : t_i64)=> + t_i128 (Into_f_into (i64_0 x)); + }. + +Instance t_From_34424521 : t_From ((t_i8)) ((t_i128)) := + { + From_impl_32_f_from := fun (x : t_i128)=> + t_i8 (Into_f_into (i128_0 x)); + }. + +Instance t_From_603602239 : t_From ((t_i16)) ((t_i128)) := + { + From_impl_33_f_from := fun (x : t_i128)=> + t_i16 (Into_f_into (i128_0 x)); + }. + +Instance t_From_479038908 : t_From ((t_i32)) ((t_i128)) := + { + From_impl_34_f_from := fun (x : t_i128)=> + t_i32 (Into_f_into (i128_0 x)); + }. + +Instance t_From_299745195 : t_From ((t_i64)) ((t_i128)) := + { + From_impl_35_f_from := fun (x : t_i128)=> + t_i64 (Into_f_into (i128_0 x)); + }. + +Instance t_From_615821455 : t_From ((t_isize)) ((t_i128)) := + { + From_impl_36_f_from := fun (x : t_i128)=> + t_isize (Into_f_into (i128_0 x)); + }. + +Instance t_From_376191918 : t_From ((t_i8)) ((t_isize)) := + { + From_impl_37_f_from := fun (x : t_isize)=> + t_i8 (Into_f_into (isize_0 x)); + }. + +Instance t_From_649927535 : t_From ((t_i16)) ((t_isize)) := + { + From_impl_38_f_from := fun (x : t_isize)=> + t_i16 (Into_f_into (isize_0 x)); + }. + +Instance t_From_395262437 : t_From ((t_i32)) ((t_isize)) := + { + From_impl_39_f_from := fun (x : t_isize)=> + t_i32 (Into_f_into (isize_0 x)); + }. + +Instance t_From_218237752 : t_From ((t_i128)) ((t_isize)) := + { + From_impl_41_f_from := fun (x : t_isize)=> + t_i128 (Into_f_into (isize_0 x)); + }. + +Instance v_SliceIndex_622480125 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : v_SliceIndex ((t_usize)) ((t_Slice ((v_T)))) := + { + SliceIndex_impl_1_f_Output := v_T; + SliceIndex_impl_1_f_index := fun (self : t_usize) (slice : t_Slice ((v_T)))=> + let x : t_usize := Into_f_into (U64_f_v usize_0 self) in + Index_f_index (Seq_f_v Slice_f_v slice) (x); + }. + +Definition add_with_overflow_i128 (x : t_i128) (y : t_i128) : (t_i128*bool) := + let overflow := z_add (Abstraction_f_lift (i128_0 x)) (Abstraction_f_lift (i128_0 y)) in + let res : t_I128 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_i128 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + +Definition add_with_overflow_i16 (x : t_i16) (y : t_i16) : (t_i16*bool) := + let overflow := z_add (Abstraction_f_lift (i16_0 x)) (Abstraction_f_lift (i16_0 y)) in + let res : t_I16 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_i16 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + +Definition add_with_overflow_i32 (x : t_i32) (y : t_i32) : (t_i32*bool) := + let overflow := z_add (Abstraction_f_lift (i32_0 x)) (Abstraction_f_lift (i32_0 y)) in + let res : t_I32 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_i32 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + +Definition add_with_overflow_i64 (x : t_i64) (y : t_i64) : (t_i64*bool) := + let overflow := z_add (Abstraction_f_lift (i64_0 x)) (Abstraction_f_lift (i64_0 y)) in + let res : t_I64 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_i64 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + +Definition add_with_overflow_i8 (x : t_i8) (y : t_i8) : (t_i8*bool) := + let overflow := z_add (Abstraction_f_lift (i8_0 x)) (Abstraction_f_lift (i8_0 y)) in + let res : t_I8 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_i8 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + +Definition add_with_overflow_isize (x : t_isize) (y : t_isize) : (t_isize*bool) := + let overflow := z_add (Abstraction_f_lift (isize_0 x)) (Abstraction_f_lift (isize_0 y)) in + let res : t_I64 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_isize (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + +Definition unchecked_add_i128 (x : t_i128) (y : t_i128) : t_i128 := + t_i128 (Build_t_I128 (z_add (Abstraction_f_lift (i128_0 x)) (Abstraction_f_lift (i128_0 y)))). + +Definition unchecked_add_i16 (x : t_i16) (y : t_i16) : t_i16 := + t_i16 (Build_t_I16 (z_add (Abstraction_f_lift (i16_0 x)) (Abstraction_f_lift (i16_0 y)))). + +Definition unchecked_add_i32 (x : t_i32) (y : t_i32) : t_i32 := + t_i32 (Build_t_I32 (z_add (Abstraction_f_lift (i32_0 x)) (Abstraction_f_lift (i32_0 y)))). + +Definition unchecked_add_i64 (x : t_i64) (y : t_i64) : t_i64 := + t_i64 (Build_t_I64 (z_add (Abstraction_f_lift (i64_0 x)) (Abstraction_f_lift (i64_0 y)))). + +Definition unchecked_add_i8 (x : t_i8) (y : t_i8) : t_i8 := + t_i8 (Build_t_I8 (z_add (Abstraction_f_lift (i8_0 x)) (Abstraction_f_lift (i8_0 y)))). + +Definition unchecked_add_isize (x : t_isize) (y : t_isize) : t_isize := + t_isize (Build_t_I64 (z_add (Abstraction_f_lift (isize_0 x)) (Abstraction_f_lift (isize_0 y)))). + +Definition unchecked_add_u128 (x : t_u128) (y : t_u128) : t_u128 := + t_u128 (Build_t_U128 (haxint_add (Abstraction_f_lift (u128_0 x)) (Abstraction_f_lift (u128_0 y)))). + +Definition unchecked_add_u16 (x : t_u16) (y : t_u16) : t_u16 := + t_u16 (Build_t_U16 (haxint_add (Abstraction_f_lift (u16_0 x)) (Abstraction_f_lift (u16_0 y)))). + +Definition unchecked_add_u32 (x : t_u32) (y : t_u32) : t_u32 := + t_u32 (Build_t_U32 (haxint_add (Abstraction_f_lift (u32_0 x)) (Abstraction_f_lift (u32_0 y)))). + +Definition unchecked_add_u64 (x : t_u64) (y : t_u64) : t_u64 := + t_u64 (Build_t_U64 (haxint_add (Abstraction_f_lift (u64_0 x)) (Abstraction_f_lift (u64_0 y)))). + +Definition unchecked_add_u8 (x : t_u8) (y : t_u8) : t_u8 := + t_u8 (Build_t_U8 (haxint_add (Abstraction_f_lift (u8_0 x)) (Abstraction_f_lift (u8_0 y)))). + +Definition unchecked_add_usize (x : t_usize) (y : t_usize) : t_usize := + t_usize (Build_t_U64 (haxint_add (Abstraction_f_lift (usize_0 x)) (Abstraction_f_lift (usize_0 y)))). + +Definition checked_add268751055 (self : t_u8) (rhs : t_u8) : t_Option ((t_u8)) := + Option_Some (unchecked_add_u8 (self) (rhs)). + +Definition checked_add132377399 (self : t_u16) (rhs : t_u16) : t_Option ((t_u16)) := + Option_Some (unchecked_add_u16 (self) (rhs)). + +Definition checked_add985437730 (self : t_u32) (rhs : t_u32) : t_Option ((t_u32)) := + Option_Some (unchecked_add_u32 (self) (rhs)). + +Definition checked_add586246465 (self : t_u64) (rhs : t_u64) : t_Option ((t_u64)) := + Option_Some (unchecked_add_u64 (self) (rhs)). + +Definition checked_add218978451 (self : t_u128) (rhs : t_u128) : t_Option ((t_u128)) := + Option_Some (unchecked_add_u128 (self) (rhs)). + +Definition checked_add984013567 (self : t_usize) (rhs : t_usize) : t_Option ((t_usize)) := + Option_Some (unchecked_add_usize (self) (rhs)). + +Definition add_with_overflow_u128 (x : t_u128) (y : t_u128) : (t_u128*bool) := + let overflow := haxint_add (Abstraction_f_lift (u128_0 x)) (Abstraction_f_lift (u128_0 y)) in + let res : t_U128 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_u128 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + +Definition add_with_overflow_u16 (x : t_u16) (y : t_u16) : (t_u16*bool) := + let overflow := haxint_add (Abstraction_f_lift (u16_0 x)) (Abstraction_f_lift (u16_0 y)) in + let res : t_U16 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_u16 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + +Definition add_with_overflow_u32 (x : t_u32) (y : t_u32) : (t_u32*bool) := + let overflow := haxint_add (Abstraction_f_lift (u32_0 x)) (Abstraction_f_lift (u32_0 y)) in + let res : t_U32 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_u32 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + +Definition add_with_overflow_u64 (x : t_u64) (y : t_u64) : (t_u64*bool) := + let overflow := haxint_add (Abstraction_f_lift (u64_0 x)) (Abstraction_f_lift (u64_0 y)) in + let res : t_U64 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_u64 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + +Definition add_with_overflow_u8 (x : t_u8) (y : t_u8) : (t_u8*bool) := + let overflow := haxint_add (Abstraction_f_lift (u8_0 x)) (Abstraction_f_lift (u8_0 y)) in + let res : t_U8 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_u8 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + +Definition add_with_overflow_usize (x : t_usize) (y : t_usize) : (t_usize*bool) := + let overflow := haxint_add (Abstraction_f_lift (usize_0 x)) (Abstraction_f_lift (usize_0 y)) in + let res : t_U64 := Concretization_f_concretize (Clone_f_clone (overflow)) in + (t_usize (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + +Definition unchecked_div_u128 (x : t_u128) (y : t_u128) : t_u128 := + t_u128 (Build_t_U128 (haxint_div (Abstraction_f_lift (u128_0 x)) (Abstraction_f_lift (u128_0 y)))). + +Definition unchecked_div_u16 (x : t_u16) (y : t_u16) : t_u16 := + t_u16 (Build_t_U16 (haxint_div (Abstraction_f_lift (u16_0 x)) (Abstraction_f_lift (u16_0 y)))). + +Definition unchecked_div_u32 (x : t_u32) (y : t_u32) : t_u32 := + t_u32 (Build_t_U32 (haxint_div (Abstraction_f_lift (u32_0 x)) (Abstraction_f_lift (u32_0 y)))). + +Definition unchecked_div_u64 (x : t_u64) (y : t_u64) : t_u64 := + t_u64 (Build_t_U64 (haxint_div (Abstraction_f_lift (u64_0 x)) (Abstraction_f_lift (u64_0 y)))). + +Definition unchecked_div_u8 (x : t_u8) (y : t_u8) : t_u8 := + t_u8 (Build_t_U8 (haxint_div (Abstraction_f_lift (u8_0 x)) (Abstraction_f_lift (u8_0 y)))). + +Definition unchecked_div_usize (x : t_usize) (y : t_usize) : t_usize := + t_usize (Build_t_U64 (haxint_div (Abstraction_f_lift (usize_0 x)) (Abstraction_f_lift (usize_0 y)))). + +Definition wrapping_add_i128 (a : t_i128) (b : t_i128) : t_i128 := + t_i128 (Add_f_add (i128_0 a) (i128_0 b)). + +Definition wrapping_add_i16 (a : t_i16) (b : t_i16) : t_i16 := + t_i16 (Add_f_add (i16_0 a) (i16_0 b)). + +Definition wrapping_add_i32 (a : t_i32) (b : t_i32) : t_i32 := + t_i32 (Add_f_add (i32_0 a) (i32_0 b)). + +Definition wrapping_add_i64 (a : t_i64) (b : t_i64) : t_i64 := + t_i64 (Add_f_add (i64_0 a) (i64_0 b)). + +Definition wrapping_add_i8 (a : t_i8) (b : t_i8) : t_i8 := + t_i8 (Add_f_add (i8_0 a) (i8_0 b)). + +Definition wrapping_add_isize (a : t_isize) (b : t_isize) : t_isize := + t_isize (Add_f_add (isize_0 a) (isize_0 b)). + +Definition wrapping_sub_i128 (a : t_i128) (b : t_i128) : t_i128 := + t_i128 (Sub_f_sub (i128_0 a) (i128_0 b)). + +Definition wrapping_sub_i16 (a : t_i16) (b : t_i16) : t_i16 := + t_i16 (Sub_f_sub (i16_0 a) (i16_0 b)). + +Definition wrapping_sub_i32 (a : t_i32) (b : t_i32) : t_i32 := + t_i32 (Sub_f_sub (i32_0 a) (i32_0 b)). + +Definition wrapping_sub_i64 (a : t_i64) (b : t_i64) : t_i64 := + t_i64 (Sub_f_sub (i64_0 a) (i64_0 b)). + +Definition wrapping_sub_i8 (a : t_i8) (b : t_i8) : t_i8 := + t_i8 (Sub_f_sub (i8_0 a) (i8_0 b)). + +Definition wrapping_sub_isize (a : t_isize) (b : t_isize) : t_isize := + t_isize (Sub_f_sub (isize_0 a) (isize_0 b)). + +Definition wrapping_add634491935 (self : t_i8) (rhs : t_i8) : t_i8 := + wrapping_add_i8 (self) (rhs). + +Definition wrapping_sub973428293 (self : t_i8) (rhs : t_i8) : t_i8 := + wrapping_sub_i8 (self) (rhs). + +Definition wrapping_neg400701205 (self : t_i8) : t_i8 := + wrapping_sub973428293 (Into_f_into (0)) (self). + +Definition wrapping_abs400396545 (self : t_i8) : t_i8 := + if + is_negative350273175 (Clone_f_clone (self)) + then + wrapping_neg400701205 (self) + else + self. + +Definition wrapping_add868559108 (self : t_i16) (rhs : t_i16) : t_i16 := + wrapping_add_i16 (self) (rhs). + +Definition wrapping_sub189469152 (self : t_i16) (rhs : t_i16) : t_i16 := + wrapping_sub_i16 (self) (rhs). + +Definition wrapping_neg860505723 (self : t_i16) : t_i16 := + wrapping_sub189469152 (Into_f_into (0)) (self). + +Definition wrapping_abs229076826 (self : t_i16) : t_i16 := + if + is_negative477067241 (Clone_f_clone (self)) + then + wrapping_neg860505723 (self) + else + self. + +Definition wrapping_add475006616 (self : t_i32) (rhs : t_i32) : t_i32 := + wrapping_add_i32 (self) (rhs). + +Definition wrapping_sub298337071 (self : t_i32) (rhs : t_i32) : t_i32 := + wrapping_sub_i32 (self) (rhs). + +Definition wrapping_neg636433078 (self : t_i32) : t_i32 := + wrapping_sub298337071 (Into_f_into (0)) (self). + +Definition wrapping_abs729536875 (self : t_i32) : t_i32 := + if + is_negative1035644813 (Clone_f_clone (self)) + then + wrapping_neg636433078 (self) + else + self. + +Definition wrapping_add590074241 (self : t_i64) (rhs : t_i64) : t_i64 := + wrapping_add_i64 (self) (rhs). + +Definition wrapping_sub334584751 (self : t_i64) (rhs : t_i64) : t_i64 := + wrapping_sub_i64 (self) (rhs). + +Definition wrapping_neg868282938 (self : t_i64) : t_i64 := + wrapping_sub334584751 (Into_f_into (0)) (self). + +Definition wrapping_abs285829312 (self : t_i64) : t_i64 := + if + is_negative1066124578 (Clone_f_clone (self)) + then + wrapping_neg868282938 (self) + else + self. + +Definition wrapping_add251385439 (self : t_i128) (rhs : t_i128) : t_i128 := + wrapping_add_i128 (self) (rhs). + +Definition wrapping_sub681598071 (self : t_i128) (rhs : t_i128) : t_i128 := + wrapping_sub_i128 (self) (rhs). + +Definition wrapping_neg446546984 (self : t_i128) : t_i128 := + wrapping_sub681598071 (Into_f_into (0)) (self). + +Definition wrapping_abs281925696 (self : t_i128) : t_i128 := + if + is_negative221698470 (Clone_f_clone (self)) + then + wrapping_neg446546984 (self) + else + self. + +Definition wrapping_add226040243 (self : t_isize) (rhs : t_isize) : t_isize := + wrapping_add_isize (self) (rhs). + +Definition wrapping_sub698035192 (self : t_isize) (rhs : t_isize) : t_isize := + wrapping_sub_isize (self) (rhs). + +Definition wrapping_neg912291768 (self : t_isize) : t_isize := + wrapping_sub698035192 (Into_f_into (0)) (self). + +Definition wrapping_abs347300819 (self : t_isize) : t_isize := + if + is_negative693446369 (Clone_f_clone (self)) + then + wrapping_neg912291768 (self) + else + self. + +Definition checked_div508301931 (self : t_u8) (rhs : t_u8) : t_Option ((t_u8)) := + if + PartialEq_f_eq (rhs) (Into_f_into (0)) + then + Option_None + else + Option_Some (unchecked_div_u8 (self) (rhs)). + +Definition overflowing_add708890057 (self : t_u8) (rhs : t_u8) : (t_u8*bool) := + add_with_overflow_u8 (self) (rhs). + +Definition checked_div614920780 (self : t_u16) (rhs : t_u16) : t_Option ((t_u16)) := + if + PartialEq_f_eq (rhs) (Into_f_into (0)) + then + Option_None + else + Option_Some (unchecked_div_u16 (self) (rhs)). + +Definition overflowing_add1023344178 (self : t_u16) (rhs : t_u16) : (t_u16*bool) := + add_with_overflow_u16 (self) (rhs). + +Definition checked_div979383477 (self : t_u32) (rhs : t_u32) : t_Option ((t_u32)) := + if + PartialEq_f_eq (rhs) (Into_f_into (0)) + then + Option_None + else + Option_Some (unchecked_div_u32 (self) (rhs)). + +Definition overflowing_add905744292 (self : t_u32) (rhs : t_u32) : (t_u32*bool) := + add_with_overflow_u32 (self) (rhs). + +Definition checked_div988689127 (self : t_u64) (rhs : t_u64) : t_Option ((t_u64)) := + if + PartialEq_f_eq (rhs) (Into_f_into (0)) + then + Option_None + else + Option_Some (unchecked_div_u64 (self) (rhs)). + +Definition overflowing_add581983607 (self : t_u64) (rhs : t_u64) : (t_u64*bool) := + add_with_overflow_u64 (self) (rhs). + +Definition checked_div344106746 (self : t_u128) (rhs : t_u128) : t_Option ((t_u128)) := + if + PartialEq_f_eq (rhs) (Into_f_into (0)) + then + Option_None + else + Option_Some (unchecked_div_u128 (self) (rhs)). + +Definition overflowing_add458293681 (self : t_u128) (rhs : t_u128) : (t_u128*bool) := + add_with_overflow_u128 (self) (rhs). + +Definition checked_div80223906 (self : t_usize) (rhs : t_usize) : t_Option ((t_usize)) := + if + PartialEq_f_eq (rhs) (Into_f_into (0)) + then + Option_None + else + Option_Some (unchecked_div_usize (self) (rhs)). + +Definition overflowing_add682280407 (self : t_usize) (rhs : t_usize) : (t_usize*bool) := + add_with_overflow_usize (self) (rhs). + +Instance t_Neg_125588538 : t_Neg ((t_i8)) := + { + Neg_impl_f_Output := t_i8; + Neg_impl_f_neg := fun (self : t_i8)=> + t_i8 (Neg_f_neg (i8_0 self)); + }. + +Definition abs945505614 (self : t_i8) : t_i8 := + if + is_negative350273175 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +Instance t_Neg_977573626 : t_Neg ((t_i16)) := + { + Neg_impl_1_f_Output := t_i16; + Neg_impl_1_f_neg := fun (self : t_i16)=> + t_i16 (Neg_f_neg (i16_0 self)); + }. + +Definition abs581170970 (self : t_i16) : t_i16 := + if + is_negative477067241 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +Instance t_Neg_289824503 : t_Neg ((t_i32)) := + { + Neg_impl_2_f_Output := t_i32; + Neg_impl_2_f_neg := fun (self : t_i32)=> + t_i32 (Neg_f_neg (i32_0 self)); + }. + +Definition abs590464694 (self : t_i32) : t_i32 := + if + is_negative1035644813 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +Instance t_Neg_895800448 : t_Neg ((t_i64)) := + { + Neg_impl_3_f_Output := t_i64; + Neg_impl_3_f_neg := fun (self : t_i64)=> + t_i64 (Neg_f_neg (i64_0 self)); + }. + +Definition abs654781043 (self : t_i64) : t_i64 := + if + is_negative1066124578 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +Instance t_Neg_830237431 : t_Neg ((t_i128)) := + { + Neg_impl_4_f_Output := t_i128; + Neg_impl_4_f_neg := fun (self : t_i128)=> + t_i128 (Neg_f_neg (i128_0 self)); + }. + +Definition abs204417539 (self : t_i128) : t_i128 := + if + is_negative221698470 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +Instance t_Neg_693499423 : t_Neg ((t_isize)) := + { + Neg_impl_5_f_Output := t_isize; + Neg_impl_5_f_neg := fun (self : t_isize)=> + t_isize (Neg_f_neg (isize_0 self)); + }. + +Definition abs220926056 (self : t_isize) : t_isize := + if + is_negative693446369 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +Instance t_BitOr_174929276 : t_BitOr ((t_i8)) ((t_i8)) := + { + BitOr_impl_84_f_Output := t_i8; + BitOr_impl_84_f_bitor := fun (self : t_i8) (other : t_i8)=> + t_i8 (BitOr_f_bitor (i8_0 self) (i8_0 other)); + }. + +Instance t_BitOr_162600380 : t_BitOr ((t_i16)) ((t_i16)) := + { + BitOr_impl_85_f_Output := t_i16; + BitOr_impl_85_f_bitor := fun (self : t_i16) (other : t_i16)=> + t_i16 (BitOr_f_bitor (i16_0 self) (i16_0 other)); + }. + +Instance t_BitOr_64689421 : t_BitOr ((t_i32)) ((t_i32)) := + { + BitOr_impl_86_f_Output := t_i32; + BitOr_impl_86_f_bitor := fun (self : t_i32) (other : t_i32)=> + t_i32 (BitOr_f_bitor (i32_0 self) (i32_0 other)); + }. + +Instance t_BitOr_348780956 : t_BitOr ((t_i64)) ((t_i64)) := + { + BitOr_impl_87_f_Output := t_i64; + BitOr_impl_87_f_bitor := fun (self : t_i64) (other : t_i64)=> + t_i64 (BitOr_f_bitor (i64_0 self) (i64_0 other)); + }. + +Instance t_BitOr_643690063 : t_BitOr ((t_i128)) ((t_i128)) := + { + BitOr_impl_88_f_Output := t_i128; + BitOr_impl_88_f_bitor := fun (self : t_i128) (other : t_i128)=> + t_i128 (BitOr_f_bitor (i128_0 self) (i128_0 other)); + }. + +Instance t_BitOr_1027404433 : t_BitOr ((t_isize)) ((t_isize)) := + { + BitOr_impl_89_f_Output := t_isize; + BitOr_impl_89_f_bitor := fun (self : t_isize) (other : t_isize)=> + t_isize (BitOr_f_bitor (isize_0 self) (isize_0 other)); + }. + +Instance t_From_124503227 : t_From ((t_u16)) ((t_u8)) := + { + From_impl_12_f_from := fun (x : t_u8)=> + t_u16 (Into_f_into (u8_0 x)); + }. + +Instance t_From_499390246 : t_From ((t_u32)) ((t_u8)) := + { + From_impl_13_f_from := fun (x : t_u8)=> + t_u32 (Into_f_into (u8_0 x)); + }. + +Instance t_From_1040523499 : t_From ((t_u64)) ((t_u8)) := + { + From_impl_14_f_from := fun (x : t_u8)=> + t_u64 (Into_f_into (u8_0 x)); + }. + +Instance t_From_827336555 : t_From ((t_u128)) ((t_u8)) := + { + From_impl_15_f_from := fun (x : t_u8)=> + t_u128 (Into_f_into (u8_0 x)); + }. + +Instance t_From_1002852925 : t_From ((t_usize)) ((t_u8)) := + { + From_impl_16_f_from := fun (x : t_u8)=> + t_usize (Into_f_into (u8_0 x)); + }. + +Instance t_From_476851440 : t_From ((t_u8)) ((t_u16)) := + { + From_impl_17_f_from := fun (x : t_u16)=> + t_u8 (Into_f_into (u16_0 x)); + }. + +Instance t_From_590504350 : t_From ((t_u32)) ((t_u16)) := + { + From_impl_18_f_from := fun (x : t_u16)=> + t_u32 (Into_f_into (u16_0 x)); + }. + +Instance t_From_786143320 : t_From ((t_u64)) ((t_u16)) := + { + From_impl_19_f_from := fun (x : t_u16)=> + t_u64 (Into_f_into (u16_0 x)); + }. + +Instance t_From_98507156 : t_From ((t_u128)) ((t_u16)) := + { + From_impl_20_f_from := fun (x : t_u16)=> + t_u128 (Into_f_into (u16_0 x)); + }. + +Instance t_From_427149512 : t_From ((t_usize)) ((t_u16)) := + { + From_impl_21_f_from := fun (x : t_u16)=> + t_usize (Into_f_into (u16_0 x)); + }. + +Instance t_From_306676060 : t_From ((t_u8)) ((t_u32)) := + { + From_impl_22_f_from := fun (x : t_u32)=> + t_u8 (Into_f_into (u32_0 x)); + }. + +Instance t_From_55624543 : t_From ((t_u16)) ((t_u32)) := + { + From_impl_23_f_from := fun (x : t_u32)=> + t_u16 (Into_f_into (u32_0 x)); + }. + +Instance t_From_863285405 : t_From ((t_u64)) ((t_u32)) := + { + From_impl_24_f_from := fun (x : t_u32)=> + t_u64 (Into_f_into (u32_0 x)); + }. + +Instance t_From_675130423 : t_From ((t_u128)) ((t_u32)) := + { + From_impl_25_f_from := fun (x : t_u32)=> + t_u128 (Into_f_into (u32_0 x)); + }. + +Instance t_From_295642421 : t_From ((t_usize)) ((t_u32)) := + { + From_impl_26_f_from := fun (x : t_u32)=> + t_usize (Into_f_into (u32_0 x)); + }. + +Instance t_From_690942554 : t_From ((t_u8)) ((t_u64)) := + { + From_impl_27_f_from := fun (x : t_u64)=> + t_u8 (Into_f_into (u64_0 x)); + }. + +Instance t_From_956877210 : t_From ((t_u16)) ((t_u64)) := + { + From_impl_28_f_from := fun (x : t_u64)=> + t_u16 (Into_f_into (u64_0 x)); + }. + +Instance t_From_124072492 : t_From ((t_u32)) ((t_u64)) := + { + From_impl_29_f_from := fun (x : t_u64)=> + t_u32 (Into_f_into (u64_0 x)); + }. + +Instance t_From_882228220 : t_From ((t_u128)) ((t_u64)) := + { + From_impl_30_f_from := fun (x : t_u64)=> + t_u128 (Into_f_into (u64_0 x)); + }. + +Instance t_From_1060762174 : t_From ((t_u8)) ((t_u128)) := + { + From_impl_32_f_from := fun (x : t_u128)=> + t_u8 (Into_f_into (u128_0 x)); + }. + +Instance t_From_437123664 : t_From ((t_u16)) ((t_u128)) := + { + From_impl_33_f_from := fun (x : t_u128)=> + t_u16 (Into_f_into (u128_0 x)); + }. + +Instance t_From_685712174 : t_From ((t_u32)) ((t_u128)) := + { + From_impl_34_f_from := fun (x : t_u128)=> + t_u32 (Into_f_into (u128_0 x)); + }. + +Instance t_From_239215567 : t_From ((t_u64)) ((t_u128)) := + { + From_impl_35_f_from := fun (x : t_u128)=> + t_u64 (Into_f_into (u128_0 x)); + }. + +Instance t_From_583993496 : t_From ((t_usize)) ((t_u128)) := + { + From_impl_36_f_from := fun (x : t_u128)=> + t_usize (Into_f_into (u128_0 x)); + }. + +Instance t_From_1069835847 : t_From ((t_u8)) ((t_usize)) := + { + From_impl_37_f_from := fun (x : t_usize)=> + t_u8 (Into_f_into (usize_0 x)); + }. + +Instance t_From_976343396 : t_From ((t_u16)) ((t_usize)) := + { + From_impl_38_f_from := fun (x : t_usize)=> + t_u16 (Into_f_into (usize_0 x)); + }. + +Instance t_From_448121712 : t_From ((t_u32)) ((t_usize)) := + { + From_impl_39_f_from := fun (x : t_usize)=> + t_u32 (Into_f_into (usize_0 x)); + }. + +Instance t_From_448032498 : t_From ((t_u128)) ((t_usize)) := + { + From_impl_41_f_from := fun (x : t_usize)=> + t_u128 (Into_f_into (usize_0 x)); + }. + +Definition unchecked_div_i128 (x : t_i128) (y : t_i128) : t_i128 := + t_i128 (Build_t_I128 (z_div (Abstraction_f_lift (i128_0 x)) (Abstraction_f_lift (i128_0 y)))). + +Definition unchecked_div_i16 (x : t_i16) (y : t_i16) : t_i16 := + t_i16 (Build_t_I16 (z_div (Abstraction_f_lift (i16_0 x)) (Abstraction_f_lift (i16_0 y)))). + +Definition unchecked_div_i32 (x : t_i32) (y : t_i32) : t_i32 := + t_i32 (Build_t_I32 (z_div (Abstraction_f_lift (i32_0 x)) (Abstraction_f_lift (i32_0 y)))). + +Definition unchecked_div_i64 (x : t_i64) (y : t_i64) : t_i64 := + t_i64 (Build_t_I64 (z_div (Abstraction_f_lift (i64_0 x)) (Abstraction_f_lift (i64_0 y)))). + +Definition unchecked_div_i8 (x : t_i8) (y : t_i8) : t_i8 := + t_i8 (Build_t_I8 (z_div (Abstraction_f_lift (i8_0 x)) (Abstraction_f_lift (i8_0 y)))). + +Definition unchecked_div_isize (x : t_isize) (y : t_isize) : t_isize := + t_isize (Build_t_I64 (z_div (Abstraction_f_lift (isize_0 x)) (Abstraction_f_lift (isize_0 y)))). + +Definition wrapping_add_u128 (a : t_u128) (b : t_u128) : t_u128 := + t_u128 (Add_f_add (u128_0 a) (u128_0 b)). + +Definition wrapping_add_u16 (a : t_u16) (b : t_u16) : t_u16 := + t_u16 (Add_f_add (u16_0 a) (u16_0 b)). + +Definition wrapping_add_u32 (a : t_u32) (b : t_u32) : t_u32 := + t_u32 (Add_f_add (u32_0 a) (u32_0 b)). + +Definition wrapping_add_u64 (a : t_u64) (b : t_u64) : t_u64 := + t_u64 (Add_f_add (u64_0 a) (u64_0 b)). + +Definition wrapping_add_u8 (a : t_u8) (b : t_u8) : t_u8 := + t_u8 (Add_f_add (u8_0 a) (u8_0 b)). + +Definition wrapping_add_usize (a : t_usize) (b : t_usize) : t_usize := + t_usize (Add_f_add (usize_0 a) (usize_0 b)). + +Definition wrapping_mul_i128 (a : t_i128) (b : t_i128) : t_i128 := + t_i128 (Mul_f_mul (i128_0 a) (i128_0 b)). + +Definition wrapping_mul_i16 (a : t_i16) (b : t_i16) : t_i16 := + t_i16 (Mul_f_mul (i16_0 a) (i16_0 b)). + +Definition wrapping_mul_i32 (a : t_i32) (b : t_i32) : t_i32 := + t_i32 (Mul_f_mul (i32_0 a) (i32_0 b)). + +Definition wrapping_mul_i64 (a : t_i64) (b : t_i64) : t_i64 := + t_i64 (Mul_f_mul (i64_0 a) (i64_0 b)). + +Definition wrapping_mul_i8 (a : t_i8) (b : t_i8) : t_i8 := + t_i8 (Mul_f_mul (i8_0 a) (i8_0 b)). + +Definition wrapping_mul_isize (a : t_isize) (b : t_isize) : t_isize := + t_isize (Mul_f_mul (isize_0 a) (isize_0 b)). + +Definition wrapping_mul_u128 (a : t_u128) (b : t_u128) : t_u128 := + t_u128 (Mul_f_mul (u128_0 a) (u128_0 b)). + +Definition wrapping_mul_u16 (a : t_u16) (b : t_u16) : t_u16 := + t_u16 (Mul_f_mul (u16_0 a) (u16_0 b)). + +Definition wrapping_mul_u32 (a : t_u32) (b : t_u32) : t_u32 := + t_u32 (Mul_f_mul (u32_0 a) (u32_0 b)). + +Definition wrapping_mul_u64 (a : t_u64) (b : t_u64) : t_u64 := + t_u64 (Mul_f_mul (u64_0 a) (u64_0 b)). + +Definition wrapping_mul_u8 (a : t_u8) (b : t_u8) : t_u8 := + t_u8 (Mul_f_mul (u8_0 a) (u8_0 b)). + +Definition wrapping_mul_usize (a : t_usize) (b : t_usize) : t_usize := + t_usize (Mul_f_mul (usize_0 a) (usize_0 b)). + +Definition wrapping_add480603777 (self : t_u8) (rhs : t_u8) : t_u8 := + wrapping_add_u8 (self) (rhs). + +Definition wrapping_mul885216284 (self : t_u8) (rhs : t_u8) : t_u8 := + wrapping_mul_u8 (self) (rhs). + +Definition wrapping_add124432709 (self : t_u16) (rhs : t_u16) : t_u16 := + wrapping_add_u16 (self) (rhs). + +Definition wrapping_mul14465189 (self : t_u16) (rhs : t_u16) : t_u16 := + wrapping_mul_u16 (self) (rhs). + +Definition wrapping_add1049665857 (self : t_u32) (rhs : t_u32) : t_u32 := + wrapping_add_u32 (self) (rhs). + +Definition wrapping_mul203346768 (self : t_u32) (rhs : t_u32) : t_u32 := + wrapping_mul_u32 (self) (rhs). + +Definition wrapping_add865565639 (self : t_u64) (rhs : t_u64) : t_u64 := + wrapping_add_u64 (self) (rhs). + +Definition wrapping_mul742978873 (self : t_u64) (rhs : t_u64) : t_u64 := + wrapping_mul_u64 (self) (rhs). + +Definition wrapping_add40844100 (self : t_u128) (rhs : t_u128) : t_u128 := + wrapping_add_u128 (self) (rhs). + +Definition wrapping_mul294115024 (self : t_u128) (rhs : t_u128) : t_u128 := + wrapping_mul_u128 (self) (rhs). + +Definition wrapping_add427637036 (self : t_usize) (rhs : t_usize) : t_usize := + wrapping_add_usize (self) (rhs). + +Definition wrapping_mul680896953 (self : t_usize) (rhs : t_usize) : t_usize := + wrapping_mul_usize (self) (rhs). + +Instance t_Add_695878175 : t_Add ((t_i8)) ((t_i8)) := + { + Add_impl_12_f_Output := t_i8; + Add_impl_12_f_add := fun (self : t_i8) (other : t_i8)=> + t_i8 (Add_f_add (i8_0 self) (i8_0 other)); + }. + +Instance t_Add_877139857 : t_Add ((t_i16)) ((t_i16)) := + { + Add_impl_13_f_Output := t_i16; + Add_impl_13_f_add := fun (self : t_i16) (other : t_i16)=> + t_i16 (Add_f_add (i16_0 self) (i16_0 other)); + }. + +Instance t_Add_426581780 : t_Add ((t_i32)) ((t_i32)) := + { + Add_impl_14_f_Output := t_i32; + Add_impl_14_f_add := fun (self : t_i32) (other : t_i32)=> + t_i32 (Add_f_add (i32_0 self) (i32_0 other)); + }. + +Instance t_Add_113633409 : t_Add ((t_i64)) ((t_i64)) := + { + Add_impl_15_f_Output := t_i64; + Add_impl_15_f_add := fun (self : t_i64) (other : t_i64)=> + t_i64 (Add_f_add (i64_0 self) (i64_0 other)); + }. + +Instance t_Add_788236527 : t_Add ((t_i128)) ((t_i128)) := + { + Add_impl_16_f_Output := t_i128; + Add_impl_16_f_add := fun (self : t_i128) (other : t_i128)=> + t_i128 (Add_f_add (i128_0 self) (i128_0 other)); + }. + +Instance t_Add_247333017 : t_Add ((t_isize)) ((t_isize)) := + { + Add_impl_17_f_Output := t_isize; + Add_impl_17_f_add := fun (self : t_isize) (other : t_isize)=> + t_isize (Add_f_add (isize_0 self) (isize_0 other)); + }. + +Instance t_Sub_756206062 : t_Sub ((t_i8)) ((t_i8)) := + { + Sub_impl_24_f_Output := t_i8; + Sub_impl_24_f_sub := fun (self : t_i8) (other : t_i8)=> + t_i8 (Sub_f_sub (i8_0 self) (i8_0 other)); + }. + +Instance t_Sub_618838212 : t_Sub ((t_i16)) ((t_i16)) := + { + Sub_impl_25_f_Output := t_i16; + Sub_impl_25_f_sub := fun (self : t_i16) (other : t_i16)=> + t_i16 (Sub_f_sub (i16_0 self) (i16_0 other)); + }. + +Instance t_Sub_44574118 : t_Sub ((t_i32)) ((t_i32)) := + { + Sub_impl_26_f_Output := t_i32; + Sub_impl_26_f_sub := fun (self : t_i32) (other : t_i32)=> + t_i32 (Sub_f_sub (i32_0 self) (i32_0 other)); + }. + +Instance t_Sub_287793174 : t_Sub ((t_i64)) ((t_i64)) := + { + Sub_impl_27_f_Output := t_i64; + Sub_impl_27_f_sub := fun (self : t_i64) (other : t_i64)=> + t_i64 (Sub_f_sub (i64_0 self) (i64_0 other)); + }. + +Instance t_Sub_837338145 : t_Sub ((t_i128)) ((t_i128)) := + { + Sub_impl_28_f_Output := t_i128; + Sub_impl_28_f_sub := fun (self : t_i128) (other : t_i128)=> + t_i128 (Sub_f_sub (i128_0 self) (i128_0 other)); + }. + +Instance t_Sub_22961567 : t_Sub ((t_isize)) ((t_isize)) := + { + Sub_impl_29_f_Output := t_isize; + Sub_impl_29_f_sub := fun (self : t_isize) (other : t_isize)=> + t_isize (Sub_f_sub (isize_0 self) (isize_0 other)); + }. + +Definition wrapping_sub_u128 (a : t_u128) (b : t_u128) : t_u128 := + t_u128 (Sub_f_sub (u128_0 a) (u128_0 b)). + +Definition wrapping_sub_u16 (a : t_u16) (b : t_u16) : t_u16 := + t_u16 (Sub_f_sub (u16_0 a) (u16_0 b)). + +Definition wrapping_sub_u32 (a : t_u32) (b : t_u32) : t_u32 := + t_u32 (Sub_f_sub (u32_0 a) (u32_0 b)). + +Definition wrapping_sub_u64 (a : t_u64) (b : t_u64) : t_u64 := + t_u64 (Sub_f_sub (u64_0 a) (u64_0 b)). + +Definition wrapping_sub_u8 (a : t_u8) (b : t_u8) : t_u8 := + t_u8 (Sub_f_sub (u8_0 a) (u8_0 b)). + +Definition wrapping_sub_usize (a : t_usize) (b : t_usize) : t_usize := + t_usize (Sub_f_sub (usize_0 a) (usize_0 b)). + +Definition wrapping_sub403906422 (self : t_u8) (rhs : t_u8) : t_u8 := + wrapping_sub_u8 (self) (rhs). + +Definition wrapping_neg123212788 (self : t_u8) : t_u8 := + wrapping_sub403906422 (t_u8 (Constants_f_ZERO)) (self). + +Definition wrapping_sub811251034 (self : t_u16) (rhs : t_u16) : t_u16 := + wrapping_sub_u16 (self) (rhs). + +Definition wrapping_neg128555595 (self : t_u16) : t_u16 := + wrapping_sub811251034 (t_u16 (Constants_f_ZERO)) (self). + +Definition wrapping_sub708953500 (self : t_u32) (rhs : t_u32) : t_u32 := + wrapping_sub_u32 (self) (rhs). + +Definition wrapping_neg328220773 (self : t_u32) : t_u32 := + wrapping_sub708953500 (t_u32 (Constants_f_ZERO)) (self). + +Definition wrapping_sub762520851 (self : t_u64) (rhs : t_u64) : t_u64 := + wrapping_sub_u64 (self) (rhs). + +Definition wrapping_neg617136337 (self : t_u64) : t_u64 := + wrapping_sub762520851 (t_u64 (Constants_f_ZERO)) (self). + +Definition wrapping_sub409310259 (self : t_u128) (rhs : t_u128) : t_u128 := + wrapping_sub_u128 (self) (rhs). + +Definition wrapping_neg729451428 (self : t_u128) : t_u128 := + wrapping_sub409310259 (t_u128 (Constants_f_ZERO)) (self). + +Definition wrapping_sub813101882 (self : t_usize) (rhs : t_usize) : t_usize := + wrapping_sub_usize (self) (rhs). + +Definition wrapping_neg342773446 (self : t_usize) : t_usize := + wrapping_sub813101882 (t_usize (Constants_f_ZERO)) (self). + +Instance t_Add_63222257 : t_Add ((t_u8)) ((t_u8)) := + { + Add_impl_6_f_Output := t_u8; + Add_impl_6_f_add := fun (self : t_u8) (other : t_u8)=> + t_u8 (Add_f_add (u8_0 self) (u8_0 other)); + }. + +Instance t_Add_568595401 : t_Add ((t_u16)) ((t_u16)) := + { + Add_impl_7_f_Output := t_u16; + Add_impl_7_f_add := fun (self : t_u16) (other : t_u16)=> + t_u16 (Add_f_add (u16_0 self) (u16_0 other)); + }. + +Instance t_Add_99427071 : t_Add ((t_u32)) ((t_u32)) := + { + Add_impl_8_f_Output := t_u32; + Add_impl_8_f_add := fun (self : t_u32) (other : t_u32)=> + t_u32 (Add_f_add (u32_0 self) (u32_0 other)); + }. + +Instance t_Add_963057404 : t_Add ((t_u64)) ((t_u64)) := + { + Add_impl_9_f_Output := t_u64; + Add_impl_9_f_add := fun (self : t_u64) (other : t_u64)=> + t_u64 (Add_f_add (u64_0 self) (u64_0 other)); + }. + +Instance t_Add_258013445 : t_Add ((t_u128)) ((t_u128)) := + { + Add_impl_10_f_Output := t_u128; + Add_impl_10_f_add := fun (self : t_u128) (other : t_u128)=> + t_u128 (Add_f_add (u128_0 self) (u128_0 other)); + }. + +Instance t_Add_192585125 : t_Add ((t_usize)) ((t_usize)) := + { + Add_impl_11_f_Output := t_usize; + Add_impl_11_f_add := fun (self : t_usize) (other : t_usize)=> + t_usize (Add_f_add (usize_0 self) (usize_0 other)); + }. + +Instance t_Mul_307943337 : t_Mul ((t_u8)) ((t_u8)) := + { + Mul_impl_30_f_Output := t_u8; + Mul_impl_30_f_mul := fun (self : t_u8) (other : t_u8)=> + t_u8 (Mul_f_mul (u8_0 self) (u8_0 other)); + }. + +Instance t_Mul_579880302 : t_Mul ((t_u16)) ((t_u16)) := + { + Mul_impl_31_f_Output := t_u16; + Mul_impl_31_f_mul := fun (self : t_u16) (other : t_u16)=> + t_u16 (Mul_f_mul (u16_0 self) (u16_0 other)); + }. + +Instance t_Mul_969448321 : t_Mul ((t_u32)) ((t_u32)) := + { + Mul_impl_32_f_Output := t_u32; + Mul_impl_32_f_mul := fun (self : t_u32) (other : t_u32)=> + t_u32 (Mul_f_mul (u32_0 self) (u32_0 other)); + }. + +Instance t_Mul_572333733 : t_Mul ((t_u64)) ((t_u64)) := + { + Mul_impl_33_f_Output := t_u64; + Mul_impl_33_f_mul := fun (self : t_u64) (other : t_u64)=> + t_u64 (Mul_f_mul (u64_0 self) (u64_0 other)); + }. + +Instance t_Mul_904691459 : t_Mul ((t_u128)) ((t_u128)) := + { + Mul_impl_34_f_Output := t_u128; + Mul_impl_34_f_mul := fun (self : t_u128) (other : t_u128)=> + t_u128 (Mul_f_mul (u128_0 self) (u128_0 other)); + }. + +Instance t_Mul_490480124 : t_Mul ((t_usize)) ((t_usize)) := + { + Mul_impl_35_f_Output := t_usize; + Mul_impl_35_f_mul := fun (self : t_usize) (other : t_usize)=> + t_usize (Mul_f_mul (usize_0 self) (usize_0 other)); + }. + +Instance t_Mul_542253756 : t_Mul ((t_i8)) ((t_i8)) := + { + Mul_impl_36_f_Output := t_i8; + Mul_impl_36_f_mul := fun (self : t_i8) (other : t_i8)=> + t_i8 (Mul_f_mul (i8_0 self) (i8_0 other)); + }. + +Instance t_Mul_586956420 : t_Mul ((t_i16)) ((t_i16)) := + { + Mul_impl_37_f_Output := t_i16; + Mul_impl_37_f_mul := fun (self : t_i16) (other : t_i16)=> + t_i16 (Mul_f_mul (i16_0 self) (i16_0 other)); + }. + +Instance t_Mul_622712365 : t_Mul ((t_i32)) ((t_i32)) := + { + Mul_impl_38_f_Output := t_i32; + Mul_impl_38_f_mul := fun (self : t_i32) (other : t_i32)=> + t_i32 (Mul_f_mul (i32_0 self) (i32_0 other)); + }. + +Instance t_Mul_167399285 : t_Mul ((t_i64)) ((t_i64)) := + { + Mul_impl_39_f_Output := t_i64; + Mul_impl_39_f_mul := fun (self : t_i64) (other : t_i64)=> + t_i64 (Mul_f_mul (i64_0 self) (i64_0 other)); + }. + +Instance t_Mul_264435207 : t_Mul ((t_i128)) ((t_i128)) := + { + Mul_impl_40_f_Output := t_i128; + Mul_impl_40_f_mul := fun (self : t_i128) (other : t_i128)=> + t_i128 (Mul_f_mul (i128_0 self) (i128_0 other)); + }. + +Instance t_Mul_9915144 : t_Mul ((t_isize)) ((t_isize)) := + { + Mul_impl_41_f_Output := t_isize; + Mul_impl_41_f_mul := fun (self : t_isize) (other : t_isize)=> + t_isize (Mul_f_mul (isize_0 self) (isize_0 other)); + }. + +Instance t_Div_23426959 : t_Div ((t_u8)) ((t_u8)) := + { + Div_impl_42_f_Output := t_u8; + Div_impl_42_f_div := fun (self : t_u8) (other : t_u8)=> + t_u8 (Div_f_div (u8_0 self) (u8_0 other)); + }. + +Definition wrapping_div660080892 (self : t_u8) (rhs : t_u8) : t_u8 := + Div_f_div (self) (rhs). + +Definition wrapping_div_euclid481233436 (self : t_u8) (rhs : t_u8) : t_u8 := + Div_f_div (self) (rhs). + +Instance t_Div_469212879 : t_Div ((t_u16)) ((t_u16)) := + { + Div_impl_43_f_Output := t_u16; + Div_impl_43_f_div := fun (self : t_u16) (other : t_u16)=> + t_u16 (Div_f_div (u16_0 self) (u16_0 other)); + }. + +Definition wrapping_div366977334 (self : t_u16) (rhs : t_u16) : t_u16 := + Div_f_div (self) (rhs). + +Definition wrapping_div_euclid22267888 (self : t_u16) (rhs : t_u16) : t_u16 := + Div_f_div (self) (rhs). + +Instance t_Div_248596974 : t_Div ((t_u32)) ((t_u32)) := + { + Div_impl_44_f_Output := t_u32; + Div_impl_44_f_div := fun (self : t_u32) (other : t_u32)=> + t_u32 (Div_f_div (u32_0 self) (u32_0 other)); + }. + +Definition wrapping_div931150450 (self : t_u32) (rhs : t_u32) : t_u32 := + Div_f_div (self) (rhs). + +Definition wrapping_div_euclid606291997 (self : t_u32) (rhs : t_u32) : t_u32 := + Div_f_div (self) (rhs). + +Instance t_Div_901268642 : t_Div ((t_u64)) ((t_u64)) := + { + Div_impl_45_f_Output := t_u64; + Div_impl_45_f_div := fun (self : t_u64) (other : t_u64)=> + t_u64 (Div_f_div (u64_0 self) (u64_0 other)); + }. + +Definition wrapping_div168427046 (self : t_u64) (rhs : t_u64) : t_u64 := + Div_f_div (self) (rhs). + +Definition wrapping_div_euclid321252086 (self : t_u64) (rhs : t_u64) : t_u64 := + Div_f_div (self) (rhs). + +Instance t_Div_868602092 : t_Div ((t_u128)) ((t_u128)) := + { + Div_impl_46_f_Output := t_u128; + Div_impl_46_f_div := fun (self : t_u128) (other : t_u128)=> + t_u128 (Div_f_div (u128_0 self) (u128_0 other)); + }. + +Definition wrapping_div692427683 (self : t_u128) (rhs : t_u128) : t_u128 := + Div_f_div (self) (rhs). + +Definition wrapping_div_euclid926334515 (self : t_u128) (rhs : t_u128) : t_u128 := + Div_f_div (self) (rhs). + +Instance t_Div_740920454 : t_Div ((t_usize)) ((t_usize)) := + { + Div_impl_47_f_Output := t_usize; + Div_impl_47_f_div := fun (self : t_usize) (other : t_usize)=> + t_usize (Div_f_div (usize_0 self) (usize_0 other)); + }. + +Definition wrapping_div905768546 (self : t_usize) (rhs : t_usize) : t_usize := + Div_f_div (self) (rhs). + +Definition wrapping_div_euclid90317722 (self : t_usize) (rhs : t_usize) : t_usize := + Div_f_div (self) (rhs). + +Instance t_Rem_485335443 : t_Rem ((t_u8)) ((t_u8)) := + { + Rem_impl_54_f_Output := t_u8; + Rem_impl_54_f_rem := fun (self : t_u8) (other : t_u8)=> + t_u8 (Rem_f_rem (u8_0 self) (u8_0 other)); + }. + +Definition wrapping_rem984569721 (self : t_u8) (rhs : t_u8) : t_u8 := + Rem_f_rem (self) (rhs). + +Definition wrapping_rem_euclid946579345 (self : t_u8) (rhs : t_u8) : t_u8 := + Rem_f_rem (self) (rhs). + +Instance t_Rem_780488465 : t_Rem ((t_u16)) ((t_u16)) := + { + Rem_impl_55_f_Output := t_u16; + Rem_impl_55_f_rem := fun (self : t_u16) (other : t_u16)=> + t_u16 (Rem_f_rem (u16_0 self) (u16_0 other)); + }. + +Definition wrapping_rem378598035 (self : t_u16) (rhs : t_u16) : t_u16 := + Rem_f_rem (self) (rhs). + +Definition wrapping_rem_euclid602402638 (self : t_u16) (rhs : t_u16) : t_u16 := + Rem_f_rem (self) (rhs). + +Instance t_Rem_734014529 : t_Rem ((t_u32)) ((t_u32)) := + { + Rem_impl_56_f_Output := t_u32; + Rem_impl_56_f_rem := fun (self : t_u32) (other : t_u32)=> + t_u32 (Rem_f_rem (u32_0 self) (u32_0 other)); + }. + +Definition wrapping_rem292009099 (self : t_u32) (rhs : t_u32) : t_u32 := + Rem_f_rem (self) (rhs). + +Definition wrapping_rem_euclid1020271291 (self : t_u32) (rhs : t_u32) : t_u32 := + Rem_f_rem (self) (rhs). + +Instance t_Rem_455480749 : t_Rem ((t_u64)) ((t_u64)) := + { + Rem_impl_57_f_Output := t_u64; + Rem_impl_57_f_rem := fun (self : t_u64) (other : t_u64)=> + t_u64 (Rem_f_rem (u64_0 self) (u64_0 other)); + }. + +Definition wrapping_rem390602260 (self : t_u64) (rhs : t_u64) : t_u64 := + Rem_f_rem (self) (rhs). + +Definition wrapping_rem_euclid839264546 (self : t_u64) (rhs : t_u64) : t_u64 := + Rem_f_rem (self) (rhs). + +Instance t_Rem_412060686 : t_Rem ((t_u128)) ((t_u128)) := + { + Rem_impl_58_f_Output := t_u128; + Rem_impl_58_f_rem := fun (self : t_u128) (other : t_u128)=> + t_u128 (Rem_f_rem (u128_0 self) (u128_0 other)); + }. + +Definition wrapping_rem332379920 (self : t_u128) (rhs : t_u128) : t_u128 := + Rem_f_rem (self) (rhs). + +Definition wrapping_rem_euclid646122423 (self : t_u128) (rhs : t_u128) : t_u128 := + Rem_f_rem (self) (rhs). + +Instance t_Rem_796467486 : t_Rem ((t_usize)) ((t_usize)) := + { + Rem_impl_59_f_Output := t_usize; + Rem_impl_59_f_rem := fun (self : t_usize) (other : t_usize)=> + t_usize (Rem_f_rem (usize_0 self) (usize_0 other)); + }. + +Definition wrapping_rem333089373 (self : t_usize) (rhs : t_usize) : t_usize := + Rem_f_rem (self) (rhs). + +Definition wrapping_rem_euclid769656504 (self : t_usize) (rhs : t_usize) : t_usize := + Rem_f_rem (self) (rhs). + +Instance t_Shr_1061808511 : t_Shr ((t_u8)) ((t_u8)) := + { + Shr_impl_6_f_Output := t_u8; + Shr_impl_6_f_shr := fun (self : t_u8) (other : t_u8)=> + t_u8 (Shr_f_shr (u8_0 self) (u8_0 other)); + }. + +Instance t_Shr_590944100 : t_Shr ((t_u8)) ((t_u16)) := + { + Shr_impl_7_f_Output := t_u8; + Shr_impl_7_f_shr := fun (self : t_u8) (other : t_u16)=> + t_u8 (Shr_f_shr (u8_0 self) (u16_0 other)); + }. + +Instance t_Shr_267395304 : t_Shr ((t_u8)) ((t_u32)) := + { + Shr_impl_8_f_Output := t_u8; + Shr_impl_8_f_shr := fun (self : t_u8) (other : t_u32)=> + t_u8 (Shr_f_shr (u8_0 self) (u32_0 other)); + }. + +Instance t_Shr_922719969 : t_Shr ((t_u8)) ((t_u64)) := + { + Shr_impl_9_f_Output := t_u8; + Shr_impl_9_f_shr := fun (self : t_u8) (other : t_u64)=> + t_u8 (Shr_f_shr (u8_0 self) (u64_0 other)); + }. + +Instance t_Shr_138723873 : t_Shr ((t_u8)) ((t_u128)) := + { + Shr_impl_10_f_Output := t_u8; + Shr_impl_10_f_shr := fun (self : t_u8) (other : t_u128)=> + t_u8 (Shr_f_shr (u8_0 self) (u128_0 other)); + }. + +Instance t_Shr_558887005 : t_Shr ((t_u8)) ((t_usize)) := + { + Shr_impl_11_f_Output := t_u8; + Shr_impl_11_f_shr := fun (self : t_u8) (other : t_usize)=> + t_u8 (Shr_f_shr (u8_0 self) (usize_0 other)); + }. + +Instance t_Shr_170693446 : t_Shr ((t_u16)) ((t_u8)) := + { + Shr_impl_12_f_Output := t_u16; + Shr_impl_12_f_shr := fun (self : t_u16) (other : t_u8)=> + t_u16 (Shr_f_shr (u16_0 self) (u8_0 other)); + }. + +Instance t_Shr_899863737 : t_Shr ((t_u16)) ((t_u16)) := + { + Shr_impl_13_f_Output := t_u16; + Shr_impl_13_f_shr := fun (self : t_u16) (other : t_u16)=> + t_u16 (Shr_f_shr (u16_0 self) (u16_0 other)); + }. + +Instance t_Shr_290867596 : t_Shr ((t_u16)) ((t_u32)) := + { + Shr_impl_14_f_Output := t_u16; + Shr_impl_14_f_shr := fun (self : t_u16) (other : t_u32)=> + t_u16 (Shr_f_shr (u16_0 self) (u32_0 other)); + }. + +Instance t_Shr_630800316 : t_Shr ((t_u16)) ((t_u64)) := + { + Shr_impl_15_f_Output := t_u16; + Shr_impl_15_f_shr := fun (self : t_u16) (other : t_u64)=> + t_u16 (Shr_f_shr (u16_0 self) (u64_0 other)); + }. + +Instance t_Shr_51138976 : t_Shr ((t_u16)) ((t_u128)) := + { + Shr_impl_16_f_Output := t_u16; + Shr_impl_16_f_shr := fun (self : t_u16) (other : t_u128)=> + t_u16 (Shr_f_shr (u16_0 self) (u128_0 other)); + }. + +Instance t_Shr_82567397 : t_Shr ((t_u16)) ((t_usize)) := + { + Shr_impl_17_f_Output := t_u16; + Shr_impl_17_f_shr := fun (self : t_u16) (other : t_usize)=> + t_u16 (Shr_f_shr (u16_0 self) (usize_0 other)); + }. + +Instance t_Shr_430948219 : t_Shr ((t_u32)) ((t_u8)) := + { + Shr_impl_18_f_Output := t_u32; + Shr_impl_18_f_shr := fun (self : t_u32) (other : t_u8)=> + t_u32 (Shr_f_shr (u32_0 self) (u8_0 other)); + }. + +Instance t_Shr_157675832 : t_Shr ((t_u32)) ((t_u16)) := + { + Shr_impl_19_f_Output := t_u32; + Shr_impl_19_f_shr := fun (self : t_u32) (other : t_u16)=> + t_u32 (Shr_f_shr (u32_0 self) (u16_0 other)); + }. + +Instance t_Shr_708845947 : t_Shr ((t_u32)) ((t_u32)) := + { + Shr_impl_20_f_Output := t_u32; + Shr_impl_20_f_shr := fun (self : t_u32) (other : t_u32)=> + t_u32 (Shr_f_shr (u32_0 self) (u32_0 other)); + }. + +Instance t_Shr_1060262347 : t_Shr ((t_u32)) ((t_u64)) := + { + Shr_impl_21_f_Output := t_u32; + Shr_impl_21_f_shr := fun (self : t_u32) (other : t_u64)=> + t_u32 (Shr_f_shr (u32_0 self) (u64_0 other)); + }. + +Instance t_Shr_372764217 : t_Shr ((t_u32)) ((t_u128)) := + { + Shr_impl_22_f_Output := t_u32; + Shr_impl_22_f_shr := fun (self : t_u32) (other : t_u128)=> + t_u32 (Shr_f_shr (u32_0 self) (u128_0 other)); + }. + +Instance t_Shr_534962338 : t_Shr ((t_u32)) ((t_usize)) := + { + Shr_impl_23_f_Output := t_u32; + Shr_impl_23_f_shr := fun (self : t_u32) (other : t_usize)=> + t_u32 (Shr_f_shr (u32_0 self) (usize_0 other)); + }. + +Instance t_Shr_45695168 : t_Shr ((t_u64)) ((t_u8)) := + { + Shr_impl_24_f_Output := t_u64; + Shr_impl_24_f_shr := fun (self : t_u64) (other : t_u8)=> + t_u64 (Shr_f_shr (u64_0 self) (u8_0 other)); + }. + +Instance t_Shr_1027310629 : t_Shr ((t_u64)) ((t_u16)) := + { + Shr_impl_25_f_Output := t_u64; + Shr_impl_25_f_shr := fun (self : t_u64) (other : t_u16)=> + t_u64 (Shr_f_shr (u64_0 self) (u16_0 other)); + }. + +Instance t_Shr_357793917 : t_Shr ((t_u64)) ((t_u32)) := + { + Shr_impl_26_f_Output := t_u64; + Shr_impl_26_f_shr := fun (self : t_u64) (other : t_u32)=> + t_u64 (Shr_f_shr (u64_0 self) (u32_0 other)); + }. + +Instance t_Shr_1038705817 : t_Shr ((t_u64)) ((t_u64)) := + { + Shr_impl_27_f_Output := t_u64; + Shr_impl_27_f_shr := fun (self : t_u64) (other : t_u64)=> + t_u64 (Shr_f_shr (u64_0 self) (u64_0 other)); + }. + +Instance t_Shr_567649567 : t_Shr ((t_u64)) ((t_u128)) := + { + Shr_impl_28_f_Output := t_u64; + Shr_impl_28_f_shr := fun (self : t_u64) (other : t_u128)=> + t_u64 (Shr_f_shr (u64_0 self) (u128_0 other)); + }. + +Instance t_Shr_380280894 : t_Shr ((t_u64)) ((t_usize)) := + { + Shr_impl_29_f_Output := t_u64; + Shr_impl_29_f_shr := fun (self : t_u64) (other : t_usize)=> + t_u64 (Shr_f_shr (u64_0 self) (usize_0 other)); + }. + +Instance t_Shr_555027554 : t_Shr ((t_u128)) ((t_u8)) := + { + Shr_impl_30_f_Output := t_u128; + Shr_impl_30_f_shr := fun (self : t_u128) (other : t_u8)=> + t_u128 (Shr_f_shr (u128_0 self) (u8_0 other)); + }. + +Instance t_Shr_225523666 : t_Shr ((t_u128)) ((t_u16)) := + { + Shr_impl_31_f_Output := t_u128; + Shr_impl_31_f_shr := fun (self : t_u128) (other : t_u16)=> + t_u128 (Shr_f_shr (u128_0 self) (u16_0 other)); + }. + +Instance t_Shr_910916464 : t_Shr ((t_u128)) ((t_u32)) := + { + Shr_impl_32_f_Output := t_u128; + Shr_impl_32_f_shr := fun (self : t_u128) (other : t_u32)=> + t_u128 (Shr_f_shr (u128_0 self) (u32_0 other)); + }. + +Instance t_Shr_137291592 : t_Shr ((t_u128)) ((t_u64)) := + { + Shr_impl_33_f_Output := t_u128; + Shr_impl_33_f_shr := fun (self : t_u128) (other : t_u64)=> + t_u128 (Shr_f_shr (u128_0 self) (u64_0 other)); + }. + +Instance t_Shr_1070013296 : t_Shr ((t_u128)) ((t_u128)) := + { + Shr_impl_34_f_Output := t_u128; + Shr_impl_34_f_shr := fun (self : t_u128) (other : t_u128)=> + t_u128 (Shr_f_shr (u128_0 self) (u128_0 other)); + }. + +Instance t_Shr_1009428374 : t_Shr ((t_u128)) ((t_usize)) := + { + Shr_impl_35_f_Output := t_u128; + Shr_impl_35_f_shr := fun (self : t_u128) (other : t_usize)=> + t_u128 (Shr_f_shr (u128_0 self) (usize_0 other)); + }. + +Instance t_Shr_94723353 : t_Shr ((t_usize)) ((t_u8)) := + { + Shr_impl_36_f_Output := t_usize; + Shr_impl_36_f_shr := fun (self : t_usize) (other : t_u8)=> + t_usize (Shr_f_shr (usize_0 self) (u8_0 other)); + }. + +Instance t_Shr_18219058 : t_Shr ((t_usize)) ((t_u16)) := + { + Shr_impl_37_f_Output := t_usize; + Shr_impl_37_f_shr := fun (self : t_usize) (other : t_u16)=> + t_usize (Shr_f_shr (usize_0 self) (u16_0 other)); + }. + +Instance t_Shr_14441839 : t_Shr ((t_usize)) ((t_u32)) := + { + Shr_impl_38_f_Output := t_usize; + Shr_impl_38_f_shr := fun (self : t_usize) (other : t_u32)=> + t_usize (Shr_f_shr (usize_0 self) (u32_0 other)); + }. + +Instance t_Shr_642676920 : t_Shr ((t_usize)) ((t_u64)) := + { + Shr_impl_39_f_Output := t_usize; + Shr_impl_39_f_shr := fun (self : t_usize) (other : t_u64)=> + t_usize (Shr_f_shr (usize_0 self) (u64_0 other)); + }. + +Instance t_Shr_65876869 : t_Shr ((t_usize)) ((t_u128)) := + { + Shr_impl_40_f_Output := t_usize; + Shr_impl_40_f_shr := fun (self : t_usize) (other : t_u128)=> + t_usize (Shr_f_shr (usize_0 self) (u128_0 other)); + }. + +Instance t_Shr_833436714 : t_Shr ((t_usize)) ((t_usize)) := + { + Shr_impl_41_f_Output := t_usize; + Shr_impl_41_f_shr := fun (self : t_usize) (other : t_usize)=> + t_usize (Shr_f_shr (usize_0 self) (usize_0 other)); + }. + +Instance t_Shl_161455974 : t_Shl ((t_u8)) ((t_u8)) := + { + Shl_impl_42_f_Output := t_u8; + Shl_impl_42_f_shl := fun (self : t_u8) (other : t_u8)=> + t_u8 (Shl_f_shl (u8_0 self) (u8_0 other)); + }. + +Instance t_Shl_861055562 : t_Shl ((t_u8)) ((t_u16)) := + { + Shl_impl_43_f_Output := t_u8; + Shl_impl_43_f_shl := fun (self : t_u8) (other : t_u16)=> + t_u8 (Shl_f_shl (u8_0 self) (u16_0 other)); + }. + +Instance t_Shl_479938796 : t_Shl ((t_u8)) ((t_u32)) := + { + Shl_impl_44_f_Output := t_u8; + Shl_impl_44_f_shl := fun (self : t_u8) (other : t_u32)=> + t_u8 (Shl_f_shl (u8_0 self) (u32_0 other)); + }. + +Instance t_Shl_373462431 : t_Shl ((t_u8)) ((t_u64)) := + { + Shl_impl_45_f_Output := t_u8; + Shl_impl_45_f_shl := fun (self : t_u8) (other : t_u64)=> + t_u8 (Shl_f_shl (u8_0 self) (u64_0 other)); + }. + +Instance t_Shl_356733585 : t_Shl ((t_u8)) ((t_u128)) := + { + Shl_impl_46_f_Output := t_u8; + Shl_impl_46_f_shl := fun (self : t_u8) (other : t_u128)=> + t_u8 (Shl_f_shl (u8_0 self) (u128_0 other)); + }. + +Instance t_Shl_138823384 : t_Shl ((t_u8)) ((t_usize)) := + { + Shl_impl_47_f_Output := t_u8; + Shl_impl_47_f_shl := fun (self : t_u8) (other : t_usize)=> + t_u8 (Shl_f_shl (u8_0 self) (usize_0 other)); + }. + +Instance t_Shl_492599436 : t_Shl ((t_u16)) ((t_u8)) := + { + Shl_impl_48_f_Output := t_u16; + Shl_impl_48_f_shl := fun (self : t_u16) (other : t_u8)=> + t_u16 (Shl_f_shl (u16_0 self) (u8_0 other)); + }. + +Instance t_Shl_254997522 : t_Shl ((t_u16)) ((t_u16)) := + { + Shl_impl_49_f_Output := t_u16; + Shl_impl_49_f_shl := fun (self : t_u16) (other : t_u16)=> + t_u16 (Shl_f_shl (u16_0 self) (u16_0 other)); + }. + +Instance t_Shl_840888059 : t_Shl ((t_u16)) ((t_u32)) := + { + Shl_impl_50_f_Output := t_u16; + Shl_impl_50_f_shl := fun (self : t_u16) (other : t_u32)=> + t_u16 (Shl_f_shl (u16_0 self) (u32_0 other)); + }. + +Instance t_Shl_1017206779 : t_Shl ((t_u16)) ((t_u64)) := + { + Shl_impl_51_f_Output := t_u16; + Shl_impl_51_f_shl := fun (self : t_u16) (other : t_u64)=> + t_u16 (Shl_f_shl (u16_0 self) (u64_0 other)); + }. + +Instance t_Shl_751151164 : t_Shl ((t_u16)) ((t_u128)) := + { + Shl_impl_52_f_Output := t_u16; + Shl_impl_52_f_shl := fun (self : t_u16) (other : t_u128)=> + t_u16 (Shl_f_shl (u16_0 self) (u128_0 other)); + }. + +Instance t_Shl_303578486 : t_Shl ((t_u16)) ((t_usize)) := + { + Shl_impl_53_f_Output := t_u16; + Shl_impl_53_f_shl := fun (self : t_u16) (other : t_usize)=> + t_u16 (Shl_f_shl (u16_0 self) (usize_0 other)); + }. + +Instance t_Shl_186069032 : t_Shl ((t_u32)) ((t_u8)) := + { + Shl_impl_54_f_Output := t_u32; + Shl_impl_54_f_shl := fun (self : t_u32) (other : t_u8)=> + t_u32 (Shl_f_shl (u32_0 self) (u8_0 other)); + }. + +Instance t_Shl_320616735 : t_Shl ((t_u32)) ((t_u16)) := + { + Shl_impl_55_f_Output := t_u32; + Shl_impl_55_f_shl := fun (self : t_u32) (other : t_u16)=> + t_u32 (Shl_f_shl (u32_0 self) (u16_0 other)); + }. + +Instance t_Shl_325940784 : t_Shl ((t_u32)) ((t_u32)) := + { + Shl_impl_56_f_Output := t_u32; + Shl_impl_56_f_shl := fun (self : t_u32) (other : t_u32)=> + t_u32 (Shl_f_shl (u32_0 self) (u32_0 other)); + }. + +Instance t_Shl_398883535 : t_Shl ((t_u32)) ((t_u64)) := + { + Shl_impl_57_f_Output := t_u32; + Shl_impl_57_f_shl := fun (self : t_u32) (other : t_u64)=> + t_u32 (Shl_f_shl (u32_0 self) (u64_0 other)); + }. + +Instance t_Shl_700909976 : t_Shl ((t_u32)) ((t_u128)) := + { + Shl_impl_58_f_Output := t_u32; + Shl_impl_58_f_shl := fun (self : t_u32) (other : t_u128)=> + t_u32 (Shl_f_shl (u32_0 self) (u128_0 other)); + }. + +Instance t_Shl_475027367 : t_Shl ((t_u32)) ((t_usize)) := + { + Shl_impl_59_f_Output := t_u32; + Shl_impl_59_f_shl := fun (self : t_u32) (other : t_usize)=> + t_u32 (Shl_f_shl (u32_0 self) (usize_0 other)); + }. + +Instance t_Shl_620046856 : t_Shl ((t_u64)) ((t_u8)) := + { + Shl_impl_60_f_Output := t_u64; + Shl_impl_60_f_shl := fun (self : t_u64) (other : t_u8)=> + t_u64 (Shl_f_shl (u64_0 self) (u8_0 other)); + }. + +Instance t_Shl_158077515 : t_Shl ((t_u64)) ((t_u16)) := + { + Shl_impl_61_f_Output := t_u64; + Shl_impl_61_f_shl := fun (self : t_u64) (other : t_u16)=> + t_u64 (Shl_f_shl (u64_0 self) (u16_0 other)); + }. + +Instance t_Shl_1071441050 : t_Shl ((t_u64)) ((t_u32)) := + { + Shl_impl_62_f_Output := t_u64; + Shl_impl_62_f_shl := fun (self : t_u64) (other : t_u32)=> + t_u64 (Shl_f_shl (u64_0 self) (u32_0 other)); + }. + +Instance t_Shl_581241894 : t_Shl ((t_u64)) ((t_u64)) := + { + Shl_impl_63_f_Output := t_u64; + Shl_impl_63_f_shl := fun (self : t_u64) (other : t_u64)=> + t_u64 (Shl_f_shl (u64_0 self) (u64_0 other)); + }. + +Instance t_Shl_916302310 : t_Shl ((t_u64)) ((t_u128)) := + { + Shl_impl_64_f_Output := t_u64; + Shl_impl_64_f_shl := fun (self : t_u64) (other : t_u128)=> + t_u64 (Shl_f_shl (u64_0 self) (u128_0 other)); + }. + +Instance t_Shl_59609547 : t_Shl ((t_u64)) ((t_usize)) := + { + Shl_impl_65_f_Output := t_u64; + Shl_impl_65_f_shl := fun (self : t_u64) (other : t_usize)=> + t_u64 (Shl_f_shl (u64_0 self) (usize_0 other)); + }. + +Instance t_Shl_308574333 : t_Shl ((t_u128)) ((t_u8)) := + { + Shl_impl_66_f_Output := t_u128; + Shl_impl_66_f_shl := fun (self : t_u128) (other : t_u8)=> + t_u128 (Shl_f_shl (u128_0 self) (u8_0 other)); + }. + +Instance t_Shl_966677877 : t_Shl ((t_u128)) ((t_u16)) := + { + Shl_impl_67_f_Output := t_u128; + Shl_impl_67_f_shl := fun (self : t_u128) (other : t_u16)=> + t_u128 (Shl_f_shl (u128_0 self) (u16_0 other)); + }. + +Instance t_Shl_38932717 : t_Shl ((t_u128)) ((t_u32)) := + { + Shl_impl_68_f_Output := t_u128; + Shl_impl_68_f_shl := fun (self : t_u128) (other : t_u32)=> + t_u128 (Shl_f_shl (u128_0 self) (u32_0 other)); + }. + +Instance t_Shl_108085956 : t_Shl ((t_u128)) ((t_u64)) := + { + Shl_impl_69_f_Output := t_u128; + Shl_impl_69_f_shl := fun (self : t_u128) (other : t_u64)=> + t_u128 (Shl_f_shl (u128_0 self) (u64_0 other)); + }. + +Instance t_Shl_489587677 : t_Shl ((t_u128)) ((t_u128)) := + { + Shl_impl_70_f_Output := t_u128; + Shl_impl_70_f_shl := fun (self : t_u128) (other : t_u128)=> + t_u128 (Shl_f_shl (u128_0 self) (u128_0 other)); + }. + +Instance t_Shl_837150634 : t_Shl ((t_u128)) ((t_usize)) := + { + Shl_impl_71_f_Output := t_u128; + Shl_impl_71_f_shl := fun (self : t_u128) (other : t_usize)=> + t_u128 (Shl_f_shl (u128_0 self) (usize_0 other)); + }. + +Instance t_Shl_736165651 : t_Shl ((t_usize)) ((t_u8)) := + { + Shl_impl_72_f_Output := t_usize; + Shl_impl_72_f_shl := fun (self : t_usize) (other : t_u8)=> + t_usize (Shl_f_shl (usize_0 self) (u8_0 other)); + }. + +Instance t_Shl_740886741 : t_Shl ((t_usize)) ((t_u16)) := + { + Shl_impl_73_f_Output := t_usize; + Shl_impl_73_f_shl := fun (self : t_usize) (other : t_u16)=> + t_usize (Shl_f_shl (usize_0 self) (u16_0 other)); + }. + +Instance t_Shl_683246358 : t_Shl ((t_usize)) ((t_u32)) := + { + Shl_impl_74_f_Output := t_usize; + Shl_impl_74_f_shl := fun (self : t_usize) (other : t_u32)=> + t_usize (Shl_f_shl (usize_0 self) (u32_0 other)); + }. + +Instance t_Shl_436746920 : t_Shl ((t_usize)) ((t_u64)) := + { + Shl_impl_75_f_Output := t_usize; + Shl_impl_75_f_shl := fun (self : t_usize) (other : t_u64)=> + t_usize (Shl_f_shl (usize_0 self) (u64_0 other)); + }. + +Instance t_Shl_527409353 : t_Shl ((t_usize)) ((t_u128)) := + { + Shl_impl_76_f_Output := t_usize; + Shl_impl_76_f_shl := fun (self : t_usize) (other : t_u128)=> + t_usize (Shl_f_shl (usize_0 self) (u128_0 other)); + }. + +Instance t_Shl_982380013 : t_Shl ((t_usize)) ((t_usize)) := + { + Shl_impl_77_f_Output := t_usize; + Shl_impl_77_f_shl := fun (self : t_usize) (other : t_usize)=> + t_usize (Shl_f_shl (usize_0 self) (usize_0 other)); + }. + +Instance t_BitOr_669654947 : t_BitOr ((t_u8)) ((t_u8)) := + { + BitOr_impl_78_f_Output := t_u8; + BitOr_impl_78_f_bitor := fun (self : t_u8) (other : t_u8)=> + t_u8 (BitOr_f_bitor (u8_0 self) (u8_0 other)); + }. + +Instance t_BitOr_892941557 : t_BitOr ((t_u16)) ((t_u16)) := + { + BitOr_impl_79_f_Output := t_u16; + BitOr_impl_79_f_bitor := fun (self : t_u16) (other : t_u16)=> + t_u16 (BitOr_f_bitor (u16_0 self) (u16_0 other)); + }. + +Instance t_BitOr_991330847 : t_BitOr ((t_u32)) ((t_u32)) := + { + BitOr_impl_80_f_Output := t_u32; + BitOr_impl_80_f_bitor := fun (self : t_u32) (other : t_u32)=> + t_u32 (BitOr_f_bitor (u32_0 self) (u32_0 other)); + }. + +Instance t_BitOr_692971983 : t_BitOr ((t_u64)) ((t_u64)) := + { + BitOr_impl_81_f_Output := t_u64; + BitOr_impl_81_f_bitor := fun (self : t_u64) (other : t_u64)=> + t_u64 (BitOr_f_bitor (u64_0 self) (u64_0 other)); + }. + +Instance t_BitOr_227319538 : t_BitOr ((t_u128)) ((t_u128)) := + { + BitOr_impl_82_f_Output := t_u128; + BitOr_impl_82_f_bitor := fun (self : t_u128) (other : t_u128)=> + t_u128 (BitOr_f_bitor (u128_0 self) (u128_0 other)); + }. + +Instance t_BitOr_669787696 : t_BitOr ((t_usize)) ((t_usize)) := + { + BitOr_impl_83_f_Output := t_usize; + BitOr_impl_83_f_bitor := fun (self : t_usize) (other : t_usize)=> + t_usize (BitOr_f_bitor (usize_0 self) (usize_0 other)); + }. + +Instance t_BitXor_327788827 : t_BitXor ((t_u8)) ((t_u8)) := + { + BitXor_impl_90_f_Output := t_u8; + BitXor_impl_90_f_bitxor := fun (self : t_u8) (other : t_u8)=> + t_u8 (BitXor_f_bitxor (u8_0 self) (u8_0 other)); + }. + +Instance t_BitXor_661040931 : t_BitXor ((t_u16)) ((t_u16)) := + { + BitXor_impl_91_f_Output := t_u16; + BitXor_impl_91_f_bitxor := fun (self : t_u16) (other : t_u16)=> + t_u16 (BitXor_f_bitxor (u16_0 self) (u16_0 other)); + }. + +Instance t_BitXor_222957020 : t_BitXor ((t_u32)) ((t_u32)) := + { + BitXor_impl_92_f_Output := t_u32; + BitXor_impl_92_f_bitxor := fun (self : t_u32) (other : t_u32)=> + t_u32 (BitXor_f_bitxor (u32_0 self) (u32_0 other)); + }. + +Instance t_BitXor_530545977 : t_BitXor ((t_u64)) ((t_u64)) := + { + BitXor_impl_93_f_Output := t_u64; + BitXor_impl_93_f_bitxor := fun (self : t_u64) (other : t_u64)=> + t_u64 (BitXor_f_bitxor (u64_0 self) (u64_0 other)); + }. + +Instance t_BitXor_112780081 : t_BitXor ((t_u128)) ((t_u128)) := + { + BitXor_impl_94_f_Output := t_u128; + BitXor_impl_94_f_bitxor := fun (self : t_u128) (other : t_u128)=> + t_u128 (BitXor_f_bitxor (u128_0 self) (u128_0 other)); + }. + +Instance t_BitXor_969810999 : t_BitXor ((t_usize)) ((t_usize)) := + { + BitXor_impl_95_f_Output := t_usize; + BitXor_impl_95_f_bitxor := fun (self : t_usize) (other : t_usize)=> + t_usize (BitXor_f_bitxor (usize_0 self) (usize_0 other)); + }. + +Instance t_BitAnd_126469303 : t_BitAnd ((t_u8)) ((t_u8)) := + { + BitAnd_impl_96_f_Output := t_u8; + BitAnd_impl_96_f_bitand := fun (self : t_u8) (other : t_u8)=> + t_u8 (BitAnd_f_bitand (u8_0 self) (u8_0 other)); + }. + +Instance t_BitAnd_531525101 : t_BitAnd ((t_u16)) ((t_u16)) := + { + BitAnd_impl_97_f_Output := t_u16; + BitAnd_impl_97_f_bitand := fun (self : t_u16) (other : t_u16)=> + t_u16 (BitAnd_f_bitand (u16_0 self) (u16_0 other)); + }. + +Instance t_BitAnd_24728760 : t_BitAnd ((t_u32)) ((t_u32)) := + { + BitAnd_impl_98_f_Output := t_u32; + BitAnd_impl_98_f_bitand := fun (self : t_u32) (other : t_u32)=> + t_u32 (BitAnd_f_bitand (u32_0 self) (u32_0 other)); + }. + +Instance t_BitAnd_35845574 : t_BitAnd ((t_u64)) ((t_u64)) := + { + BitAnd_impl_99_f_Output := t_u64; + BitAnd_impl_99_f_bitand := fun (self : t_u64) (other : t_u64)=> + t_u64 (BitAnd_f_bitand (u64_0 self) (u64_0 other)); + }. + +Instance t_BitAnd_396424214 : t_BitAnd ((t_u128)) ((t_u128)) := + { + BitAnd_impl_100_f_Output := t_u128; + BitAnd_impl_100_f_bitand := fun (self : t_u128) (other : t_u128)=> + t_u128 (BitAnd_f_bitand (u128_0 self) (u128_0 other)); + }. + +Instance t_BitAnd_652458180 : t_BitAnd ((t_usize)) ((t_usize)) := + { + BitAnd_impl_101_f_Output := t_usize; + BitAnd_impl_101_f_bitand := fun (self : t_usize) (other : t_usize)=> + t_usize (BitAnd_f_bitand (usize_0 self) (usize_0 other)); + }. + +Instance t_Sub_81344668 : t_Sub ((t_u8)) ((t_u8)) := + { + Sub_impl_18_f_Output := t_u8; + Sub_impl_18_f_sub := fun (self : t_u8) (other : t_u8)=> + t_u8 (Sub_f_sub (u8_0 self) (u8_0 other)); + }. + +Instance t_Sub_1011801854 : t_Sub ((t_u16)) ((t_u16)) := + { + Sub_impl_19_f_Output := t_u16; + Sub_impl_19_f_sub := fun (self : t_u16) (other : t_u16)=> + t_u16 (Sub_f_sub (u16_0 self) (u16_0 other)); + }. + +Instance t_Sub_1070652436 : t_Sub ((t_u32)) ((t_u32)) := + { + Sub_impl_20_f_Output := t_u32; + Sub_impl_20_f_sub := fun (self : t_u32) (other : t_u32)=> + t_u32 (Sub_f_sub (u32_0 self) (u32_0 other)); + }. + +Definition rotate_left_u128 (x : t_u128) (shift : t_u32) : t_u128 := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS136999051) in + let left : t_u128 := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_u128 := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS136999051) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_left_u16 (x : t_u16) (shift : t_u32) : t_u16 := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS277333551) in + let left : t_u16 := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_u16 := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS277333551) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_left_u32 (x : t_u32) (shift : t_u32) : t_u32 := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS473478051) in + let left : t_u32 := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_u32 := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS473478051) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_left_u64 (x : t_u64) (shift : t_u32) : t_u64 := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS177666292) in + let left : t_u64 := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_u64 := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS177666292) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_left_u8 (x : t_u8) (shift : t_u32) : t_u8 := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS690311813) in + let left : t_u8 := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_u8 := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS690311813) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_left_usize (x : t_usize) (shift : t_u32) : t_usize := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS229952196) in + let left : t_usize := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_usize := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS229952196) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_right_u128 (x : t_u128) (shift : t_u32) : t_u128 := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS136999051) in + let left : t_u128 := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_u128 := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS136999051) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_right_u16 (x : t_u16) (shift : t_u32) : t_u16 := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS277333551) in + let left : t_u16 := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_u16 := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS277333551) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_right_u32 (x : t_u32) (shift : t_u32) : t_u32 := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS473478051) in + let left : t_u32 := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_u32 := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS473478051) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_right_u64 (x : t_u64) (shift : t_u32) : t_u64 := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS177666292) in + let left : t_u64 := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_u64 := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS177666292) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_right_u8 (x : t_u8) (shift : t_u32) : t_u8 := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS690311813) in + let left : t_u8 := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_u8 := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS690311813) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_right_usize (x : t_usize) (shift : t_u32) : t_usize := + let shift : t_u32 := Rem_f_rem (shift) (v_BITS229952196) in + let left : t_usize := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in + let right : t_usize := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS229952196) (Clone_f_clone (shift))) in + BitOr_f_bitor (left) (right). + +Definition rotate_left792925914 (self : t_u8) (n : t_u32) : t_u8 := + run (let hoist1 := ControlFlow_Break (rotate_left_u8 (self) (n)) in + ControlFlow_Continue (never_to_any (hoist1))). + +Definition rotate_right166090082 (self : t_u8) (n : t_u32) : t_u8 := + run (let hoist2 := ControlFlow_Break (rotate_right_u8 (self) (n)) in + ControlFlow_Continue (never_to_any (hoist2))). + +Definition rotate_left297034175 (self : t_u16) (n : t_u32) : t_u16 := + run (let hoist3 := ControlFlow_Break (rotate_left_u16 (self) (n)) in + ControlFlow_Continue (never_to_any (hoist3))). + +Definition rotate_right138522246 (self : t_u16) (n : t_u32) : t_u16 := + run (let hoist4 := ControlFlow_Break (rotate_right_u16 (self) (n)) in + ControlFlow_Continue (never_to_any (hoist4))). + +Definition rotate_left823573251 (self : t_u32) (n : t_u32) : t_u32 := + run (let hoist5 := ControlFlow_Break (rotate_left_u32 (self) (n)) in + ControlFlow_Continue (never_to_any (hoist5))). + +Definition rotate_right869195717 (self : t_u32) (n : t_u32) : t_u32 := + run (let hoist6 := ControlFlow_Break (rotate_right_u32 (self) (n)) in + ControlFlow_Continue (never_to_any (hoist6))). + +Definition rotate_left618936072 (self : t_u64) (n : t_u32) : t_u64 := + run (let hoist7 := ControlFlow_Break (rotate_left_u64 (self) (n)) in + ControlFlow_Continue (never_to_any (hoist7))). + +Definition rotate_right1041614027 (self : t_u64) (n : t_u32) : t_u64 := + run (let hoist8 := ControlFlow_Break (rotate_right_u64 (self) (n)) in + ControlFlow_Continue (never_to_any (hoist8))). + +Definition rotate_left1065866885 (self : t_u128) (n : t_u32) : t_u128 := + run (let hoist9 := ControlFlow_Break (rotate_left_u128 (self) (n)) in + ControlFlow_Continue (never_to_any (hoist9))). + +Definition rotate_right591112338 (self : t_u128) (n : t_u32) : t_u128 := + run (let hoist10 := ControlFlow_Break (rotate_right_u128 (self) (n)) in + ControlFlow_Continue (never_to_any (hoist10))). + +Definition rotate_left996672710 (self : t_usize) (n : t_u32) : t_usize := + run (let hoist11 := ControlFlow_Break (rotate_left_usize (self) (n)) in + ControlFlow_Continue (never_to_any (hoist11))). + +Definition rotate_right442734174 (self : t_usize) (n : t_u32) : t_usize := + run (let hoist12 := ControlFlow_Break (rotate_right_usize (self) (n)) in + ControlFlow_Continue (never_to_any (hoist12))). + +Instance t_Sub_788323603 : t_Sub ((t_u64)) ((t_u64)) := + { + Sub_impl_21_f_Output := t_u64; + Sub_impl_21_f_sub := fun (self : t_u64) (other : t_u64)=> + t_u64 (Sub_f_sub (u64_0 self) (u64_0 other)); + }. + +Instance t_Sub_1046324685 : t_Sub ((t_u128)) ((t_u128)) := + { + Sub_impl_22_f_Output := t_u128; + Sub_impl_22_f_sub := fun (self : t_u128) (other : t_u128)=> + t_u128 (Sub_f_sub (u128_0 self) (u128_0 other)); + }. + +Instance t_Sub_1064369889 : t_Sub ((t_usize)) ((t_usize)) := + { + Sub_impl_23_f_Output := t_usize; + Sub_impl_23_f_sub := fun (self : t_usize) (other : t_usize)=> + t_usize (Sub_f_sub (usize_0 self) (usize_0 other)); + }. + +Definition bswap_u128 (x : t_u128) : t_u128 := + let count : t_u128 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS136999051)) (fun count _ => + true) (count) (fun count i => + let low_bit : t_u128 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in + count) in + count. + +Definition bswap_u16 (x : t_u16) : t_u16 := + let count : t_u16 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS277333551)) (fun count _ => + true) (count) (fun count i => + let low_bit : t_u16 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in + count) in + count. + +Definition bswap_u32 (x : t_u32) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS473478051)) (fun count _ => + true) (count) (fun count i => + let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in + count) in + count. + +Definition bswap_u64 (x : t_u64) : t_u64 := + let count : t_u64 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS177666292)) (fun count _ => + true) (count) (fun count i => + let low_bit : t_u64 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in + count) in + count. + +Definition bswap_u8 (x : t_u8) : t_u8 := + let count : t_u8 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS690311813)) (fun count _ => + true) (count) (fun count i => + let low_bit : t_u8 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in + count) in + count. + +Definition bswap_usize (x : t_usize) : t_usize := + let count : t_usize := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS229952196)) (fun count _ => + true) (count) (fun count i => + let low_bit : t_usize := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in + count) in + count. + +Definition ctlz_u128 (x : t_u128) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS136999051)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS136999051) (Into_f_into (1))))) in + if + orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition ctlz_u16 (x : t_u16) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS277333551)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS277333551) (Into_f_into (1))))) in + if + orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition ctlz_u32 (x : t_u32) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS473478051)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS473478051) (Into_f_into (1))))) in + if + orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition ctlz_u64 (x : t_u64) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS177666292)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS177666292) (Into_f_into (1))))) in + if + orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition ctlz_u8 (x : t_u8) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS690311813)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS690311813) (Into_f_into (1))))) in + if + orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition ctlz_usize (x : t_usize) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS229952196)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS229952196) (Into_f_into (1))))) in + if + orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition ctpop_u128 (x : t_u128) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS136999051)) (fun count _ => + true) (count) (fun count i => + Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in + count. + +Definition ctpop_u16 (x : t_u16) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS277333551)) (fun count _ => + true) (count) (fun count i => + Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in + count. + +Definition ctpop_u32 (x : t_u32) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS473478051)) (fun count _ => + true) (count) (fun count i => + Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in + count. + +Definition ctpop_u64 (x : t_u64) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS177666292)) (fun count _ => + true) (count) (fun count i => + Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in + count. + +Definition ctpop_u8 (x : t_u8) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS690311813)) (fun count _ => + true) (count) (fun count i => + Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in + count. + +Definition ctpop_usize (x : t_usize) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let count := fold_range (0) (Into_f_into (v_BITS229952196)) (fun count _ => + true) (count) (fun count i => + Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in + count. + +Definition cttz_u128 (x : t_u128) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS136999051)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + if + orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition cttz_u16 (x : t_u16) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS277333551)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + if + orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition cttz_u32 (x : t_u32) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS473478051)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + if + orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition cttz_u64 (x : t_u64) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS177666292)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + if + orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition cttz_u8 (x : t_u8) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS690311813)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + if + orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition cttz_usize (x : t_usize) : t_u32 := + let count : t_u32 := Into_f_into (0) in + let done := false in + let (count,done) := fold_range (0) (Into_f_into (v_BITS229952196)) (fun (count,done) _ => + true) ((count,done)) (fun (count,done) i => + let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in + if + orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) + then + let done := true in + (count,done) + else + let count := Add_f_add (count) (Into_f_into (1)) in + (count,done)) in + count. + +Definition count_ones202509899 (self : t_u8) : t_u32 := + run (let hoist13 := ControlFlow_Break (ctpop_u8 (self)) in + ControlFlow_Continue (never_to_any (hoist13))). + +Definition leading_zeros75047366 (self : t_u8) : t_u32 := + run (let hoist14 := ControlFlow_Break (ctlz_u8 (self)) in + ControlFlow_Continue (never_to_any (hoist14))). + +Definition swap_bytes657156997 (self : t_u8) : t_u8 := + Into_f_into (bswap_u8 (self)). + +Definition from_be746282521 (x : t_u8) : t_u8 := + swap_bytes657156997 (x). + +Definition to_be972448780 (self : t_u8) : t_u8 := + swap_bytes657156997 (self). + +Definition trailing_zeros572929871 (self : t_u8) : t_u32 := + run (let hoist15 := ControlFlow_Break (cttz_u8 (self)) in + ControlFlow_Continue (never_to_any (hoist15))). + +Definition count_ones91875752 (self : t_u16) : t_u32 := + run (let hoist16 := ControlFlow_Break (ctpop_u16 (self)) in + ControlFlow_Continue (never_to_any (hoist16))). + +Definition leading_zeros462412478 (self : t_u16) : t_u32 := + run (let hoist17 := ControlFlow_Break (ctlz_u16 (self)) in + ControlFlow_Continue (never_to_any (hoist17))). + +Definition swap_bytes926722059 (self : t_u16) : t_u16 := + Into_f_into (bswap_u16 (self)). + +Definition from_be510959665 (x : t_u16) : t_u16 := + swap_bytes926722059 (x). + +Definition to_be551590602 (self : t_u16) : t_u16 := + swap_bytes926722059 (self). + +Definition trailing_zeros421474733 (self : t_u16) : t_u32 := + run (let hoist18 := ControlFlow_Break (cttz_u16 (self)) in + ControlFlow_Continue (never_to_any (hoist18))). + +Definition count_ones776185738 (self : t_u32) : t_u32 := + run (let hoist19 := ControlFlow_Break (ctpop_u32 (self)) in + ControlFlow_Continue (never_to_any (hoist19))). + +Definition leading_zeros698221972 (self : t_u32) : t_u32 := + run (let hoist20 := ControlFlow_Break (ctlz_u32 (self)) in + ControlFlow_Continue (never_to_any (hoist20))). + +Definition swap_bytes320480126 (self : t_u32) : t_u32 := + Into_f_into (bswap_u32 (self)). + +Definition from_be664756649 (x : t_u32) : t_u32 := + swap_bytes320480126 (x). + +Definition to_be82825962 (self : t_u32) : t_u32 := + swap_bytes320480126 (self). + +Definition trailing_zeros1061560720 (self : t_u32) : t_u32 := + run (let hoist21 := ControlFlow_Break (cttz_u32 (self)) in + ControlFlow_Continue (never_to_any (hoist21))). + +Definition count_ones235885653 (self : t_u64) : t_u32 := + run (let hoist22 := ControlFlow_Break (ctpop_u64 (self)) in + ControlFlow_Continue (never_to_any (hoist22))). + +Definition leading_zeros338302110 (self : t_u64) : t_u32 := + run (let hoist23 := ControlFlow_Break (ctlz_u64 (self)) in + ControlFlow_Continue (never_to_any (hoist23))). + +Definition swap_bytes722254271 (self : t_u64) : t_u64 := + Into_f_into (bswap_u64 (self)). + +Definition from_be16013635 (x : t_u64) : t_u64 := + swap_bytes722254271 (x). + +Definition to_be376714729 (self : t_u64) : t_u64 := + swap_bytes722254271 (self). + +Definition trailing_zeros188346231 (self : t_u64) : t_u32 := + run (let hoist24 := ControlFlow_Break (cttz_u64 (self)) in + ControlFlow_Continue (never_to_any (hoist24))). + +Definition count_ones926736261 (self : t_u128) : t_u32 := + run (let hoist25 := ControlFlow_Break (ctpop_u128 (self)) in + ControlFlow_Continue (never_to_any (hoist25))). + +Definition leading_zeros19644612 (self : t_u128) : t_u32 := + run (let hoist26 := ControlFlow_Break (ctlz_u128 (self)) in + ControlFlow_Continue (never_to_any (hoist26))). + +Definition swap_bytes420879368 (self : t_u128) : t_u128 := + Into_f_into (bswap_u128 (self)). + +Definition from_be191085771 (x : t_u128) : t_u128 := + swap_bytes420879368 (x). + +Definition to_be555075987 (self : t_u128) : t_u128 := + swap_bytes420879368 (self). + +Definition trailing_zeros821715250 (self : t_u128) : t_u32 := + run (let hoist27 := ControlFlow_Break (cttz_u128 (self)) in + ControlFlow_Continue (never_to_any (hoist27))). + +Definition count_ones441645762 (self : t_usize) : t_u32 := + run (let hoist28 := ControlFlow_Break (ctpop_usize (self)) in + ControlFlow_Continue (never_to_any (hoist28))). + +Definition leading_zeros905233489 (self : t_usize) : t_u32 := + run (let hoist29 := ControlFlow_Break (ctlz_usize (self)) in + ControlFlow_Continue (never_to_any (hoist29))). + +Definition swap_bytes268673424 (self : t_usize) : t_usize := + Into_f_into (bswap_usize (self)). + +Definition from_be607978059 (x : t_usize) : t_usize := + swap_bytes268673424 (x). + +Definition to_be561847134 (self : t_usize) : t_usize := + swap_bytes268673424 (self). + +Definition trailing_zeros42066260 (self : t_usize) : t_u32 := + run (let hoist30 := ControlFlow_Break (cttz_usize (self)) in + ControlFlow_Continue (never_to_any (hoist30))). + +Instance t_Div_345870802 : t_Div ((t_i8)) ((t_i8)) := + { + Div_impl_48_f_Output := t_i8; + Div_impl_48_f_div := fun (self : t_i8) (other : t_i8)=> + t_i8 (Div_f_div (i8_0 self) (i8_0 other)); + }. + +Instance t_Div_69196905 : t_Div ((t_i16)) ((t_i16)) := + { + Div_impl_49_f_Output := t_i16; + Div_impl_49_f_div := fun (self : t_i16) (other : t_i16)=> + t_i16 (Div_f_div (i16_0 self) (i16_0 other)); + }. + +Instance t_Div_222178666 : t_Div ((t_i32)) ((t_i32)) := + { + Div_impl_50_f_Output := t_i32; + Div_impl_50_f_div := fun (self : t_i32) (other : t_i32)=> + t_i32 (Div_f_div (i32_0 self) (i32_0 other)); + }. + +Instance t_Div_551701934 : t_Div ((t_i64)) ((t_i64)) := + { + Div_impl_51_f_Output := t_i64; + Div_impl_51_f_div := fun (self : t_i64) (other : t_i64)=> + t_i64 (Div_f_div (i64_0 self) (i64_0 other)); + }. + +Instance t_Div_650346214 : t_Div ((t_i128)) ((t_i128)) := + { + Div_impl_52_f_Output := t_i128; + Div_impl_52_f_div := fun (self : t_i128) (other : t_i128)=> + t_i128 (Div_f_div (i128_0 self) (i128_0 other)); + }. + +Instance t_Div_911978922 : t_Div ((t_isize)) ((t_isize)) := + { + Div_impl_53_f_Output := t_isize; + Div_impl_53_f_div := fun (self : t_isize) (other : t_isize)=> + t_isize (Div_f_div (isize_0 self) (isize_0 other)); + }. + +Instance t_Rem_580678374 : t_Rem ((t_i8)) ((t_i8)) := + { + Rem_impl_60_f_Output := t_i8; + Rem_impl_60_f_rem := fun (self : t_i8) (other : t_i8)=> + t_i8 (Rem_f_rem (i8_0 self) (i8_0 other)); + }. + +Definition rem_euclid622298453 (self : t_i8) (rhs : t_i8) : t_i8 := + let r := Rem_f_rem (self) (Clone_f_clone (rhs)) in + if + PartialOrd_f_lt (r) (Into_f_into (0)) + then + wrapping_add634491935 (r) (wrapping_abs400396545 (rhs)) + else + r. + +Instance t_Rem_532407972 : t_Rem ((t_i16)) ((t_i16)) := + { + Rem_impl_61_f_Output := t_i16; + Rem_impl_61_f_rem := fun (self : t_i16) (other : t_i16)=> + t_i16 (Rem_f_rem (i16_0 self) (i16_0 other)); + }. + +Definition rem_euclid158017644 (self : t_i16) (rhs : t_i16) : t_i16 := + let r := Rem_f_rem (self) (Clone_f_clone (rhs)) in + if + PartialOrd_f_lt (r) (Into_f_into (0)) + then + wrapping_add868559108 (r) (wrapping_abs229076826 (rhs)) + else + r. + +Instance t_Rem_406274620 : t_Rem ((t_i32)) ((t_i32)) := + { + Rem_impl_62_f_Output := t_i32; + Rem_impl_62_f_rem := fun (self : t_i32) (other : t_i32)=> + t_i32 (Rem_f_rem (i32_0 self) (i32_0 other)); + }. + +Definition rem_euclid881249982 (self : t_i32) (rhs : t_i32) : t_i32 := + let r := Rem_f_rem (self) (Clone_f_clone (rhs)) in + if + PartialOrd_f_lt (r) (Into_f_into (0)) + then + wrapping_add475006616 (r) (wrapping_abs729536875 (rhs)) + else + r. + +Instance t_Rem_296096507 : t_Rem ((t_i64)) ((t_i64)) := + { + Rem_impl_63_f_Output := t_i64; + Rem_impl_63_f_rem := fun (self : t_i64) (other : t_i64)=> + t_i64 (Rem_f_rem (i64_0 self) (i64_0 other)); + }. + +Definition rem_euclid1057082210 (self : t_i64) (rhs : t_i64) : t_i64 := + let r := Rem_f_rem (self) (Clone_f_clone (rhs)) in + if + PartialOrd_f_lt (r) (Into_f_into (0)) + then + wrapping_add590074241 (r) (wrapping_abs285829312 (rhs)) + else + r. + +Instance t_Rem_773614977 : t_Rem ((t_i128)) ((t_i128)) := + { + Rem_impl_64_f_Output := t_i128; + Rem_impl_64_f_rem := fun (self : t_i128) (other : t_i128)=> + t_i128 (Rem_f_rem (i128_0 self) (i128_0 other)); + }. + +Definition rem_euclid254910751 (self : t_i128) (rhs : t_i128) : t_i128 := + let r := Rem_f_rem (self) (Clone_f_clone (rhs)) in + if + PartialOrd_f_lt (r) (Into_f_into (0)) + then + wrapping_add251385439 (r) (wrapping_abs281925696 (rhs)) + else + r. + +Instance t_Rem_136872616 : t_Rem ((t_isize)) ((t_isize)) := + { + Rem_impl_65_f_Output := t_isize; + Rem_impl_65_f_rem := fun (self : t_isize) (other : t_isize)=> + t_isize (Rem_f_rem (isize_0 self) (isize_0 other)); + }. + +Definition rem_euclid828379367 (self : t_isize) (rhs : t_isize) : t_isize := + let r := Rem_f_rem (self) (Clone_f_clone (rhs)) in + if + PartialOrd_f_lt (r) (Into_f_into (0)) + then + wrapping_add226040243 (r) (wrapping_abs347300819 (rhs)) + else + r. + +Instance t_Not_500984294 : t_Not ((t_u8)) := + { + Not_impl_f_Output := t_u8; + Not_impl_f_not := fun (self : t_u8)=> + t_u8 (Not_f_not (u8_0 self)); + }. + +Definition count_zeros558337492 (self : t_u8) : t_u32 := + count_ones202509899 (Not_f_not (self)). + +Definition leading_ones55148479 (self : t_u8) : t_u32 := + leading_zeros75047366 (Not_f_not (self)). + +Definition trailing_ones359778731 (self : t_u8) : t_u32 := + trailing_zeros572929871 (Not_f_not (self)). + +Instance t_Not_560691647 : t_Not ((t_u16)) := + { + Not_impl_1_f_Output := t_u16; + Not_impl_1_f_not := fun (self : t_u16)=> + t_u16 (Not_f_not (u16_0 self)); + }. + +Definition count_zeros199825317 (self : t_u16) : t_u32 := + count_ones91875752 (Not_f_not (self)). + +Definition leading_ones164277656 (self : t_u16) : t_u32 := + leading_zeros462412478 (Not_f_not (self)). + +Definition trailing_ones903944727 (self : t_u16) : t_u32 := + trailing_zeros421474733 (Not_f_not (self)). + +Instance t_Not_220208504 : t_Not ((t_u32)) := + { + Not_impl_2_f_Output := t_u32; + Not_impl_2_f_not := fun (self : t_u32)=> + t_u32 (Not_f_not (u32_0 self)); + }. + +Definition count_zeros942566041 (self : t_u32) : t_u32 := + count_ones776185738 (Not_f_not (self)). + +Definition leading_ones766486760 (self : t_u32) : t_u32 := + leading_zeros698221972 (Not_f_not (self)). + +Definition trailing_ones223371510 (self : t_u32) : t_u32 := + trailing_zeros1061560720 (Not_f_not (self)). + +Instance t_Not_655044209 : t_Not ((t_u64)) := + { + Not_impl_3_f_Output := t_u64; + Not_impl_3_f_not := fun (self : t_u64)=> + t_u64 (Not_f_not (u64_0 self)); + }. + +Definition count_zeros60346158 (self : t_u64) : t_u32 := + count_ones235885653 (Not_f_not (self)). + +Definition leading_ones404666910 (self : t_u64) : t_u32 := + leading_zeros338302110 (Not_f_not (self)). + +Definition trailing_ones601201120 (self : t_u64) : t_u32 := + trailing_zeros188346231 (Not_f_not (self)). + +Instance t_Not_851738617 : t_Not ((t_u128)) := + { + Not_impl_4_f_Output := t_u128; + Not_impl_4_f_not := fun (self : t_u128)=> + t_u128 (Not_f_not (u128_0 self)); + }. + +Definition count_zeros824862815 (self : t_u128) : t_u32 := + count_ones926736261 (Not_f_not (self)). + +Definition leading_ones475503572 (self : t_u128) : t_u32 := + leading_zeros19644612 (Not_f_not (self)). + +Definition trailing_ones705845381 (self : t_u128) : t_u32 := + trailing_zeros821715250 (Not_f_not (self)). + +Instance t_Not_677551814 : t_Not ((t_usize)) := + { + Not_impl_5_f_Output := t_usize; + Not_impl_5_f_not := fun (self : t_usize)=> + t_usize (Not_f_not (usize_0 self)); + }. + +Definition count_zeros73479642 (self : t_usize) : t_u32 := + count_ones441645762 (Not_f_not (self)). + +Definition leading_ones667660708 (self : t_usize) : t_u32 := + leading_zeros905233489 (Not_f_not (self)). + +Definition trailing_ones979548463 (self : t_usize) : t_u32 := + trailing_zeros42066260 (Not_f_not (self)). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base.v b/proof-libs/coq/coq/generated-core/src/Core_Base.v index 8e9653885..7e4eaf95a 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base.v @@ -1,36 +1,89 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Spec. -Export Spec. +(* From Core Require Import Core. *) -Require Import Binary. -Export Binary. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Pos. -Export Pos. +From Core Require Import spec. +Export spec. -Require Import Z. -Export Z. +From Core Require Import binary. +Export binary. -Require Import Number_conversion. -Export Number_conversion. -Require Import Seq. -Export Seq. -(*Not implemented yet? todo(item)*) +From Core Require Import pos. +Export pos. -(*Not implemented yet? todo(item)*) +From Core Require Import z. +Export z. -(*Not implemented yet? todo(item)*) +From Core Require Import number_conversion. +Export number_conversion. -(*Not implemented yet? todo(item)*) +From Core Require Import seq. +Export seq. -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v index c57e6f0b3..f0472a30e 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v @@ -1,147 +1,200 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super_Spec. -Export Super_Spec. +(* From Core Require Import Core. *) -Require Import Ordering. -Export Ordering. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Definition positive_cmp__cmp_binary_cont (x : t_Positive_t) (y : t_Positive_t) (r : t_Ordering_t) : t_Ordering_t := - match match_positive x with - | POSITIVE_XH => - match match_positive y with - | POSITIVE_XH => +From Core Require Import Core_Base_Spec. +Export Core_Base_Spec. + +From Core Require Import Core_Cmp (t_Ordering). +Export Core_Cmp (t_Ordering). + +Fixpoint positive_cmp__cmp_binary_cont (x : t_Positive) (y : t_Positive) (r : t_Ordering) : t_Ordering := + match match_positive (x) with + | POSITIVE_XH => + match match_positive (y) with + | POSITIVE_XH => r - | POSITIVE_XO q | POSITIVE_XI q => - Ordering_Lesst_Ordering_t + | POSITIVE_XO (q) + | POSITIVE_XI (q) => + Ordering_Less end - | POSITIVE_XO p => - match match_positive y with - | POSITIVE_XH => - Ordering_Greatert_Ordering_t - | POSITIVE_XO q => - positive_cmp__cmp_binary_cont p q r - | POSITIVE_XI q => - positive_cmp__cmp_binary_cont p q Ordering_Lesst_Ordering_t + | POSITIVE_XO (p) => + match match_positive (y) with + | POSITIVE_XH => + Ordering_Greater + | POSITIVE_XO (q) => + positive_cmp__cmp_binary_cont (p) (q) (r) + | POSITIVE_XI (q) => + positive_cmp__cmp_binary_cont (p) (q) (Ordering_Less) end - | POSITIVE_XI p => - match match_positive y with - | POSITIVE_XH => - Ordering_Greatert_Ordering_t - | POSITIVE_XO q => - positive_cmp__cmp_binary_cont p q Ordering_Greatert_Ordering_t - | POSITIVE_XI q => - positive_cmp__cmp_binary_cont p q r + | POSITIVE_XI (p) => + match match_positive (y) with + | POSITIVE_XH => + Ordering_Greater + | POSITIVE_XO (q) => + positive_cmp__cmp_binary_cont (p) (q) (Ordering_Greater) + | POSITIVE_XI (q) => + positive_cmp__cmp_binary_cont (p) (q) (r) end end. -Definition positive_cmp (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Ordering_t := - positive_cmp__cmp_binary_cont lhs rhs Ordering_Equalt_Ordering_t. +Definition positive_cmp (lhs : t_Positive) (rhs : t_Positive) : t_Ordering := + positive_cmp__cmp_binary_cont (lhs) (rhs) (Ordering_Equal). -Definition positive_le (lhs : t_Positive_t) (rhs : t_Positive_t) : bool := - match Option_Some (positive_cmp lhs rhs) with - | Option_Some Ordering_Less | Ordering_Equal => +Definition positive_le (lhs : t_Positive) (rhs : t_Positive) : bool := + match Option_Some (positive_cmp (lhs) (rhs)) with + | Option_Some (Ordering_Less + | Ordering_Equal) => true | _ => false end. -Definition positive_pred_double (s : t_Positive_t) : t_Positive_t := - match match_positive s with - | POSITIVE_XH => +Fixpoint positive_pred_double (s : t_Positive) : t_Positive := + match match_positive (s) with + | POSITIVE_XH => xH - | POSITIVE_XO p => - xI (positive_pred_double p) - | POSITIVE_XI p => - xI (xO p) + | POSITIVE_XO (p) => + xI (positive_pred_double (p)) + | POSITIVE_XI (p) => + xI (xO (p)) end. -Definition positive_succ (s : t_Positive_t) : t_Positive_t := - match match_positive s with - | POSITIVE_XH => - xO xH - | POSITIVE_XO q => - xI q - | POSITIVE_XI q => - xO (positive_succ q) +Fixpoint positive_succ (s : t_Positive) : t_Positive := + match match_positive (s) with + | POSITIVE_XH => + xO (xH) + | POSITIVE_XO (q) => + xI (q) + | POSITIVE_XI (q) => + xO (positive_succ (q)) end. -Definition positive_add (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Positive_t := - positive_add__add lhs rhs. +Definition positive_add (lhs : t_Positive) (rhs : t_Positive) : t_Positive := + positive_add__add (lhs) (rhs). -Definition positive_mul (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Positive_t := - match match_positive lhs with - | POSITIVE_XH => +Fixpoint positive_mul (lhs : t_Positive) (rhs : t_Positive) : t_Positive := + match match_positive (lhs) with + | POSITIVE_XH => rhs - | POSITIVE_XO p => - xO (positive_mul p rhs) - | POSITIVE_XI p => - positive_add (f_clone rhs) (xO (positive_mul p rhs)) + | POSITIVE_XO (p) => + xO (positive_mul (p) (rhs)) + | POSITIVE_XI (p) => + positive_add (Clone_f_clone (rhs)) (xO (positive_mul (p) (rhs))) end. -Definition positive_add__add (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Positive_t := - match match_positive lhs with - | POSITIVE_XH => - match match_positive rhs with - | POSITIVE_XH => - xO xH - | POSITIVE_XO q => - xI q - | POSITIVE_XI q => - xO (positive_succ q) +Fixpoint positive_add__add (lhs : t_Positive) (rhs : t_Positive) : t_Positive := + match match_positive (lhs) with + | POSITIVE_XH => + match match_positive (rhs) with + | POSITIVE_XH => + xO (xH) + | POSITIVE_XO (q) => + xI (q) + | POSITIVE_XI (q) => + xO (positive_succ (q)) end - | POSITIVE_XO p => - match match_positive rhs with - | POSITIVE_XH => - xI p - | POSITIVE_XO q => - xO (positive_add__add p q) - | POSITIVE_XI q => - xI (positive_add__add p q) + | POSITIVE_XO (p) => + match match_positive (rhs) with + | POSITIVE_XH => + xI (p) + | POSITIVE_XO (q) => + xO (positive_add__add (p) (q)) + | POSITIVE_XI (q) => + xI (positive_add__add (p) (q)) end - | POSITIVE_XI p => - match match_positive rhs with - | POSITIVE_XH => - xO (positive_succ p) - | POSITIVE_XO q => - xI (positive_add__add p q) - | POSITIVE_XI q => - xO (positive_add__add_carry p q) + | POSITIVE_XI (p) => + match match_positive (rhs) with + | POSITIVE_XH => + xO (positive_succ (p)) + | POSITIVE_XO (q) => + xI (positive_add__add (p) (q)) + | POSITIVE_XI (q) => + xO (positive_add__add_carry (p) (q)) end end. -Definition positive_add__add_carry (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Positive_t := - match match_positive lhs with - | POSITIVE_XH => - match match_positive rhs with - | POSITIVE_XH => - xI xH - | POSITIVE_XO q => - xO (positive_succ q) - | POSITIVE_XI q => - xI (positive_succ q) +Fixpoint positive_add__add_carry (lhs : t_Positive) (rhs : t_Positive) : t_Positive := + match match_positive (lhs) with + | POSITIVE_XH => + match match_positive (rhs) with + | POSITIVE_XH => + xI (xH) + | POSITIVE_XO (q) => + xO (positive_succ (q)) + | POSITIVE_XI (q) => + xI (positive_succ (q)) end - | POSITIVE_XO p => - match match_positive rhs with - | POSITIVE_XH => - xO (positive_succ p) - | POSITIVE_XO q => - xI (positive_add__add p q) - | POSITIVE_XI q => - xO (positive_add__add_carry p q) + | POSITIVE_XO (p) => + match match_positive (rhs) with + | POSITIVE_XH => + xO (positive_succ (p)) + | POSITIVE_XO (q) => + xI (positive_add__add (p) (q)) + | POSITIVE_XI (q) => + xO (positive_add__add_carry (p) (q)) end - | POSITIVE_XI p => - match match_positive rhs with - | POSITIVE_XH => - xI (positive_succ p) - | POSITIVE_XO q => - xO (positive_add__add_carry p q) - | POSITIVE_XI q => - xI (positive_add__add_carry p q) + | POSITIVE_XI (p) => + match match_positive (rhs) with + | POSITIVE_XH => + xI (positive_succ (p)) + | POSITIVE_XO (q) => + xO (positive_add__add_carry (p) (q)) + | POSITIVE_XI (q) => + xI (positive_add__add_carry (p) (q)) end end. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v index 683efe3f2..045695834 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v @@ -1,347 +1,146 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super_Spec. -Export Super_Spec. - -Require Import Super. -Export Super. - -Require Import primitive. -Export primitive. - -Require Import Core_Cmp. -Export Core_Cmp. - -Require Import Core_Convert. -Export Core_Convert. - -(*Not implemented yet? todo(item)*) - -Definition impl_24__from_u128_binary (x : int128) : t_Positive_t := - if eq x (@repr WORDSIZE128 1) - then xH - else if eq (rem x (@repr WORDSIZE128 2)) (@repr WORDSIZE128 0) - then xO (impl_24__from_u128_binary (div x (@repr WORDSIZE128 2))) - else xI (impl_24__from_u128_binary (div x (@repr WORDSIZE128 2))). - -#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t int128 := { - f_from (x : int128) := if eq x (@repr WORDSIZE128 0) - then v_HaxInt_ZERO - else positive_to_int (impl_24__from_u128_binary x); -}. - -#[global] Instance t_Z_t_t_From : t_From t_Z_t int128 := { - f_from (x : int128) := match f_cmp x (@repr WORDSIZE128 0) with - | Ordering_Equal => - Z_ZEROt_Z_t - | Ordering_Less => - Z_NEG (impl_24__from_u128_binary (impl__i128__unsigned_abs x)) - | Ordering_Greater => - Z_POS (impl_24__from_u128_binary (impl__i128__unsigned_abs x)) - end; -}. - -Definition impl_24__from_u16_binary (x : int16) : t_Positive_t := - if eq x (@repr WORDSIZE16 1) - then xH - else if eq (rem x (@repr WORDSIZE16 2)) (@repr WORDSIZE16 0) - then xO (impl_24__from_u16_binary (div x (@repr WORDSIZE16 2))) - else xI (impl_24__from_u16_binary (div x (@repr WORDSIZE16 2))). - -#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t int16 := { - f_from (x : int16) := if eq x (@repr WORDSIZE16 0) - then v_HaxInt_ZERO - else positive_to_int (impl_24__from_u16_binary x); -}. - -#[global] Instance t_Z_t_t_From : t_From t_Z_t int16 := { - f_from (x : int16) := match f_cmp x (@repr WORDSIZE16 0) with - | Ordering_Equal => - Z_ZEROt_Z_t - | Ordering_Less => - Z_NEG (impl_24__from_u16_binary (impl__i16__unsigned_abs x)) - | Ordering_Greater => - Z_POS (impl_24__from_u16_binary (impl__i16__unsigned_abs x)) - end; -}. - -Definition impl_24__from_u32_binary (x : int32) : t_Positive_t := - if eq x (@repr WORDSIZE32 1) - then xH - else if eq (rem x (@repr WORDSIZE32 2)) (@repr WORDSIZE32 0) - then xO (impl_24__from_u32_binary (div x (@repr WORDSIZE32 2))) - else xI (impl_24__from_u32_binary (div x (@repr WORDSIZE32 2))). - -#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t int32 := { - f_from (x : int32) := if eq x (@repr WORDSIZE32 0) - then v_HaxInt_ZERO - else positive_to_int (impl_24__from_u32_binary x); -}. - -#[global] Instance t_Z_t_t_From : t_From t_Z_t int32 := { - f_from (x : int32) := match f_cmp x (@repr WORDSIZE32 0) with - | Ordering_Equal => - Z_ZEROt_Z_t - | Ordering_Less => - Z_NEG (impl_24__from_u32_binary (impl__i32__unsigned_abs x)) - | Ordering_Greater => - Z_POS (impl_24__from_u32_binary (impl__i32__unsigned_abs x)) - end; -}. - -Definition impl_24__from_u64_binary (x : int64) : t_Positive_t := - if eq x (@repr WORDSIZE64 1) - then xH - else if eq (rem x (@repr WORDSIZE64 2)) (@repr WORDSIZE64 0) - then xO (impl_24__from_u64_binary (div x (@repr WORDSIZE64 2))) - else xI (impl_24__from_u64_binary (div x (@repr WORDSIZE64 2))). - -#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t int64 := { - f_from (x : int64) := if eq x (@repr WORDSIZE64 0) - then v_HaxInt_ZERO - else positive_to_int (impl_24__from_u64_binary x); -}. - -#[global] Instance t_Z_t_t_From : t_From t_Z_t int64 := { - f_from (x : int64) := match f_cmp x (@repr WORDSIZE64 0) with - | Ordering_Equal => - Z_ZEROt_Z_t - | Ordering_Less => - Z_NEG (impl_24__from_u64_binary (impl__i64__unsigned_abs x)) - | Ordering_Greater => - Z_POS (impl_24__from_u64_binary (impl__i64__unsigned_abs x)) - end; -}. - -Definition impl_24__from_u8_binary (x : int8) : t_Positive_t := - if eq x (@repr WORDSIZE8 1) - then xH - else if eq (rem x (@repr WORDSIZE8 2)) (@repr WORDSIZE8 0) - then xO (impl_24__from_u8_binary (div x (@repr WORDSIZE8 2))) - else xI (impl_24__from_u8_binary (div x (@repr WORDSIZE8 2))). - -#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t int8 := { - f_from (x : int8) := if eq x (@repr WORDSIZE8 0) - then v_HaxInt_ZERO - else positive_to_int (impl_24__from_u8_binary x); -}. - -#[global] Instance t_Z_t_t_From : t_From t_Z_t int8 := { - f_from (x : int8) := match f_cmp x (@repr WORDSIZE8 0) with - | Ordering_Equal => - Z_ZEROt_Z_t - | Ordering_Less => - Z_NEG (impl_24__from_u8_binary (impl__i8__unsigned_abs x)) - | Ordering_Greater => - Z_POS (impl_24__from_u8_binary (impl__i8__unsigned_abs x)) - end; -}. - -Definition impl_24__from_usize_binary (x : uint_size) : t_Positive_t := - if eq x (@repr WORDSIZE32 1) - then xH - else if eq (rem x (@repr WORDSIZE32 2)) (@repr WORDSIZE32 0) - then xO (impl_24__from_usize_binary (div x (@repr WORDSIZE32 2))) - else xI (impl_24__from_usize_binary (div x (@repr WORDSIZE32 2))). - -#[global] Instance t_HaxInt_t_t_From : t_From t_HaxInt_t uint_size := { - f_from (x : uint_size) := if eq x (@repr WORDSIZE32 0) - then v_HaxInt_ZERO - else positive_to_int (impl_24__from_usize_binary x); -}. - -#[global] Instance t_Z_t_t_From : t_From t_Z_t uint_size := { - f_from (x : uint_size) := match f_cmp x (@repr WORDSIZE32 0) with - | Ordering_Equal => - Z_ZEROt_Z_t - | Ordering_Less => - Z_NEG (impl_24__from_usize_binary (impl__isize__unsigned_abs x)) - | Ordering_Greater => - Z_POS (impl_24__from_usize_binary (impl__isize__unsigned_abs x)) - end; -}. - -Definition impl_24__to_u128_binary (self : t_Positive_t) : int128 := - match match_positive self with - | POSITIVE_XH => - (@repr WORDSIZE128 1) - | POSITIVE_XO p => - mul (impl_24__to_u128_binary p) (@repr WORDSIZE128 2) - | POSITIVE_XI p => - add (mul (impl_24__to_u128_binary p) (@repr WORDSIZE128 2)) (@repr WORDSIZE128 1) - end. - -#[global] Instance int128_t_From : t_From int128 t_HaxInt_t := { - f_from (x : t_HaxInt_t) := match match_pos x with - | POS_ZERO => - (@repr WORDSIZE128 0) - | POS_POS p => - impl_24__to_u128_binary p - end; -}. - -#[global] Instance int128_t_From : t_From int128 t_Z_t := { - f_from (x : t_Z_t) := match x with - | Z_NEG x => - sub (neg (cast (sub (impl_24__to_u128_binary x) (@repr WORDSIZE128 1)))) (@repr WORDSIZE128 1) - | Z_ZERO => - (@repr WORDSIZE128 0) - | Z_POS x => - cast (impl_24__to_u128_binary x) - end; -}. - -Definition impl_24__to_u16_binary (self : t_Positive_t) : int16 := - match match_positive self with - | POSITIVE_XH => - (@repr WORDSIZE16 1) - | POSITIVE_XO p => - mul (impl_24__to_u16_binary p) (@repr WORDSIZE16 2) - | POSITIVE_XI p => - add (mul (impl_24__to_u16_binary p) (@repr WORDSIZE16 2)) (@repr WORDSIZE16 1) - end. - -#[global] Instance int16_t_From : t_From int16 t_HaxInt_t := { - f_from (x : t_HaxInt_t) := match match_pos x with - | POS_ZERO => - (@repr WORDSIZE16 0) - | POS_POS p => - impl_24__to_u16_binary p - end; -}. - -#[global] Instance int16_t_From : t_From int16 t_Z_t := { - f_from (x : t_Z_t) := match x with - | Z_NEG x => - sub (neg (cast (sub (impl_24__to_u16_binary x) (@repr WORDSIZE16 1)))) (@repr WORDSIZE16 1) - | Z_ZERO => - (@repr WORDSIZE16 0) - | Z_POS x => - cast (impl_24__to_u16_binary x) - end; -}. - -Definition impl_24__to_u32_binary (self : t_Positive_t) : int32 := - match match_positive self with - | POSITIVE_XH => - (@repr WORDSIZE32 1) - | POSITIVE_XO p => - mul (impl_24__to_u32_binary p) (@repr WORDSIZE32 2) - | POSITIVE_XI p => - add (mul (impl_24__to_u32_binary p) (@repr WORDSIZE32 2)) (@repr WORDSIZE32 1) - end. - -#[global] Instance int32_t_From : t_From int32 t_HaxInt_t := { - f_from (x : t_HaxInt_t) := match match_pos x with - | POS_ZERO => - (@repr WORDSIZE32 0) - | POS_POS p => - impl_24__to_u32_binary p - end; -}. - -#[global] Instance int32_t_From : t_From int32 t_Z_t := { - f_from (x : t_Z_t) := match x with - | Z_NEG x => - sub (neg (cast (sub (impl_24__to_u32_binary x) (@repr WORDSIZE32 1)))) (@repr WORDSIZE32 1) - | Z_ZERO => - (@repr WORDSIZE32 0) - | Z_POS x => - cast (impl_24__to_u32_binary x) - end; -}. - -Definition impl_24__to_u64_binary (self : t_Positive_t) : int64 := - match match_positive self with - | POSITIVE_XH => - (@repr WORDSIZE64 1) - | POSITIVE_XO p => - mul (impl_24__to_u64_binary p) (@repr WORDSIZE64 2) - | POSITIVE_XI p => - add (mul (impl_24__to_u64_binary p) (@repr WORDSIZE64 2)) (@repr WORDSIZE64 1) - end. - -#[global] Instance int64_t_From : t_From int64 t_HaxInt_t := { - f_from (x : t_HaxInt_t) := match match_pos x with - | POS_ZERO => - (@repr WORDSIZE64 0) - | POS_POS p => - impl_24__to_u64_binary p - end; -}. - -#[global] Instance int64_t_From : t_From int64 t_Z_t := { - f_from (x : t_Z_t) := match x with - | Z_NEG x => - sub (neg (cast (sub (impl_24__to_u64_binary x) (@repr WORDSIZE64 1)))) (@repr WORDSIZE64 1) - | Z_ZERO => - (@repr WORDSIZE64 0) - | Z_POS x => - cast (impl_24__to_u64_binary x) - end; -}. - -Definition impl_24__to_u8_binary (self : t_Positive_t) : int8 := - match match_positive self with - | POSITIVE_XH => - (@repr WORDSIZE8 1) - | POSITIVE_XO p => - mul (impl_24__to_u8_binary p) (@repr WORDSIZE8 2) - | POSITIVE_XI p => - add (mul (impl_24__to_u8_binary p) (@repr WORDSIZE8 2)) (@repr WORDSIZE8 1) - end. - -#[global] Instance int8_t_From : t_From int8 t_HaxInt_t := { - f_from (x : t_HaxInt_t) := match match_pos x with - | POS_ZERO => - (@repr WORDSIZE8 0) - | POS_POS p => - impl_24__to_u8_binary p - end; -}. - -#[global] Instance int8_t_From : t_From int8 t_Z_t := { - f_from (x : t_Z_t) := match x with - | Z_NEG x => - sub (neg (cast (sub (impl_24__to_u8_binary x) (@repr WORDSIZE8 1)))) (@repr WORDSIZE8 1) - | Z_ZERO => - (@repr WORDSIZE8 0) - | Z_POS x => - cast (impl_24__to_u8_binary x) - end; -}. - -Definition impl_24__to_usize_binary (self : t_Positive_t) : uint_size := - match match_positive self with - | POSITIVE_XH => - (@repr WORDSIZE32 1) - | POSITIVE_XO p => - mul (impl_24__to_usize_binary p) (@repr WORDSIZE32 2) - | POSITIVE_XI p => - add (mul (impl_24__to_usize_binary p) (@repr WORDSIZE32 2)) (@repr WORDSIZE32 1) - end. - -#[global] Instance uint_size_t_From : t_From uint_size t_HaxInt_t := { - f_from (x : t_HaxInt_t) := match match_pos x with - | POS_ZERO => - (@repr WORDSIZE32 0) - | POS_POS p => - impl_24__to_usize_binary p - end; -}. - -#[global] Instance uint_size_t_From : t_From uint_size t_Z_t := { - f_from (x : t_Z_t) := match x with - | Z_NEG x => - sub (neg (cast (sub (impl_24__to_usize_binary x) (@repr WORDSIZE32 1)))) (@repr WORDSIZE32 1) - | Z_ZERO => - (@repr WORDSIZE32 0) - | Z_POS x => - cast (impl_24__to_usize_binary x) - end; -}. +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_Spec. +Export Core_Base_Spec. + +From Core Require Import Core_Base. +Export Core_Base. + +From Core Require Import Core (t_primitive). +Export Core (t_primitive). + +From Core Require Import Core (t_cmp). +Export Core (t_cmp). + +From Core Require Import Core (t_convert). +Export Core (t_convert). + +(* NotImplementedYet *) + +Notation "'impl_24__from_u128_binary'" := (from_u128_binary). + +Notation "'impl_8'" := (impl_8). + +Notation "'impl_20'" := (impl_20). + +Notation "'impl_24__from_u16_binary'" := (from_u16_binary). + +Notation "'impl_2'" := (impl_2). + +Notation "'impl_14'" := (impl_14). + +Notation "'impl_24__from_u32_binary'" := (from_u32_binary). + +Notation "'impl_4'" := (impl_4). + +Notation "'impl_16'" := (impl_16). + +Notation "'impl_24__from_u64_binary'" := (from_u64_binary). + +Notation "'impl_6'" := (impl_6). + +Notation "'impl_18'" := (impl_18). + +Notation "'impl_24__from_u8_binary'" := (from_u8_binary). + +Notation "'impl'" := (impl). + +Notation "'impl_12'" := (impl_12). + +Notation "'impl_24__from_usize_binary'" := (from_usize_binary). + +Notation "'impl_10'" := (impl_10). + +Notation "'impl_22'" := (impl_22). + +Notation "'impl_24__to_u128_binary'" := (to_u128_binary). + +Notation "'impl_9'" := (impl_9). + +Notation "'impl_21'" := (impl_21). + +Notation "'impl_24__to_u16_binary'" := (to_u16_binary). + +Notation "'impl_3'" := (impl_3). + +Notation "'impl_15'" := (impl_15). + +Notation "'impl_24__to_u32_binary'" := (to_u32_binary). + +Notation "'impl_5'" := (impl_5). + +Notation "'impl_17'" := (impl_17). + +Notation "'impl_24__to_u64_binary'" := (to_u64_binary). + +Notation "'impl_7'" := (impl_7). + +Notation "'impl_19'" := (impl_19). + +Notation "'impl_24__to_u8_binary'" := (to_u8_binary). + +Notation "'impl_1'" := (impl_1). + +Notation "'impl_13'" := (impl_13). + +Notation "'impl_24__to_usize_binary'" := (to_usize_binary). + +Notation "'impl_11'" := (impl_11). + +Notation "'impl_23'" := (impl_23). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v index c651e9211..a4024f524 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v @@ -1,397 +1,465 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_Spec. +Export Core_Base_Spec. + +From Core Require Import Core_Base_Binary. +Export Core_Base_Binary. + +From Core Require Import Core_Cmp (t_Ordering). +Export Core_Cmp (t_Ordering). + +Definition haxint_double (s : t_HaxInt) : t_HaxInt := + match match_pos (s) with + | POS_ZERO => + v_HaxInt_ZERO + | POS_POS (p) => + positive_to_int (xO (p)) + end. -Require Import Super_Spec. -Export Super_Spec. - -Require Import Super_Binary. -Export Super_Binary. - -Require Import Ordering. -Export Ordering. - -Definition haxint_shr__half (s : t_HaxInt_t) : t_HaxInt_t := - match match_pos s with - | POS_ZERO => +Definition haxint_shr__half (s : t_HaxInt) : t_HaxInt := + match match_pos (s) with + | POS_ZERO => v_HaxInt_ZERO - | POS_POS n => - match match_positive n with - | POSITIVE_XH => + | POS_POS (n) => + match match_positive (n) with + | POSITIVE_XH => v_HaxInt_ZERO - | POSITIVE_XO p => - positive_to_int p - | POSITIVE_XI p => - positive_to_int p + | POSITIVE_XO (p) => + positive_to_int (p) + | POSITIVE_XI (p) => + positive_to_int (p) end end. -Definition haxint_sub__succ_double_mask (lhs : t_HaxInt_t) : t_HaxInt_t := - match match_pos lhs with - | POS_ZERO => - positive_to_int xH - | POS_POS p => - positive_to_int (xI p) - end. - -Definition haxint_succ_double (s : t_HaxInt_t) : t_Positive_t := - match match_pos s with - | POS_ZERO => - xH - | POS_POS p => - xI p +Definition haxint_sub__double_mask (lhs : t_HaxInt) : t_HaxInt := + match match_pos (lhs) with + | POS_ZERO => + v_HaxInt_ZERO + | POS_POS (p) => + positive_to_int (xO (p)) end. -Definition haxint_double (s : t_HaxInt_t) : t_HaxInt_t := - match match_pos s with - | POS_ZERO => - v_HaxInt_ZERO - | POS_POS p => - positive_to_int (xO p) +Definition haxint_sub__succ_double_mask (lhs : t_HaxInt) : t_HaxInt := + match match_pos (lhs) with + | POS_ZERO => + positive_to_int (xH) + | POS_POS (p) => + positive_to_int (xI (p)) end. -Definition haxint_sub__double_mask (lhs : t_HaxInt_t) : t_HaxInt_t := - match match_pos lhs with - | POS_ZERO => - v_HaxInt_ZERO - | POS_POS p => - positive_to_int (xO p) +Definition haxint_succ_double (s : t_HaxInt) : t_Positive := + match match_pos (s) with + | POS_ZERO => + xH + | POS_POS (p) => + xI (p) end. -Definition bitand_binary (lhs : t_Positive_t) (rhs : t_Positive_t) : t_HaxInt_t := - match match_positive lhs with - | POSITIVE_XH => - match match_positive rhs with - | POSITIVE_XO q => +Fixpoint bitand_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := + match match_positive (lhs) with + | POSITIVE_XH => + match match_positive (rhs) with + | POSITIVE_XO (q) => v_HaxInt_ZERO - | POSITIVE_XI _ | POSITIVE_XH => + | POSITIVE_XI (_) + | POSITIVE_XH => v_HaxInt_ONE end - | POSITIVE_XO p => - match match_positive rhs with - | POSITIVE_XH => + | POSITIVE_XO (p) => + match match_positive (rhs) with + | POSITIVE_XH => v_HaxInt_ZERO - | POSITIVE_XO q | POSITIVE_XI q => - haxint_double (bitand_binary p q) + | POSITIVE_XO (q) + | POSITIVE_XI (q) => + haxint_double (bitand_binary (p) (q)) end - | POSITIVE_XI p => - match match_positive rhs with - | POSITIVE_XH => + | POSITIVE_XI (p) => + match match_positive (rhs) with + | POSITIVE_XH => v_HaxInt_ONE - | POSITIVE_XO q => - haxint_double (bitand_binary p q) - | POSITIVE_XI q => - positive_to_int (haxint_succ_double (bitand_binary p q)) + | POSITIVE_XO (q) => + haxint_double (bitand_binary (p) (q)) + | POSITIVE_XI (q) => + positive_to_int (haxint_succ_double (bitand_binary (p) (q))) end end. -Definition bitor_binary (lhs : t_Positive_t) (rhs : t_Positive_t) : t_Positive_t := - match match_positive lhs with - | POSITIVE_XH => - match match_positive rhs with - | POSITIVE_XO q => - xI q - | POSITIVE_XH => +Fixpoint bitor_binary (lhs : t_Positive) (rhs : t_Positive) : t_Positive := + match match_positive (lhs) with + | POSITIVE_XH => + match match_positive (rhs) with + | POSITIVE_XO (q) => + xI (q) + | POSITIVE_XH => xH - | POSITIVE_XI q => - xI q + | POSITIVE_XI (q) => + xI (q) end - | POSITIVE_XO p => - match match_positive rhs with - | POSITIVE_XH => - xI p - | POSITIVE_XO q => - xO (bitor_binary p q) - | POSITIVE_XI q => - xI (bitor_binary p q) + | POSITIVE_XO (p) => + match match_positive (rhs) with + | POSITIVE_XH => + xI (p) + | POSITIVE_XO (q) => + xO (bitor_binary (p) (q)) + | POSITIVE_XI (q) => + xI (bitor_binary (p) (q)) end - | POSITIVE_XI p => - match match_positive rhs with - | POSITIVE_XH => - xI p - | POSITIVE_XO q | POSITIVE_XI q => - xI (bitor_binary p q) + | POSITIVE_XI (p) => + match match_positive (rhs) with + | POSITIVE_XH => + xI (p) + | POSITIVE_XO (q) + | POSITIVE_XI (q) => + xI (bitor_binary (p) (q)) end end. -Definition haxint_bitand (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := - match match_pos lhs with - | POS_ZERO => +Definition haxint_bitand (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match match_pos (lhs) with + | POS_ZERO => v_HaxInt_ZERO - | POS_POS p => - match match_pos rhs with - | POS_ZERO => + | POS_POS (p) => + match match_pos (rhs) with + | POS_ZERO => v_HaxInt_ZERO - | POS_POS q => - bitand_binary p q + | POS_POS (q) => + bitand_binary (p) (q) end end. -Definition haxint_bitor (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := - match match_pos lhs with - | POS_ZERO => +Definition haxint_bitor (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match match_pos (lhs) with + | POS_ZERO => rhs - | POS_POS p => - match match_pos rhs with - | POS_ZERO => - positive_to_int p - | POS_POS q => - positive_to_int (bitor_binary p q) + | POS_POS (p) => + match match_pos (rhs) with + | POS_ZERO => + positive_to_int (p) + | POS_POS (q) => + positive_to_int (bitor_binary (p) (q)) end end. -Definition haxint_bitxor__bitxor_binary (lhs : t_Positive_t) (rhs : t_Positive_t) : t_HaxInt_t := - match match_positive lhs with - | POSITIVE_XH => - match match_positive rhs with - | POSITIVE_XH => +Fixpoint haxint_bitxor__bitxor_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := + match match_positive (lhs) with + | POSITIVE_XH => + match match_positive (rhs) with + | POSITIVE_XH => v_HaxInt_ZERO - | POSITIVE_XO q => - positive_to_int (xI q) - | POSITIVE_XI q => - positive_to_int (xO q) + | POSITIVE_XO (q) => + positive_to_int (xI (q)) + | POSITIVE_XI (q) => + positive_to_int (xO (q)) end - | POSITIVE_XO p => - match match_positive rhs with - | POSITIVE_XH => - positive_to_int (xI p) - | POSITIVE_XO q => - haxint_double (haxint_bitxor__bitxor_binary p q) - | POSITIVE_XI q => - positive_to_int (haxint_succ_double (haxint_bitxor__bitxor_binary p q)) + | POSITIVE_XO (p) => + match match_positive (rhs) with + | POSITIVE_XH => + positive_to_int (xI (p)) + | POSITIVE_XO (q) => + haxint_double (haxint_bitxor__bitxor_binary (p) (q)) + | POSITIVE_XI (q) => + positive_to_int (haxint_succ_double (haxint_bitxor__bitxor_binary (p) (q))) end - | POSITIVE_XI p => - match match_positive rhs with - | POSITIVE_XH => - positive_to_int (xO p) - | POSITIVE_XO q => - positive_to_int (haxint_succ_double (haxint_bitxor__bitxor_binary p q)) - | POSITIVE_XI q => - haxint_double (haxint_bitxor__bitxor_binary p q) + | POSITIVE_XI (p) => + match match_positive (rhs) with + | POSITIVE_XH => + positive_to_int (xO (p)) + | POSITIVE_XO (q) => + positive_to_int (haxint_succ_double (haxint_bitxor__bitxor_binary (p) (q))) + | POSITIVE_XI (q) => + haxint_double (haxint_bitxor__bitxor_binary (p) (q)) end end. -Definition haxint_bitxor (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := - match match_pos lhs with - | POS_ZERO => +Definition haxint_bitxor (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match match_pos (lhs) with + | POS_ZERO => rhs - | POS_POS p => - match match_pos rhs with - | POS_ZERO => - positive_to_int p - | POS_POS q => - haxint_bitxor__bitxor_binary p q + | POS_POS (p) => + match match_pos (rhs) with + | POS_ZERO => + positive_to_int (p) + | POS_POS (q) => + haxint_bitxor__bitxor_binary (p) (q) end end. -Definition haxint_cmp (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_Ordering_t := - match match_pos lhs with - | POS_ZERO => - match match_pos rhs with - | POS_ZERO => - Ordering_Equalt_Ordering_t - | POS_POS q => - Ordering_Lesst_Ordering_t +Definition haxint_cmp (lhs : t_HaxInt) (rhs : t_HaxInt) : t_Ordering := + match match_pos (lhs) with + | POS_ZERO => + match match_pos (rhs) with + | POS_ZERO => + Ordering_Equal + | POS_POS (q) => + Ordering_Less end - | POS_POS p => - match match_pos rhs with - | POS_ZERO => - Ordering_Greatert_Ordering_t - | POS_POS q => - positive_cmp p q + | POS_POS (p) => + match match_pos (rhs) with + | POS_ZERO => + Ordering_Greater + | POS_POS (q) => + positive_cmp (p) (q) end end. -Definition haxint_le (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : bool := - match Option_Some (haxint_cmp lhs rhs) with - | Option_Some Ordering_Less | Ordering_Equal => +Definition haxint_le (lhs : t_HaxInt) (rhs : t_HaxInt) : bool := + match Option_Some (haxint_cmp (lhs) (rhs)) with + | Option_Some (Ordering_Less + | Ordering_Equal) => true | _ => false end. -Definition haxint_lt (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : bool := - match Option_Some (haxint_cmp lhs rhs) with - | Option_Some Ordering_Less => +Definition haxint_lt (lhs : t_HaxInt) (rhs : t_HaxInt) : bool := + match Option_Some (haxint_cmp (lhs) (rhs)) with + | Option_Some (Ordering_Less) => true | _ => false end. -Definition haxint_shl__shl_helper (rhs : t_Unary_t) (lhs : t_HaxInt_t) : t_HaxInt_t := - if is_zero (f_clone lhs) - then lhs - else match match_unary rhs with - | UNARY_ZERO => +Fixpoint haxint_shl__shl_helper (rhs : t_Unary) (lhs : t_HaxInt) : t_HaxInt := + if + is_zero (Clone_f_clone (lhs)) + then + lhs + else + match match_unary (rhs) with + | UNARY_ZERO => lhs - | UNARY_SUCC n => - haxint_shl__shl_helper n (haxint_double lhs) + | UNARY_SUCC (n) => + haxint_shl__shl_helper (n) (haxint_double (lhs)) end. -Definition haxint_shl (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := - haxint_shl__shl_helper (unary_from_int rhs) lhs. - -Definition haxint_shr__shr_helper (rhs : t_Unary_t) (lhs : t_HaxInt_t) : t_HaxInt_t := - if is_zero (f_clone lhs) - then lhs - else match match_unary rhs with - | UNARY_ZERO => +Definition haxint_shl (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + haxint_shl__shl_helper (unary_from_int (rhs)) (lhs). + +Fixpoint haxint_shr__shr_helper (rhs : t_Unary) (lhs : t_HaxInt) : t_HaxInt := + if + is_zero (Clone_f_clone (lhs)) + then + lhs + else + match match_unary (rhs) with + | UNARY_ZERO => lhs - | UNARY_SUCC n => - haxint_shr__shr_helper n (haxint_shr__half lhs) + | UNARY_SUCC (n) => + haxint_shr__shr_helper (n) (haxint_shr__half (lhs)) end. -Definition haxint_shr (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := - haxint_shr__shr_helper (unary_from_int rhs) lhs. +Definition haxint_shr (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + haxint_shr__shr_helper (unary_from_int (rhs)) (lhs). -Definition haxint_sub__double_pred_mask (lhs : t_Positive_t) : t_HaxInt_t := - match match_positive lhs with - | POSITIVE_XH => +Definition haxint_sub__double_pred_mask (lhs : t_Positive) : t_HaxInt := + match match_positive (lhs) with + | POSITIVE_XH => v_HaxInt_ZERO - | POSITIVE_XO p => - positive_to_int (xO (positive_pred_double p)) - | POSITIVE_XI p => - positive_to_int (xO (xO p)) + | POSITIVE_XO (p) => + positive_to_int (xO (positive_pred_double (p))) + | POSITIVE_XI (p) => + positive_to_int (xO (xO (p))) end. -Definition power_of_two (s : t_Unary_t) : t_Positive_t := - match match_unary s with - | UNARY_ZERO => +Fixpoint power_of_two (s : t_Unary) : t_Positive := + match match_unary (s) with + | UNARY_ZERO => xH - | UNARY_SUCC x => - xO (power_of_two x) + | UNARY_SUCC (x) => + xO (power_of_two (x)) end. -Definition haxint_add (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := - match match_pos lhs with - | POS_ZERO => +Definition haxint_add (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match match_pos (lhs) with + | POS_ZERO => rhs - | POS_POS p => - match match_pos rhs with - | POS_ZERO => - positive_to_int p - | POS_POS q => - positive_to_int (positive_add p q) + | POS_POS (p) => + match match_pos (rhs) with + | POS_ZERO => + positive_to_int (p) + | POS_POS (q) => + positive_to_int (positive_add (p) (q)) end end. -Definition haxint_sub (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := - match match_pos lhs with - | POS_ZERO => +Definition haxint_sub (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match match_pos (lhs) with + | POS_ZERO => v_HaxInt_ZERO - | POS_POS p => - match match_pos rhs with - | POS_ZERO => - positive_to_int p - | POS_POS q => - haxint_sub__sub_binary p q + | POS_POS (p) => + match match_pos (rhs) with + | POS_ZERO => + positive_to_int (p) + | POS_POS (q) => + haxint_sub__sub_binary (p) (q) end end. -Definition haxint_divmod__divmod_binary (a : t_Positive_t) (b : t_Positive_t) : t_HaxInt_t × t_HaxInt_t := - match match_positive a with - | POSITIVE_XH => - match match_positive b with - | POSITIVE_XH => +Fixpoint haxint_divmod__divmod_binary (a : t_Positive) (b : t_Positive) : (t_HaxInt*t_HaxInt) := + match match_positive (a) with + | POSITIVE_XH => + match match_positive (b) with + | POSITIVE_XH => (v_HaxInt_ONE,v_HaxInt_ZERO) - | POSITIVE_XO q | POSITIVE_XI q => + | POSITIVE_XO (q) + | POSITIVE_XI (q) => (v_HaxInt_ZERO,v_HaxInt_ONE) end - | POSITIVE_XO a_ => - let '(q,r) := haxint_divmod__divmod_binary a_ (f_clone b) : t_HaxInt_t × t_HaxInt_t in - let r_ := haxint_double r : t_HaxInt_t in - if haxint_le (positive_to_int (f_clone b)) (f_clone r_) - then (positive_to_int (haxint_succ_double q),haxint_sub r_ (positive_to_int b)) - else (haxint_double q,r_) - | POSITIVE_XI a_ => - let '(q,r) := haxint_divmod__divmod_binary a_ (f_clone b) : t_HaxInt_t × t_HaxInt_t in - let r_ := positive_to_int (haxint_succ_double r) : t_HaxInt_t in - if haxint_le (positive_to_int (f_clone b)) (f_clone r_) - then (positive_to_int (haxint_succ_double q),haxint_sub r_ (positive_to_int b)) - else (haxint_double q,r_) + | POSITIVE_XO (a___) => + let (q,r) := haxint_divmod__divmod_binary (a___) (Clone_f_clone (b)) in + let r___ := haxint_double (r) in + if + haxint_le (positive_to_int (Clone_f_clone (b))) (Clone_f_clone (r___)) + then + (positive_to_int (haxint_succ_double (q)),haxint_sub (r___) (positive_to_int (b))) + else + (haxint_double (q),r___) + | POSITIVE_XI (a___) => + let (q,r) := haxint_divmod__divmod_binary (a___) (Clone_f_clone (b)) in + let r___ := positive_to_int (haxint_succ_double (r)) in + if + haxint_le (positive_to_int (Clone_f_clone (b))) (Clone_f_clone (r___)) + then + (positive_to_int (haxint_succ_double (q)),haxint_sub (r___) (positive_to_int (b))) + else + (haxint_double (q),r___) end. -Definition haxint_divmod (a : t_HaxInt_t) (b : t_HaxInt_t) : t_HaxInt_t × t_HaxInt_t := - match match_pos a with - | POS_ZERO => +Definition haxint_divmod (a : t_HaxInt) (b : t_HaxInt) : (t_HaxInt*t_HaxInt) := + match match_pos (a) with + | POS_ZERO => (v_HaxInt_ZERO,v_HaxInt_ZERO) - | POS_POS p => - match match_pos b with - | POS_ZERO => - (v_HaxInt_ZERO,positive_to_int p) - | POS_POS q => - haxint_divmod__divmod_binary p q + | POS_POS (p) => + match match_pos (b) with + | POS_ZERO => + (v_HaxInt_ZERO,positive_to_int (p)) + | POS_POS (q) => + haxint_divmod__divmod_binary (p) (q) end end. -Definition haxint_div (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := - let '(q,_) := haxint_divmod lhs rhs : t_HaxInt_t × t_HaxInt_t in +Definition haxint_div (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + let (q,_) := haxint_divmod (lhs) (rhs) in q. -Definition haxint_mul (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := - match match_pos lhs with - | POS_ZERO => +Definition haxint_mul (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + match match_pos (lhs) with + | POS_ZERO => v_HaxInt_ZERO - | POS_POS p => - match match_pos rhs with - | POS_ZERO => + | POS_POS (p) => + match match_pos (rhs) with + | POS_ZERO => v_HaxInt_ZERO - | POS_POS q => - positive_to_int (positive_mul p q) + | POS_POS (q) => + positive_to_int (positive_mul (p) (q)) end end. -Definition haxint_rem (lhs : t_HaxInt_t) (rhs : t_HaxInt_t) : t_HaxInt_t := - let '(_,r) := haxint_divmod lhs rhs : t_HaxInt_t × t_HaxInt_t in +Definition haxint_rem (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + let (_,r) := haxint_divmod (lhs) (rhs) in r. -Definition haxint_sub__sub_binary (lhs : t_Positive_t) (rhs : t_Positive_t) : t_HaxInt_t := - match match_positive lhs with - | POSITIVE_XH => +Fixpoint haxint_sub__sub_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := + match match_positive (lhs) with + | POSITIVE_XH => v_HaxInt_ZERO - | POSITIVE_XO p => - match match_positive rhs with - | POSITIVE_XH => - positive_to_int (positive_pred_double p) - | POSITIVE_XO q => - haxint_sub__double_mask (haxint_sub__sub_binary p q) - | POSITIVE_XI q => - haxint_sub__succ_double_mask (haxint_sub__sub_carry p q) + | POSITIVE_XO (p) => + match match_positive (rhs) with + | POSITIVE_XH => + positive_to_int (positive_pred_double (p)) + | POSITIVE_XO (q) => + haxint_sub__double_mask (haxint_sub__sub_binary (p) (q)) + | POSITIVE_XI (q) => + haxint_sub__succ_double_mask (haxint_sub__sub_carry (p) (q)) end - | POSITIVE_XI p => - match match_positive rhs with - | POSITIVE_XH => - positive_to_int (xO p) - | POSITIVE_XO q => - haxint_sub__succ_double_mask (haxint_sub__sub_binary p q) - | POSITIVE_XI q => - haxint_sub__double_mask (haxint_sub__sub_binary p q) + | POSITIVE_XI (p) => + match match_positive (rhs) with + | POSITIVE_XH => + positive_to_int (xO (p)) + | POSITIVE_XO (q) => + haxint_sub__succ_double_mask (haxint_sub__sub_binary (p) (q)) + | POSITIVE_XI (q) => + haxint_sub__double_mask (haxint_sub__sub_binary (p) (q)) end end. -Definition haxint_sub__sub_carry (lhs : t_Positive_t) (rhs : t_Positive_t) : t_HaxInt_t := - match match_positive lhs with - | POSITIVE_XH => +Fixpoint haxint_sub__sub_carry (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := + match match_positive (lhs) with + | POSITIVE_XH => v_HaxInt_ZERO - | POSITIVE_XO p => - match match_positive rhs with - | POSITIVE_XH => - haxint_sub__double_pred_mask p - | POSITIVE_XO q => - haxint_sub__succ_double_mask (haxint_sub__sub_carry p q) - | POSITIVE_XI q => - haxint_sub__double_mask (haxint_sub__sub_carry p q) + | POSITIVE_XO (p) => + match match_positive (rhs) with + | POSITIVE_XH => + haxint_sub__double_pred_mask (p) + | POSITIVE_XO (q) => + haxint_sub__succ_double_mask (haxint_sub__sub_carry (p) (q)) + | POSITIVE_XI (q) => + haxint_sub__double_mask (haxint_sub__sub_carry (p) (q)) end - | POSITIVE_XI p => - match match_positive rhs with - | POSITIVE_XH => - positive_to_int (positive_pred_double p) - | POSITIVE_XO q => - haxint_sub__double_mask (haxint_sub__sub_binary p q) - | POSITIVE_XI q => - haxint_sub__succ_double_mask (haxint_sub__sub_carry p q) + | POSITIVE_XI (p) => + match match_positive (rhs) with + | POSITIVE_XH => + positive_to_int (positive_pred_double (p)) + | POSITIVE_XO (q) => + haxint_sub__double_mask (haxint_sub__sub_binary (p) (q)) + | POSITIVE_XI (q) => + haxint_sub__succ_double_mask (haxint_sub__sub_carry (p) (q)) end end. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v index 1fd749f0e..eac05b8b1 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v @@ -1,129 +1,183 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. - -Require Import Super_Spec. -Export Super_Spec. - -Require Import haxint_lt. -Export haxint_lt. - -Require Import Clone. -Export Clone. - -Require Import Core_Cmp. -Export Core_Cmp. - -Require Import Sized. -Export Sized. - -Require Import panicking. -Export panicking. - -Definition hd__panic_cold_explicit (_ : unit) : t_Never_t := - panic_explicit tt. - -Definition set_index__set_index_unary__panic_cold_explicit (_ : unit) : t_Never_t := - panic_explicit tt. - -Definition hd (s : t_Seq_t T) : T := - match match_list s with - | LIST_NIL => - never_to_any (hd__panic_cold_explicit tt) - | LIST_CONS hd _ => - hd - end. - -Definition is_empty (s : t_Seq_t T) : bool := - match match_list s with - | LIST_NIL => +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_Spec. +Export Core_Base_Spec. + +From Core Require Import Core_Base_Haxint_lt. +Export Core_Base_Haxint_lt. + +From Core Require Import Core_Clone (t_Clone). +Export Core_Clone (t_Clone). + +From Core Require Import Core (t_cmp). +Export Core (t_cmp). + +From Core Require Import Core_Marker (t_Sized). +Export Core_Marker (t_Sized). + +From Core Require Import Core (t_panicking). +Export Core (t_panicking). + +Definition hd__panic_cold_explicit '(_ : unit) : t_Never := + panic_explicit (tt). + +Definition set_index__set_index_unary__panic_cold_explicit '(_ : unit) : t_Never := + panic_explicit (tt). + +Definition is_empty `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : bool := + match match_list (s) with + | LIST_NIL => true - | LIST_CONS _ _ => + | LIST_CONS (_) (_) => false end. -Definition tl (s : t_Seq_t T) : t_Seq_t T := - match match_list s with - | LIST_NIL => - nil tt - | LIST_CONS _ tl => +Definition hd `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) `{negb (is_empty (s)) = true} : v_T := + match match_list (s) with + | LIST_NIL => + never_to_any (hd__panic_cold_explicit (tt)) + | LIST_CONS (hd) (_) => + hd + end. + +Definition tl `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) `{negb (is_empty (s)) = true} : t_Seq ((v_T)) := + match match_list (s) with + | LIST_NIL => + nil (tt) + | LIST_CONS (_) (tl) => tl end. -Definition eq_inner (s : t_Seq_t T) (other : t_Seq_t T) : bool := - match match_list (f_clone s) with - | LIST_NIL => - is_empty (f_clone other) - | LIST_CONS x xs => - match match_list (f_clone other) with - | LIST_NIL => +Fixpoint eq_inner `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} `{t_PartialEq (v_T) (v_T)} (s : t_Seq ((v_T))) (other : t_Seq ((v_T))) : bool := + match match_list (Clone_f_clone (s)) with + | LIST_NIL => + is_empty (Clone_f_clone (other)) + | LIST_CONS (x) (xs) => + match match_list (Clone_f_clone (other)) with + | LIST_NIL => false - | LIST_CONS y ys => - andb (x=.?y) (eq_inner xs ys) + | LIST_CONS (y) (ys) => + andb (PartialEq_f_eq (x) (y)) (eq_inner (xs) (ys)) end end. -#[global] Instance t_Seq_t T_t_PartialEq (T : _) : t_PartialEq (t_Seq_t T) (t_Seq_t T) := { - f_eq (self : t_Seq_t T) (other : t_Seq_t T) := eq_inner (f_clone self) (f_clone other); - f_ne (self : t_Seq_t T) (other : t_Seq_t T) := not (eq_inner (f_clone self) (f_clone other)); -}. - -Definition get_index__get_index_unary (l : t_Seq_t T) (i : t_Unary_t) : T := - match match_unary i with - | UNARY_ZERO => - hd l - | UNARY_SUCC n => - get_index__get_index_unary (tl l) n +Instance t_PartialEq_126322860 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} `{t_PartialEq (v_T) (v_T)} : t_PartialEq ((t_Seq ((v_T)))) ((t_Seq ((v_T)))) := + { + PartialEq_impl_f_eq := fun (self : t_Seq ((v_T))) (other : t_Seq ((v_T)))=> + eq_inner (Clone_f_clone (self)) (Clone_f_clone (other)); + PartialEq_impl_f_ne := fun (self : t_Seq ((v_T))) (other : t_Seq ((v_T)))=> + negb (eq_inner (Clone_f_clone (self)) (Clone_f_clone (other))); + }. + +Fixpoint get_index__get_index_unary `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (l : t_Seq ((v_T))) (i : t_Unary) : v_T := + match match_unary (i) with + | UNARY_ZERO => + hd (l) + | UNARY_SUCC (n) => + get_index__get_index_unary (tl (l)) (n) end. -Definition get_index (s : t_Seq_t T) (i : t_HaxInt_t) : T := - get_index__get_index_unary s (unary_from_int i). +Definition get_index `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) (i : t_HaxInt) : v_T := + get_index__get_index_unary (s) (unary_from_int (i)). -Definition len (s : t_Seq_t T) : t_HaxInt_t := - match match_list s with - | LIST_NIL => +Fixpoint len `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : t_HaxInt := + match match_list (s) with + | LIST_NIL => v_HaxInt_ZERO - | LIST_CONS _ tl => - succ (len tl) + | LIST_CONS (_) (tl) => + succ (len (tl)) end. -Definition repeat__repeat_unary (n : t_Unary_t) (v : T) : t_Seq_t T := - match match_unary n with - | UNARY_ZERO => - nil tt - | UNARY_SUCC m => - cons (repeat__repeat_unary m (f_clone v)) v +Fixpoint repeat__repeat_unary `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (n : t_Unary) (v : v_T) : t_Seq ((v_T)) := + match match_unary (n) with + | UNARY_ZERO => + nil (tt) + | UNARY_SUCC (m) => + cons (repeat__repeat_unary (m) (Clone_f_clone (v))) (v) end. -Definition repeat (n : t_HaxInt_t) (v : T) : t_Seq_t T := - repeat__repeat_unary (unary_from_int n) v. +Definition repeat `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (n : t_HaxInt) (v : v_T) : t_Seq ((v_T)) := + repeat__repeat_unary (unary_from_int (n)) (v). -Definition rev__rev_accum (s : t_Seq_t T) (accum : t_Seq_t T) : t_Seq_t T := - match match_list s with - | LIST_NIL => +Fixpoint rev__rev_accum `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) (accum : t_Seq ((v_T))) : t_Seq ((v_T)) := + match match_list (s) with + | LIST_NIL => accum - | LIST_CONS hd tl => - rev__rev_accum tl (cons accum hd) + | LIST_CONS (hd) (tl) => + rev__rev_accum (tl) (cons (accum) (hd)) end. -Definition rev (s : t_Seq_t T) : t_Seq_t T := - rev__rev_accum s (nil tt). - -Definition set_index__set_index_unary (x : t_Seq_t T) (i : t_Unary_t) (v : T) : t_Seq_t T := - match match_list x with - | LIST_NIL => - never_to_any (set_index__set_index_unary__panic_cold_explicit tt) - | LIST_CONS hd tl => - match match_unary i with - | UNARY_ZERO => - cons tl v - | UNARY_SUCC n => - cons (set_index__set_index_unary tl n v) hd +Definition rev `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : t_Seq ((v_T)) := + rev__rev_accum (s) (nil (tt)). + +Fixpoint set_index__set_index_unary `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (x : t_Seq ((v_T))) (i : t_Unary) (v : v_T) : t_Seq ((v_T)) := + match match_list (x) with + | LIST_NIL => + never_to_any (set_index__set_index_unary__panic_cold_explicit (tt)) + | LIST_CONS (hd) (tl) => + match match_unary (i) with + | UNARY_ZERO => + cons (tl) (v) + | UNARY_SUCC (n) => + cons (set_index__set_index_unary (tl) (n) (v)) (hd) end end. -Definition set_index (s : t_Seq_t T) (i : t_HaxInt_t) (v : T) : t_Seq_t T := - set_index__set_index_unary s (unary_from_int i) v. +Definition set_index `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) (i : t_HaxInt) (v : v_T) `{haxint_lt (i) (len (s)) = true} : t_Seq ((v_T)) := + set_index__set_index_unary (s) (unary_from_int (i)) (v). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v index 5a60b002d..1080900e6 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v @@ -1,39 +1,92 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Haxint. -Export Haxint. +(* From Core Require Import Core. *) -Require Import haxint_succ. -Export haxint_succ. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Unary. -Export Unary. -Require Import Binary. -Export Binary. -Require Import Z. -Export Z. +From Core Require Import haxint. +Export haxint. -Require Import Seq. -Export Seq. +From Core Require Import Haxint (t_succ). +Export Haxint (t_succ). -Require Import Constants. -Export Constants. +From Core Require Import unary. +Export unary. -(*Not implemented yet? todo(item)*) +From Core Require Import binary. +Export binary. -(*Not implemented yet? todo(item)*) +From Core Require Import z. +Export z. -(*Not implemented yet? todo(item)*) +From Core Require Import seq. +Export seq. -(*Not implemented yet? todo(item)*) +From Core Require Import constants. +Export constants. -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v index 9867e9049..219f598ec 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v @@ -1,16 +1,67 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Pos. -Export Pos. +(* From Core Require Import Core. *) -Require Import Positive. -Export Positive. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -(*Not implemented yet? todo(item)*) +From Core Require Import pos. +Export pos. -(*Not implemented yet? todo(item)*) +From Core Require Import positive. +Export positive. + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v index 6de0da6dc..dd59b14aa 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v @@ -1,21 +1,77 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super_Super_Haxint. -Export Super_Super_Haxint. +(* From Core Require Import Core. *) -Require Import Super_Positive. -Export Super_Positive. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_Spec_Binary_Super_Haxint. +Export Core_Base_Spec_Binary_Super_Haxint. + +From Core Require Import Core_Base_Spec_Binary_Positive. +Export Core_Base_Spec_Binary_Positive. Inductive t_POS : Type := -| POS_ZERO : t_POS -| POS_POS : t_Positive_t -> t_POS. +| POS_ZERO +| POS_POS : t_Positive -> _. +Arguments POS_ZERO. +Arguments POS_POS. -Definition match_pos (s : t_HaxInt_t) : t_POS_t := - if is_zero (f_clone s) - then POS_ZEROt_POS_t - else POS_POS (positive_from_int s). +Definition match_pos (s : t_HaxInt) : t_POS := + if + is_zero (Clone_f_clone (s)) + then + POS_ZERO + else + POS_POS (positive_from_int (s)). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v index 63f17fccb..ec7884b46 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v @@ -1,53 +1,121 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super_Super_Haxint. -Export Super_Super_Haxint. +(* From Core Require Import Core. *) -Record t_Positive : Type := { - 0 : t_HaxInt_t; -}. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -#[global] Instance t_Positive_t_t_Clone : t_Clone t_Positive_t := { - f_clone (self : t_Positive_t) := never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))); -}. +From Core Require Import Core_Base_Spec_Binary_Super_Haxint. +Export Core_Base_Spec_Binary_Super_Haxint. + +Record t_Positive : Type := + { + Positive_0 : t_HaxInt; + }. +Arguments Build_t_Positive. +Arguments Positive_0. +#[export] Instance settable_t_Positive : Settable _ := + settable! (Build_t_Positive) . +Notation "'Positive'" := Build_t_Positive. Inductive t_POSITIVE : Type := -| POSITIVE_XH : t_POSITIVE -| POSITIVE_XO : t_Positive_t -> t_POSITIVE -| POSITIVE_XI : t_Positive_t -> t_POSITIVE. +| POSITIVE_XH +| POSITIVE_XO : t_Positive -> _ +| POSITIVE_XI : t_Positive -> _. +Arguments POSITIVE_XH. +Arguments POSITIVE_XO. +Arguments POSITIVE_XI. + +Definition positive_from_int (x : t_HaxInt) : t_Positive := + Build_t_Positive (x). -Definition match_positive__is_xH (s : t_Positive_t) : bool := - never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). +Definition positive_to_int (s : t_Positive) : t_HaxInt := + Positive_0 s. -Definition match_positive__is_xI (s : t_Positive_t) : bool := - never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). +Definition xH : t_Positive := + Build_t_Positive (v_HaxInt_ONE). -Definition match_positive__is_xO (s : t_Positive_t) : bool := - never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). +Instance t_Clone_16961168 : t_Clone ((t_Positive)) := + { + Clone_impl_f_clone := fun (self : t_Positive)=> + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))); + }. -Definition positive_from_int (x : t_HaxInt_t) : t_Positive_t := - Positive x. +Definition match_positive__is_xH (s : t_Positive) : bool := + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). -Definition positive_to_int (s : t_Positive_t) : t_HaxInt_t := - 0 s. +Definition match_positive__is_xI (s : t_Positive) : bool := + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). -Definition match_positive (s : t_Positive_t) : t_POSITIVE_t := - if match_positive__is_xH (f_clone s) - then POSITIVE_XHt_POSITIVE_t - else if match_positive__is_xO (f_clone s) - then POSITIVE_XO (positive_from_int (div2 (positive_to_int s))) - else POSITIVE_XI (positive_from_int (div2 (positive_to_int s))). +Definition match_positive__is_xO (s : t_Positive) : bool := + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). -Definition xH : t_Positive_t := - Positive v_HaxInt_ONE. +Definition xI (s : t_Positive) : t_Positive := + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). -Definition xI (s : t_Positive_t) : t_Positive_t := - never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). +Definition xO (s : t_Positive) : t_Positive := + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). -Definition xO (s : t_Positive_t) : t_Positive_t := - never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). +Definition match_positive (s : t_Positive) : t_POSITIVE := + if + match_positive__is_xH (Clone_f_clone (s)) + then + POSITIVE_XH + else + if + match_positive__is_xO (Clone_f_clone (s)) + then + POSITIVE_XO (positive_from_int (div2 (positive_to_int (s)))) + else + POSITIVE_XI (positive_from_int (div2 (positive_to_int (s)))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v index 964c8feb5..10e11483f 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v @@ -1,117 +1,111 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. - -Require Import Super_Haxint. -Export Super_Haxint. - -Definition v_BITS_128_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 128)]))). - -Definition v_BITS_16_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 16)]))). - -Definition v_BITS_32_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 32)]))). - -Definition v_BITS_64_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 64)]))). - -Definition v_BITS_8_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 8)]))). - -Definition v_WORDSIZE_128_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 1)]))). - -Definition v_WORDSIZE_128_SUB_1_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255)]))). - -Definition v_WORDSIZE_16_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 1)]))). - -Definition v_WORDSIZE_16_SUB_1_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 255); - (@repr WORDSIZE8 255)]))). - -Definition v_WORDSIZE_32_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 1)]))). - -Definition v_WORDSIZE_32_SUB_1_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255)]))). - -Definition v_WORDSIZE_4_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 128)]))). - -Definition v_WORDSIZE_4_SUB_1_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 127)]))). - -Definition v_WORDSIZE_64_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 0); - (@repr WORDSIZE8 1)]))). - -Definition v_WORDSIZE_64_SUB_1_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255); - (@repr WORDSIZE8 255)]))). - -Definition v_WORDSIZE_8_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 0); - (@repr WORDSIZE8 1)]))). - -Definition v_WORDSIZE_8_SUB_1_ : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 255)]))). +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_Spec_Haxint. +Export Core_Base_Spec_Haxint. + +Definition v_BITS_128_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([128]))). + +Definition v_BITS_16_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([16]))). + +Definition v_BITS_32_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([32]))). + +Definition v_BITS_64_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([64]))). + +Definition v_BITS_8_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([8]))). + +Definition v_WORDSIZE_128_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 1]))). + +Definition v_WORDSIZE_128_SUB_1_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255]))). + +Definition v_WORDSIZE_16_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([0; 0; 1]))). + +Definition v_WORDSIZE_16_SUB_1_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([255; 255]))). + +Definition v_WORDSIZE_32_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([0; 0; 0; 0; 1]))). + +Definition v_WORDSIZE_32_SUB_1_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([255; 255; 255; 255]))). + +Definition v_WORDSIZE_4_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([128]))). + +Definition v_WORDSIZE_4_SUB_1_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([127]))). + +Definition v_WORDSIZE_64_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([0; 0; 0; 0; 0; 0; 0; 0; 1]))). + +Definition v_WORDSIZE_64_SUB_1_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([255; 255; 255; 255; 255; 255; 255; 255]))). + +Definition v_WORDSIZE_8_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([0; 1]))). + +Definition v_WORDSIZE_8_SUB_1_ : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([255]))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v index 42fb1d8a5..0ed1995d2 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v @@ -1,29 +1,87 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Record t_HaxInt : Type := { - f_v : t_Cow_t (seq int8); -}. +(* From Core Require Import Core. *) -Definition v_HaxInt_ONE : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 1)]))). +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Definition v_HaxInt_TWO : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize (array_from_list [(@repr WORDSIZE8 2)]))). +Record t_HaxInt : Type := + { + HaxInt_f_v : t_Cow ((t_Slice t_u8)); + }. +Arguments Build_t_HaxInt. +Arguments HaxInt_f_v. +#[export] Instance settable_t_HaxInt : Settable _ := + settable! (Build_t_HaxInt) . -Definition v_HaxInt_ZERO : t_HaxInt_t := - Build_HaxInt (f_v := Cow_Borrowed (unsize !TODO empty array!)). +Definition v_HaxInt_ONE : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([1]))). -#[global] Instance t_HaxInt_t_t_Clone : t_Clone t_HaxInt_t := { - f_clone (self : t_HaxInt_t) := never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))); -}. +Definition v_HaxInt_TWO : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([2]))). -Definition div2 (s : t_HaxInt_t) : t_HaxInt_t := - never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). +Definition v_HaxInt_ZERO : t_HaxInt := + Build_t_HaxInt (Cow_Borrowed (unsize ([]))). -Definition is_zero (s : t_HaxInt_t) : bool := - never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). +Instance t_Clone_622375820 : t_Clone ((t_HaxInt)) := + { + Clone_impl_f_clone := fun (self : t_HaxInt)=> + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))); + }. + +Definition div2 (s : t_HaxInt) : t_HaxInt := + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). + +Definition is_zero (s : t_HaxInt) : bool := + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v index 6e268f9f6..cc19255f6 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v @@ -1,32 +1,75 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Record t_Seq (T : _) : Type := { - f_v : t_Vec_t T t_Global_t; -}. +(* From Core Require Import Core. *) -#[global] Instance t_Seq_t T_t_Clone (T : _) : t_Clone (t_Seq_t T) := { - f_clone (self : t_Seq_t T) := Build_Seq (f_v := f_clone (f_v self)); -}. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Inductive t_LIST (T : _) : Type := -| LIST_NIL : t_LIST (T : _) -| LIST_CONS : (T × t_Seq_t T) -> t_LIST (T : _). -Arguments LIST_NIL {_}. -Arguments LIST_CONS {_} (T × t_Seq_t T). +Notation "'t_Seq'" := (t_Seq). -Definition nil (_ : unit) : t_Seq_t T := - Build_Seq (f_v := impl__new tt). +Notation "'Seq_f_v'" := (Seq_f_v). -Definition cons (s : t_Seq_t T) (t : T) : t_Seq_t T := - Build_Seq (f_v := impl__concat (unsize (array_from_list [(array_from_list [t]).[RangeFullt_RangeFull_t]; - (f_v s).[RangeFullt_RangeFull_t]]))). +Notation "'impl'" := (impl). -Definition match_list (s : t_Seq_t T) : t_LIST_t T := - if eq (impl_1__len (f_v s)) (@repr WORDSIZE32 0) - then LIST_NILt_LIST_t T - else LIST_CONSt_LIST_t T. +Notation "'t_LIST'" := (t_LIST). + +Notation "'LIST_NIL'" := (LIST_NIL). + +Notation "'LIST_CONS'" := (LIST_CONS). + +Notation "'nil'" := (nil). + +Notation "'cons'" := (cons). + +Notation "'match_list'" := (match_list). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v index e50fd5b1c..935433761 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v @@ -1,38 +1,102 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super_Haxint. -Export Super_Haxint. +(* From Core Require Import Core. *) -Record t_Unary : Type := { - 0 : t_HaxInt_t; -}. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -#[global] Instance t_Unary_t_t_Clone : t_Clone t_Unary_t := { - f_clone (self : t_Unary_t) := never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))); -}. +From Core Require Import Core_Base_Spec_Haxint. +Export Core_Base_Spec_Haxint. + +Record t_Unary : Type := + { + Unary_0 : t_HaxInt; + }. +Arguments Build_t_Unary. +Arguments Unary_0. +#[export] Instance settable_t_Unary : Settable _ := + settable! (Build_t_Unary) . +Notation "'Unary'" := Build_t_Unary. Inductive t_UNARY : Type := -| UNARY_ZERO : t_UNARY -| UNARY_SUCC : t_Unary_t -> t_UNARY. +| UNARY_ZERO +| UNARY_SUCC : t_Unary -> _. +Arguments UNARY_ZERO. +Arguments UNARY_SUCC. + +Definition unary_from_int (x : t_HaxInt) : t_Unary := + Build_t_Unary (x). -Definition pred (x : t_Unary_t) : t_Unary_t := - never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). +Definition unary_to_int (s : t_Unary) : t_HaxInt := + Unary_0 s. -Definition succ (x : t_Unary_t) : t_Unary_t := - never_to_any (panic_fmt (impl_2__new_v1 (array_from_list [not yet implemented: specification needed]) (impl_1__none tt))). +Instance t_Clone_289793624 : t_Clone ((t_Unary)) := + { + Clone_impl_f_clone := fun (self : t_Unary)=> + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))); + }. -Definition unary_from_int (x : t_HaxInt_t) : t_Unary_t := - Unary x. +Definition pred (x : t_Unary) : t_Unary := + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). -Definition unary_to_int (s : t_Unary_t) : t_HaxInt_t := - 0 s. +Definition match_unary (s : t_Unary) : t_UNARY := + if + is_zero (unary_to_int (Clone_f_clone (s))) + then + UNARY_ZERO + else + UNARY_SUCC (pred (s)). -Definition match_unary (s : t_Unary_t) : t_UNARY_t := - if is_zero (unary_to_int (f_clone s)) - then UNARY_ZEROt_UNARY_t - else UNARY_SUCC (pred s). +Definition succ (x : t_Unary) : t_Unary := + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v index ddd0783bc..73ff4d4f8 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v @@ -1,20 +1,74 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super_Binary. -Export Super_Binary. +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_Spec_Binary. +Export Core_Base_Spec_Binary. Inductive t_Z : Type := -| Z_NEG : t_Positive_t -> t_Z -| Z_ZERO : t_Z -| Z_POS : t_Positive_t -> t_Z. +| Z_NEG : t_Positive -> _ +| Z_ZERO +| Z_POS : t_Positive -> _. +Arguments Z_NEG. +Arguments Z_ZERO. +Arguments Z_POS. -Definition v_Z_ONE : t_Z_t := - Z_POS xH. +Definition v_Z_ONE : t_Z := + Z_POS (xH). -Definition v_Z_TWO : t_Z_t := - Z_POS (Positive v_HaxInt_TWO). +Definition v_Z_TWO : t_Z := + Z_POS (Build_t_Positive (v_HaxInt_TWO)). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v index 5a695d161..5bbffacc2 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v @@ -1,357 +1,418 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super_Spec. -Export Super_Spec. +(* From Core Require Import Core. *) -Require Import Super_Binary. -Export Super_Binary. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Ordering. -Export Ordering. +From Core Require Import Core_Base_Spec. +Export Core_Base_Spec. -Definition z_add__z_double (s : t_Z_t) : t_Z_t := - match s with - | Z_ZERO => - Z_ZEROt_Z_t - | Z_POS p => - Z_POS (xO p) - | Z_NEG p => - Z_NEG (xO p) - end. +From Core Require Import Core_Base_Binary. +Export Core_Base_Binary. -Definition z_bitor__haxint_ldiff__n_double (x : t_POS_t) : t_POS_t := +From Core Require Import Core_Cmp (t_Ordering). +Export Core_Cmp (t_Ordering). + +Definition z_neg (x : t_Z) : t_Z := match x with - | POS_ZERO => - POS_ZEROt_POS_t - | POS_POS p => - POS_POS (xO p) + | Z_NEG (p) => + Z_POS (p) + | Z_ZERO => + Z_ZERO + | Z_POS (p) => + Z_NEG (p) end. -Definition z_bitor__haxint_ldiff__n_succ_double (x : t_POS_t) : t_POS_t := +Definition z_bitor__n_succ (x : t_POS) : t_Positive := match x with - | POS_ZERO => - POS_POS xH - | POS_POS p => - POS_POS (xI p) + | POS_ZERO => + xH + | POS_POS (p) => + positive_from_int (succ (positive_to_int (p))) end. -Definition z_bitor__n_succ (x : t_POS_t) : t_Positive_t := +Definition z_add__z_double (s : t_Z) : t_Z := + match s with + | Z_ZERO => + Z_ZERO + | Z_POS (p) => + Z_POS (xO (p)) + | Z_NEG (p) => + Z_NEG (xO (p)) + end. + +Definition z_bitor__haxint_ldiff__n_double (x : t_POS) : t_POS := match x with - | POS_ZERO => - xH - | POS_POS p => - positive_from_int (succ (positive_to_int p)) + | POS_ZERO => + POS_ZERO + | POS_POS (p) => + POS_POS (xO (p)) end. -Definition z_neg (x : t_Z_t) : t_Z_t := +Definition z_bitor__haxint_ldiff__n_succ_double (x : t_POS) : t_POS := match x with - | Z_NEG p => - Z_POS p - | Z_ZERO => - Z_ZEROt_Z_t - | Z_POS p => - Z_NEG p + | POS_ZERO => + POS_POS (xH) + | POS_POS (p) => + POS_POS (xI (p)) end. -Definition z_add__z_pred_double (s : t_Z_t) : t_Z_t := +Definition z_add__z_pred_double (s : t_Z) : t_Z := match s with - | Z_ZERO => - Z_NEG xH - | Z_POS p => - Z_POS (positive_pred_double p) - | Z_NEG p => - Z_NEG (xI p) + | Z_ZERO => + Z_NEG (xH) + | Z_POS (p) => + Z_POS (positive_pred_double (p)) + | Z_NEG (p) => + Z_NEG (xI (p)) end. -Definition z_add__z_succ_double (s : t_Z_t) : t_Z_t := +Definition z_add__z_succ_double (s : t_Z) : t_Z := match s with - | Z_ZERO => - Z_POS xH - | Z_POS p => - Z_POS (xI p) - | Z_NEG p => - Z_NEG (positive_pred_double p) + | Z_ZERO => + Z_POS (xH) + | Z_POS (p) => + Z_POS (xI (p)) + | Z_NEG (p) => + Z_NEG (positive_pred_double (p)) end. -Definition z_bitor__haxint_ldiff__positive_ldiff (lhs : t_Positive_t) (rhs : t_Positive_t) : t_POS_t := - match match_positive lhs with - | POSITIVE_XH => - match match_positive rhs with - | POSITIVE_XH => - POS_ZEROt_POS_t - | POSITIVE_XO _ => - POS_POS xH - | POSITIVE_XI _ => - POS_ZEROt_POS_t +Fixpoint z_bitor__haxint_ldiff__positive_ldiff (lhs : t_Positive) (rhs : t_Positive) : t_POS := + match match_positive (lhs) with + | POSITIVE_XH => + match match_positive (rhs) with + | POSITIVE_XH => + POS_ZERO + | POSITIVE_XO (_) => + POS_POS (xH) + | POSITIVE_XI (_) => + POS_ZERO end - | POSITIVE_XO p => - match match_positive rhs with - | POSITIVE_XH => - POS_POS (xO p) - | POSITIVE_XO q => - z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q) - | POSITIVE_XI q => - z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q) + | POSITIVE_XO (p) => + match match_positive (rhs) with + | POSITIVE_XH => + POS_POS (xO (p)) + | POSITIVE_XO (q) => + z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff (p) (q)) + | POSITIVE_XI (q) => + z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff (p) (q)) end - | POSITIVE_XI p => - match match_positive rhs with - | POSITIVE_XH => - POS_POS (xO p) - | POSITIVE_XO q => - z_bitor__haxint_ldiff__n_succ_double (z_bitor__haxint_ldiff__positive_ldiff p q) - | POSITIVE_XI q => - z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q) + | POSITIVE_XI (p) => + match match_positive (rhs) with + | POSITIVE_XH => + POS_POS (xO (p)) + | POSITIVE_XO (q) => + z_bitor__haxint_ldiff__n_succ_double (z_bitor__haxint_ldiff__positive_ldiff (p) (q)) + | POSITIVE_XI (q) => + z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff (p) (q)) end end. -Definition z_bitor__haxint_ldiff (lhs : t_POS_t) (rhs : t_POS_t) : t_POS_t := +Definition z_bitor__haxint_ldiff (lhs : t_POS) (rhs : t_POS) : t_POS := match lhs with - | POS_ZERO => - POS_ZEROt_POS_t - | POS_POS p => + | POS_ZERO => + POS_ZERO + | POS_POS (p) => match rhs with - | POS_ZERO => - POS_POS p - | POS_POS q => - z_bitor__haxint_ldiff__positive_ldiff p q + | POS_ZERO => + POS_POS (p) + | POS_POS (q) => + z_bitor__haxint_ldiff__positive_ldiff (p) (q) end end. -Definition z_bitor__n_and (lhs : t_POS_t) (rhs : t_POS_t) : t_POS_t := +Definition z_bitor__n_and (lhs : t_POS) (rhs : t_POS) : t_POS := match lhs with - | POS_ZERO => - POS_ZEROt_POS_t - | POS_POS p => + | POS_ZERO => + POS_ZERO + | POS_POS (p) => match rhs with - | POS_ZERO => - POS_ZEROt_POS_t - | POS_POS q => - POS_POS (positive_from_int (bitand_binary p q)) + | POS_ZERO => + POS_ZERO + | POS_POS (q) => + POS_POS (positive_from_int (bitand_binary (p) (q))) end end. -Definition z_bitor__positive_pred_N (x : t_Positive_t) : t_POS_t := - match match_positive x with - | POSITIVE_XH => - POS_ZEROt_POS_t - | POSITIVE_XI p => - POS_POS (xO p) - | POSITIVE_XO p => - POS_POS (positive_pred_double p) +Definition z_bitor__positive_pred_N (x : t_Positive) : t_POS := + match match_positive (x) with + | POSITIVE_XH => + POS_ZERO + | POSITIVE_XI (p) => + POS_POS (xO (p)) + | POSITIVE_XO (p) => + POS_POS (positive_pred_double (p)) end. -Definition z_bitor (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := +Definition z_bitor (lhs : t_Z) (rhs : t_Z) : t_Z := match lhs with - | Z_ZERO => + | Z_ZERO => rhs - | Z_POS x => + | Z_POS (x) => match rhs with - | Z_ZERO => - Z_POS x - | Z_POS y => - Z_POS (bitor_binary x y) - | Z_NEG y => - Z_NEG (z_bitor__n_succ (z_bitor__haxint_ldiff (z_bitor__positive_pred_N y) (POS_POS x))) + | Z_ZERO => + Z_POS (x) + | Z_POS (y) => + Z_POS (bitor_binary (x) (y)) + | Z_NEG (y) => + Z_NEG (z_bitor__n_succ (z_bitor__haxint_ldiff (z_bitor__positive_pred_N (y)) (POS_POS (x)))) end - | Z_NEG x => + | Z_NEG (x) => match rhs with - | Z_ZERO => - Z_NEG x - | Z_POS y => - Z_NEG (z_bitor__n_succ (z_bitor__haxint_ldiff (z_bitor__positive_pred_N x) (POS_POS y))) - | Z_NEG y => - Z_NEG (z_bitor__n_succ (z_bitor__n_and (z_bitor__positive_pred_N x) (z_bitor__positive_pred_N y))) + | Z_ZERO => + Z_NEG (x) + | Z_POS (y) => + Z_NEG (z_bitor__n_succ (z_bitor__haxint_ldiff (z_bitor__positive_pred_N (x)) (POS_POS (y)))) + | Z_NEG (y) => + Z_NEG (z_bitor__n_succ (z_bitor__n_and (z_bitor__positive_pred_N (x)) (z_bitor__positive_pred_N (y)))) end end. -Definition z_cmp (lhs : t_Z_t) (rhs : t_Z_t) : t_Ordering_t := +Definition z_cmp (lhs : t_Z) (rhs : t_Z) : t_Ordering := match lhs with - | Z_NEG p => + | Z_NEG (p) => match rhs with - | Z_NEG q => - match positive_cmp p q with - | Ordering_Equal => - Ordering_Equalt_Ordering_t - | Ordering_Less => - Ordering_Greatert_Ordering_t - | Ordering_Greater => - Ordering_Lesst_Ordering_t + | Z_NEG (q) => + match positive_cmp (p) (q) with + | Ordering_Equal => + Ordering_Equal + | Ordering_Less => + Ordering_Greater + | Ordering_Greater => + Ordering_Less end | _ => - Ordering_Lesst_Ordering_t + Ordering_Less end - | Z_ZERO => + | Z_ZERO => match rhs with - | Z_ZERO => - Ordering_Equalt_Ordering_t - | Z_POS _ => - Ordering_Lesst_Ordering_t - | Z_NEG _ => - Ordering_Greatert_Ordering_t + | Z_ZERO => + Ordering_Equal + | Z_POS (_) => + Ordering_Less + | Z_NEG (_) => + Ordering_Greater end - | Z_POS p => + | Z_POS (p) => match rhs with - | Z_POS q => - positive_cmp p q + | Z_POS (q) => + positive_cmp (p) (q) | _ => - Ordering_Greatert_Ordering_t + Ordering_Greater end end. -Definition z_le (lhs : t_Z_t) (rhs : t_Z_t) : bool := - match Option_Some (z_cmp lhs rhs) with - | Option_Some Ordering_Less | Ordering_Equal => +Definition z_le (lhs : t_Z) (rhs : t_Z) : bool := + match Option_Some (z_cmp (lhs) (rhs)) with + | Option_Some (Ordering_Less + | Ordering_Equal) => true | _ => false end. -Definition z_lt (lhs : t_Z_t) (rhs : t_Z_t) : bool := - match Option_Some (z_cmp lhs rhs) with - | Option_Some Ordering_Less => +Definition z_lt (lhs : t_Z) (rhs : t_Z) : bool := + match Option_Some (z_cmp (lhs) (rhs)) with + | Option_Some (Ordering_Less) => true | _ => false end. -Definition z_add__pos_z_sub (x : t_Positive_t) (y : t_Positive_t) : t_Z_t := - match match_positive x with - | POSITIVE_XH => - match match_positive y with - | POSITIVE_XH => - Z_ZEROt_Z_t - | POSITIVE_XO q => - Z_NEG (positive_pred_double q) - | POSITIVE_XI q => - Z_NEG (xO q) +Fixpoint z_add__pos_z_sub (x : t_Positive) (y : t_Positive) : t_Z := + match match_positive (x) with + | POSITIVE_XH => + match match_positive (y) with + | POSITIVE_XH => + Z_ZERO + | POSITIVE_XO (q) => + Z_NEG (positive_pred_double (q)) + | POSITIVE_XI (q) => + Z_NEG (xO (q)) end - | POSITIVE_XO p => - match match_positive y with - | POSITIVE_XH => - Z_POS (positive_pred_double p) - | POSITIVE_XO q => - z_add__z_double (z_add__pos_z_sub p q) - | POSITIVE_XI q => - z_add__z_pred_double (z_add__pos_z_sub p q) + | POSITIVE_XO (p) => + match match_positive (y) with + | POSITIVE_XH => + Z_POS (positive_pred_double (p)) + | POSITIVE_XO (q) => + z_add__z_double (z_add__pos_z_sub (p) (q)) + | POSITIVE_XI (q) => + z_add__z_pred_double (z_add__pos_z_sub (p) (q)) end - | POSITIVE_XI p => - match match_positive y with - | POSITIVE_XH => - Z_POS (xO p) - | POSITIVE_XO q => - z_add__z_succ_double (z_add__pos_z_sub p q) - | POSITIVE_XI q => - z_add__z_double (z_add__pos_z_sub p q) + | POSITIVE_XI (p) => + match match_positive (y) with + | POSITIVE_XH => + Z_POS (xO (p)) + | POSITIVE_XO (q) => + z_add__z_succ_double (z_add__pos_z_sub (p) (q)) + | POSITIVE_XI (q) => + z_add__z_double (z_add__pos_z_sub (p) (q)) end end. -Definition z_add (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := +Definition z_add (lhs : t_Z) (rhs : t_Z) : t_Z := match lhs with - | Z_NEG p => + | Z_NEG (p) => match rhs with - | Z_NEG q => - Z_NEG (positive_add p q) - | Z_ZERO => - Z_NEG p - | Z_POS q => - z_add__pos_z_sub q p + | Z_NEG (q) => + Z_NEG (positive_add (p) (q)) + | Z_ZERO => + Z_NEG (p) + | Z_POS (q) => + z_add__pos_z_sub (q) (p) end - | Z_ZERO => + | Z_ZERO => rhs - | Z_POS p => + | Z_POS (p) => match rhs with - | Z_NEG q => - z_add__pos_z_sub p q - | Z_ZERO => - Z_POS p - | Z_POS q => - Z_POS (positive_add p q) + | Z_NEG (q) => + z_add__pos_z_sub (p) (q) + | Z_ZERO => + Z_POS (p) + | Z_POS (q) => + Z_POS (positive_add (p) (q)) end end. -Definition z_sub (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := - z_add lhs (z_neg rhs). +Definition z_sub (lhs : t_Z) (rhs : t_Z) : t_Z := + z_add (lhs) (z_neg (rhs)). -Definition z_mul (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := +Definition z_mul (lhs : t_Z) (rhs : t_Z) : t_Z := match lhs with - | Z_NEG p => + | Z_NEG (p) => match rhs with - | Z_NEG q => - Z_POS (positive_mul p q) - | Z_ZERO => - Z_ZEROt_Z_t - | Z_POS q => - Z_NEG (positive_mul p q) + | Z_NEG (q) => + Z_POS (positive_mul (p) (q)) + | Z_ZERO => + Z_ZERO + | Z_POS (q) => + Z_NEG (positive_mul (p) (q)) end - | Z_ZERO => - Z_ZEROt_Z_t - | Z_POS p => + | Z_ZERO => + Z_ZERO + | Z_POS (p) => match rhs with - | Z_NEG q => - Z_NEG (positive_mul p q) - | Z_ZERO => - Z_ZEROt_Z_t - | Z_POS q => - Z_POS (positive_mul p q) + | Z_NEG (q) => + Z_NEG (positive_mul (p) (q)) + | Z_ZERO => + Z_ZERO + | Z_POS (q) => + Z_POS (positive_mul (p) (q)) end end. -Definition pos_div_eucl (a : t_Positive_t) (b : t_Z_t) : t_Z_t × t_Z_t := - match match_positive a with - | POSITIVE_XH => - if z_le v_Z_TWO (f_clone b) - then (Z_ZEROt_Z_t,v_Z_ONE) - else (v_Z_ONE,Z_ZEROt_Z_t) - | POSITIVE_XO p => - let '(q,r) := pos_div_eucl p (f_clone b) : t_Z_t × t_Z_t in - let r_ := z_mul v_Z_TWO r : t_Z_t in - if z_lt (f_clone r_) (f_clone b) - then (z_mul v_Z_TWO q,r_) - else (z_add (z_mul v_Z_TWO q) v_Z_ONE,z_sub r_ b) - | POSITIVE_XI p => - let '(q,r) := pos_div_eucl p (f_clone b) : t_Z_t × t_Z_t in - let r_ := z_add (z_mul v_Z_TWO r) v_Z_ONE : t_Z_t in - if z_lt (f_clone r_) (f_clone b) - then (z_mul v_Z_TWO q,r_) - else (z_add (z_mul v_Z_TWO q) v_Z_ONE,z_sub r_ b) +Fixpoint pos_div_eucl (a : t_Positive) (b : t_Z) : (t_Z*t_Z) := + match match_positive (a) with + | POSITIVE_XH => + if + z_le (v_Z_TWO) (Clone_f_clone (b)) + then + (Z_ZERO,v_Z_ONE) + else + (v_Z_ONE,Z_ZERO) + | POSITIVE_XO (p) => + let (q,r) := pos_div_eucl (p) (Clone_f_clone (b)) in + let r___ := z_mul (v_Z_TWO) (r) in + if + z_lt (Clone_f_clone (r___)) (Clone_f_clone (b)) + then + (z_mul (v_Z_TWO) (q),r___) + else + (z_add (z_mul (v_Z_TWO) (q)) (v_Z_ONE),z_sub (r___) (b)) + | POSITIVE_XI (p) => + let (q,r) := pos_div_eucl (p) (Clone_f_clone (b)) in + let r___ := z_add (z_mul (v_Z_TWO) (r)) (v_Z_ONE) in + if + z_lt (Clone_f_clone (r___)) (Clone_f_clone (b)) + then + (z_mul (v_Z_TWO) (q),r___) + else + (z_add (z_mul (v_Z_TWO) (q)) (v_Z_ONE),z_sub (r___) (b)) end. -Definition z_divmod (a : t_Z_t) (b : t_Z_t) : t_Z_t × t_Z_t := +Definition z_divmod (a : t_Z) (b : t_Z) : (t_Z*t_Z) := match a with - | Z_ZERO => - (Z_ZEROt_Z_t,Z_ZEROt_Z_t) - | Z_POS a_ => - match f_clone b with - | Z_ZERO => - (Z_ZEROt_Z_t,Z_POS a_) - | Z_POS b_ => - pos_div_eucl a_ b - | Z_NEG b_ => - let '(q,r) := pos_div_eucl a_ (Z_POS b_) : t_Z_t × t_Z_t in - (z_neg q,r) + | Z_ZERO => + (Z_ZERO,Z_ZERO) + | Z_POS (a___) => + match Clone_f_clone (b) with + | Z_ZERO => + (Z_ZERO,Z_POS (a___)) + | Z_POS (b___) => + pos_div_eucl (a___) (b) + | Z_NEG (b___) => + let (q,r) := pos_div_eucl (a___) (Z_POS (b___)) in + (z_neg (q),r) end - | Z_NEG a_ => - match f_clone b with - | Z_ZERO => - (Z_ZEROt_Z_t,Z_NEG a_) - | Z_POS _ => - let '(q,r) := pos_div_eucl a_ (f_clone b) : t_Z_t × t_Z_t in - (z_neg q,z_neg r) - | Z_NEG b_ => - let '(q,r) := pos_div_eucl a_ (Z_POS b_) : t_Z_t × t_Z_t in - (q,z_neg r) + | Z_NEG (a___) => + match Clone_f_clone (b) with + | Z_ZERO => + (Z_ZERO,Z_NEG (a___)) + | Z_POS (_) => + let (q,r) := pos_div_eucl (a___) (Clone_f_clone (b)) in + (z_neg (q),z_neg (r)) + | Z_NEG (b___) => + let (q,r) := pos_div_eucl (a___) (Z_POS (b___)) in + (q,z_neg (r)) end end. -Definition z_div (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := - let '(q,_) := z_divmod lhs rhs : t_Z_t × t_Z_t in +Definition z_div (lhs : t_Z) (rhs : t_Z) : t_Z := + let (q,_) := z_divmod (lhs) (rhs) in q. -Definition z_rem (lhs : t_Z_t) (rhs : t_Z_t) : t_Z_t := - let '(_,r) := z_divmod lhs rhs : t_Z_t × t_Z_t in +Definition z_rem (lhs : t_Z) (rhs : t_Z) : t_Z := + let (_,r) := z_divmod (lhs) (rhs) in r. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v index fb2a526ab..246ed40f6 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v @@ -1,16 +1,67 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Int. -Export Int. +(* From Core Require Import Core. *) -Require Import Coerce. -Export Coerce. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -(*Not implemented yet? todo(item)*) +From Core Require Import int. +Export int. -(*Not implemented yet? todo(item)*) +From Core Require Import coerce. +Export coerce. + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v index 8ecbc22d5..3ea3645c1 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v @@ -1,12 +1,71 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -(*item error backend*) +(* From Core Require Import Core. *) -Class t_Concretization (Self : _) := { - f_concretize : (Self -> T) ; -}. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +Class t_Concretization (v_Self : Type) (v_T : Type) `{t_Sized (v_T)} : Type := + { + Concretization_f_concretize : v_Self -> v_T; + }. +Arguments t_Concretization (_) (_) {_}. + +Class t_Abstraction (v_Self : Type) : Type := + { + Abstraction_f_AbstractType : Type; + _ :: `{t_Sized (Abstraction_f_AbstractType)}; + Abstraction_f_lift : v_Self -> Abstraction_f_AbstractType; + }. +Arguments t_Abstraction (_). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v index 2316b0a45..a58dcdfd7 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v @@ -1,1129 +1,2203 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core (t_cmp). +Export Core (t_cmp). + +From Core Require Import Core (t_ops). +Export Core (t_ops). + +From Core Require Import Core (t_base). +Export Core (t_base). + + + +From Core Require Import Core_Base_interface_Coerce_Abstraction. +Export Core_Base_interface_Coerce_Abstraction. + +From Core Require Import Core_Base_interface_Coerce_Concretization. +Export Core_Base_interface_Coerce_Concretization. + + + +From Core Require Import Core_Option (t_Option). +Export Core_Option (t_Option). + + + +From Core Require Import Core_Option_Option (t_None). +Export Core_Option_Option (t_None). + +From Core Require Import Core_Option_Option (t_Some). +Export Core_Option_Option (t_Some). + +From Core Require Import Core_Clone (t_Clone). +Export Core_Clone (t_Clone). + +From Core Require Import Core_Convert (t_From). +Export Core_Convert (t_From). + +Class t_Constants (v_Self : Type) : Type := + { + Constants_f_ZERO : v_Self; + Constants_f_ONE : v_Self; + Constants_f_MIN : v_Self; + Constants_f_MAX : v_Self; + }. +Arguments t_Constants (_). + +Record t_I128 : Type := + { + I128_f_v : t_Z; + }. +Arguments Build_t_I128. +Arguments I128_f_v. +#[export] Instance settable_t_I128 : Settable _ := + settable! (Build_t_I128) . + +(* NotImplementedYet *) + +Record t_I16 : Type := + { + I16_f_v : t_Z; + }. +Arguments Build_t_I16. +Arguments I16_f_v. +#[export] Instance settable_t_I16 : Settable _ := + settable! (Build_t_I16) . + +(* NotImplementedYet *) + +Record t_I32 : Type := + { + I32_f_v : t_Z; + }. +Arguments Build_t_I32. +Arguments I32_f_v. +#[export] Instance settable_t_I32 : Settable _ := + settable! (Build_t_I32) . + +(* NotImplementedYet *) + +Record t_I64 : Type := + { + I64_f_v : t_Z; + }. +Arguments Build_t_I64. +Arguments I64_f_v. +#[export] Instance settable_t_I64 : Settable _ := + settable! (Build_t_I64) . -Require Import Core_Cmp. -Export Core_Cmp. +(* NotImplementedYet *) -Require Import Core_Ops. -Export Core_Ops. +Record t_I8 : Type := + { + I8_f_v : t_Z; + }. +Arguments Build_t_I8. +Arguments I8_f_v. +#[export] Instance settable_t_I8 : Settable _ := + settable! (Build_t_I8) . -Require Import Crate_Base. -Export Crate_Base. +(* NotImplementedYet *) -Require Import Abstraction. -Export Abstraction. +Record t_U128 : Type := + { + U128_f_v : t_HaxInt; + }. +Arguments Build_t_U128. +Arguments U128_f_v. +#[export] Instance settable_t_U128 : Settable _ := + settable! (Build_t_U128) . -Require Import Concretization. -Export Concretization. +(* NotImplementedYet *) -Require Import Option. -Export Option. +Record t_U16 : Type := + { + U16_f_v : t_HaxInt; + }. +Arguments Build_t_U16. +Arguments U16_f_v. +#[export] Instance settable_t_U16 : Settable _ := + settable! (Build_t_U16) . -Require Import None. -Export None. +(* NotImplementedYet *) -Require Import Some. -Export Some. +Record t_U32 : Type := + { + U32_f_v : t_HaxInt; + }. +Arguments Build_t_U32. +Arguments U32_f_v. +#[export] Instance settable_t_U32 : Settable _ := + settable! (Build_t_U32) . + +(* NotImplementedYet *) + +Record t_U64 : Type := + { + U64_f_v : t_HaxInt; + }. +Arguments Build_t_U64. +Arguments U64_f_v. +#[export] Instance settable_t_U64 : Settable _ := + settable! (Build_t_U64) . + +(* NotImplementedYet *) + +Record t_U8 : Type := + { + U8_f_v : t_HaxInt; + }. +Arguments Build_t_U8. +Arguments U8_f_v. +#[export] Instance settable_t_U8 : Settable _ := + settable! (Build_t_U8) . + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) -Require Import Clone. -Export Clone. +(* NotImplementedYet *) -Require Import From. -Export From. +(* NotImplementedYet *) -Class t_Constants := { - f_ZERO : Self ; - f_ONE : Self ; - f_MIN : Self ; - f_MAX : Self ; -}. +(* NotImplementedYet *) + +Instance t_Concretization_407178874 : t_Concretization ((t_Z)) ((t_I128)) := + { + Concretization_impl_43_f_concretize := fun (self : t_Z)=> + Build_t_I128 (self); + }. -(*Not implemented yet? todo(item)*) +Instance t_Clone_960918039 : t_Clone ((t_I128)) := + { + Clone_impl_51_f_clone := fun (self : t_I128)=> + Build_t_I128 (Clone_f_clone (I128_f_v self)); + }. -(*Not implemented yet? todo(item)*) +Instance t_Concretization_1068646878 : t_Concretization ((t_Z)) ((t_I64)) := + { + Concretization_impl_57_f_concretize := fun (self : t_Z)=> + Build_t_I64 (self); + }. -(*Not implemented yet? todo(item)*) +Instance t_Clone_305340151 : t_Clone ((t_I64)) := + { + Clone_impl_65_f_clone := fun (self : t_I64)=> + Build_t_I64 (Clone_f_clone (I64_f_v self)); + }. -(*Not implemented yet? todo(item)*) +Instance t_Concretization_499270091 : t_Concretization ((t_Z)) ((t_I32)) := + { + Concretization_impl_71_f_concretize := fun (self : t_Z)=> + Build_t_I32 (self); + }. -(*Not implemented yet? todo(item)*) +Instance t_Clone_774571516 : t_Clone ((t_I32)) := + { + Clone_impl_79_f_clone := fun (self : t_I32)=> + Build_t_I32 (Clone_f_clone (I32_f_v self)); + }. -(*Not implemented yet? todo(item)*) +Instance t_Concretization_432063162 : t_Concretization ((t_Z)) ((t_I16)) := + { + Concretization_impl_85_f_concretize := fun (self : t_Z)=> + Build_t_I16 (self); + }. -(*Not implemented yet? todo(item)*) +Instance t_Clone_611206751 : t_Clone ((t_I16)) := + { + Clone_impl_93_f_clone := fun (self : t_I16)=> + Build_t_I16 (Clone_f_clone (I16_f_v self)); + }. -(*Not implemented yet? todo(item)*) +Instance t_Concretization_232722110 : t_Concretization ((t_Z)) ((t_I8)) := + { + Concretization_impl_99_f_concretize := fun (self : t_Z)=> + Build_t_I8 (self); + }. -(*Not implemented yet? todo(item)*) +Instance t_Clone_122768833 : t_Clone ((t_I8)) := + { + Clone_impl_107_f_clone := fun (self : t_I8)=> + Build_t_I8 (Clone_f_clone (I8_f_v self)); + }. -(*Not implemented yet? todo(item)*) +Instance t_Constants_572255769 : t_Constants ((t_I128)) := + { + Constants_impl_40_f_ZERO := Build_t_I128 (Z_ZERO); + Constants_impl_40_f_ONE := Build_t_I128 (Z_POS (xH)); + Constants_impl_40_f_MIN := Build_t_I128 (Z_NEG (Build_t_Positive (v_WORDSIZE_64_))); + Constants_impl_40_f_MAX := Build_t_I128 (Z_POS (Build_t_Positive (v_WORDSIZE_64_SUB_1_))); + }. -(*Not implemented yet? todo(item)*) +Definition impl_41__BITS : t_U32 := + Build_t_U32 (v_BITS_128_). -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -Definition impl_41__WORDSIZE : t_HaxInt_t := +Definition impl_41__WORDSIZE : t_HaxInt := v_WORDSIZE_128_. -Definition impl_55__WORDSIZE : t_HaxInt_t := - v_WORDSIZE_64_. +Instance t_Constants_908090553 : t_Constants ((t_I64)) := + { + Constants_impl_54_f_ZERO := Build_t_I64 (Z_ZERO); + Constants_impl_54_f_ONE := Build_t_I64 (Z_POS (xH)); + Constants_impl_54_f_MIN := Build_t_I64 (Z_NEG (Build_t_Positive (v_WORDSIZE_32_))); + Constants_impl_54_f_MAX := Build_t_I64 (Z_POS (Build_t_Positive (v_WORDSIZE_32_SUB_1_))); + }. -Definition impl_69__WORDSIZE : t_HaxInt_t := - v_WORDSIZE_32_. - -Definition impl_83__WORDSIZE : t_HaxInt_t := - v_WORDSIZE_16_. +Definition impl_55__BITS : t_U32 := + Build_t_U32 (v_BITS_64_). -Definition impl_97__WORDSIZE : t_HaxInt_t := - v_WORDSIZE_8_. - -Definition impl_111__WORDSIZE : t_HaxInt_t := - v_WORDSIZE_128_. - -Definition impl_138__WORDSIZE : t_HaxInt_t := +Definition impl_55__WORDSIZE : t_HaxInt := v_WORDSIZE_64_. -Definition impl_165__WORDSIZE : t_HaxInt_t := - v_WORDSIZE_32_. - -Definition impl_192__WORDSIZE : t_HaxInt_t := - v_WORDSIZE_16_. - -Definition impl_219__WORDSIZE : t_HaxInt_t := - v_WORDSIZE_8_. - -Record t_U128 : Type := { - f_v : t_HaxInt_t; -}. - -#[global] Instance t_U128_t_t_Constants : t_Constants t_U128_t := { - f_ZERO := Build_U128 (f_v := v_HaxInt_ZERO); - f_ONE := Build_U128 (f_v := v_HaxInt_ONE); - f_MIN := Build_U128 (f_v := v_HaxInt_ZERO); - f_MAX := Build_U128 (f_v := v_WORDSIZE_128_SUB_1_); -}. - -#[global] Instance t_U128_t_t_Clone : t_Clone t_U128_t := { - f_clone (self : t_U128_t) := Build_U128 (f_v := f_clone (f_v self)); -}. - -Record t_U16 : Type := { - f_v : t_HaxInt_t; -}. - -#[global] Instance t_U16_t_t_Constants : t_Constants t_U16_t := { - f_ZERO := Build_U16 (f_v := v_HaxInt_ZERO); - f_ONE := Build_U16 (f_v := v_HaxInt_ONE); - f_MIN := Build_U16 (f_v := v_HaxInt_ZERO); - f_MAX := Build_U16 (f_v := v_WORDSIZE_16_SUB_1_); -}. - -#[global] Instance t_U16_t_t_Clone : t_Clone t_U16_t := { - f_clone (self : t_U16_t) := Build_U16 (f_v := f_clone (f_v self)); -}. - -Record t_U32 : Type := { - f_v : t_HaxInt_t; -}. - -Definition impl_41__BITS : t_U32_t := - Build_U32 (f_v := v_BITS_128_). - -Definition impl_55__BITS : t_U32_t := - Build_U32 (f_v := v_BITS_64_). - -Definition impl_69__BITS : t_U32_t := - Build_U32 (f_v := v_BITS_32_). - -Definition impl_83__BITS : t_U32_t := - Build_U32 (f_v := v_BITS_16_). - -Definition impl_97__BITS : t_U32_t := - Build_U32 (f_v := v_BITS_8_). - -Definition impl_111__BITS : t_U32_t := - Build_U32 (f_v := v_BITS_128_). - -Definition impl_138__BITS : t_U32_t := - Build_U32 (f_v := v_BITS_64_). - -#[global] Instance t_U32_t_t_Constants : t_Constants t_U32_t := { - f_ZERO := Build_U32 (f_v := v_HaxInt_ZERO); - f_ONE := Build_U32 (f_v := v_HaxInt_ONE); - f_MIN := Build_U32 (f_v := v_HaxInt_ZERO); - f_MAX := Build_U32 (f_v := v_WORDSIZE_32_SUB_1_); -}. - -Definition impl_165__BITS : t_U32_t := - Build_U32 (f_v := v_BITS_32_). - -#[global] Instance t_U32_t_t_Clone : t_Clone t_U32_t := { - f_clone (self : t_U32_t) := Build_U32 (f_v := f_clone (f_v self)); -}. - -Definition impl_192__BITS : t_U32_t := - Build_U32 (f_v := v_BITS_16_). - -Definition impl_219__BITS : t_U32_t := - Build_U32 (f_v := v_BITS_8_). - -Record t_U64 : Type := { - f_v : t_HaxInt_t; -}. - -#[global] Instance t_U64_t_t_Constants : t_Constants t_U64_t := { - f_ZERO := Build_U64 (f_v := v_HaxInt_ZERO); - f_ONE := Build_U64 (f_v := v_HaxInt_ONE); - f_MIN := Build_U64 (f_v := v_HaxInt_ZERO); - f_MAX := Build_U64 (f_v := v_WORDSIZE_64_SUB_1_); -}. - -#[global] Instance t_U64_t_t_Clone : t_Clone t_U64_t := { - f_clone (self : t_U64_t) := Build_U64 (f_v := f_clone (f_v self)); -}. - -Record t_U8 : Type := { - f_v : t_HaxInt_t; -}. - -#[global] Instance t_U8_t_t_Constants : t_Constants t_U8_t := { - f_ZERO := Build_U8 (f_v := v_HaxInt_ZERO); - f_ONE := Build_U8 (f_v := v_HaxInt_ONE); - f_MIN := Build_U8 (f_v := v_HaxInt_ZERO); - f_MAX := Build_U8 (f_v := v_WORDSIZE_8_SUB_1_); -}. - -#[global] Instance t_U8_t_t_Clone : t_Clone t_U8_t := { - f_clone (self : t_U8_t) := Build_U8 (f_v := f_clone (f_v self)); -}. - -(*item error backend*) - -#[global] Instance t_U128_t_t_PartialEq : t_PartialEq t_U128_t t_U128_t := { - f_eq (self : t_U128_t) (rhs : t_U128_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; - f_ne (self : t_U128_t) (rhs : t_U128_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; -}. - -#[global] Instance t_U128_t_t_PartialOrd : t_PartialOrd t_U128_t t_U128_t := { - f_partial_cmp (self : t_U128_t) (rhs : t_U128_t) := Option_Some (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); - f_lt (self : t_U128_t) (rhs : t_U128_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less => - true - | _ => - false - end; - f_le (self : t_U128_t) (rhs : t_U128_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_U128_t) (rhs : t_U128_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_U128_t) (rhs : t_U128_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -(*item error backend*) - -#[global] Instance t_U64_t_t_PartialEq : t_PartialEq t_U64_t t_U64_t := { - f_eq (self : t_U64_t) (rhs : t_U64_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; - f_ne (self : t_U64_t) (rhs : t_U64_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; -}. - -#[global] Instance t_U64_t_t_PartialOrd : t_PartialOrd t_U64_t t_U64_t := { - f_partial_cmp (self : t_U64_t) (rhs : t_U64_t) := Option_Some (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); - f_lt (self : t_U64_t) (rhs : t_U64_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less => - true - | _ => - false - end; - f_le (self : t_U64_t) (rhs : t_U64_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_U64_t) (rhs : t_U64_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_U64_t) (rhs : t_U64_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -(*item error backend*) - -#[global] Instance t_U32_t_t_PartialEq : t_PartialEq t_U32_t t_U32_t := { - f_eq (self : t_U32_t) (rhs : t_U32_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; - f_ne (self : t_U32_t) (rhs : t_U32_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; -}. - -#[global] Instance t_U32_t_t_PartialOrd : t_PartialOrd t_U32_t t_U32_t := { - f_partial_cmp (self : t_U32_t) (rhs : t_U32_t) := Option_Some (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); - f_lt (self : t_U32_t) (rhs : t_U32_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less => - true - | _ => - false - end; - f_le (self : t_U32_t) (rhs : t_U32_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_U32_t) (rhs : t_U32_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_U32_t) (rhs : t_U32_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -(*item error backend*) - -#[global] Instance t_U16_t_t_PartialEq : t_PartialEq t_U16_t t_U16_t := { - f_eq (self : t_U16_t) (rhs : t_U16_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; - f_ne (self : t_U16_t) (rhs : t_U16_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; -}. - -#[global] Instance t_U16_t_t_PartialOrd : t_PartialOrd t_U16_t t_U16_t := { - f_partial_cmp (self : t_U16_t) (rhs : t_U16_t) := Option_Some (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); - f_lt (self : t_U16_t) (rhs : t_U16_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less => - true - | _ => - false - end; - f_le (self : t_U16_t) (rhs : t_U16_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_U16_t) (rhs : t_U16_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_U16_t) (rhs : t_U16_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -(*item error backend*) - -#[global] Instance t_U8_t_t_PartialEq : t_PartialEq t_U8_t t_U8_t := { - f_eq (self : t_U8_t) (rhs : t_U8_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; - f_ne (self : t_U8_t) (rhs : t_U8_t) := (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; -}. - -#[global] Instance t_U8_t_t_PartialOrd : t_PartialOrd t_U8_t t_U8_t := { - f_partial_cmp (self : t_U8_t) (rhs : t_U8_t) := Option_Some (haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); - f_lt (self : t_U8_t) (rhs : t_U8_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less => - true - | _ => - false - end; - f_le (self : t_U8_t) (rhs : t_U8_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_U8_t) (rhs : t_U8_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_U8_t) (rhs : t_U8_t) := match haxint_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_I128 : Type := { - f_v : t_Z_t; -}. - -#[global] Instance t_I128_t_t_Constants : t_Constants t_I128_t := { - f_ZERO := Build_I128 (f_v := Z_ZEROt_Z_t); - f_ONE := Build_I128 (f_v := Z_POS xH); - f_MIN := Build_I128 (f_v := Z_NEG (Positive v_WORDSIZE_64_)); - f_MAX := Build_I128 (f_v := Z_POS (Positive v_WORDSIZE_64_SUB_1_)); -}. - -#[global] Instance t_Z_t_t_Concretization : t_Concretization t_Z_t t_I128_t := { - f_concretize (self : t_Z_t) := Build_I128 (f_v := self); -}. - -#[global] Instance t_I128_t_t_Clone : t_Clone t_I128_t := { - f_clone (self : t_I128_t) := Build_I128 (f_v := f_clone (f_v self)); -}. - -Record t_I16 : Type := { - f_v : t_Z_t; -}. - -#[global] Instance t_I16_t_t_Constants : t_Constants t_I16_t := { - f_ZERO := Build_I16 (f_v := Z_ZEROt_Z_t); - f_ONE := Build_I16 (f_v := Z_POS xH); - f_MIN := Build_I16 (f_v := Z_NEG (Positive v_WORDSIZE_8_)); - f_MAX := Build_I16 (f_v := Z_POS (Positive v_WORDSIZE_8_SUB_1_)); -}. - -#[global] Instance t_Z_t_t_Concretization : t_Concretization t_Z_t t_I16_t := { - f_concretize (self : t_Z_t) := Build_I16 (f_v := self); -}. - -#[global] Instance t_I16_t_t_Clone : t_Clone t_I16_t := { - f_clone (self : t_I16_t) := Build_I16 (f_v := f_clone (f_v self)); -}. - -Record t_I32 : Type := { - f_v : t_Z_t; -}. - -#[global] Instance t_I32_t_t_Constants : t_Constants t_I32_t := { - f_ZERO := Build_I32 (f_v := Z_ZEROt_Z_t); - f_ONE := Build_I32 (f_v := Z_POS xH); - f_MIN := Build_I32 (f_v := Z_NEG (Positive v_WORDSIZE_16_)); - f_MAX := Build_I32 (f_v := Z_POS (Positive v_WORDSIZE_16_SUB_1_)); -}. - -#[global] Instance t_Z_t_t_Concretization : t_Concretization t_Z_t t_I32_t := { - f_concretize (self : t_Z_t) := Build_I32 (f_v := self); -}. - -#[global] Instance t_I32_t_t_Clone : t_Clone t_I32_t := { - f_clone (self : t_I32_t) := Build_I32 (f_v := f_clone (f_v self)); -}. - -Record t_I64 : Type := { - f_v : t_Z_t; -}. - -#[global] Instance t_I64_t_t_Constants : t_Constants t_I64_t := { - f_ZERO := Build_I64 (f_v := Z_ZEROt_Z_t); - f_ONE := Build_I64 (f_v := Z_POS xH); - f_MIN := Build_I64 (f_v := Z_NEG (Positive v_WORDSIZE_32_)); - f_MAX := Build_I64 (f_v := Z_POS (Positive v_WORDSIZE_32_SUB_1_)); -}. - -#[global] Instance t_Z_t_t_Concretization : t_Concretization t_Z_t t_I64_t := { - f_concretize (self : t_Z_t) := Build_I64 (f_v := self); -}. - -#[global] Instance t_I64_t_t_Clone : t_Clone t_I64_t := { - f_clone (self : t_I64_t) := Build_I64 (f_v := f_clone (f_v self)); -}. - -Record t_I8 : Type := { - f_v : t_Z_t; -}. - -#[global] Instance t_I8_t_t_Constants : t_Constants t_I8_t := { - f_ZERO := Build_I8 (f_v := Z_ZEROt_Z_t); - f_ONE := Build_I8 (f_v := Z_POS xH); - f_MIN := Build_I8 (f_v := Z_NEG (Positive v_WORDSIZE_4_)); - f_MAX := Build_I8 (f_v := Z_POS (Positive v_WORDSIZE_4_SUB_1_)); -}. - -#[global] Instance t_Z_t_t_Concretization : t_Concretization t_Z_t t_I8_t := { - f_concretize (self : t_Z_t) := Build_I8 (f_v := self); -}. - -#[global] Instance t_I8_t_t_Clone : t_Clone t_I8_t := { - f_clone (self : t_I8_t) := Build_I8 (f_v := f_clone (f_v self)); -}. - -(*item error backend*) - -#[global] Instance t_I8_t_t_From : t_From t_I8_t t_I128_t := { - f_from (x : t_I128_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I16_t_t_From : t_From t_I16_t t_I128_t := { - f_from (x : t_I128_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I32_t_t_From : t_From t_I32_t t_I128_t := { - f_from (x : t_I128_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I64_t_t_From : t_From t_I64_t t_I128_t := { - f_from (x : t_I128_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I128_t_t_PartialEq : t_PartialEq t_I128_t t_I128_t := { - f_eq (self : t_I128_t) (rhs : t_I128_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; - f_ne (self : t_I128_t) (rhs : t_I128_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; -}. - -#[global] Instance t_I128_t_t_PartialOrd : t_PartialOrd t_I128_t t_I128_t := { - f_partial_cmp (self : t_I128_t) (rhs : t_I128_t) := Option_Some (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); - f_lt (self : t_I128_t) (rhs : t_I128_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less => - true - | _ => - false - end; - f_le (self : t_I128_t) (rhs : t_I128_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_I128_t) (rhs : t_I128_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_I128_t) (rhs : t_I128_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -(*item error backend*) - -#[global] Instance t_I8_t_t_From : t_From t_I8_t t_I64_t := { - f_from (x : t_I64_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I16_t_t_From : t_From t_I16_t t_I64_t := { - f_from (x : t_I64_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I32_t_t_From : t_From t_I32_t t_I64_t := { - f_from (x : t_I64_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I128_t_t_From : t_From t_I128_t t_I64_t := { - f_from (x : t_I64_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I64_t_t_PartialEq : t_PartialEq t_I64_t t_I64_t := { - f_eq (self : t_I64_t) (rhs : t_I64_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; - f_ne (self : t_I64_t) (rhs : t_I64_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; -}. - -#[global] Instance t_I64_t_t_PartialOrd : t_PartialOrd t_I64_t t_I64_t := { - f_partial_cmp (self : t_I64_t) (rhs : t_I64_t) := Option_Some (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); - f_lt (self : t_I64_t) (rhs : t_I64_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less => - true - | _ => - false - end; - f_le (self : t_I64_t) (rhs : t_I64_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_I64_t) (rhs : t_I64_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_I64_t) (rhs : t_I64_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -(*item error backend*) - -#[global] Instance t_I8_t_t_From : t_From t_I8_t t_I32_t := { - f_from (x : t_I32_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I16_t_t_From : t_From t_I16_t t_I32_t := { - f_from (x : t_I32_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I64_t_t_From : t_From t_I64_t t_I32_t := { - f_from (x : t_I32_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I128_t_t_From : t_From t_I128_t t_I32_t := { - f_from (x : t_I32_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I32_t_t_PartialEq : t_PartialEq t_I32_t t_I32_t := { - f_eq (self : t_I32_t) (rhs : t_I32_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; - f_ne (self : t_I32_t) (rhs : t_I32_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; -}. - -#[global] Instance t_I32_t_t_PartialOrd : t_PartialOrd t_I32_t t_I32_t := { - f_partial_cmp (self : t_I32_t) (rhs : t_I32_t) := Option_Some (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); - f_lt (self : t_I32_t) (rhs : t_I32_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less => - true - | _ => - false - end; - f_le (self : t_I32_t) (rhs : t_I32_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_I32_t) (rhs : t_I32_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_I32_t) (rhs : t_I32_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -(*item error backend*) - -#[global] Instance t_I8_t_t_From : t_From t_I8_t t_I16_t := { - f_from (x : t_I16_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I32_t_t_From : t_From t_I32_t t_I16_t := { - f_from (x : t_I16_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I64_t_t_From : t_From t_I64_t t_I16_t := { - f_from (x : t_I16_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I128_t_t_From : t_From t_I128_t t_I16_t := { - f_from (x : t_I16_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I16_t_t_PartialEq : t_PartialEq t_I16_t t_I16_t := { - f_eq (self : t_I16_t) (rhs : t_I16_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; - f_ne (self : t_I16_t) (rhs : t_I16_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; -}. - -#[global] Instance t_I16_t_t_PartialOrd : t_PartialOrd t_I16_t t_I16_t := { - f_partial_cmp (self : t_I16_t) (rhs : t_I16_t) := Option_Some (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); - f_lt (self : t_I16_t) (rhs : t_I16_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less => - true - | _ => - false - end; - f_le (self : t_I16_t) (rhs : t_I16_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_I16_t) (rhs : t_I16_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_I16_t) (rhs : t_I16_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -(*item error backend*) - -#[global] Instance t_I16_t_t_From : t_From t_I16_t t_I8_t := { - f_from (x : t_I8_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I32_t_t_From : t_From t_I32_t t_I8_t := { - f_from (x : t_I8_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I64_t_t_From : t_From t_I64_t t_I8_t := { - f_from (x : t_I8_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I128_t_t_From : t_From t_I128_t t_I8_t := { - f_from (x : t_I8_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_I8_t_t_PartialEq : t_PartialEq t_I8_t t_I8_t := { - f_eq (self : t_I8_t) (rhs : t_I8_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))=.?Ordering_Equalt_Ordering_t; - f_ne (self : t_I8_t) (rhs : t_I8_t) := (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)))<>Ordering_Equalt_Ordering_t; -}. - -#[global] Instance t_I8_t_t_PartialOrd : t_PartialOrd t_I8_t t_I8_t := { - f_partial_cmp (self : t_I8_t) (rhs : t_I8_t) := Option_Some (z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs))); - f_lt (self : t_I8_t) (rhs : t_I8_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less => - true - | _ => - false - end; - f_le (self : t_I8_t) (rhs : t_I8_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_I8_t) (rhs : t_I8_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_I8_t) (rhs : t_I8_t) := match z_cmp (f_lift (f_clone self)) (f_lift (f_clone rhs)) with - | Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -#[global] Instance t_HaxInt_t_t_Concretization : t_Concretization t_HaxInt_t t_U128_t := { - f_concretize (self : t_HaxInt_t) := Build_U128 (f_v := haxint_rem self v_WORDSIZE_128_); -}. - -#[global] Instance t_U128_t_t_From : t_From t_U128_t t_U8_t := { - f_from (x : t_U8_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U128_t_t_From : t_From t_U128_t t_U16_t := { - f_from (x : t_U16_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U128_t_t_From : t_From t_U128_t t_U32_t := { - f_from (x : t_U32_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U128_t_t_From : t_From t_U128_t t_U64_t := { - f_from (x : t_U64_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_HaxInt_t_t_Concretization : t_Concretization t_HaxInt_t t_U64_t := { - f_concretize (self : t_HaxInt_t) := Build_U64 (f_v := haxint_rem self v_WORDSIZE_64_); -}. - -#[global] Instance t_U64_t_t_From : t_From t_U64_t t_U8_t := { - f_from (x : t_U8_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U64_t_t_From : t_From t_U64_t t_U16_t := { - f_from (x : t_U16_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U64_t_t_From : t_From t_U64_t t_U32_t := { - f_from (x : t_U32_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U64_t_t_From : t_From t_U64_t t_U128_t := { - f_from (x : t_U128_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_HaxInt_t_t_Concretization : t_Concretization t_HaxInt_t t_U32_t := { - f_concretize (self : t_HaxInt_t) := Build_U32 (f_v := haxint_rem self v_WORDSIZE_32_); -}. - -#[global] Instance t_U32_t_t_From : t_From t_U32_t t_U8_t := { - f_from (x : t_U8_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U32_t_t_From : t_From t_U32_t t_U16_t := { - f_from (x : t_U16_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U32_t_t_From : t_From t_U32_t t_U64_t := { - f_from (x : t_U64_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U32_t_t_From : t_From t_U32_t t_U128_t := { - f_from (x : t_U128_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_HaxInt_t_t_Concretization : t_Concretization t_HaxInt_t t_U16_t := { - f_concretize (self : t_HaxInt_t) := Build_U16 (f_v := haxint_rem self v_WORDSIZE_16_); -}. - -#[global] Instance t_U16_t_t_From : t_From t_U16_t t_U8_t := { - f_from (x : t_U8_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U16_t_t_From : t_From t_U16_t t_U32_t := { - f_from (x : t_U32_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U16_t_t_From : t_From t_U16_t t_U64_t := { - f_from (x : t_U64_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U16_t_t_From : t_From t_U16_t t_U128_t := { - f_from (x : t_U128_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_HaxInt_t_t_Concretization : t_Concretization t_HaxInt_t t_U8_t := { - f_concretize (self : t_HaxInt_t) := Build_U8 (f_v := haxint_rem self v_WORDSIZE_8_); -}. - -#[global] Instance t_U8_t_t_From : t_From t_U8_t t_U16_t := { - f_from (x : t_U16_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U8_t_t_From : t_From t_U8_t t_U32_t := { - f_from (x : t_U32_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U8_t_t_From : t_From t_U8_t t_U64_t := { - f_from (x : t_U64_t) := f_concretize (f_lift x); -}. - -#[global] Instance t_U8_t_t_From : t_From t_U8_t t_U128_t := { - f_from (x : t_U128_t) := f_concretize (f_lift x); -}. - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) +Instance t_Constants_99970330 : t_Constants ((t_I32)) := + { + Constants_impl_68_f_ZERO := Build_t_I32 (Z_ZERO); + Constants_impl_68_f_ONE := Build_t_I32 (Z_POS (xH)); + Constants_impl_68_f_MIN := Build_t_I32 (Z_NEG (Build_t_Positive (v_WORDSIZE_16_))); + Constants_impl_68_f_MAX := Build_t_I32 (Z_POS (Build_t_Positive (v_WORDSIZE_16_SUB_1_))); + }. -(*item error backend*) +Definition impl_69__BITS : t_U32 := + Build_t_U32 (v_BITS_32_). -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) +Definition impl_69__WORDSIZE : t_HaxInt := + v_WORDSIZE_32_. -(*item error backend*) +Instance t_Constants_687261461 : t_Constants ((t_I16)) := + { + Constants_impl_82_f_ZERO := Build_t_I16 (Z_ZERO); + Constants_impl_82_f_ONE := Build_t_I16 (Z_POS (xH)); + Constants_impl_82_f_MIN := Build_t_I16 (Z_NEG (Build_t_Positive (v_WORDSIZE_8_))); + Constants_impl_82_f_MAX := Build_t_I16 (Z_POS (Build_t_Positive (v_WORDSIZE_8_SUB_1_))); + }. -(*item error backend*) +Definition impl_83__BITS : t_U32 := + Build_t_U32 (v_BITS_16_). -(*item error backend*) +Definition impl_83__WORDSIZE : t_HaxInt := + v_WORDSIZE_16_. -(*item error backend*) +Instance t_Constants_636847136 : t_Constants ((t_I8)) := + { + Constants_impl_96_f_ZERO := Build_t_I8 (Z_ZERO); + Constants_impl_96_f_ONE := Build_t_I8 (Z_POS (xH)); + Constants_impl_96_f_MIN := Build_t_I8 (Z_NEG (Build_t_Positive (v_WORDSIZE_4_))); + Constants_impl_96_f_MAX := Build_t_I8 (Z_POS (Build_t_Positive (v_WORDSIZE_4_SUB_1_))); + }. -(*item error backend*) +Definition impl_97__BITS : t_U32 := + Build_t_U32 (v_BITS_8_). -(*item error backend*) +Definition impl_97__WORDSIZE : t_HaxInt := + v_WORDSIZE_8_. -(*item error backend*) +Instance t_Constants_119702187 : t_Constants ((t_U128)) := + { + Constants_impl_110_f_ZERO := Build_t_U128 (v_HaxInt_ZERO); + Constants_impl_110_f_ONE := Build_t_U128 (v_HaxInt_ONE); + Constants_impl_110_f_MIN := Build_t_U128 (v_HaxInt_ZERO); + Constants_impl_110_f_MAX := Build_t_U128 (v_WORDSIZE_128_SUB_1_); + }. -(*item error backend*) +Definition impl_111__BITS : t_U32 := + Build_t_U32 (v_BITS_128_). -(*item error backend*) +Definition impl_111__WORDSIZE : t_HaxInt := + v_WORDSIZE_128_. -(*item error backend*) +Instance t_Constants_579677195 : t_Constants ((t_U64)) := + { + Constants_impl_137_f_ZERO := Build_t_U64 (v_HaxInt_ZERO); + Constants_impl_137_f_ONE := Build_t_U64 (v_HaxInt_ONE); + Constants_impl_137_f_MIN := Build_t_U64 (v_HaxInt_ZERO); + Constants_impl_137_f_MAX := Build_t_U64 (v_WORDSIZE_64_SUB_1_); + }. -(*item error backend*) +Definition impl_138__BITS : t_U32 := + Build_t_U32 (v_BITS_64_). -(*item error backend*) +Definition impl_138__WORDSIZE : t_HaxInt := + v_WORDSIZE_64_. -(*item error backend*) +Instance t_Constants_63564700 : t_Constants ((t_U32)) := + { + Constants_impl_164_f_ZERO := Build_t_U32 (v_HaxInt_ZERO); + Constants_impl_164_f_ONE := Build_t_U32 (v_HaxInt_ONE); + Constants_impl_164_f_MIN := Build_t_U32 (v_HaxInt_ZERO); + Constants_impl_164_f_MAX := Build_t_U32 (v_WORDSIZE_32_SUB_1_); + }. -(*item error backend*) +Definition impl_165__BITS : t_U32 := + Build_t_U32 (v_BITS_32_). -(*item error backend*) +Definition impl_165__WORDSIZE : t_HaxInt := + v_WORDSIZE_32_. -(*item error backend*) +Instance t_Constants_221027212 : t_Constants ((t_U16)) := + { + Constants_impl_191_f_ZERO := Build_t_U16 (v_HaxInt_ZERO); + Constants_impl_191_f_ONE := Build_t_U16 (v_HaxInt_ONE); + Constants_impl_191_f_MIN := Build_t_U16 (v_HaxInt_ZERO); + Constants_impl_191_f_MAX := Build_t_U16 (v_WORDSIZE_16_SUB_1_); + }. -(*item error backend*) +Definition impl_192__BITS : t_U32 := + Build_t_U32 (v_BITS_16_). -(*item error backend*) +Definition impl_192__WORDSIZE : t_HaxInt := + v_WORDSIZE_16_. -(*item error backend*) +Instance t_Constants_932070468 : t_Constants ((t_U8)) := + { + Constants_impl_218_f_ZERO := Build_t_U8 (v_HaxInt_ZERO); + Constants_impl_218_f_ONE := Build_t_U8 (v_HaxInt_ONE); + Constants_impl_218_f_MIN := Build_t_U8 (v_HaxInt_ZERO); + Constants_impl_218_f_MAX := Build_t_U8 (v_WORDSIZE_8_SUB_1_); + }. -(*item error backend*) +Definition impl_219__BITS : t_U32 := + Build_t_U32 (v_BITS_8_). -(*item error backend*) +Definition impl_219__WORDSIZE : t_HaxInt := + v_WORDSIZE_8_. -(*item error backend*) +Instance t_Clone_138729312 : t_Clone ((t_U128)) := + { + Clone_impl_134_f_clone := fun (self : t_U128)=> + Build_t_U128 (Clone_f_clone (U128_f_v self)); + }. + +Instance t_Clone_461763462 : t_Clone ((t_U64)) := + { + Clone_impl_161_f_clone := fun (self : t_U64)=> + Build_t_U64 (Clone_f_clone (U64_f_v self)); + }. + +Instance t_Clone_412151272 : t_Clone ((t_U32)) := + { + Clone_impl_188_f_clone := fun (self : t_U32)=> + Build_t_U32 (Clone_f_clone (U32_f_v self)); + }. + +Instance t_Clone_387504240 : t_Clone ((t_U16)) := + { + Clone_impl_215_f_clone := fun (self : t_U16)=> + Build_t_U16 (Clone_f_clone (U16_f_v self)); + }. + +Instance t_Clone_917943387 : t_Clone ((t_U8)) := + { + Clone_impl_242_f_clone := fun (self : t_U8)=> + Build_t_U8 (Clone_f_clone (U8_f_v self)); + }. + +Instance t_Abstraction_970113908 : t_Abstraction ((t_I128)) := + { + Abstraction_impl_42_f_AbstractType := t_Z; + Abstraction_impl_42_f_lift := fun (self : t_I128)=> + I128_f_v self; + }. + +Instance t_From_330503528 : t_From ((t_I8)) ((t_I128)) := + { + From_impl_36_f_from := fun (x : t_I128)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_185067369 : t_From ((t_I16)) ((t_I128)) := + { + From_impl_37_f_from := fun (x : t_I128)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_106548803 : t_From ((t_I32)) ((t_I128)) := + { + From_impl_38_f_from := fun (x : t_I128)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_237552649 : t_From ((t_I64)) ((t_I128)) := + { + From_impl_39_f_from := fun (x : t_I128)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_PartialEq_488790252 : t_PartialEq ((t_I128)) ((t_I128)) := + { + PartialEq_impl_52_f_eq := fun (self : t_I128) (rhs : t_I128)=> + PartialEq_f_eq (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_impl_52_f_ne := fun (self : t_I128) (rhs : t_I128)=> + PartialEq_f_ne (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + }. + +Instance t_PartialOrd_387128921 : t_PartialOrd ((t_I128)) ((t_I128)) := + { + PartialOrd_impl_53_f_partial_cmp := fun (self : t_I128) (rhs : t_I128)=> + Option_Some (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); + PartialOrd_impl_53_f_lt := fun (self : t_I128) (rhs : t_I128)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less => + true + | _ => + false + end; + PartialOrd_impl_53_f_le := fun (self : t_I128) (rhs : t_I128)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less + | Ordering_Equal => + true + | _ => + false + end; + PartialOrd_impl_53_f_gt := fun (self : t_I128) (rhs : t_I128)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater => + true + | _ => + false + end; + PartialOrd_impl_53_f_ge := fun (self : t_I128) (rhs : t_I128)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater + | Ordering_Equal => + true + | _ => + false + end; + }. + +Instance t_Abstraction_692501606 : t_Abstraction ((t_I64)) := + { + Abstraction_impl_56_f_AbstractType := t_Z; + Abstraction_impl_56_f_lift := fun (self : t_I64)=> + I64_f_v self; + }. + +Instance t_From_318313768 : t_From ((t_I8)) ((t_I64)) := + { + From_impl_32_f_from := fun (x : t_I64)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_215423074 : t_From ((t_I16)) ((t_I64)) := + { + From_impl_33_f_from := fun (x : t_I64)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_221659723 : t_From ((t_I32)) ((t_I64)) := + { + From_impl_34_f_from := fun (x : t_I64)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_927453474 : t_From ((t_I128)) ((t_I64)) := + { + From_impl_35_f_from := fun (x : t_I64)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_PartialEq_474861724 : t_PartialEq ((t_I64)) ((t_I64)) := + { + PartialEq_impl_66_f_eq := fun (self : t_I64) (rhs : t_I64)=> + PartialEq_f_eq (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_impl_66_f_ne := fun (self : t_I64) (rhs : t_I64)=> + PartialEq_f_ne (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + }. + +Instance t_PartialOrd_552634265 : t_PartialOrd ((t_I64)) ((t_I64)) := + { + PartialOrd_impl_67_f_partial_cmp := fun (self : t_I64) (rhs : t_I64)=> + Option_Some (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); + PartialOrd_impl_67_f_lt := fun (self : t_I64) (rhs : t_I64)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less => + true + | _ => + false + end; + PartialOrd_impl_67_f_le := fun (self : t_I64) (rhs : t_I64)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less + | Ordering_Equal => + true + | _ => + false + end; + PartialOrd_impl_67_f_gt := fun (self : t_I64) (rhs : t_I64)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater => + true + | _ => + false + end; + PartialOrd_impl_67_f_ge := fun (self : t_I64) (rhs : t_I64)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater + | Ordering_Equal => + true + | _ => + false + end; + }. + +Instance t_Abstraction_493183574 : t_Abstraction ((t_I32)) := + { + Abstraction_impl_70_f_AbstractType := t_Z; + Abstraction_impl_70_f_lift := fun (self : t_I32)=> + I32_f_v self; + }. + +Instance t_From_573287156 : t_From ((t_I8)) ((t_I32)) := + { + From_impl_28_f_from := fun (x : t_I32)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_278670998 : t_From ((t_I16)) ((t_I32)) := + { + From_impl_29_f_from := fun (x : t_I32)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_697572388 : t_From ((t_I64)) ((t_I32)) := + { + From_impl_30_f_from := fun (x : t_I32)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_30146175 : t_From ((t_I128)) ((t_I32)) := + { + From_impl_31_f_from := fun (x : t_I32)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_PartialEq_795859780 : t_PartialEq ((t_I32)) ((t_I32)) := + { + PartialEq_impl_80_f_eq := fun (self : t_I32) (rhs : t_I32)=> + PartialEq_f_eq (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_impl_80_f_ne := fun (self : t_I32) (rhs : t_I32)=> + PartialEq_f_ne (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + }. + +Instance t_PartialOrd_126468614 : t_PartialOrd ((t_I32)) ((t_I32)) := + { + PartialOrd_impl_81_f_partial_cmp := fun (self : t_I32) (rhs : t_I32)=> + Option_Some (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); + PartialOrd_impl_81_f_lt := fun (self : t_I32) (rhs : t_I32)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less => + true + | _ => + false + end; + PartialOrd_impl_81_f_le := fun (self : t_I32) (rhs : t_I32)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less + | Ordering_Equal => + true + | _ => + false + end; + PartialOrd_impl_81_f_gt := fun (self : t_I32) (rhs : t_I32)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater => + true + | _ => + false + end; + PartialOrd_impl_81_f_ge := fun (self : t_I32) (rhs : t_I32)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater + | Ordering_Equal => + true + | _ => + false + end; + }. + +Instance t_Abstraction_8671741 : t_Abstraction ((t_I16)) := + { + Abstraction_impl_84_f_AbstractType := t_Z; + Abstraction_impl_84_f_lift := fun (self : t_I16)=> + I16_f_v self; + }. + +Instance t_From_767089390 : t_From ((t_I8)) ((t_I16)) := + { + From_impl_24_f_from := fun (x : t_I16)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_339600325 : t_From ((t_I32)) ((t_I16)) := + { + From_impl_25_f_from := fun (x : t_I16)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_929749154 : t_From ((t_I64)) ((t_I16)) := + { + From_impl_26_f_from := fun (x : t_I16)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_366897745 : t_From ((t_I128)) ((t_I16)) := + { + From_impl_27_f_from := fun (x : t_I16)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_PartialEq_359538097 : t_PartialEq ((t_I16)) ((t_I16)) := + { + PartialEq_impl_94_f_eq := fun (self : t_I16) (rhs : t_I16)=> + PartialEq_f_eq (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_impl_94_f_ne := fun (self : t_I16) (rhs : t_I16)=> + PartialEq_f_ne (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + }. + +Instance t_PartialOrd_524872806 : t_PartialOrd ((t_I16)) ((t_I16)) := + { + PartialOrd_impl_95_f_partial_cmp := fun (self : t_I16) (rhs : t_I16)=> + Option_Some (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); + PartialOrd_impl_95_f_lt := fun (self : t_I16) (rhs : t_I16)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less => + true + | _ => + false + end; + PartialOrd_impl_95_f_le := fun (self : t_I16) (rhs : t_I16)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less + | Ordering_Equal => + true + | _ => + false + end; + PartialOrd_impl_95_f_gt := fun (self : t_I16) (rhs : t_I16)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater => + true + | _ => + false + end; + PartialOrd_impl_95_f_ge := fun (self : t_I16) (rhs : t_I16)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater + | Ordering_Equal => + true + | _ => + false + end; + }. + +Instance t_Abstraction_78490685 : t_Abstraction ((t_I8)) := + { + Abstraction_impl_98_f_AbstractType := t_Z; + Abstraction_impl_98_f_lift := fun (self : t_I8)=> + I8_f_v self; + }. + +Instance t_From_995744130 : t_From ((t_I16)) ((t_I8)) := + { + From_impl_20_f_from := fun (x : t_I8)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_513826093 : t_From ((t_I32)) ((t_I8)) := + { + From_impl_21_f_from := fun (x : t_I8)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_843443999 : t_From ((t_I64)) ((t_I8)) := + { + From_impl_22_f_from := fun (x : t_I8)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_532428771 : t_From ((t_I128)) ((t_I8)) := + { + From_impl_23_f_from := fun (x : t_I8)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_PartialEq_594648758 : t_PartialEq ((t_I8)) ((t_I8)) := + { + PartialEq_impl_108_f_eq := fun (self : t_I8) (rhs : t_I8)=> + PartialEq_f_eq (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_impl_108_f_ne := fun (self : t_I8) (rhs : t_I8)=> + PartialEq_f_ne (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + }. + +Instance t_PartialOrd_221919414 : t_PartialOrd ((t_I8)) ((t_I8)) := + { + PartialOrd_impl_109_f_partial_cmp := fun (self : t_I8) (rhs : t_I8)=> + Option_Some (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); + PartialOrd_impl_109_f_lt := fun (self : t_I8) (rhs : t_I8)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less => + true + | _ => + false + end; + PartialOrd_impl_109_f_le := fun (self : t_I8) (rhs : t_I8)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less + | Ordering_Equal => + true + | _ => + false + end; + PartialOrd_impl_109_f_gt := fun (self : t_I8) (rhs : t_I8)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater => + true + | _ => + false + end; + PartialOrd_impl_109_f_ge := fun (self : t_I8) (rhs : t_I8)=> + match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater + | Ordering_Equal => + true + | _ => + false + end; + }. + +Instance t_Abstraction_133243863 : t_Abstraction ((t_U128)) := + { + Abstraction_impl_112_f_AbstractType := t_HaxInt; + Abstraction_impl_112_f_lift := fun (self : t_U128)=> + U128_f_v self; + }. + +Instance t_PartialEq_792968920 : t_PartialEq ((t_U128)) ((t_U128)) := + { + PartialEq_impl_135_f_eq := fun (self : t_U128) (rhs : t_U128)=> + PartialEq_f_eq (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_impl_135_f_ne := fun (self : t_U128) (rhs : t_U128)=> + PartialEq_f_ne (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + }. + +Instance t_PartialOrd_168269581 : t_PartialOrd ((t_U128)) ((t_U128)) := + { + PartialOrd_impl_136_f_partial_cmp := fun (self : t_U128) (rhs : t_U128)=> + Option_Some (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); + PartialOrd_impl_136_f_lt := fun (self : t_U128) (rhs : t_U128)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less => + true + | _ => + false + end; + PartialOrd_impl_136_f_le := fun (self : t_U128) (rhs : t_U128)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less + | Ordering_Equal => + true + | _ => + false + end; + PartialOrd_impl_136_f_gt := fun (self : t_U128) (rhs : t_U128)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater => + true + | _ => + false + end; + PartialOrd_impl_136_f_ge := fun (self : t_U128) (rhs : t_U128)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater + | Ordering_Equal => + true + | _ => + false + end; + }. + +Instance t_Abstraction_219241396 : t_Abstraction ((t_U64)) := + { + Abstraction_impl_139_f_AbstractType := t_HaxInt; + Abstraction_impl_139_f_lift := fun (self : t_U64)=> + U64_f_v self; + }. + +Instance t_PartialEq_162514109 : t_PartialEq ((t_U64)) ((t_U64)) := + { + PartialEq_impl_162_f_eq := fun (self : t_U64) (rhs : t_U64)=> + PartialEq_f_eq (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_impl_162_f_ne := fun (self : t_U64) (rhs : t_U64)=> + PartialEq_f_ne (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + }. + +Instance t_PartialOrd_210240032 : t_PartialOrd ((t_U64)) ((t_U64)) := + { + PartialOrd_impl_163_f_partial_cmp := fun (self : t_U64) (rhs : t_U64)=> + Option_Some (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); + PartialOrd_impl_163_f_lt := fun (self : t_U64) (rhs : t_U64)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less => + true + | _ => + false + end; + PartialOrd_impl_163_f_le := fun (self : t_U64) (rhs : t_U64)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less + | Ordering_Equal => + true + | _ => + false + end; + PartialOrd_impl_163_f_gt := fun (self : t_U64) (rhs : t_U64)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater => + true + | _ => + false + end; + PartialOrd_impl_163_f_ge := fun (self : t_U64) (rhs : t_U64)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater + | Ordering_Equal => + true + | _ => + false + end; + }. + +Instance t_Abstraction_517050128 : t_Abstraction ((t_U32)) := + { + Abstraction_impl_166_f_AbstractType := t_HaxInt; + Abstraction_impl_166_f_lift := fun (self : t_U32)=> + U32_f_v self; + }. + +Instance t_PartialEq_894496962 : t_PartialEq ((t_U32)) ((t_U32)) := + { + PartialEq_impl_189_f_eq := fun (self : t_U32) (rhs : t_U32)=> + PartialEq_f_eq (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_impl_189_f_ne := fun (self : t_U32) (rhs : t_U32)=> + PartialEq_f_ne (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + }. + +Instance t_PartialOrd_534404445 : t_PartialOrd ((t_U32)) ((t_U32)) := + { + PartialOrd_impl_190_f_partial_cmp := fun (self : t_U32) (rhs : t_U32)=> + Option_Some (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); + PartialOrd_impl_190_f_lt := fun (self : t_U32) (rhs : t_U32)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less => + true + | _ => + false + end; + PartialOrd_impl_190_f_le := fun (self : t_U32) (rhs : t_U32)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less + | Ordering_Equal => + true + | _ => + false + end; + PartialOrd_impl_190_f_gt := fun (self : t_U32) (rhs : t_U32)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater => + true + | _ => + false + end; + PartialOrd_impl_190_f_ge := fun (self : t_U32) (rhs : t_U32)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater + | Ordering_Equal => + true + | _ => + false + end; + }. + +Instance t_Abstraction_994821584 : t_Abstraction ((t_U16)) := + { + Abstraction_impl_193_f_AbstractType := t_HaxInt; + Abstraction_impl_193_f_lift := fun (self : t_U16)=> + U16_f_v self; + }. + +Instance t_PartialEq_603208302 : t_PartialEq ((t_U16)) ((t_U16)) := + { + PartialEq_impl_216_f_eq := fun (self : t_U16) (rhs : t_U16)=> + PartialEq_f_eq (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_impl_216_f_ne := fun (self : t_U16) (rhs : t_U16)=> + PartialEq_f_ne (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + }. + +Instance t_PartialOrd_595325431 : t_PartialOrd ((t_U16)) ((t_U16)) := + { + PartialOrd_impl_217_f_partial_cmp := fun (self : t_U16) (rhs : t_U16)=> + Option_Some (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); + PartialOrd_impl_217_f_lt := fun (self : t_U16) (rhs : t_U16)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less => + true + | _ => + false + end; + PartialOrd_impl_217_f_le := fun (self : t_U16) (rhs : t_U16)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less + | Ordering_Equal => + true + | _ => + false + end; + PartialOrd_impl_217_f_gt := fun (self : t_U16) (rhs : t_U16)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater => + true + | _ => + false + end; + PartialOrd_impl_217_f_ge := fun (self : t_U16) (rhs : t_U16)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater + | Ordering_Equal => + true + | _ => + false + end; + }. + +Instance t_Abstraction_789996186 : t_Abstraction ((t_U8)) := + { + Abstraction_impl_220_f_AbstractType := t_HaxInt; + Abstraction_impl_220_f_lift := fun (self : t_U8)=> + U8_f_v self; + }. + +Instance t_PartialEq_774173636 : t_PartialEq ((t_U8)) ((t_U8)) := + { + PartialEq_impl_243_f_eq := fun (self : t_U8) (rhs : t_U8)=> + PartialEq_f_eq (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_impl_243_f_ne := fun (self : t_U8) (rhs : t_U8)=> + PartialEq_f_ne (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + }. + +Instance t_PartialOrd_577399304 : t_PartialOrd ((t_U8)) ((t_U8)) := + { + PartialOrd_impl_244_f_partial_cmp := fun (self : t_U8) (rhs : t_U8)=> + Option_Some (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); + PartialOrd_impl_244_f_lt := fun (self : t_U8) (rhs : t_U8)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less => + true + | _ => + false + end; + PartialOrd_impl_244_f_le := fun (self : t_U8) (rhs : t_U8)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Less + | Ordering_Equal => + true + | _ => + false + end; + PartialOrd_impl_244_f_gt := fun (self : t_U8) (rhs : t_U8)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater => + true + | _ => + false + end; + PartialOrd_impl_244_f_ge := fun (self : t_U8) (rhs : t_U8)=> + match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with + | Ordering_Greater + | Ordering_Equal => + true + | _ => + false + end; + }. + +Instance t_Neg_375517228 : t_Neg ((t_I128)) := + { + Neg_impl_48_f_Output := t_I128; + Neg_impl_48_f_neg := fun (self : t_I128)=> + Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); + }. + +Instance t_BitOr_938342430 : t_BitOr ((t_I128)) ((t_I128)) := + { + BitOr_impl_50_f_Output := t_I128; + BitOr_impl_50_f_bitor := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_210530286 : t_Neg ((t_I64)) := + { + Neg_impl_62_f_Output := t_I64; + Neg_impl_62_f_neg := fun (self : t_I64)=> + Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); + }. + +Instance t_BitOr_329754853 : t_BitOr ((t_I64)) ((t_I64)) := + { + BitOr_impl_64_f_Output := t_I64; + BitOr_impl_64_f_bitor := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_104016941 : t_Neg ((t_I32)) := + { + Neg_impl_76_f_Output := t_I32; + Neg_impl_76_f_neg := fun (self : t_I32)=> + Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); + }. + +Instance t_BitOr_840483685 : t_BitOr ((t_I32)) ((t_I32)) := + { + BitOr_impl_78_f_Output := t_I32; + BitOr_impl_78_f_bitor := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_1063990797 : t_Neg ((t_I16)) := + { + Neg_impl_90_f_Output := t_I16; + Neg_impl_90_f_neg := fun (self : t_I16)=> + Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); + }. + +Instance t_BitOr_450806124 : t_BitOr ((t_I16)) ((t_I16)) := + { + BitOr_impl_92_f_Output := t_I16; + BitOr_impl_92_f_bitor := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_979719905 : t_Neg ((t_I8)) := + { + Neg_impl_104_f_Output := t_I8; + Neg_impl_104_f_neg := fun (self : t_I8)=> + Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); + }. + +Instance t_BitOr_828862178 : t_BitOr ((t_I8)) ((t_I8)) := + { + BitOr_impl_106_f_Output := t_I8; + BitOr_impl_106_f_bitor := fun (self : t_I8) (rhs : t_I8)=> + Concretization_f_concretize (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Add_749575336 : t_Add ((t_I128)) ((t_I128)) := + { + Add_impl_46_f_Output := t_I128; + Add_impl_46_f_add := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Sub_800692471 : t_Sub ((t_I128)) ((t_I128)) := + { + Sub_impl_49_f_Output := t_I128; + Sub_impl_49_f_sub := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Add_87367909 : t_Add ((t_I64)) ((t_I64)) := + { + Add_impl_60_f_Output := t_I64; + Add_impl_60_f_add := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Sub_741383133 : t_Sub ((t_I64)) ((t_I64)) := + { + Sub_impl_63_f_Output := t_I64; + Sub_impl_63_f_sub := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Add_574043038 : t_Add ((t_I32)) ((t_I32)) := + { + Add_impl_74_f_Output := t_I32; + Add_impl_74_f_add := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Sub_699874712 : t_Sub ((t_I32)) ((t_I32)) := + { + Sub_impl_77_f_Output := t_I32; + Sub_impl_77_f_sub := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Add_413164706 : t_Add ((t_I16)) ((t_I16)) := + { + Add_impl_88_f_Output := t_I16; + Add_impl_88_f_add := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Sub_544358249 : t_Sub ((t_I16)) ((t_I16)) := + { + Sub_impl_91_f_Output := t_I16; + Sub_impl_91_f_sub := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Add_335735231 : t_Add ((t_I8)) ((t_I8)) := + { + Add_impl_102_f_Output := t_I8; + Add_impl_102_f_add := fun (self : t_I8) (rhs : t_I8)=> + Concretization_f_concretize (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Sub_257575332 : t_Sub ((t_I8)) ((t_I8)) := + { + Sub_impl_105_f_Output := t_I8; + Sub_impl_105_f_sub := fun (self : t_I8) (rhs : t_I8)=> + Concretization_f_concretize (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Concretization_943450188 : t_Concretization ((t_HaxInt)) ((t_U128)) := + { + Concretization_impl_113_f_concretize := fun (self : t_HaxInt)=> + Build_t_U128 (haxint_rem (self) (v_WORDSIZE_128_)); + }. + +Instance t_From_355161674 : t_From ((t_U128)) ((t_U8)) := + { + From_impl_3_f_from := fun (x : t_U8)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_739905379 : t_From ((t_U128)) ((t_U16)) := + { + From_impl_7_f_from := fun (x : t_U16)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_487010006 : t_From ((t_U128)) ((t_U32)) := + { + From_impl_11_f_from := fun (x : t_U32)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_665417617 : t_From ((t_U128)) ((t_U64)) := + { + From_impl_15_f_from := fun (x : t_U64)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_Concretization_10977439 : t_Concretization ((t_HaxInt)) ((t_U64)) := + { + Concretization_impl_140_f_concretize := fun (self : t_HaxInt)=> + Build_t_U64 (haxint_rem (self) (v_WORDSIZE_64_)); + }. + +Instance t_From_746191059 : t_From ((t_U64)) ((t_U8)) := + { + From_impl_2_f_from := fun (x : t_U8)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_598353876 : t_From ((t_U64)) ((t_U16)) := + { + From_impl_6_f_from := fun (x : t_U16)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_293255347 : t_From ((t_U64)) ((t_U32)) := + { + From_impl_10_f_from := fun (x : t_U32)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_478031507 : t_From ((t_U64)) ((t_U128)) := + { + From_impl_19_f_from := fun (x : t_U128)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_Concretization_264065114 : t_Concretization ((t_HaxInt)) ((t_U32)) := + { + Concretization_impl_167_f_concretize := fun (self : t_HaxInt)=> + Build_t_U32 (haxint_rem (self) (v_WORDSIZE_32_)); + }. + +Instance t_From_675834555 : t_From ((t_U32)) ((t_U8)) := + { + From_impl_1_f_from := fun (x : t_U8)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_410569540 : t_From ((t_U32)) ((t_U16)) := + { + From_impl_5_f_from := fun (x : t_U16)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_616913228 : t_From ((t_U32)) ((t_U64)) := + { + From_impl_14_f_from := fun (x : t_U64)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_376625380 : t_From ((t_U32)) ((t_U128)) := + { + From_impl_18_f_from := fun (x : t_U128)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_Concretization_656994795 : t_Concretization ((t_HaxInt)) ((t_U16)) := + { + Concretization_impl_194_f_concretize := fun (self : t_HaxInt)=> + Build_t_U16 (haxint_rem (self) (v_WORDSIZE_16_)); + }. + +Instance t_From_352276566 : t_From ((t_U16)) ((t_U8)) := + { + From_impl_f_from := fun (x : t_U8)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_699842532 : t_From ((t_U16)) ((t_U32)) := + { + From_impl_9_f_from := fun (x : t_U32)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_326646767 : t_From ((t_U16)) ((t_U64)) := + { + From_impl_13_f_from := fun (x : t_U64)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_604186294 : t_From ((t_U16)) ((t_U128)) := + { + From_impl_17_f_from := fun (x : t_U128)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_Concretization_492312374 : t_Concretization ((t_HaxInt)) ((t_U8)) := + { + Concretization_impl_221_f_concretize := fun (self : t_HaxInt)=> + Build_t_U8 (haxint_rem (self) (v_WORDSIZE_8_)); + }. + +Instance t_From_374313775 : t_From ((t_U8)) ((t_U16)) := + { + From_impl_4_f_from := fun (x : t_U16)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_42776580 : t_From ((t_U8)) ((t_U32)) := + { + From_impl_8_f_from := fun (x : t_U32)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_480314375 : t_From ((t_U8)) ((t_U64)) := + { + From_impl_12_f_from := fun (x : t_U64)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_From_135782329 : t_From ((t_U8)) ((t_U128)) := + { + From_impl_16_f_from := fun (x : t_U128)=> + Concretization_f_concretize (Abstraction_f_lift (x)); + }. + +Instance t_Mul_180009375 : t_Mul ((t_I128)) ((t_I128)) := + { + Mul_impl_44_f_Output := t_I128; + Mul_impl_44_f_mul := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Mul_1051209688 : t_Mul ((t_I64)) ((t_I64)) := + { + Mul_impl_58_f_Output := t_I64; + Mul_impl_58_f_mul := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Mul_481497752 : t_Mul ((t_I32)) ((t_I32)) := + { + Mul_impl_72_f_Output := t_I32; + Mul_impl_72_f_mul := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Mul_768005208 : t_Mul ((t_I16)) ((t_I16)) := + { + Mul_impl_86_f_Output := t_I16; + Mul_impl_86_f_mul := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Mul_1057691929 : t_Mul ((t_I8)) ((t_I8)) := + { + Mul_impl_100_f_Output := t_I8; + Mul_impl_100_f_mul := fun (self : t_I8) (rhs : t_I8)=> + Concretization_f_concretize (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_200638412 : t_Neg ((t_U128)) := + { + Neg_impl_114_f_Output := t_U128; + Neg_impl_114_f_neg := fun (self : t_U128)=> + Concretization_f_concretize (haxint_sub (v_WORDSIZE_128_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_128_))); + }. + +Instance t_Mul_508073751 : t_Mul ((t_U128)) ((t_U128)) := + { + Mul_impl_117_f_Output := t_U128; + Mul_impl_117_f_mul := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_184769952 : t_Rem ((t_U128)) ((t_U128)) := + { + Rem_impl_118_f_Output := t_U128; + Rem_impl_118_f_rem := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Add_74062568 : t_Add ((t_U128)) ((t_U128)) := + { + Add_impl_119_f_Output := t_U128; + Add_impl_119_f_add := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Div_697142148 : t_Div ((t_U128)) ((t_U128)) := + { + Div_impl_120_f_Output := t_U128; + Div_impl_120_f_div := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_912131656 : t_Shl ((t_U128)) ((t_U8)) := + { + Shl_impl_121_f_Output := t_U128; + Shl_impl_121_f_shl := fun (self : t_U128) (rhs : t_U8)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_188720840 : t_Shl ((t_U128)) ((t_U16)) := + { + Shl_impl_122_f_Output := t_U128; + Shl_impl_122_f_shl := fun (self : t_U128) (rhs : t_U16)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_674581806 : t_Shl ((t_U128)) ((t_U32)) := + { + Shl_impl_123_f_Output := t_U128; + Shl_impl_123_f_shl := fun (self : t_U128) (rhs : t_U32)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_230523808 : t_Shl ((t_U128)) ((t_U64)) := + { + Shl_impl_124_f_Output := t_U128; + Shl_impl_124_f_shl := fun (self : t_U128) (rhs : t_U64)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_304350501 : t_Shl ((t_U128)) ((t_U128)) := + { + Shl_impl_125_f_Output := t_U128; + Shl_impl_125_f_shl := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_584068908 : t_Shr ((t_U128)) ((t_U8)) := + { + Shr_impl_126_f_Output := t_U128; + Shr_impl_126_f_shr := fun (self : t_U128) (rhs : t_U8)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_73833277 : t_Shr ((t_U128)) ((t_U16)) := + { + Shr_impl_127_f_Output := t_U128; + Shr_impl_127_f_shr := fun (self : t_U128) (rhs : t_U16)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_50912121 : t_Shr ((t_U128)) ((t_U32)) := + { + Shr_impl_128_f_Output := t_U128; + Shr_impl_128_f_shr := fun (self : t_U128) (rhs : t_U32)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_282345299 : t_Shr ((t_U128)) ((t_U64)) := + { + Shr_impl_129_f_Output := t_U128; + Shr_impl_129_f_shr := fun (self : t_U128) (rhs : t_U64)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_354892033 : t_Shr ((t_U128)) ((t_U128)) := + { + Shr_impl_130_f_Output := t_U128; + Shr_impl_130_f_shr := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitXor_457452962 : t_BitXor ((t_U128)) ((t_U128)) := + { + BitXor_impl_131_f_Output := t_U128; + BitXor_impl_131_f_bitxor := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitAnd_499214249 : t_BitAnd ((t_U128)) ((t_U128)) := + { + BitAnd_impl_132_f_Output := t_U128; + BitAnd_impl_132_f_bitand := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitOr_579754702 : t_BitOr ((t_U128)) ((t_U128)) := + { + BitOr_impl_133_f_Output := t_U128; + BitOr_impl_133_f_bitor := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_338880159 : t_Neg ((t_U64)) := + { + Neg_impl_141_f_Output := t_U64; + Neg_impl_141_f_neg := fun (self : t_U64)=> + Concretization_f_concretize (haxint_sub (v_WORDSIZE_64_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_64_))); + }. + +Instance t_Mul_785129859 : t_Mul ((t_U64)) ((t_U64)) := + { + Mul_impl_144_f_Output := t_U64; + Mul_impl_144_f_mul := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_450198244 : t_Rem ((t_U64)) ((t_U64)) := + { + Rem_impl_145_f_Output := t_U64; + Rem_impl_145_f_rem := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Add_880469818 : t_Add ((t_U64)) ((t_U64)) := + { + Add_impl_146_f_Output := t_U64; + Add_impl_146_f_add := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Div_1065913959 : t_Div ((t_U64)) ((t_U64)) := + { + Div_impl_147_f_Output := t_U64; + Div_impl_147_f_div := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_307107617 : t_Shl ((t_U64)) ((t_U8)) := + { + Shl_impl_148_f_Output := t_U64; + Shl_impl_148_f_shl := fun (self : t_U64) (rhs : t_U8)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_521831749 : t_Shl ((t_U64)) ((t_U16)) := + { + Shl_impl_149_f_Output := t_U64; + Shl_impl_149_f_shl := fun (self : t_U64) (rhs : t_U16)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_243646433 : t_Shl ((t_U64)) ((t_U32)) := + { + Shl_impl_150_f_Output := t_U64; + Shl_impl_150_f_shl := fun (self : t_U64) (rhs : t_U32)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_732371970 : t_Shl ((t_U64)) ((t_U64)) := + { + Shl_impl_151_f_Output := t_U64; + Shl_impl_151_f_shl := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_362455113 : t_Shl ((t_U64)) ((t_U128)) := + { + Shl_impl_152_f_Output := t_U64; + Shl_impl_152_f_shl := fun (self : t_U64) (rhs : t_U128)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_675607391 : t_Shr ((t_U64)) ((t_U8)) := + { + Shr_impl_153_f_Output := t_U64; + Shr_impl_153_f_shr := fun (self : t_U64) (rhs : t_U8)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_163042579 : t_Shr ((t_U64)) ((t_U16)) := + { + Shr_impl_154_f_Output := t_U64; + Shr_impl_154_f_shr := fun (self : t_U64) (rhs : t_U16)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_329072619 : t_Shr ((t_U64)) ((t_U32)) := + { + Shr_impl_155_f_Output := t_U64; + Shr_impl_155_f_shr := fun (self : t_U64) (rhs : t_U32)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_1046321056 : t_Shr ((t_U64)) ((t_U64)) := + { + Shr_impl_156_f_Output := t_U64; + Shr_impl_156_f_shr := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_1027159812 : t_Shr ((t_U64)) ((t_U128)) := + { + Shr_impl_157_f_Output := t_U64; + Shr_impl_157_f_shr := fun (self : t_U64) (rhs : t_U128)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitXor_771705591 : t_BitXor ((t_U64)) ((t_U64)) := + { + BitXor_impl_158_f_Output := t_U64; + BitXor_impl_158_f_bitxor := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitAnd_61309855 : t_BitAnd ((t_U64)) ((t_U64)) := + { + BitAnd_impl_159_f_Output := t_U64; + BitAnd_impl_159_f_bitand := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitOr_584478327 : t_BitOr ((t_U64)) ((t_U64)) := + { + BitOr_impl_160_f_Output := t_U64; + BitOr_impl_160_f_bitor := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_660092460 : t_Neg ((t_U32)) := + { + Neg_impl_168_f_Output := t_U32; + Neg_impl_168_f_neg := fun (self : t_U32)=> + Concretization_f_concretize (haxint_sub (v_WORDSIZE_32_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_32_))); + }. + +Instance t_Mul_907086750 : t_Mul ((t_U32)) ((t_U32)) := + { + Mul_impl_171_f_Output := t_U32; + Mul_impl_171_f_mul := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_754047547 : t_Rem ((t_U32)) ((t_U32)) := + { + Rem_impl_172_f_Output := t_U32; + Rem_impl_172_f_rem := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Add_62760194 : t_Add ((t_U32)) ((t_U32)) := + { + Add_impl_173_f_Output := t_U32; + Add_impl_173_f_add := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Div_1036065219 : t_Div ((t_U32)) ((t_U32)) := + { + Div_impl_174_f_Output := t_U32; + Div_impl_174_f_div := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_940272829 : t_Shl ((t_U32)) ((t_U8)) := + { + Shl_impl_175_f_Output := t_U32; + Shl_impl_175_f_shl := fun (self : t_U32) (rhs : t_U8)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_184065944 : t_Shl ((t_U32)) ((t_U16)) := + { + Shl_impl_176_f_Output := t_U32; + Shl_impl_176_f_shl := fun (self : t_U32) (rhs : t_U16)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_512141775 : t_Shl ((t_U32)) ((t_U32)) := + { + Shl_impl_177_f_Output := t_U32; + Shl_impl_177_f_shl := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_760382167 : t_Shl ((t_U32)) ((t_U64)) := + { + Shl_impl_178_f_Output := t_U32; + Shl_impl_178_f_shl := fun (self : t_U32) (rhs : t_U64)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_938844716 : t_Shl ((t_U32)) ((t_U128)) := + { + Shl_impl_179_f_Output := t_U32; + Shl_impl_179_f_shl := fun (self : t_U32) (rhs : t_U128)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_376401556 : t_Shr ((t_U32)) ((t_U8)) := + { + Shr_impl_180_f_Output := t_U32; + Shr_impl_180_f_shr := fun (self : t_U32) (rhs : t_U8)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_816225657 : t_Shr ((t_U32)) ((t_U16)) := + { + Shr_impl_181_f_Output := t_U32; + Shr_impl_181_f_shr := fun (self : t_U32) (rhs : t_U16)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_131570199 : t_Shr ((t_U32)) ((t_U32)) := + { + Shr_impl_182_f_Output := t_U32; + Shr_impl_182_f_shr := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_643141508 : t_Shr ((t_U32)) ((t_U64)) := + { + Shr_impl_183_f_Output := t_U32; + Shr_impl_183_f_shr := fun (self : t_U32) (rhs : t_U64)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_472576920 : t_Shr ((t_U32)) ((t_U128)) := + { + Shr_impl_184_f_Output := t_U32; + Shr_impl_184_f_shr := fun (self : t_U32) (rhs : t_U128)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitXor_568575701 : t_BitXor ((t_U32)) ((t_U32)) := + { + BitXor_impl_185_f_Output := t_U32; + BitXor_impl_185_f_bitxor := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitAnd_188629984 : t_BitAnd ((t_U32)) ((t_U32)) := + { + BitAnd_impl_186_f_Output := t_U32; + BitAnd_impl_186_f_bitand := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitOr_727300711 : t_BitOr ((t_U32)) ((t_U32)) := + { + BitOr_impl_187_f_Output := t_U32; + BitOr_impl_187_f_bitor := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_524209972 : t_Neg ((t_U16)) := + { + Neg_impl_195_f_Output := t_U16; + Neg_impl_195_f_neg := fun (self : t_U16)=> + Concretization_f_concretize (haxint_sub (v_WORDSIZE_16_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_16_))); + }. + +Instance t_Mul_813798593 : t_Mul ((t_U16)) ((t_U16)) := + { + Mul_impl_198_f_Output := t_U16; + Mul_impl_198_f_mul := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_1023129312 : t_Rem ((t_U16)) ((t_U16)) := + { + Rem_impl_199_f_Output := t_U16; + Rem_impl_199_f_rem := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Add_669194837 : t_Add ((t_U16)) ((t_U16)) := + { + Add_impl_200_f_Output := t_U16; + Add_impl_200_f_add := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Div_599727096 : t_Div ((t_U16)) ((t_U16)) := + { + Div_impl_201_f_Output := t_U16; + Div_impl_201_f_div := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_254354835 : t_Shl ((t_U16)) ((t_U8)) := + { + Shl_impl_202_f_Output := t_U16; + Shl_impl_202_f_shl := fun (self : t_U16) (rhs : t_U8)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_786190756 : t_Shl ((t_U16)) ((t_U16)) := + { + Shl_impl_203_f_Output := t_U16; + Shl_impl_203_f_shl := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_961613024 : t_Shl ((t_U16)) ((t_U32)) := + { + Shl_impl_204_f_Output := t_U16; + Shl_impl_204_f_shl := fun (self : t_U16) (rhs : t_U32)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_699049796 : t_Shl ((t_U16)) ((t_U64)) := + { + Shl_impl_205_f_Output := t_U16; + Shl_impl_205_f_shl := fun (self : t_U16) (rhs : t_U64)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_98667823 : t_Shl ((t_U16)) ((t_U128)) := + { + Shl_impl_206_f_Output := t_U16; + Shl_impl_206_f_shl := fun (self : t_U16) (rhs : t_U128)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_116990915 : t_Shr ((t_U16)) ((t_U8)) := + { + Shr_impl_207_f_Output := t_U16; + Shr_impl_207_f_shr := fun (self : t_U16) (rhs : t_U8)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_53270962 : t_Shr ((t_U16)) ((t_U16)) := + { + Shr_impl_208_f_Output := t_U16; + Shr_impl_208_f_shr := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_622272332 : t_Shr ((t_U16)) ((t_U32)) := + { + Shr_impl_209_f_Output := t_U16; + Shr_impl_209_f_shr := fun (self : t_U16) (rhs : t_U32)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_1061476863 : t_Shr ((t_U16)) ((t_U64)) := + { + Shr_impl_210_f_Output := t_U16; + Shr_impl_210_f_shr := fun (self : t_U16) (rhs : t_U64)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_148349277 : t_Shr ((t_U16)) ((t_U128)) := + { + Shr_impl_211_f_Output := t_U16; + Shr_impl_211_f_shr := fun (self : t_U16) (rhs : t_U128)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitXor_39308972 : t_BitXor ((t_U16)) ((t_U16)) := + { + BitXor_impl_212_f_Output := t_U16; + BitXor_impl_212_f_bitxor := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitAnd_100986953 : t_BitAnd ((t_U16)) ((t_U16)) := + { + BitAnd_impl_213_f_Output := t_U16; + BitAnd_impl_213_f_bitand := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitOr_321212552 : t_BitOr ((t_U16)) ((t_U16)) := + { + BitOr_impl_214_f_Output := t_U16; + BitOr_impl_214_f_bitor := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Neg_410091205 : t_Neg ((t_U8)) := + { + Neg_impl_222_f_Output := t_U8; + Neg_impl_222_f_neg := fun (self : t_U8)=> + Concretization_f_concretize (haxint_sub (v_WORDSIZE_8_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_8_))); + }. + +Instance t_Mul_116494850 : t_Mul ((t_U8)) ((t_U8)) := + { + Mul_impl_225_f_Output := t_U8; + Mul_impl_225_f_mul := fun (self : t_U8) (rhs : t_U8)=> + Concretization_f_concretize (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_674469245 : t_Rem ((t_U8)) ((t_U8)) := + { + Rem_impl_226_f_Output := t_U8; + Rem_impl_226_f_rem := fun (self : t_U8) (rhs : t_U8)=> + Concretization_f_concretize (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Add_886374338 : t_Add ((t_U8)) ((t_U8)) := + { + Add_impl_227_f_Output := t_U8; + Add_impl_227_f_add := fun (self : t_U8) (rhs : t_U8)=> + Concretization_f_concretize (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Div_7559770 : t_Div ((t_U8)) ((t_U8)) := + { + Div_impl_228_f_Output := t_U8; + Div_impl_228_f_div := fun (self : t_U8) (rhs : t_U8)=> + Concretization_f_concretize (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_889664521 : t_Shl ((t_U8)) ((t_U8)) := + { + Shl_impl_229_f_Output := t_U8; + Shl_impl_229_f_shl := fun (self : t_U8) (rhs : t_U8)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_268581730 : t_Shl ((t_U8)) ((t_U16)) := + { + Shl_impl_230_f_Output := t_U8; + Shl_impl_230_f_shl := fun (self : t_U8) (rhs : t_U16)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_833473770 : t_Shl ((t_U8)) ((t_U32)) := + { + Shl_impl_231_f_Output := t_U8; + Shl_impl_231_f_shl := fun (self : t_U8) (rhs : t_U32)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_896563459 : t_Shl ((t_U8)) ((t_U64)) := + { + Shl_impl_232_f_Output := t_U8; + Shl_impl_232_f_shl := fun (self : t_U8) (rhs : t_U64)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shl_595294021 : t_Shl ((t_U8)) ((t_U128)) := + { + Shl_impl_233_f_Output := t_U8; + Shl_impl_233_f_shl := fun (self : t_U8) (rhs : t_U128)=> + Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_467626732 : t_Shr ((t_U8)) ((t_U8)) := + { + Shr_impl_234_f_Output := t_U8; + Shr_impl_234_f_shr := fun (self : t_U8) (rhs : t_U8)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_985367369 : t_Shr ((t_U8)) ((t_U16)) := + { + Shr_impl_235_f_Output := t_U8; + Shr_impl_235_f_shr := fun (self : t_U8) (rhs : t_U16)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_868101800 : t_Shr ((t_U8)) ((t_U32)) := + { + Shr_impl_236_f_Output := t_U8; + Shr_impl_236_f_shr := fun (self : t_U8) (rhs : t_U32)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_300023283 : t_Shr ((t_U8)) ((t_U64)) := + { + Shr_impl_237_f_Output := t_U8; + Shr_impl_237_f_shr := fun (self : t_U8) (rhs : t_U64)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Shr_794091640 : t_Shr ((t_U8)) ((t_U128)) := + { + Shr_impl_238_f_Output := t_U8; + Shr_impl_238_f_shr := fun (self : t_U8) (rhs : t_U128)=> + Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitXor_24738444 : t_BitXor ((t_U8)) ((t_U8)) := + { + BitXor_impl_239_f_Output := t_U8; + BitXor_impl_239_f_bitxor := fun (self : t_U8) (rhs : t_U8)=> + Concretization_f_concretize (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitAnd_358790390 : t_BitAnd ((t_U8)) ((t_U8)) := + { + BitAnd_impl_240_f_Output := t_U8; + BitAnd_impl_240_f_bitand := fun (self : t_U8) (rhs : t_U8)=> + Concretization_f_concretize (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_BitOr_349401480 : t_BitOr ((t_U8)) ((t_U8)) := + { + BitOr_impl_241_f_Output := t_U8; + BitOr_impl_241_f_bitor := fun (self : t_U8) (rhs : t_U8)=> + Concretization_f_concretize (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_998027599 : t_Rem ((t_I128)) ((t_I128)) := + { + Rem_impl_45_f_Output := t_I128; + Rem_impl_45_f_rem := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Div_865866956 : t_Div ((t_I128)) ((t_I128)) := + { + Div_impl_47_f_Output := t_I128; + Div_impl_47_f_div := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_957489424 : t_Rem ((t_I64)) ((t_I64)) := + { + Rem_impl_59_f_Output := t_I64; + Rem_impl_59_f_rem := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Div_611785525 : t_Div ((t_I64)) ((t_I64)) := + { + Div_impl_61_f_Output := t_I64; + Div_impl_61_f_div := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_219303214 : t_Rem ((t_I32)) ((t_I32)) := + { + Rem_impl_73_f_Output := t_I32; + Rem_impl_73_f_rem := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Div_1002924104 : t_Div ((t_I32)) ((t_I32)) := + { + Div_impl_75_f_Output := t_I32; + Div_impl_75_f_div := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_948867246 : t_Rem ((t_I16)) ((t_I16)) := + { + Rem_impl_87_f_Output := t_I16; + Rem_impl_87_f_rem := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Div_357493436 : t_Div ((t_I16)) ((t_I16)) := + { + Div_impl_89_f_Output := t_I16; + Div_impl_89_f_div := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Rem_228000167 : t_Rem ((t_I8)) ((t_I8)) := + { + Rem_impl_101_f_Output := t_I8; + Rem_impl_101_f_rem := fun (self : t_I8) (rhs : t_I8)=> + Concretization_f_concretize (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Div_470010025 : t_Div ((t_I8)) ((t_I8)) := + { + Div_impl_103_f_Output := t_I8; + Div_impl_103_f_div := fun (self : t_I8) (rhs : t_I8)=> + Concretization_f_concretize (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + }. + +Instance t_Sub_1018502693 : t_Sub ((t_U128)) ((t_U128)) := + { + Sub_impl_115_f_Output := t_U128; + Sub_impl_115_f_sub := fun (self : t_U128) (rhs : t_U128)=> + Add_f_add (self) (Neg_f_neg (rhs)); + }. + +Instance t_Not_758360759 : t_Not ((t_U128)) := + { + Not_impl_116_f_Output := t_U128; + Not_impl_116_f_not := fun (self : t_U128)=> + BitXor_f_bitxor (self) (Constants_f_MAX); + }. + +Instance t_Sub_919216830 : t_Sub ((t_U64)) ((t_U64)) := + { + Sub_impl_142_f_Output := t_U64; + Sub_impl_142_f_sub := fun (self : t_U64) (rhs : t_U64)=> + Add_f_add (self) (Neg_f_neg (rhs)); + }. + +Instance t_Not_693249901 : t_Not ((t_U64)) := + { + Not_impl_143_f_Output := t_U64; + Not_impl_143_f_not := fun (self : t_U64)=> + BitXor_f_bitxor (self) (Constants_f_MAX); + }. + +Instance t_Sub_22623594 : t_Sub ((t_U32)) ((t_U32)) := + { + Sub_impl_169_f_Output := t_U32; + Sub_impl_169_f_sub := fun (self : t_U32) (rhs : t_U32)=> + Add_f_add (self) (Neg_f_neg (rhs)); + }. + +Instance t_Not_183316157 : t_Not ((t_U32)) := + { + Not_impl_170_f_Output := t_U32; + Not_impl_170_f_not := fun (self : t_U32)=> + BitXor_f_bitxor (self) (Constants_f_MAX); + }. + +Instance t_Sub_502320750 : t_Sub ((t_U16)) ((t_U16)) := + { + Sub_impl_196_f_Output := t_U16; + Sub_impl_196_f_sub := fun (self : t_U16) (rhs : t_U16)=> + Add_f_add (self) (Neg_f_neg (rhs)); + }. + +Instance t_Not_669226601 : t_Not ((t_U16)) := + { + Not_impl_197_f_Output := t_U16; + Not_impl_197_f_not := fun (self : t_U16)=> + BitXor_f_bitxor (self) (Constants_f_MAX); + }. + +Instance t_Sub_299023787 : t_Sub ((t_U8)) ((t_U8)) := + { + Sub_impl_223_f_Output := t_U8; + Sub_impl_223_f_sub := fun (self : t_U8) (rhs : t_U8)=> + Add_f_add (self) (Neg_f_neg (rhs)); + }. + +Instance t_Not_761019181 : t_Not ((t_U8)) := + { + Not_impl_224_f_Output := t_U8; + Not_impl_224_f_not := fun (self : t_U8)=> + BitXor_f_bitxor (self) (Constants_f_MAX); + }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I128_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I128_proofs.v index e88d23e63..a6b1ef40b 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I128_proofs.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I128_proofs.v @@ -1,12 +1,65 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Definition abstract_concretize_cancel (x : t_I128_t) : unit := - tt. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. + +Lemma abstract_concretize_cancel (x : t_I128) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I16_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I16_proofs.v index 0039a2e3b..9a349820b 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I16_proofs.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I16_proofs.v @@ -1,12 +1,65 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Definition abstract_concretize_cancel (x : t_I16_t) : unit := - tt. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. + +Lemma abstract_concretize_cancel (x : t_I16) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I32_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I32_proofs.v index a945858f6..9ae26ec4a 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I32_proofs.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I32_proofs.v @@ -1,12 +1,65 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Definition abstract_concretize_cancel (x : t_I32_t) : unit := - tt. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. + +Lemma abstract_concretize_cancel (x : t_I32) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I64_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I64_proofs.v index c0379e924..f0492b7d3 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I64_proofs.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I64_proofs.v @@ -1,12 +1,65 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Definition abstract_concretize_cancel (x : t_I64_t) : unit := - tt. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. + +Lemma abstract_concretize_cancel (x : t_I64) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I8_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I8_proofs.v index a723368eb..55cc0bd73 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I8_proofs.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I8_proofs.v @@ -1,12 +1,65 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Definition abstract_concretize_cancel (x : t_I8_t) : unit := - tt. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. + +Lemma abstract_concretize_cancel (x : t_I8) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U128_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U128_proofs.v index d73195c5c..795ef01c7 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U128_proofs.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U128_proofs.v @@ -1,24 +1,85 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Definition abstract_concretize_cancel (x : t_U128_t) : unit := - tt. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Definition mod_add (x : t_U128_t) (y : t_U128_t) (z : t_U128_t) : unit := - tt. +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. -Definition mod_mul (x : t_U128_t) (y : t_U128_t) (z : t_U128_t) : unit := - tt. +Lemma abstract_concretize_cancel (x : t_U128) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. -Definition mod_one (x : t_U128_t) : unit := - tt. +Lemma mod_add (x : t_U128) (y : t_U128) (z : t_U128) : + -> + orb (haxint_le (v_WORDSIZE_128_) (haxint_add (Abstraction_f_lift (Clone_f_clone (x))) (Abstraction_f_lift (Clone_f_clone (y))))) (PartialEq_f_eq (Rem_f_rem (Add_f_add (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Add_f_add (Rem_f_rem (x) (Clone_f_clone (z))) (Rem_f_rem (y) (Clone_f_clone (z)))) (z))) = true. +Proof. Admitted. -Definition mod_sub (x : t_U128_t) (y : t_U128_t) (z : t_U128_t) : unit := - tt. +Lemma mod_mul (x : t_U128) (y : t_U128) (z : t_U128) : + -> + orb (haxint_lt (v_WORDSIZE_128_) (haxint_mul (Abstraction_f_lift (Clone_f_clone (x))) (Abstraction_f_lift (Clone_f_clone (y))))) (PartialEq_f_eq (Rem_f_rem (Mul_f_mul (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Rem_f_rem (Mul_f_mul (Rem_f_rem (x) (Clone_f_clone (z))) (y)) (Clone_f_clone (z))) (z))) = true. +Proof. Admitted. + +Lemma mod_one (x : t_U128) : + -> + PartialEq_f_eq (Rem_f_rem (x) (Constants_f_ONE)) (Constants_f_ZERO) = true. +Proof. Admitted. + +Lemma mod_sub (x : t_U128) (y : t_U128) (z : t_U128) : + -> + orb (orb (PartialOrd_f_lt (Clone_f_clone (x)) (Clone_f_clone (y))) (PartialOrd_f_le (Clone_f_clone (z)) (Clone_f_clone (x)))) (PartialEq_f_eq (Rem_f_rem (Sub_f_sub (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Sub_f_sub (Rem_f_rem (x) (Clone_f_clone (z))) (Rem_f_rem (y) (Clone_f_clone (z)))) (z))) = true. +Proof. Admitted. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U16_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U16_proofs.v index ebd8996bf..c7dbc1090 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U16_proofs.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U16_proofs.v @@ -1,24 +1,85 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Definition abstract_concretize_cancel (x : t_U16_t) : unit := - tt. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Definition mod_add (x : t_U16_t) (y : t_U16_t) (z : t_U16_t) : unit := - tt. +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. -Definition mod_mul (x : t_U16_t) (y : t_U16_t) (z : t_U16_t) : unit := - tt. +Lemma abstract_concretize_cancel (x : t_U16) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. -Definition mod_one (x : t_U16_t) : unit := - tt. +Lemma mod_add (x : t_U16) (y : t_U16) (z : t_U16) : + -> + orb (haxint_le (v_WORDSIZE_16_) (haxint_add (Abstraction_f_lift (Clone_f_clone (x))) (Abstraction_f_lift (Clone_f_clone (y))))) (PartialEq_f_eq (Rem_f_rem (Add_f_add (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Add_f_add (Rem_f_rem (x) (Clone_f_clone (z))) (Rem_f_rem (y) (Clone_f_clone (z)))) (z))) = true. +Proof. Admitted. -Definition mod_sub (x : t_U16_t) (y : t_U16_t) (z : t_U16_t) : unit := - tt. +Lemma mod_mul (x : t_U16) (y : t_U16) (z : t_U16) : + -> + orb (haxint_lt (v_WORDSIZE_16_) (haxint_mul (Abstraction_f_lift (Clone_f_clone (x))) (Abstraction_f_lift (Clone_f_clone (y))))) (PartialEq_f_eq (Rem_f_rem (Mul_f_mul (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Rem_f_rem (Mul_f_mul (Rem_f_rem (x) (Clone_f_clone (z))) (y)) (Clone_f_clone (z))) (z))) = true. +Proof. Admitted. + +Lemma mod_one (x : t_U16) : + -> + PartialEq_f_eq (Rem_f_rem (x) (Constants_f_ONE)) (Constants_f_ZERO) = true. +Proof. Admitted. + +Lemma mod_sub (x : t_U16) (y : t_U16) (z : t_U16) : + -> + orb (orb (PartialOrd_f_lt (Clone_f_clone (x)) (Clone_f_clone (y))) (PartialOrd_f_le (Clone_f_clone (z)) (Clone_f_clone (x)))) (PartialEq_f_eq (Rem_f_rem (Sub_f_sub (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Sub_f_sub (Rem_f_rem (x) (Clone_f_clone (z))) (Rem_f_rem (y) (Clone_f_clone (z)))) (z))) = true. +Proof. Admitted. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U32_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U32_proofs.v index 6e47d7273..5b9ca519a 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U32_proofs.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U32_proofs.v @@ -1,24 +1,85 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Definition abstract_concretize_cancel (x : t_U32_t) : unit := - tt. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Definition mod_add (x : t_U32_t) (y : t_U32_t) (z : t_U32_t) : unit := - tt. +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. -Definition mod_mul (x : t_U32_t) (y : t_U32_t) (z : t_U32_t) : unit := - tt. +Lemma abstract_concretize_cancel (x : t_U32) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. -Definition mod_one (x : t_U32_t) : unit := - tt. +Lemma mod_add (x : t_U32) (y : t_U32) (z : t_U32) : + -> + orb (haxint_le (v_WORDSIZE_32_) (haxint_add (Abstraction_f_lift (Clone_f_clone (x))) (Abstraction_f_lift (Clone_f_clone (y))))) (PartialEq_f_eq (Rem_f_rem (Add_f_add (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Add_f_add (Rem_f_rem (x) (Clone_f_clone (z))) (Rem_f_rem (y) (Clone_f_clone (z)))) (z))) = true. +Proof. Admitted. -Definition mod_sub (x : t_U32_t) (y : t_U32_t) (z : t_U32_t) : unit := - tt. +Lemma mod_mul (x : t_U32) (y : t_U32) (z : t_U32) : + -> + orb (haxint_lt (v_WORDSIZE_32_) (haxint_mul (Abstraction_f_lift (Clone_f_clone (x))) (Abstraction_f_lift (Clone_f_clone (y))))) (PartialEq_f_eq (Rem_f_rem (Mul_f_mul (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Rem_f_rem (Mul_f_mul (Rem_f_rem (x) (Clone_f_clone (z))) (y)) (Clone_f_clone (z))) (z))) = true. +Proof. Admitted. + +Lemma mod_one (x : t_U32) : + -> + PartialEq_f_eq (Rem_f_rem (x) (Constants_f_ONE)) (Constants_f_ZERO) = true. +Proof. Admitted. + +Lemma mod_sub (x : t_U32) (y : t_U32) (z : t_U32) : + -> + orb (orb (PartialOrd_f_lt (Clone_f_clone (x)) (Clone_f_clone (y))) (PartialOrd_f_le (Clone_f_clone (z)) (Clone_f_clone (x)))) (PartialEq_f_eq (Rem_f_rem (Sub_f_sub (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Sub_f_sub (Rem_f_rem (x) (Clone_f_clone (z))) (Rem_f_rem (y) (Clone_f_clone (z)))) (z))) = true. +Proof. Admitted. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U64_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U64_proofs.v index 8a7fc84a7..a041c9fd2 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U64_proofs.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U64_proofs.v @@ -1,24 +1,85 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Definition abstract_concretize_cancel (x : t_U64_t) : unit := - tt. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Definition mod_add (x : t_U64_t) (y : t_U64_t) (z : t_U64_t) : unit := - tt. +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. -Definition mod_mul (x : t_U64_t) (y : t_U64_t) (z : t_U64_t) : unit := - tt. +Lemma abstract_concretize_cancel (x : t_U64) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. -Definition mod_one (x : t_U64_t) : unit := - tt. +Lemma mod_add (x : t_U64) (y : t_U64) (z : t_U64) : + -> + orb (haxint_le (v_WORDSIZE_64_) (haxint_add (Abstraction_f_lift (Clone_f_clone (x))) (Abstraction_f_lift (Clone_f_clone (y))))) (PartialEq_f_eq (Rem_f_rem (Add_f_add (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Add_f_add (Rem_f_rem (x) (Clone_f_clone (z))) (Rem_f_rem (y) (Clone_f_clone (z)))) (z))) = true. +Proof. Admitted. -Definition mod_sub (x : t_U64_t) (y : t_U64_t) (z : t_U64_t) : unit := - tt. +Lemma mod_mul (x : t_U64) (y : t_U64) (z : t_U64) : + -> + orb (haxint_lt (v_WORDSIZE_64_) (haxint_mul (Abstraction_f_lift (Clone_f_clone (x))) (Abstraction_f_lift (Clone_f_clone (y))))) (PartialEq_f_eq (Rem_f_rem (Mul_f_mul (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Rem_f_rem (Mul_f_mul (Rem_f_rem (x) (Clone_f_clone (z))) (y)) (Clone_f_clone (z))) (z))) = true. +Proof. Admitted. + +Lemma mod_one (x : t_U64) : + -> + PartialEq_f_eq (Rem_f_rem (x) (Constants_f_ONE)) (Constants_f_ZERO) = true. +Proof. Admitted. + +Lemma mod_sub (x : t_U64) (y : t_U64) (z : t_U64) : + -> + orb (orb (PartialOrd_f_lt (Clone_f_clone (x)) (Clone_f_clone (y))) (PartialOrd_f_le (Clone_f_clone (z)) (Clone_f_clone (x)))) (PartialEq_f_eq (Rem_f_rem (Sub_f_sub (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Sub_f_sub (Rem_f_rem (x) (Clone_f_clone (z))) (Rem_f_rem (y) (Clone_f_clone (z)))) (z))) = true. +Proof. Admitted. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U8_proofs.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U8_proofs.v index 14aa7fb8c..79cab78fc 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U8_proofs.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U8_proofs.v @@ -1,24 +1,85 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Definition abstract_concretize_cancel (x : t_U8_t) : unit := - tt. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Definition mod_add (x : t_U8_t) (y : t_U8_t) (z : t_U8_t) : unit := - tt. +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. -Definition mod_mul (x : t_U8_t) (y : t_U8_t) (z : t_U8_t) : unit := - tt. +Lemma abstract_concretize_cancel (x : t_U8) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. -Definition mod_one (x : t_U8_t) : unit := - tt. +Lemma mod_add (x : t_U8) (y : t_U8) (z : t_U8) : + -> + orb (haxint_le (v_WORDSIZE_8_) (haxint_add (Abstraction_f_lift (Clone_f_clone (x))) (Abstraction_f_lift (Clone_f_clone (y))))) (PartialEq_f_eq (Rem_f_rem (Add_f_add (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Add_f_add (Rem_f_rem (x) (Clone_f_clone (z))) (Rem_f_rem (y) (Clone_f_clone (z)))) (z))) = true. +Proof. Admitted. -Definition mod_sub (x : t_U8_t) (y : t_U8_t) (z : t_U8_t) : unit := - tt. +Lemma mod_mul (x : t_U8) (y : t_U8) (z : t_U8) : + -> + orb (haxint_lt (v_WORDSIZE_8_) (haxint_mul (Abstraction_f_lift (Clone_f_clone (x))) (Abstraction_f_lift (Clone_f_clone (y))))) (PartialEq_f_eq (Rem_f_rem (Mul_f_mul (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Rem_f_rem (Mul_f_mul (Rem_f_rem (x) (Clone_f_clone (z))) (y)) (Clone_f_clone (z))) (z))) = true. +Proof. Admitted. + +Lemma mod_one (x : t_U8) : + -> + PartialEq_f_eq (Rem_f_rem (x) (Constants_f_ONE)) (Constants_f_ZERO) = true. +Proof. Admitted. + +Lemma mod_sub (x : t_U8) (y : t_U8) (z : t_U8) : + -> + orb (orb (PartialOrd_f_lt (Clone_f_clone (x)) (Clone_f_clone (y))) (PartialOrd_f_le (Clone_f_clone (z)) (Clone_f_clone (x)))) (PartialEq_f_eq (Rem_f_rem (Sub_f_sub (Clone_f_clone (x)) (Clone_f_clone (y))) (Clone_f_clone (z))) (Rem_f_rem (Sub_f_sub (Rem_f_rem (x) (Clone_f_clone (z))) (Rem_f_rem (y) (Clone_f_clone (z)))) (z))) = true. +Proof. Admitted. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Clone.v b/proof-libs/coq/coq/generated-core/src/Core_Clone.v index e4a4b8397..5f90b8871 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Clone.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Clone.v @@ -1,10 +1,63 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Class t_Clone := { - f_clone : (Self -> Self) ; -}. +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +Class t_Clone (v_Self : Type) : Type := + { + Clone_f_clone : v_Self -> v_Self; + }. +Arguments t_Clone (_). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Cmp.v b/proof-libs/coq/coq/generated-core/src/Core_Cmp.v index 793bba79f..5e60833f0 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Cmp.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Cmp.v @@ -1,153 +1,216 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. - -Require Import Option. -Export Option. - -Definition discriminant_Ordering_Equal : int8 := - (@repr WORDSIZE8 0). - -Definition discriminant_Ordering_Greater : int8 := - (@repr WORDSIZE8 1). +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + + + +From Core Require Import Core_Option (t_Option). +Export Core_Option (t_Option). + +Definition discriminant_Ordering_Equal : t_i8 := + 0. + +Definition discriminant_Ordering_Greater : t_i8 := + 1. Inductive t_Ordering : Type := -| Ordering_Less : t_Ordering -| Ordering_Equal : t_Ordering -| Ordering_Greater : t_Ordering. - -Definition impl__Ordering__is_eq (self : t_Ordering_t) : bool := +| Ordering_Less +| Ordering_Equal +| Ordering_Greater. +Arguments Ordering_Less. +Arguments Ordering_Equal. +Arguments Ordering_Greater. + +Definition impl__Ordering__is_eq (self : t_Ordering) : bool := match self with - | Ordering_Equal => + | Ordering_Equal => true | _ => false end. -Definition impl__Ordering__is_gt (self : t_Ordering_t) : bool := +Definition impl__Ordering__is_gt (self : t_Ordering) : bool := match self with - | Ordering_Greater => + | Ordering_Greater => true | _ => false end. -Definition impl__Ordering__is_lt (self : t_Ordering_t) : bool := +Definition impl__Ordering__is_lt (self : t_Ordering) : bool := match self with - | Ordering_Less => + | Ordering_Less => true | _ => false end. -Definition impl__Ordering__reverse (self : t_Ordering_t) : t_Ordering_t := +Definition impl__Ordering__reverse (self : t_Ordering) : t_Ordering := match self with - | Ordering_Less => - Ordering_Greatert_Ordering_t - | Ordering_Equal => - Ordering_Equalt_Ordering_t - | Ordering_Greater => - Ordering_Lesst_Ordering_t + | Ordering_Less => + Ordering_Greater + | Ordering_Equal => + Ordering_Equal + | Ordering_Greater => + Ordering_Less end. -Definition discriminant_Ordering_Less : int8 := - (@repr WORDSIZE8 1). +Definition discriminant_Ordering_Less : t_i8 := + -1. -Definition t_Ordering_cast_to_repr (x : t_Ordering_t) : int8 := +Definition t_Ordering_cast_to_repr (x : t_Ordering) : t_i8 := match x with - | Ordering_Less => + | Ordering_Less => discriminant_Ordering_Less - | Ordering_Equal => + | Ordering_Equal => discriminant_Ordering_Equal - | Ordering_Greater => + | Ordering_Greater => discriminant_Ordering_Greater end. -Class t_PartialEq (Self : _) := { - f_eq : (Self -> Rhs -> bool) ; - f_ne : (Self -> Rhs -> bool) ; -}. +Class t_PartialEq (v_Self : Type) (v_Rhs : Type) : Type := + { + PartialEq_f_eq : v_Self -> v_Rhs -> bool; + PartialEq_f_ne : v_Self -> v_Rhs -> bool; + }. +Arguments t_PartialEq (_) (_). -Definition impl__Ordering__is_ge (self : t_Ordering_t) : bool := - not match self with - | Ordering_Less => +Definition impl__Ordering__is_ge (self : t_Ordering) : bool := + negb (match self with + | Ordering_Less => true | _ => false - end. + end). -Definition impl__Ordering__is_le (self : t_Ordering_t) : bool := - not match self with - | Ordering_Greater => +Definition impl__Ordering__is_le (self : t_Ordering) : bool := + negb (match self with + | Ordering_Greater => true | _ => false - end. + end). -Definition impl__Ordering__is_ne (self : t_Ordering_t) : bool := - not match self with - | Ordering_Equal => +Definition impl__Ordering__is_ne (self : t_Ordering) : bool := + negb (match self with + | Ordering_Equal => true | _ => false - end. - -#[global] Instance t_Ordering_t_t_PartialEq : t_PartialEq t_Ordering_t t_Ordering_t := { - f_eq (self : t_Ordering_t) (other : t_Ordering_t) := match self with - | Ordering_Less => - match other with - | Ordering_Less => - true - | _ => - false - end - | Ordering_Equal => - match other with - | Ordering_Equal => - true - | _ => - false - end - | Ordering_Greater => - match other with - | Ordering_Greater => - true - | _ => - false - end - end; - f_ne (self : t_Ordering_t) (other : t_Ordering_t) := not match self with - | Ordering_Less => - match other with - | Ordering_Less => - true - | _ => - false - end - | Ordering_Equal => - match other with - | Ordering_Equal => - true - | _ => - false - end - | Ordering_Greater => - match other with - | Ordering_Greater => - true - | _ => - false - end - end; -}. - -Class t_PartialOrd (Self : _) := { - f_partial_cmp : (Self -> Rhs -> t_Option_t t_Ordering_t) ; - f_lt : (Self -> Rhs -> bool) ; - f_le : (Self -> Rhs -> bool) ; - f_gt : (Self -> Rhs -> bool) ; - f_ge : (Self -> Rhs -> bool) ; -}. + end). + +Instance t_PartialEq_603824491 : t_PartialEq ((t_Ordering)) ((t_Ordering)) := + { + PartialEq_impl_1_f_eq := fun (self : t_Ordering) (other : t_Ordering)=> + match self with + | Ordering_Less => + match other with + | Ordering_Less => + true + | _ => + false + end + | Ordering_Equal => + match other with + | Ordering_Equal => + true + | _ => + false + end + | Ordering_Greater => + match other with + | Ordering_Greater => + true + | _ => + false + end + end; + PartialEq_impl_1_f_ne := fun (self : t_Ordering) (other : t_Ordering)=> + negb (match self with + | Ordering_Less => + match other with + | Ordering_Less => + true + | _ => + false + end + | Ordering_Equal => + match other with + | Ordering_Equal => + true + | _ => + false + end + | Ordering_Greater => + match other with + | Ordering_Greater => + true + | _ => + false + end + end); + }. + +Class t_PartialOrd (v_Self : Type) (v_Rhs : Type) `{t_PartialEq (v_Self) (v_Rhs)} : Type := + { + PartialOrd_f_partial_cmp : v_Self -> v_Rhs -> t_Option ((t_Ordering)); + PartialOrd_f_lt : v_Self -> v_Rhs -> bool; + PartialOrd_f_le : v_Self -> v_Rhs -> bool; + PartialOrd_f_gt : v_Self -> v_Rhs -> bool; + PartialOrd_f_ge : v_Self -> v_Rhs -> bool; + }. +Arguments t_PartialOrd (_) (_) {_}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Convert.v b/proof-libs/coq/coq/generated-core/src/Core_Convert.v index 2468032dc..fe1c71bea 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Convert.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Convert.v @@ -1,22 +1,81 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Class t_From (Self : _) := { - f_from : (T -> Self) ; -}. +(* From Core Require Import Core. *) -#[global] Instance T_t_From (T : _) : t_From T T := { - f_from (t : T) := t; -}. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Class t_Into (Self : _) := { - f_into : (Self -> T) ; -}. +Class t_From (v_Self : Type) (v_T : Type) `{t_Sized (v_Self)} `{t_Sized (v_T)} : Type := + { + From_f_from : v_T -> v_Self; + }. +Arguments t_From (_) (_) {_} {_}. -#[global] Instance T_t_Into (T : _) (U : _) : t_Into T U := { - f_into (self : T) := f_from self; -}. +Instance t_From_46353410 `{v_T : Type} `{t_Sized (v_T)} : t_From ((v_T)) ((v_T)) := + { + From_impl_1_f_from := fun (t : v_T)=> + t; + }. + +Class t_Into (v_Self : Type) (v_T : Type) `{t_Sized (v_Self)} `{t_Sized (v_T)} : Type := + { + Into_f_into : v_Self -> v_T; + }. +Arguments t_Into (_) (_) {_} {_}. + +Instance t_Into_730689925 `{v_T : Type} `{v_U : Type} `{t_Sized (v_T)} `{t_Sized (v_U)} `{t_From (v_U) (v_T)} : t_Into ((v_T)) ((v_U)) := + { + Into_impl_f_into := fun (self : v_T)=> + From_f_from (self); + }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Fmt.v b/proof-libs/coq/coq/generated-core/src/Core_Fmt.v index d2a03bcbb..4b1cbcbe0 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Fmt.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Fmt.v @@ -1,8 +1,59 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -(*Not implemented yet? todo(item)*) +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v b/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v index 9b17d9779..ae268df66 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v @@ -1,589 +1,296 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Crate_Primitive. -Export Crate_Primitive. +(* From Core Require Import Core. *) -Require Import Crate_Base_interface_Int. -Export Crate_Base_interface_Int. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Crate_Base_interface_Coerce. -Export Crate_Base_interface_Coerce. +From Core Require Import Core (t_primitive). +Export Core (t_primitive). -Require Import Crate_Base. -Export Crate_Base. -Require Import Add. -Export Add. -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Base_interface (t_int). +Export Core_Base_interface (t_int). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Base_interface (t_coerce). +Export Core_Base_interface (t_coerce). -Definition unchecked_add_u128 (x : t_u128_t) (y : t_u128_t) : t_u128_t := - C_u128 (Build_U128 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). +From Core Require Import Core (t_base). +Export Core (t_base). -Definition unchecked_add_u16 (x : t_u16_t) (y : t_u16_t) : t_u16_t := - C_u16 (Build_U16 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). -Definition unchecked_add_u32 (x : t_u32_t) (y : t_u32_t) : t_u32_t := - C_u32 (Build_U32 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). -Definition unchecked_add_u64 (x : t_u64_t) (y : t_u64_t) : t_u64_t := - C_u64 (Build_U64 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). +From Core Require Import Core_Ops (t_Add). +Export Core_Ops (t_Add). -Definition unchecked_add_u8 (x : t_u8_t) (y : t_u8_t) : t_u8_t := - C_u8 (Build_U8 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). +(* NotImplementedYet *) -Definition unchecked_add_usize (x : t_usize_t) (y : t_usize_t) : t_usize_t := - C_usize (Build_U64 (f_v := haxint_add (f_lift (0 x)) (f_lift (0 y)))). +(* NotImplementedYet *) -Definition add_with_overflow_i128 (x : t_i128_t) (y : t_i128_t) : t_i128_t × bool := - let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in - let (res : t_I128_t) := f_concretize (f_clone overflow) : t_I128_t in - (C_i128 (f_clone res),z_lt (f_lift res) overflow). +Notation "'add_with_overflow_i128'" := (add_with_overflow_i128). -Definition unchecked_add_i128 (x : t_i128_t) (y : t_i128_t) : t_i128_t := - C_i128 (Build_I128 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). +Notation "'add_with_overflow_i16'" := (add_with_overflow_i16). -Definition add_with_overflow_i16 (x : t_i16_t) (y : t_i16_t) : t_i16_t × bool := - let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in - let (res : t_I16_t) := f_concretize (f_clone overflow) : t_I16_t in - (C_i16 (f_clone res),z_lt (f_lift res) overflow). +Notation "'add_with_overflow_i32'" := (add_with_overflow_i32). -Definition unchecked_add_i16 (x : t_i16_t) (y : t_i16_t) : t_i16_t := - C_i16 (Build_I16 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). +Notation "'add_with_overflow_i64'" := (add_with_overflow_i64). -Definition add_with_overflow_i32 (x : t_i32_t) (y : t_i32_t) : t_i32_t × bool := - let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in - let (res : t_I32_t) := f_concretize (f_clone overflow) : t_I32_t in - (C_i32 (f_clone res),z_lt (f_lift res) overflow). +Notation "'add_with_overflow_i8'" := (add_with_overflow_i8). -Definition unchecked_add_i32 (x : t_i32_t) (y : t_i32_t) : t_i32_t := - C_i32 (Build_I32 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). +Notation "'add_with_overflow_isize'" := (add_with_overflow_isize). -Definition add_with_overflow_i64 (x : t_i64_t) (y : t_i64_t) : t_i64_t × bool := - let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in - let (res : t_I64_t) := f_concretize (f_clone overflow) : t_I64_t in - (C_i64 (f_clone res),z_lt (f_lift res) overflow). +Notation "'unchecked_add_i128'" := (unchecked_add_i128). -Definition unchecked_add_i64 (x : t_i64_t) (y : t_i64_t) : t_i64_t := - C_i64 (Build_I64 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). +Notation "'unchecked_add_i16'" := (unchecked_add_i16). -Definition add_with_overflow_i8 (x : t_i8_t) (y : t_i8_t) : t_i8_t × bool := - let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in - let (res : t_I8_t) := f_concretize (f_clone overflow) : t_I8_t in - (C_i8 (f_clone res),z_lt (f_lift res) overflow). +Notation "'unchecked_add_i32'" := (unchecked_add_i32). -Definition unchecked_add_i8 (x : t_i8_t) (y : t_i8_t) : t_i8_t := - C_i8 (Build_I8 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). +Notation "'unchecked_add_i64'" := (unchecked_add_i64). -Definition add_with_overflow_isize (x : t_isize_t) (y : t_isize_t) : t_isize_t × bool := - let overflow := z_add (f_lift (0 x)) (f_lift (0 y)) : t_Z_t in - let (res : t_I64_t) := f_concretize (f_clone overflow) : t_I64_t in - (C_isize (f_clone res),z_lt (f_lift res) overflow). +Notation "'unchecked_add_i8'" := (unchecked_add_i8). -Definition unchecked_add_isize (x : t_isize_t) (y : t_isize_t) : t_isize_t := - C_isize (Build_I64 (f_v := z_add (f_lift (0 x)) (f_lift (0 y)))). +Notation "'unchecked_add_isize'" := (unchecked_add_isize). -Definition add_with_overflow_u128 (x : t_u128_t) (y : t_u128_t) : t_u128_t × bool := - let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in - let (res : t_U128_t) := f_concretize (f_clone overflow) : t_U128_t in - (C_u128 (f_clone res),haxint_lt (f_lift res) overflow). +Notation "'unchecked_add_u128'" := (unchecked_add_u128). -Definition add_with_overflow_u16 (x : t_u16_t) (y : t_u16_t) : t_u16_t × bool := - let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in - let (res : t_U16_t) := f_concretize (f_clone overflow) : t_U16_t in - (C_u16 (f_clone res),haxint_lt (f_lift res) overflow). +Notation "'unchecked_add_u16'" := (unchecked_add_u16). -Definition add_with_overflow_u32 (x : t_u32_t) (y : t_u32_t) : t_u32_t × bool := - let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in - let (res : t_U32_t) := f_concretize (f_clone overflow) : t_U32_t in - (C_u32 (f_clone res),haxint_lt (f_lift res) overflow). +Notation "'unchecked_add_u32'" := (unchecked_add_u32). -Definition add_with_overflow_u64 (x : t_u64_t) (y : t_u64_t) : t_u64_t × bool := - let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in - let (res : t_U64_t) := f_concretize (f_clone overflow) : t_U64_t in - (C_u64 (f_clone res),haxint_lt (f_lift res) overflow). +Notation "'unchecked_add_u64'" := (unchecked_add_u64). -Definition add_with_overflow_u8 (x : t_u8_t) (y : t_u8_t) : t_u8_t × bool := - let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in - let (res : t_U8_t) := f_concretize (f_clone overflow) : t_U8_t in - (C_u8 (f_clone res),haxint_lt (f_lift res) overflow). +Notation "'unchecked_add_u8'" := (unchecked_add_u8). -Definition add_with_overflow_usize (x : t_usize_t) (y : t_usize_t) : t_usize_t × bool := - let overflow := haxint_add (f_lift (0 x)) (f_lift (0 y)) : t_HaxInt_t in - let (res : t_U64_t) := f_concretize (f_clone overflow) : t_U64_t in - (C_usize (f_clone res),haxint_lt (f_lift res) overflow). +Notation "'unchecked_add_usize'" := (unchecked_add_usize). -Definition unchecked_div_u128 (x : t_u128_t) (y : t_u128_t) : t_u128_t := - C_u128 (Build_U128 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'add_with_overflow_u128'" := (add_with_overflow_u128). -Definition unchecked_div_u16 (x : t_u16_t) (y : t_u16_t) : t_u16_t := - C_u16 (Build_U16 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'add_with_overflow_u16'" := (add_with_overflow_u16). -Definition unchecked_div_u32 (x : t_u32_t) (y : t_u32_t) : t_u32_t := - C_u32 (Build_U32 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'add_with_overflow_u32'" := (add_with_overflow_u32). -Definition unchecked_div_u64 (x : t_u64_t) (y : t_u64_t) : t_u64_t := - C_u64 (Build_U64 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'add_with_overflow_u64'" := (add_with_overflow_u64). -Definition unchecked_div_u8 (x : t_u8_t) (y : t_u8_t) : t_u8_t := - C_u8 (Build_U8 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'add_with_overflow_u8'" := (add_with_overflow_u8). -Definition unchecked_div_usize (x : t_usize_t) (y : t_usize_t) : t_usize_t := - C_usize (Build_U64 (f_v := haxint_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'add_with_overflow_usize'" := (add_with_overflow_usize). -Definition wrapping_add_i128 (a : t_i128_t) (b : t_i128_t) : t_i128_t := - C_i128 ((0 a).+(0 b)). +Notation "'unchecked_div_u128'" := (unchecked_div_u128). -Definition wrapping_add_i16 (a : t_i16_t) (b : t_i16_t) : t_i16_t := - C_i16 ((0 a).+(0 b)). +Notation "'unchecked_div_u16'" := (unchecked_div_u16). -Definition wrapping_add_i32 (a : t_i32_t) (b : t_i32_t) : t_i32_t := - C_i32 ((0 a).+(0 b)). +Notation "'unchecked_div_u32'" := (unchecked_div_u32). -Definition wrapping_add_i64 (a : t_i64_t) (b : t_i64_t) : t_i64_t := - C_i64 ((0 a).+(0 b)). +Notation "'unchecked_div_u64'" := (unchecked_div_u64). -Definition wrapping_add_i8 (a : t_i8_t) (b : t_i8_t) : t_i8_t := - C_i8 ((0 a).+(0 b)). +Notation "'unchecked_div_u8'" := (unchecked_div_u8). -Definition wrapping_add_isize (a : t_isize_t) (b : t_isize_t) : t_isize_t := - C_isize ((0 a).+(0 b)). +Notation "'unchecked_div_usize'" := (unchecked_div_usize). -Definition wrapping_sub_i128 (a : t_i128_t) (b : t_i128_t) : t_i128_t := - C_i128 ((0 a).-(0 b)). +Notation "'wrapping_add_i128'" := (wrapping_add_i128). -Definition wrapping_sub_i16 (a : t_i16_t) (b : t_i16_t) : t_i16_t := - C_i16 ((0 a).-(0 b)). +Notation "'wrapping_add_i16'" := (wrapping_add_i16). -Definition wrapping_sub_i32 (a : t_i32_t) (b : t_i32_t) : t_i32_t := - C_i32 ((0 a).-(0 b)). +Notation "'wrapping_add_i32'" := (wrapping_add_i32). -Definition wrapping_sub_i64 (a : t_i64_t) (b : t_i64_t) : t_i64_t := - C_i64 ((0 a).-(0 b)). +Notation "'wrapping_add_i64'" := (wrapping_add_i64). -Definition wrapping_sub_i8 (a : t_i8_t) (b : t_i8_t) : t_i8_t := - C_i8 ((0 a).-(0 b)). +Notation "'wrapping_add_i8'" := (wrapping_add_i8). -Definition wrapping_sub_isize (a : t_isize_t) (b : t_isize_t) : t_isize_t := - C_isize ((0 a).-(0 b)). +Notation "'wrapping_add_isize'" := (wrapping_add_isize). -Definition unchecked_div_i128 (x : t_i128_t) (y : t_i128_t) : t_i128_t := - C_i128 (Build_I128 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'wrapping_sub_i128'" := (wrapping_sub_i128). -Definition unchecked_div_i16 (x : t_i16_t) (y : t_i16_t) : t_i16_t := - C_i16 (Build_I16 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'wrapping_sub_i16'" := (wrapping_sub_i16). -Definition unchecked_div_i32 (x : t_i32_t) (y : t_i32_t) : t_i32_t := - C_i32 (Build_I32 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'wrapping_sub_i32'" := (wrapping_sub_i32). -Definition unchecked_div_i64 (x : t_i64_t) (y : t_i64_t) : t_i64_t := - C_i64 (Build_I64 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'wrapping_sub_i64'" := (wrapping_sub_i64). -Definition unchecked_div_i8 (x : t_i8_t) (y : t_i8_t) : t_i8_t := - C_i8 (Build_I8 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'wrapping_sub_i8'" := (wrapping_sub_i8). -Definition unchecked_div_isize (x : t_isize_t) (y : t_isize_t) : t_isize_t := - C_isize (Build_I64 (f_v := z_div (f_lift (0 x)) (f_lift (0 y)))). +Notation "'wrapping_sub_isize'" := (wrapping_sub_isize). -Definition wrapping_add_u128 (a : t_u128_t) (b : t_u128_t) : t_u128_t := - C_u128 ((0 a).+(0 b)). +Notation "'unchecked_div_i128'" := (unchecked_div_i128). -Definition wrapping_add_u16 (a : t_u16_t) (b : t_u16_t) : t_u16_t := - C_u16 ((0 a).+(0 b)). +Notation "'unchecked_div_i16'" := (unchecked_div_i16). -Definition wrapping_add_u32 (a : t_u32_t) (b : t_u32_t) : t_u32_t := - C_u32 ((0 a).+(0 b)). +Notation "'unchecked_div_i32'" := (unchecked_div_i32). -Definition wrapping_add_u64 (a : t_u64_t) (b : t_u64_t) : t_u64_t := - C_u64 ((0 a).+(0 b)). +Notation "'unchecked_div_i64'" := (unchecked_div_i64). -Definition wrapping_add_u8 (a : t_u8_t) (b : t_u8_t) : t_u8_t := - C_u8 ((0 a).+(0 b)). +Notation "'unchecked_div_i8'" := (unchecked_div_i8). -Definition wrapping_add_usize (a : t_usize_t) (b : t_usize_t) : t_usize_t := - C_usize ((0 a).+(0 b)). +Notation "'unchecked_div_isize'" := (unchecked_div_isize). -Definition wrapping_mul_i128 (a : t_i128_t) (b : t_i128_t) : t_i128_t := - C_i128 ((0 a).*(0 b)). +Notation "'wrapping_add_u128'" := (wrapping_add_u128). -Definition wrapping_mul_i16 (a : t_i16_t) (b : t_i16_t) : t_i16_t := - C_i16 ((0 a).*(0 b)). +Notation "'wrapping_add_u16'" := (wrapping_add_u16). -Definition wrapping_mul_i32 (a : t_i32_t) (b : t_i32_t) : t_i32_t := - C_i32 ((0 a).*(0 b)). +Notation "'wrapping_add_u32'" := (wrapping_add_u32). -Definition wrapping_mul_i64 (a : t_i64_t) (b : t_i64_t) : t_i64_t := - C_i64 ((0 a).*(0 b)). +Notation "'wrapping_add_u64'" := (wrapping_add_u64). -Definition wrapping_mul_i8 (a : t_i8_t) (b : t_i8_t) : t_i8_t := - C_i8 ((0 a).*(0 b)). +Notation "'wrapping_add_u8'" := (wrapping_add_u8). -Definition wrapping_mul_isize (a : t_isize_t) (b : t_isize_t) : t_isize_t := - C_isize ((0 a).*(0 b)). +Notation "'wrapping_add_usize'" := (wrapping_add_usize). -Definition wrapping_mul_u128 (a : t_u128_t) (b : t_u128_t) : t_u128_t := - C_u128 ((0 a).*(0 b)). +Notation "'wrapping_mul_i128'" := (wrapping_mul_i128). -Definition wrapping_mul_u16 (a : t_u16_t) (b : t_u16_t) : t_u16_t := - C_u16 ((0 a).*(0 b)). +Notation "'wrapping_mul_i16'" := (wrapping_mul_i16). -Definition wrapping_mul_u32 (a : t_u32_t) (b : t_u32_t) : t_u32_t := - C_u32 ((0 a).*(0 b)). +Notation "'wrapping_mul_i32'" := (wrapping_mul_i32). -Definition wrapping_mul_u64 (a : t_u64_t) (b : t_u64_t) : t_u64_t := - C_u64 ((0 a).*(0 b)). +Notation "'wrapping_mul_i64'" := (wrapping_mul_i64). -Definition wrapping_mul_u8 (a : t_u8_t) (b : t_u8_t) : t_u8_t := - C_u8 ((0 a).*(0 b)). +Notation "'wrapping_mul_i8'" := (wrapping_mul_i8). -Definition wrapping_mul_usize (a : t_usize_t) (b : t_usize_t) : t_usize_t := - C_usize ((0 a).*(0 b)). +Notation "'wrapping_mul_isize'" := (wrapping_mul_isize). -Definition wrapping_sub_u128 (a : t_u128_t) (b : t_u128_t) : t_u128_t := - C_u128 ((0 a).-(0 b)). +Notation "'wrapping_mul_u128'" := (wrapping_mul_u128). -Definition wrapping_sub_u16 (a : t_u16_t) (b : t_u16_t) : t_u16_t := - C_u16 ((0 a).-(0 b)). +Notation "'wrapping_mul_u16'" := (wrapping_mul_u16). -Definition wrapping_sub_u32 (a : t_u32_t) (b : t_u32_t) : t_u32_t := - C_u32 ((0 a).-(0 b)). +Notation "'wrapping_mul_u32'" := (wrapping_mul_u32). -Definition wrapping_sub_u64 (a : t_u64_t) (b : t_u64_t) : t_u64_t := - C_u64 ((0 a).-(0 b)). +Notation "'wrapping_mul_u64'" := (wrapping_mul_u64). -Definition wrapping_sub_u8 (a : t_u8_t) (b : t_u8_t) : t_u8_t := - C_u8 ((0 a).-(0 b)). - -Definition wrapping_sub_usize (a : t_usize_t) (b : t_usize_t) : t_usize_t := - C_usize ((0 a).-(0 b)). - -Definition rotate_left_u128 (x : t_u128_t) (shift : t_u32_t) : t_u128_t := - let (shift : t_u32_t) := shift.%impl_10__BITS : t_u32_t in - let (left : t_u128_t) := (f_clone x) shift_left (f_clone shift) : t_u128_t in - let (right : t_u128_t) := (f_clone x) shift_right (impl_10__BITS.-(f_clone shift)) : t_u128_t in - left.|right. - -Definition rotate_left_u16 (x : t_u16_t) (shift : t_u32_t) : t_u16_t := - let (shift : t_u32_t) := shift.%impl_7__BITS : t_u32_t in - let (left : t_u16_t) := (f_clone x) shift_left (f_clone shift) : t_u16_t in - let (right : t_u16_t) := (f_clone x) shift_right (impl_7__BITS.-(f_clone shift)) : t_u16_t in - left.|right. - -Definition rotate_left_u32 (x : t_u32_t) (shift : t_u32_t) : t_u32_t := - let (shift : t_u32_t) := shift.%impl_8__BITS : t_u32_t in - let (left : t_u32_t) := (f_clone x) shift_left (f_clone shift) : t_u32_t in - let (right : t_u32_t) := (f_clone x) shift_right (impl_8__BITS.-(f_clone shift)) : t_u32_t in - left.|right. - -Definition rotate_left_u64 (x : t_u64_t) (shift : t_u32_t) : t_u64_t := - let (shift : t_u32_t) := shift.%impl_9__BITS : t_u32_t in - let (left : t_u64_t) := (f_clone x) shift_left (f_clone shift) : t_u64_t in - let (right : t_u64_t) := (f_clone x) shift_right (impl_9__BITS.-(f_clone shift)) : t_u64_t in - left.|right. - -Definition rotate_left_u8 (x : t_u8_t) (shift : t_u32_t) : t_u8_t := - let (shift : t_u32_t) := shift.%impl_6__BITS : t_u32_t in - let (left : t_u8_t) := (f_clone x) shift_left (f_clone shift) : t_u8_t in - let (right : t_u8_t) := (f_clone x) shift_right (impl_6__BITS.-(f_clone shift)) : t_u8_t in - left.|right. - -Definition rotate_left_usize (x : t_usize_t) (shift : t_u32_t) : t_usize_t := - let (shift : t_u32_t) := shift.%impl_11__BITS : t_u32_t in - let (left : t_usize_t) := (f_clone x) shift_left (f_clone shift) : t_usize_t in - let (right : t_usize_t) := (f_clone x) shift_right (impl_11__BITS.-(f_clone shift)) : t_usize_t in - left.|right. - -Definition rotate_right_u128 (x : t_u128_t) (shift : t_u32_t) : t_u128_t := - let (shift : t_u32_t) := shift.%impl_10__BITS : t_u32_t in - let (left : t_u128_t) := (f_clone x) shift_right (f_clone shift) : t_u128_t in - let (right : t_u128_t) := (f_clone x) shift_left (impl_10__BITS.-(f_clone shift)) : t_u128_t in - left.|right. - -Definition rotate_right_u16 (x : t_u16_t) (shift : t_u32_t) : t_u16_t := - let (shift : t_u32_t) := shift.%impl_7__BITS : t_u32_t in - let (left : t_u16_t) := (f_clone x) shift_right (f_clone shift) : t_u16_t in - let (right : t_u16_t) := (f_clone x) shift_left (impl_7__BITS.-(f_clone shift)) : t_u16_t in - left.|right. - -Definition rotate_right_u32 (x : t_u32_t) (shift : t_u32_t) : t_u32_t := - let (shift : t_u32_t) := shift.%impl_8__BITS : t_u32_t in - let (left : t_u32_t) := (f_clone x) shift_right (f_clone shift) : t_u32_t in - let (right : t_u32_t) := (f_clone x) shift_left (impl_8__BITS.-(f_clone shift)) : t_u32_t in - left.|right. - -Definition rotate_right_u64 (x : t_u64_t) (shift : t_u32_t) : t_u64_t := - let (shift : t_u32_t) := shift.%impl_9__BITS : t_u32_t in - let (left : t_u64_t) := (f_clone x) shift_right (f_clone shift) : t_u64_t in - let (right : t_u64_t) := (f_clone x) shift_left (impl_9__BITS.-(f_clone shift)) : t_u64_t in - left.|right. - -Definition rotate_right_u8 (x : t_u8_t) (shift : t_u32_t) : t_u8_t := - let (shift : t_u32_t) := shift.%impl_6__BITS : t_u32_t in - let (left : t_u8_t) := (f_clone x) shift_right (f_clone shift) : t_u8_t in - let (right : t_u8_t) := (f_clone x) shift_left (impl_6__BITS.-(f_clone shift)) : t_u8_t in - left.|right. - -Definition rotate_right_usize (x : t_usize_t) (shift : t_u32_t) : t_usize_t := - let (shift : t_u32_t) := shift.%impl_11__BITS : t_u32_t in - let (left : t_usize_t) := (f_clone x) shift_right (f_clone shift) : t_usize_t in - let (right : t_usize_t) := (f_clone x) shift_left (impl_11__BITS.-(f_clone shift)) : t_usize_t in - left.|right. - -Definition bswap_u128 (x : t_u128_t) : t_u128_t := - let (count : t_u128_t) := f_into (@repr WORDSIZE128 0) : t_u128_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_10__BITS) (fun count => fun _ => - true) count (fun count => fun i => - let (low_bit : t_u128_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE128 1))) : t_u128_t in - let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_u128_t in - count) : t_u128_t in - count. - -Definition bswap_u16 (x : t_u16_t) : t_u16_t := - let (count : t_u16_t) := f_into (@repr WORDSIZE16 0) : t_u16_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_7__BITS) (fun count => fun _ => - true) count (fun count => fun i => - let (low_bit : t_u16_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE16 1))) : t_u16_t in - let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_u16_t in - count) : t_u16_t in - count. - -Definition bswap_u32 (x : t_u32_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_8__BITS) (fun count => fun _ => - true) count (fun count => fun i => - let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))) : t_u32_t in - let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_u32_t in - count) : t_u32_t in - count. - -Definition bswap_u64 (x : t_u64_t) : t_u64_t := - let (count : t_u64_t) := f_into (@repr WORDSIZE64 0) : t_u64_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_9__BITS) (fun count => fun _ => - true) count (fun count => fun i => - let (low_bit : t_u64_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE64 1))) : t_u64_t in - let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_u64_t in - count) : t_u64_t in - count. - -Definition bswap_u8 (x : t_u8_t) : t_u8_t := - let (count : t_u8_t) := f_into (@repr WORDSIZE8 0) : t_u8_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_6__BITS) (fun count => fun _ => - true) count (fun count => fun i => - let (low_bit : t_u8_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE8 1))) : t_u8_t in - let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_u8_t in - count) : t_u8_t in - count. - -Definition bswap_usize (x : t_usize_t) : t_usize_t := - let (count : t_usize_t) := f_into (@repr WORDSIZE32 0) : t_usize_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_11__BITS) (fun count => fun _ => - true) count (fun count => fun i => - let (low_bit : t_usize_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))) : t_usize_t in - let count := (count shift_left (f_into (@repr WORDSIZE32 1))).+low_bit : t_usize_t in - count) : t_usize_t in - count. - -Definition ctlz_u128 (x : t_u128_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_10__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_10__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in - if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition ctlz_u16 (x : t_u16_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_7__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_7__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in - if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition ctlz_u32 (x : t_u32_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_8__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_8__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in - if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition ctlz_u64 (x : t_u64_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_9__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_9__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in - if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition ctlz_u8 (x : t_u8_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_6__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_6__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in - if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition ctlz_usize (x : t_usize_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_11__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (high_bit : t_u32_t) := f_into (((f_clone x) shift_left (f_into i)) shift_right (f_into (impl_11__BITS.-(f_into (@repr WORDSIZE32 1))))) : t_u32_t in - if orb (high_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition ctpop_u128 (x : t_u128_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_10__BITS) (fun count => fun _ => - true) count (fun count => fun i => - count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE128 1))))) : t_u32_t in - count. - -Definition ctpop_u16 (x : t_u16_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_7__BITS) (fun count => fun _ => - true) count (fun count => fun i => - count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE16 1))))) : t_u32_t in - count. - -Definition ctpop_u32 (x : t_u32_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_8__BITS) (fun count => fun _ => - true) count (fun count => fun i => - count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))))) : t_u32_t in - count. - -Definition ctpop_u64 (x : t_u64_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_9__BITS) (fun count => fun _ => - true) count (fun count => fun i => - count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE64 1))))) : t_u32_t in - count. - -Definition ctpop_u8 (x : t_u8_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_6__BITS) (fun count => fun _ => - true) count (fun count => fun i => - count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE8 1))))) : t_u32_t in - count. - -Definition ctpop_usize (x : t_usize_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let count := fold_range (@repr WORDSIZE32 0) (f_into impl_11__BITS) (fun count => fun _ => - true) count (fun count => fun i => - count.+(f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))))) : t_u32_t in - count. - -Definition cttz_u128 (x : t_u128_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_10__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE128 1))) : t_u32_t in - if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition cttz_u16 (x : t_u16_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_7__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE16 1))) : t_u32_t in - if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition cttz_u32 (x : t_u32_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_8__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))) : t_u32_t in - if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition cttz_u64 (x : t_u64_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_9__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE64 1))) : t_u32_t in - if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition cttz_u8 (x : t_u8_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_6__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE8 1))) : t_u32_t in - if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. - -Definition cttz_usize (x : t_usize_t) : t_u32_t := - let (count : t_u32_t) := f_into (@repr WORDSIZE32 0) : t_u32_t in - let done := false : bool in - let '(count,done) := fold_range (@repr WORDSIZE32 0) (f_into impl_11__BITS) (fun '(count,done) => fun _ => - true) (count,done) (fun '(count,done) => fun i => - let (low_bit : t_u32_t) := f_into (((f_clone x) shift_right (f_into i)).&(f_into (@repr WORDSIZE32 1))) : t_u32_t in - if orb (low_bit=.?(f_into (@repr WORDSIZE32 1))) done - then let done := true : bool in - (count,done) - else let count := count.+(f_into (@repr WORDSIZE32 1)) : t_u32_t in - (count,done)) : t_u32_t × bool in - count. +Notation "'wrapping_mul_u8'" := (wrapping_mul_u8). + +Notation "'wrapping_mul_usize'" := (wrapping_mul_usize). + +Notation "'wrapping_sub_u128'" := (wrapping_sub_u128). + +Notation "'wrapping_sub_u16'" := (wrapping_sub_u16). + +Notation "'wrapping_sub_u32'" := (wrapping_sub_u32). + +Notation "'wrapping_sub_u64'" := (wrapping_sub_u64). + +Notation "'wrapping_sub_u8'" := (wrapping_sub_u8). + +Notation "'wrapping_sub_usize'" := (wrapping_sub_usize). + +Notation "'rotate_left_u128'" := (rotate_left_u128). + +Notation "'rotate_left_u16'" := (rotate_left_u16). + +Notation "'rotate_left_u32'" := (rotate_left_u32). + +Notation "'rotate_left_u64'" := (rotate_left_u64). + +Notation "'rotate_left_u8'" := (rotate_left_u8). + +Notation "'rotate_left_usize'" := (rotate_left_usize). + +Notation "'rotate_right_u128'" := (rotate_right_u128). + +Notation "'rotate_right_u16'" := (rotate_right_u16). + +Notation "'rotate_right_u32'" := (rotate_right_u32). + +Notation "'rotate_right_u64'" := (rotate_right_u64). + +Notation "'rotate_right_u8'" := (rotate_right_u8). + +Notation "'rotate_right_usize'" := (rotate_right_usize). + +Notation "'bswap_u128'" := (bswap_u128). + +Notation "'bswap_u16'" := (bswap_u16). + +Notation "'bswap_u32'" := (bswap_u32). + +Notation "'bswap_u64'" := (bswap_u64). + +Notation "'bswap_u8'" := (bswap_u8). + +Notation "'bswap_usize'" := (bswap_usize). + +Notation "'ctlz_u128'" := (ctlz_u128). + +Notation "'ctlz_u16'" := (ctlz_u16). + +Notation "'ctlz_u32'" := (ctlz_u32). + +Notation "'ctlz_u64'" := (ctlz_u64). + +Notation "'ctlz_u8'" := (ctlz_u8). + +Notation "'ctlz_usize'" := (ctlz_usize). + +Notation "'ctpop_u128'" := (ctpop_u128). + +Notation "'ctpop_u16'" := (ctpop_u16). + +Notation "'ctpop_u32'" := (ctpop_u32). + +Notation "'ctpop_u64'" := (ctpop_u64). + +Notation "'ctpop_u8'" := (ctpop_u8). + +Notation "'ctpop_usize'" := (ctpop_usize). + +Notation "'cttz_u128'" := (cttz_u128). + +Notation "'cttz_u16'" := (cttz_u16). + +Notation "'cttz_u32'" := (cttz_u32). + +Notation "'cttz_u64'" := (cttz_u64). + +Notation "'cttz_u8'" := (cttz_u8). + +Notation "'cttz_usize'" := (cttz_usize). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter.v b/proof-libs/coq/coq/generated-core/src/Core_Iter.v index aa43cfb33..0a75b31d7 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Iter.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter.v @@ -1,24 +1,77 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Iterator. -Export Iterator. +(* From Core Require Import Core. *) -Require Import Step. -Export Step. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import TrustedStep. -Export TrustedStep. +From Core Require Import Self_Traits (t_Iterator). +Export Self_Traits (t_Iterator). -Require Import IntoIterator. -Export IntoIterator. +From Core Require Import Self_Range (t_Step). +Export Self_Range (t_Step). -(*Not implemented yet? todo(item)*) +From Core Require Import Self_Traits (t_TrustedStep). +Export Self_Traits (t_TrustedStep). -(*Not implemented yet? todo(item)*) -(*Not implemented yet? todo(item)*) + +From Core Require Import Self_Traits (t_IntoIterator). +Export Self_Traits (t_IntoIterator). + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Range.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Range.v index c81311e2d..64d56e9e3 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Iter_Range.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Range.v @@ -1,107 +1,224 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. - -Require Import num. -Export num. - -Require Import u8. -Export u8. - -Require Import u16. -Export u16. - -Require Import u32. -Export u32. - -Require Import u64. -Export u64. - -Require Import u128. -Export u128. - -Require Import usize. -Export usize. - -(*Not implemented yet? todo(item)*) - -(*item error backend*) - -Class t_Step := { - f_steps_between : (Self -> Self -> t_Option_t t_usize_t) ; - f_forward_checked : (Self -> t_usize_t -> t_Option_t Self) ; -}. - -(*item error backend*) - -(*item error backend*) - -#[global] Instance t_u8_t_t_Step : t_Step t_u8_t := { - f_steps_between (start : t_u8_t) (end : t_u8_t) := if start<=.?end - then Option_Some (f_into ((f_clone end).-(f_clone start))) - else Option_Nonet_Option_t t_usize_t; - f_forward_checked (start : t_u8_t) (n : t_usize_t) := match f_try_from n with - | Result_Ok n => - impl_6__checked_add start n - | Result_Err _ => - Option_Nonet_Option_t t_u8_t - end; -}. - -#[global] Instance t_u16_t_t_Step : t_Step t_u16_t := { - f_steps_between (start : t_u16_t) (end : t_u16_t) := if start<=.?end - then Option_Some (f_into ((f_clone end).-(f_clone start))) - else Option_Nonet_Option_t t_usize_t; - f_forward_checked (start : t_u16_t) (n : t_usize_t) := match f_try_from n with - | Result_Ok n => - impl_7__checked_add start n - | Result_Err _ => - Option_Nonet_Option_t t_u16_t - end; -}. - -#[global] Instance t_u32_t_t_Step : t_Step t_u32_t := { - f_steps_between (start : t_u32_t) (end : t_u32_t) := if start<=.?end - then Option_Some (f_into ((f_clone end).-(f_clone start))) - else Option_Nonet_Option_t t_usize_t; - f_forward_checked (start : t_u32_t) (n : t_usize_t) := match f_try_from n with - | Result_Ok n => - impl_8__checked_add start n - | Result_Err _ => - Option_Nonet_Option_t t_u32_t - end; -}. - -#[global] Instance t_u64_t_t_Step : t_Step t_u64_t := { - f_steps_between (start : t_u64_t) (end : t_u64_t) := if start<=.?end - then Option_Some (f_into ((f_clone end).-(f_clone start))) - else Option_Nonet_Option_t t_usize_t; - f_forward_checked (start : t_u64_t) (n : t_usize_t) := match f_try_from n with - | Result_Ok n => - impl_9__checked_add start n - | Result_Err _ => - Option_Nonet_Option_t t_u64_t - end; -}. - -#[global] Instance t_u128_t_t_Step : t_Step t_u128_t := { - f_steps_between (start : t_u128_t) (end : t_u128_t) := if start<=.?end - then impl__ok (f_try_from ((f_clone end).-(f_clone start))) - else Option_Nonet_Option_t t_usize_t; - f_forward_checked (start : t_u128_t) (n : t_usize_t) := Option_Nonet_Option_t t_u128_t; -}. - -#[global] Instance t_usize_t_t_Step : t_Step t_usize_t := { - f_steps_between (start : t_usize_t) (end : t_usize_t) := if start<=.?end - then Option_Some (f_into ((f_clone end).-(f_clone start))) - else Option_Nonet_Option_t t_usize_t; - f_forward_checked (start : t_usize_t) (n : t_usize_t) := match f_try_from n with - | Result_Ok n => - impl_11__checked_add start n - | Result_Err _ => - Option_Nonet_Option_t t_usize_t - end; -}. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core (t_num). +Export Core (t_num). + + + +From Core Require Import Core_Primitive (t_u8). +Export Core_Primitive (t_u8). + +From Core Require Import Core_Primitive (t_u16). +Export Core_Primitive (t_u16). + +From Core Require Import Core_Primitive (t_u32). +Export Core_Primitive (t_u32). + +From Core Require Import Core_Primitive (t_u64). +Export Core_Primitive (t_u64). + +From Core Require Import Core_Primitive (t_u128). +Export Core_Primitive (t_u128). + +From Core Require Import Core_Primitive (t_usize). +Export Core_Primitive (t_usize). + +(* NotImplementedYet *) + +Class t_Step (v_Self : Type) `{t_Sized (v_Self)} `{t_Clone (v_Self)} `{t_PartialOrd (v_Self) (v_Self)} : Type := + { + Step_f_steps_between : v_Self -> v_Self -> t_Option ((t_usize)); + Step_f_forward_checked : v_Self -> t_usize -> t_Option ((v_Self)); + }. +Arguments t_Step (_) {_} {_} {_}. + +Class t_RangeIteratorImpl (v_Self : Type) : Type := + { + RangeIteratorImpl_f_Item : Type; + _ :: `{t_Sized (RangeIteratorImpl_f_Item)}; + RangeIteratorImpl_f_spec_next : v_Self -> (v_Self*t_Option ((RangeIteratorImpl_f_Item))); + }. +Arguments t_RangeIteratorImpl (_). + +Instance t_RangeIteratorImpl_158276838 `{v_A : Type} `{t_Sized (v_A)} `{t_Step (v_A)} : t_RangeIteratorImpl ((t_Range ((v_A)))) := + { + RangeIteratorImpl_impl_f_Item := v_A; + RangeIteratorImpl_impl_f_spec_next := fun (self : t_Range ((v_A)))=> + let hax_temp_output := never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))) in + (self,hax_temp_output); + }. + +Instance t_Iterator_416192239 `{v_A : Type} `{t_Sized (v_A)} `{t_Step (v_A)} : t_Iterator ((t_Range ((v_A)))) := + { + Iterator_impl_1_f_Item := v_A; + Iterator_impl_1_f_next := fun (self : t_Range ((v_A)))=> + let hax_temp_output := never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))) in + (self,hax_temp_output); + Iterator_impl_1_f_size_hint := fun (self : t_Range ((v_A)))=> + if + PartialOrd_f_lt (Range_f_start self) (Range_f_end self) + then + let hint := Step_f_steps_between (Range_f_start self) (Range_f_end self) in + (0,Option_Some (0)) + else + (0,Option_Some (0)); + }. + +Instance t_Step_890486371 : t_Step ((t_u8)) := + { + Step_impl_2_f_steps_between := fun (start : t_u8) (v_end : t_u8)=> + if + PartialOrd_f_le (start) (v_end) + then + Option_Some (Into_f_into (Sub_f_sub (Clone_f_clone (v_end)) (Clone_f_clone (start)))) + else + Option_None; + Step_impl_2_f_forward_checked := fun (start : t_u8) (n : t_usize)=> + match TryFrom_f_try_from (n) with + | Result_Ok (n) => + impl_6__checked_add (start) (n) + | Result_Err (_) => + Option_None + end; + }. + +Instance t_Step_800843805 : t_Step ((t_u16)) := + { + Step_impl_3_f_steps_between := fun (start : t_u16) (v_end : t_u16)=> + if + PartialOrd_f_le (start) (v_end) + then + Option_Some (Into_f_into (Sub_f_sub (Clone_f_clone (v_end)) (Clone_f_clone (start)))) + else + Option_None; + Step_impl_3_f_forward_checked := fun (start : t_u16) (n : t_usize)=> + match TryFrom_f_try_from (n) with + | Result_Ok (n) => + impl_7__checked_add (start) (n) + | Result_Err (_) => + Option_None + end; + }. + +Instance t_Step_230073379 : t_Step ((t_u32)) := + { + Step_impl_4_f_steps_between := fun (start : t_u32) (v_end : t_u32)=> + if + PartialOrd_f_le (start) (v_end) + then + Option_Some (Into_f_into (Sub_f_sub (Clone_f_clone (v_end)) (Clone_f_clone (start)))) + else + Option_None; + Step_impl_4_f_forward_checked := fun (start : t_u32) (n : t_usize)=> + match TryFrom_f_try_from (n) with + | Result_Ok (n) => + impl_8__checked_add (start) (n) + | Result_Err (_) => + Option_None + end; + }. + +Instance t_Step_851062726 : t_Step ((t_u64)) := + { + Step_impl_5_f_steps_between := fun (start : t_u64) (v_end : t_u64)=> + if + PartialOrd_f_le (start) (v_end) + then + Option_Some (Into_f_into (Sub_f_sub (Clone_f_clone (v_end)) (Clone_f_clone (start)))) + else + Option_None; + Step_impl_5_f_forward_checked := fun (start : t_u64) (n : t_usize)=> + match TryFrom_f_try_from (n) with + | Result_Ok (n) => + impl_9__checked_add (start) (n) + | Result_Err (_) => + Option_None + end; + }. + +Instance t_Step_679763039 : t_Step ((t_u128)) := + { + Step_impl_7_f_steps_between := fun (start : t_u128) (v_end : t_u128)=> + if + PartialOrd_f_le (start) (v_end) + then + impl__ok (TryFrom_f_try_from (Sub_f_sub (Clone_f_clone (v_end)) (Clone_f_clone (start)))) + else + Option_None; + Step_impl_7_f_forward_checked := fun (start : t_u128) (n : t_usize)=> + Option_None; + }. + +Instance t_Step_999413546 : t_Step ((t_usize)) := + { + Step_impl_6_f_steps_between := fun (start : t_usize) (v_end : t_usize)=> + if + PartialOrd_f_le (start) (v_end) + then + Option_Some (Into_f_into (Sub_f_sub (Clone_f_clone (v_end)) (Clone_f_clone (start)))) + else + Option_None; + Step_impl_6_f_forward_checked := fun (start : t_usize) (n : t_usize)=> + match TryFrom_f_try_from (n) with + | Result_Ok (n) => + impl_11__checked_add (start) (n) + | Result_Err (_) => + Option_None + end; + }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits.v index ac0e36a06..e23436f51 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits.v @@ -1,32 +1,89 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import IntoIterator. -Export IntoIterator. +(* From Core Require Import Core. *) -Require Import ExactSizeIterator. -Export ExactSizeIterator. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Iterator. -Export Iterator. -Require Import FusedIterator. -Export FusedIterator. -Require Import TrustedLen. -Export TrustedLen. -Require Import TrustedStep. -Export TrustedStep. -(*Not implemented yet? todo(item)*) +From Core Require Import Self_Collect (t_IntoIterator). +Export Self_Collect (t_IntoIterator). -(*Not implemented yet? todo(item)*) +From Core Require Import Self_Exact_size (t_ExactSizeIterator). +Export Self_Exact_size (t_ExactSizeIterator). -(*Not implemented yet? todo(item)*) +From Core Require Import Self_Iterator (t_Iterator). +Export Self_Iterator (t_Iterator). -(*Not implemented yet? todo(item)*) + + +From Core Require Import Self_Marker (t_FusedIterator). +Export Self_Marker (t_FusedIterator). + +From Core Require Import Self_Marker (t_TrustedLen). +Export Self_Marker (t_TrustedLen). + +From Core Require Import Self_Marker (t_TrustedStep). +Export Self_Marker (t_TrustedStep). + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Collect.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Collect.v index ed9cc4cf8..72ea07ca9 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Collect.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Collect.v @@ -1,17 +1,85 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Iterator. -Export Iterator. +(* From Core Require Import Core. *) -(*item error backend*) +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Class t_FromIterator (Self : _) := { - f_from_iter : (T -> Self) ; -}. +From Core Require Import Core_Iter_Traits (t_Iterator). +Export Core_Iter_Traits (t_Iterator). -(*item error backend*) +Class t_IntoIterator (v_Self : Type) : Type := + { + IntoIterator_f_Item : Type; + _ :: `{t_Sized (IntoIterator_f_Item)}; + IntoIterator_f_IntoIter `{_.(Iterator_f_Item) = IntoIterator_f_Item} : Type; + _ :: `{t_Iterator (IntoIterator_f_IntoIter)}; + _ :: `{t_Sized (IntoIterator_f_IntoIter)}; + IntoIterator_f_into_iter : v_Self -> IntoIterator_f_IntoIter; + }. +Arguments t_IntoIterator (_). + +Class t_FromIterator (v_Self : Type) (v_A : Type) `{t_Sized (v_Self)} `{t_Sized (v_A)} : Type := + { + FromIterator_f_from_iter v_T : Type `{t_Sized (v_T)} `{t_IntoIterator (v_T)} `{_.(IntoIterator_f_Item) = v_A} : v_T -> v_Self; + }. +Arguments t_FromIterator (_) (_) {_} {_}. + +Instance t_IntoIterator_346955793 `{v_I : Type} `{t_Sized (v_I)} `{t_Iterator (v_I)} : t_IntoIterator ((v_I)) := + { + IntoIterator_impl_f_Item := Iterator_f_Item; + IntoIterator_impl_f_IntoIter := v_I; + IntoIterator_impl_f_into_iter := fun (self : v_I)=> + self; + }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Exact_size.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Exact_size.v index 8556e1121..bcae322f5 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Exact_size.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Exact_size.v @@ -1,14 +1,67 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Iterator. -Export Iterator. +(* From Core Require Import Core. *) -Class t_ExactSizeIterator := { - f_len : (Self -> uint_size) ; - f_is_empty : (Self -> bool) ; -}. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +From Core Require Import Core_Iter (t_Iterator). +Export Core_Iter (t_Iterator). + +Class t_ExactSizeIterator (v_Self : Type) `{t_Iterator (v_Self)} : Type := + { + ExactSizeIterator_f_len : v_Self -> t_usize; + ExactSizeIterator_f_is_empty : v_Self -> bool; + }. +Arguments t_ExactSizeIterator (_) {_}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v index df485cf86..79579c534 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v @@ -1,20 +1,79 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Core_Marker. -Export Core_Marker. +(* From Core Require Import Core. *) -Require Import Core_Option. -Export Core_Option. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Core_Primitive. -Export Core_Primitive. +From Core Require Import Core (t_marker). +Export Core (t_marker). -Require Import FnMut. -Export FnMut. +From Core Require Import Core (t_option). +Export Core (t_option). -(*item error backend*) +From Core Require Import Core (t_primitive). +Export Core (t_primitive). + +From Core Require Import Core_Ops (t_FnMut). +Export Core_Ops (t_FnMut). + +Class t_Iterator (v_Self : Type) : Type := + { + Iterator_f_Item : Type; + _ :: `{t_Sized (Iterator_f_Item)}; + Iterator_f_next : v_Self -> (v_Self*t_Option ((Iterator_f_Item))); + Iterator_f_size_hint : v_Self -> (t_usize*t_Option ((t_usize))); + Iterator_f_fold v_B : Type v_F : Type `{t_Sized (v_B)} `{t_Sized (v_F)} `{t_Sized (v_Self)} `{t_FnMut (v_F) ((v_B*Iterator_f_Item))} `{_.(FnOnce_f_Output) = v_B} : v_Self -> v_B -> v_F -> v_B; + }. +Arguments t_Iterator (_). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Marker.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Marker.v index b536c6c6f..b68138666 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Marker.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Marker.v @@ -1,21 +1,80 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Step. -Export Step. +(* From Core Require Import Core. *) -Class t_TrustedFused := { -}. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Class t_FusedIterator := { -}. +From Core Require Import Core_Iter (t_Step). +Export Core_Iter (t_Step). -Class t_TrustedLen := { -}. +Class t_TrustedFused (v_Self : Type) : Type := + { + }. +Arguments t_TrustedFused (_). -Class t_TrustedStep := { -}. +Class t_TrustedStep (v_Self : Type) `{t_Step (v_Self)} `{t_Copy (v_Self)} : Type := + { + }. +Arguments t_TrustedStep (_) {_} {_}. + +Class t_FusedIterator (v_Self : Type) `{t_Iterator (v_Self)} : Type := + { + }. +Arguments t_FusedIterator (_) {_}. + +Class t_TrustedLen (v_Self : Type) `{t_Iterator (v_Self)} : Type := + { + }. +Arguments t_TrustedLen (_) {_}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Marker.v b/proof-libs/coq/coq/generated-core/src/Core_Marker.v index 555d59245..7bf9c11ca 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Marker.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Marker.v @@ -1,21 +1,80 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Clone. -Export Clone. +(* From Core Require Import Core. *) -Class t_Copy := { -}. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Class t_Destruct := { -}. +From Core Require Import Core_Clone (t_Clone). +Export Core_Clone (t_Clone). -Class t_Sized := { -}. +Class t_Copy (v_Self : Type) `{t_Clone (v_Self)} : Type := + { + }. +Arguments t_Copy (_) {_}. -Class t_Tuple := { -}. +Class t_Destruct (v_Self : Type) : Type := + { + }. +Arguments t_Destruct (_). + +Class t_Sized (v_Self : Type) : Type := + { + }. +Arguments t_Sized (_). + +Class t_Tuple (v_Self : Type) : Type := + { + }. +Arguments t_Tuple (_). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Num.v b/proof-libs/coq/coq/generated-core/src/Core_Num.v index 557160159..9b555ad9e 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Num.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Num.v @@ -1,835 +1,544 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Crate_Base_interface_Int. -Export Crate_Base_interface_Int. +(* From Core Require Import Core. *) -Require Import Crate_Primitive. -Export Crate_Primitive. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import intrinsics. -Export intrinsics. +From Core Require Import Core_Base_interface (t_int). +Export Core_Base_interface (t_int). -Require Import Index. -Export Index. +From Core Require Import Core (t_primitive). +Export Core (t_primitive). -Require Import Crate_Base_Seq. -Export Crate_Base_Seq. +From Core Require Import Core (t_intrinsics). +Export Core (t_intrinsics). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Ops (t_Index). +Export Core_Ops (t_Index). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Base (t_seq). +Export Core_Base (t_seq). -Definition impl_10__MAX : t_u128_t := - C_u128 f_MAX. +(* NotImplementedYet *) -Definition impl_10__MIN : t_u128_t := - C_u128 f_MIN. +(* NotImplementedYet *) -Definition impl_10__from_le (x : t_u128_t) : t_u128_t := - x. +Notation "'impl_10__from_le'" := (from_le715594649). -Definition impl_10__to_le (self : t_u128_t) : t_u128_t := - self. +Notation "'impl_10__to_le'" := (to_le902648378). -Definition impl_7__MAX : t_u16_t := - C_u16 f_MAX. +Notation "'impl_7__from_le'" := (from_le793045973). -Definition impl_7__MIN : t_u16_t := - C_u16 f_MIN. +Notation "'impl_7__to_le'" := (to_le1012469456). -Definition impl_7__from_le (x : t_u16_t) : t_u16_t := - x. +Notation "'impl_8__from_le'" := (from_le706338679). -Definition impl_7__to_le (self : t_u16_t) : t_u16_t := - self. +Notation "'impl_8__to_le'" := (to_le724624277). -Definition impl__i8__BITS : t_u32_t := - C_u32 impl_97__BITS. +Notation "'impl_9__from_le'" := (from_le435089922). -Definition impl__i16__BITS : t_u32_t := - C_u32 impl_83__BITS. +Notation "'impl_9__to_le'" := (to_le2703875). -Definition impl__i32__BITS : t_u32_t := - C_u32 impl_69__BITS. +Notation "'impl_6__from_le'" := (from_le529489651). -Definition impl__i64__BITS : t_u32_t := - C_u32 impl_55__BITS. +Notation "'impl_6__to_le'" := (to_le523556665). -Definition impl__i128__BITS : t_u32_t := - C_u32 impl_41__BITS. +Notation "'impl_11__from_le'" := (from_le418743864). -Definition impl__isize__BITS : t_u32_t := - C_u32 impl_55__BITS. +Notation "'impl_11__to_le'" := (to_le946822077). -Definition impl_6__BITS : t_u32_t := - C_u32 impl_219__BITS. +Notation "'impl__BITS'" := (v_BITS80497669). -Definition impl_7__BITS : t_u32_t := - C_u32 impl_192__BITS. +Notation "'impl__MAX'" := (v_MAX626626007). -Definition impl_8__BITS : t_u32_t := - C_u32 impl_165__BITS. +Notation "'impl__MIN'" := (v_MIN19747349). -Definition impl_8__MAX : t_u32_t := - C_u32 f_MAX. +Notation "'impl__i16__BITS'" := (v_BITS421056295). -Definition impl_8__MIN : t_u32_t := - C_u32 f_MIN. +Notation "'impl__i16__MAX'" := (v_MAX474501300). -Definition impl_8__from_le (x : t_u32_t) : t_u32_t := - x. +Notation "'impl__i16__MIN'" := (v_MIN776391606). -Definition impl_8__to_le (self : t_u32_t) : t_u32_t := - self. +Notation "'impl__i32__BITS'" := (v_BITS465526498). -Definition impl_9__BITS : t_u32_t := - C_u32 impl_138__BITS. +Notation "'impl__i32__MAX'" := (v_MAX106630818). -Definition impl_10__BITS : t_u32_t := - C_u32 impl_111__BITS. +Notation "'impl__i32__MIN'" := (v_MIN682967538). -Definition impl_11__BITS : t_u32_t := - C_u32 impl_138__BITS. +Notation "'impl__i64__BITS'" := (v_BITS419886578). -Definition impl_9__MAX : t_u64_t := - C_u64 f_MAX. +Notation "'impl__i64__MAX'" := (v_MAX527043787). -Definition impl_9__MIN : t_u64_t := - C_u64 f_MIN. +Notation "'impl__i64__MIN'" := (v_MIN654206259). -Definition impl_9__from_le (x : t_u64_t) : t_u64_t := - x. +Notation "'impl__i128__BITS'" := (v_BITS992667165). -Definition impl_9__to_le (self : t_u64_t) : t_u64_t := - self. +Notation "'impl__i128__MAX'" := (v_MAX375377319). -Definition impl_6__MAX : t_u8_t := - C_u8 f_MAX. +Notation "'impl__i128__MIN'" := (v_MIN79612531). -Definition impl_6__MIN : t_u8_t := - C_u8 f_MIN. +Notation "'impl__isize__BITS'" := (v_BITS211584016). -Definition impl_6__from_le (x : t_u8_t) : t_u8_t := - x. +Notation "'impl__isize__MAX'" := (v_MAX937003029). -Definition impl_6__to_le (self : t_u8_t) : t_u8_t := - self. +Notation "'impl__isize__MIN'" := (v_MIN1017039533). -Definition impl_11__MAX : t_usize_t := - C_usize f_MAX. +Notation "'impl_6__BITS'" := (v_BITS690311813). -Definition impl_11__MIN : t_usize_t := - C_usize f_MIN. +Notation "'impl_6__MAX'" := (v_MAX310118176). -Definition impl_11__from_le (x : t_usize_t) : t_usize_t := - x. +Notation "'impl_6__MIN'" := (v_MIN41851434). -Definition impl_11__to_le (self : t_usize_t) : t_usize_t := - self. +Notation "'impl_7__BITS'" := (v_BITS277333551). -Definition impl_6__checked_add (self : t_u8_t) (rhs : t_u8_t) : t_Option_t t_u8_t := - Option_Some (unchecked_add_u8 self rhs). +Notation "'impl_7__MAX'" := (v_MAX487295910). -Definition impl_7__checked_add (self : t_u16_t) (rhs : t_u16_t) : t_Option_t t_u16_t := - Option_Some (unchecked_add_u16 self rhs). +Notation "'impl_7__MIN'" := (v_MIN592300287). -Definition impl_8__checked_add (self : t_u32_t) (rhs : t_u32_t) : t_Option_t t_u32_t := - Option_Some (unchecked_add_u32 self rhs). +Notation "'impl_8__BITS'" := (v_BITS473478051). -Definition impl_9__checked_add (self : t_u64_t) (rhs : t_u64_t) : t_Option_t t_u64_t := - Option_Some (unchecked_add_u64 self rhs). +Notation "'impl_8__MAX'" := (v_MAX826434525). -Definition impl_10__checked_add (self : t_u128_t) (rhs : t_u128_t) : t_Option_t t_u128_t := - Option_Some (unchecked_add_u128 self rhs). +Notation "'impl_8__MIN'" := (v_MIN932777089). -Definition impl_11__checked_add (self : t_usize_t) (rhs : t_usize_t) : t_Option_t t_usize_t := - Option_Some (unchecked_add_usize self rhs). +Notation "'impl_9__BITS'" := (v_BITS177666292). -Definition impl__i128__MAX : t_i128_t := - C_i128 f_MAX. +Notation "'impl_9__MAX'" := (v_MAX815180633). -Definition impl__i128__MIN : t_i128_t := - C_i128 f_MIN. +Notation "'impl_9__MIN'" := (v_MIN631333594). -Definition impl__i16__MAX : t_i16_t := - C_i16 f_MAX. +Notation "'impl_10__BITS'" := (v_BITS136999051). -Definition impl__i16__MIN : t_i16_t := - C_i16 f_MIN. +Notation "'impl_10__MAX'" := (v_MAX404543799). -Definition impl__i32__MAX : t_i32_t := - C_i32 f_MAX. +Notation "'impl_10__MIN'" := (v_MIN668621698). -Definition impl__i32__MIN : t_i32_t := - C_i32 f_MIN. +Notation "'impl_11__BITS'" := (v_BITS229952196). -Definition impl__i64__MAX : t_i64_t := - C_i64 f_MAX. +Notation "'impl_11__MAX'" := (v_MAX750570916). -Definition impl__i64__MIN : t_i64_t := - C_i64 f_MIN. +Notation "'impl_11__MIN'" := (v_MIN861571008). -Definition impl__i8__MAX : t_i8_t := - C_i8 f_MAX. +Notation "'impl__is_negative'" := (is_negative350273175). -Definition impl__i8__MIN : t_i8_t := - C_i8 f_MIN. +Notation "'impl__is_positive'" := (is_positive286955196). -Definition impl__isize__MAX : t_isize_t := - C_isize f_MAX. +Notation "'impl__signum'" := (signum721334203). -Definition impl__isize__MIN : t_isize_t := - C_isize f_MIN. +Notation "'impl__i16__is_negative'" := (is_negative477067241). -Definition impl__i8__is_negative (self : t_i8_t) : bool := - self<.?(f_into (@repr WORDSIZE8 0)). +Notation "'impl__i16__is_positive'" := (is_positive821581438). -Definition impl__i8__is_positive (self : t_i8_t) : bool := - self>.?(f_into (@repr WORDSIZE8 0)). +Notation "'impl__i16__signum'" := (signum243706004). -Definition impl__i8__signum (self : t_i8_t) : t_i8_t := - if (f_clone self)<.?(f_into (@repr WORDSIZE8 0)) - then f_into (@repr WORDSIZE8 1) - else if self=.?(f_into (@repr WORDSIZE8 0)) - then f_into (@repr WORDSIZE8 0) - else f_into (@repr WORDSIZE8 1). +Notation "'impl__i32__is_negative'" := (is_negative1035644813). -Definition impl__i16__is_negative (self : t_i16_t) : bool := - self<.?(f_into (@repr WORDSIZE16 0)). +Notation "'impl__i32__is_positive'" := (is_positive401652342). -Definition impl__i16__is_positive (self : t_i16_t) : bool := - self>.?(f_into (@repr WORDSIZE16 0)). +Notation "'impl__i32__signum'" := (signum323641039). -Definition impl__i16__signum (self : t_i16_t) : t_i16_t := - if (f_clone self)<.?(f_into (@repr WORDSIZE16 0)) - then f_into (@repr WORDSIZE16 1) - else if self=.?(f_into (@repr WORDSIZE16 0)) - then f_into (@repr WORDSIZE16 0) - else f_into (@repr WORDSIZE16 1). +Notation "'impl__i64__is_negative'" := (is_negative1066124578). -Definition impl__i32__is_negative (self : t_i32_t) : bool := - self<.?(f_into (@repr WORDSIZE32 0)). +Notation "'impl__i64__is_positive'" := (is_positive16569358). -Definition impl__i32__is_positive (self : t_i32_t) : bool := - self>.?(f_into (@repr WORDSIZE32 0)). +Notation "'impl__i64__signum'" := (signum582963664). -Definition impl__i32__signum (self : t_i32_t) : t_i32_t := - if (f_clone self)<.?(f_into (@repr WORDSIZE32 0)) - then f_into (@repr WORDSIZE32 1) - else if self=.?(f_into (@repr WORDSIZE32 0)) - then f_into (@repr WORDSIZE32 0) - else f_into (@repr WORDSIZE32 1). +Notation "'impl__i128__is_negative'" := (is_negative221698470). -Definition impl__i64__is_negative (self : t_i64_t) : bool := - self<.?(f_into (@repr WORDSIZE64 0)). +Notation "'impl__i128__is_positive'" := (is_positive883218309). -Definition impl__i64__is_positive (self : t_i64_t) : bool := - self>.?(f_into (@repr WORDSIZE64 0)). +Notation "'impl__i128__signum'" := (signum408800799). -Definition impl__i64__signum (self : t_i64_t) : t_i64_t := - if (f_clone self)<.?(f_into (@repr WORDSIZE64 0)) - then f_into (@repr WORDSIZE64 1) - else if self=.?(f_into (@repr WORDSIZE64 0)) - then f_into (@repr WORDSIZE64 0) - else f_into (@repr WORDSIZE64 1). +Notation "'impl__isize__is_negative'" := (is_negative693446369). -Definition impl__i128__is_negative (self : t_i128_t) : bool := - self<.?(f_into (@repr WORDSIZE128 0)). +Notation "'impl__isize__is_positive'" := (is_positive169998680). -Definition impl__i128__is_positive (self : t_i128_t) : bool := - self>.?(f_into (@repr WORDSIZE128 0)). +Notation "'impl__isize__signum'" := (signum91486536). -Definition impl__i128__signum (self : t_i128_t) : t_i128_t := - if (f_clone self)<.?(f_into (@repr WORDSIZE128 0)) - then f_into (@repr WORDSIZE128 1) - else if self=.?(f_into (@repr WORDSIZE128 0)) - then f_into (@repr WORDSIZE128 0) - else f_into (@repr WORDSIZE128 1). +Notation "'impl_6__checked_add'" := (checked_add268751055). -Definition impl__isize__is_negative (self : t_isize_t) : bool := - self<.?(f_into (@repr WORDSIZE32 0)). +Notation "'impl_7__checked_add'" := (checked_add132377399). -Definition impl__isize__is_positive (self : t_isize_t) : bool := - self>.?(f_into (@repr WORDSIZE32 0)). +Notation "'impl_8__checked_add'" := (checked_add985437730). -Definition impl__isize__signum (self : t_isize_t) : t_isize_t := - if (f_clone self)<.?(f_into (@repr WORDSIZE32 0)) - then f_into (@repr WORDSIZE32 1) - else if self=.?(f_into (@repr WORDSIZE32 0)) - then f_into (@repr WORDSIZE32 0) - else f_into (@repr WORDSIZE32 1). +Notation "'impl_9__checked_add'" := (checked_add586246465). -Definition impl__i8__wrapping_add (self : t_i8_t) (rhs : t_i8_t) : t_i8_t := - wrapping_add_i8 self rhs. +Notation "'impl_10__checked_add'" := (checked_add218978451). -Definition impl__i8__wrapping_sub (self : t_i8_t) (rhs : t_i8_t) : t_i8_t := - wrapping_sub_i8 self rhs. +Notation "'impl_11__checked_add'" := (checked_add984013567). -Definition impl__i8__wrapping_neg (self : t_i8_t) : t_i8_t := - impl__i8__wrapping_sub (f_into (@repr WORDSIZE8 0)) self. +Notation "'impl__wrapping_add'" := (wrapping_add634491935). -Definition impl__i8__wrapping_abs (self : t_i8_t) : t_i8_t := - if impl__i8__is_negative (f_clone self) - then impl__i8__wrapping_neg self - else self. +Notation "'impl__wrapping_sub'" := (wrapping_sub973428293). -Definition impl__i16__wrapping_add (self : t_i16_t) (rhs : t_i16_t) : t_i16_t := - wrapping_add_i16 self rhs. +Notation "'impl__wrapping_neg'" := (wrapping_neg400701205). -Definition impl__i16__wrapping_sub (self : t_i16_t) (rhs : t_i16_t) : t_i16_t := - wrapping_sub_i16 self rhs. +Notation "'impl__wrapping_abs'" := (wrapping_abs400396545). -Definition impl__i16__wrapping_neg (self : t_i16_t) : t_i16_t := - impl__i16__wrapping_sub (f_into (@repr WORDSIZE16 0)) self. +Notation "'impl__i16__wrapping_add'" := (wrapping_add868559108). -Definition impl__i16__wrapping_abs (self : t_i16_t) : t_i16_t := - if impl__i16__is_negative (f_clone self) - then impl__i16__wrapping_neg self - else self. +Notation "'impl__i16__wrapping_sub'" := (wrapping_sub189469152). -Definition impl__i32__wrapping_add (self : t_i32_t) (rhs : t_i32_t) : t_i32_t := - wrapping_add_i32 self rhs. +Notation "'impl__i16__wrapping_neg'" := (wrapping_neg860505723). -Definition impl__i32__wrapping_sub (self : t_i32_t) (rhs : t_i32_t) : t_i32_t := - wrapping_sub_i32 self rhs. +Notation "'impl__i16__wrapping_abs'" := (wrapping_abs229076826). -Definition impl__i32__wrapping_neg (self : t_i32_t) : t_i32_t := - impl__i32__wrapping_sub (f_into (@repr WORDSIZE32 0)) self. +Notation "'impl__i32__wrapping_add'" := (wrapping_add475006616). -Definition impl__i32__wrapping_abs (self : t_i32_t) : t_i32_t := - if impl__i32__is_negative (f_clone self) - then impl__i32__wrapping_neg self - else self. +Notation "'impl__i32__wrapping_sub'" := (wrapping_sub298337071). -Definition impl__i64__wrapping_add (self : t_i64_t) (rhs : t_i64_t) : t_i64_t := - wrapping_add_i64 self rhs. +Notation "'impl__i32__wrapping_neg'" := (wrapping_neg636433078). -Definition impl__i64__wrapping_sub (self : t_i64_t) (rhs : t_i64_t) : t_i64_t := - wrapping_sub_i64 self rhs. +Notation "'impl__i32__wrapping_abs'" := (wrapping_abs729536875). -Definition impl__i64__wrapping_neg (self : t_i64_t) : t_i64_t := - impl__i64__wrapping_sub (f_into (@repr WORDSIZE64 0)) self. +Notation "'impl__i64__wrapping_add'" := (wrapping_add590074241). -Definition impl__i64__wrapping_abs (self : t_i64_t) : t_i64_t := - if impl__i64__is_negative (f_clone self) - then impl__i64__wrapping_neg self - else self. +Notation "'impl__i64__wrapping_sub'" := (wrapping_sub334584751). -Definition impl__i128__wrapping_add (self : t_i128_t) (rhs : t_i128_t) : t_i128_t := - wrapping_add_i128 self rhs. +Notation "'impl__i64__wrapping_neg'" := (wrapping_neg868282938). -Definition impl__i128__wrapping_sub (self : t_i128_t) (rhs : t_i128_t) : t_i128_t := - wrapping_sub_i128 self rhs. +Notation "'impl__i64__wrapping_abs'" := (wrapping_abs285829312). -Definition impl__i128__wrapping_neg (self : t_i128_t) : t_i128_t := - impl__i128__wrapping_sub (f_into (@repr WORDSIZE128 0)) self. +Notation "'impl__i128__wrapping_add'" := (wrapping_add251385439). -Definition impl__i128__wrapping_abs (self : t_i128_t) : t_i128_t := - if impl__i128__is_negative (f_clone self) - then impl__i128__wrapping_neg self - else self. +Notation "'impl__i128__wrapping_sub'" := (wrapping_sub681598071). -Definition impl__isize__wrapping_add (self : t_isize_t) (rhs : t_isize_t) : t_isize_t := - wrapping_add_isize self rhs. +Notation "'impl__i128__wrapping_neg'" := (wrapping_neg446546984). -Definition impl__isize__wrapping_sub (self : t_isize_t) (rhs : t_isize_t) : t_isize_t := - wrapping_sub_isize self rhs. +Notation "'impl__i128__wrapping_abs'" := (wrapping_abs281925696). -Definition impl__isize__wrapping_neg (self : t_isize_t) : t_isize_t := - impl__isize__wrapping_sub (f_into (@repr WORDSIZE32 0)) self. +Notation "'impl__isize__wrapping_add'" := (wrapping_add226040243). -Definition impl__isize__wrapping_abs (self : t_isize_t) : t_isize_t := - if impl__isize__is_negative (f_clone self) - then impl__isize__wrapping_neg self - else self. +Notation "'impl__isize__wrapping_sub'" := (wrapping_sub698035192). -Definition impl_6__checked_div (self : t_u8_t) (rhs : t_u8_t) : t_Option_t t_u8_t := - if rhs=.?(f_into (@repr WORDSIZE8 0)) - then Option_Nonet_Option_t t_u8_t - else Option_Some (unchecked_div_u8 self rhs). +Notation "'impl__isize__wrapping_neg'" := (wrapping_neg912291768). -Definition impl_6__overflowing_add (self : t_u8_t) (rhs : t_u8_t) : t_u8_t × bool := - add_with_overflow_u8 self rhs. +Notation "'impl__isize__wrapping_abs'" := (wrapping_abs347300819). -Definition impl_7__checked_div (self : t_u16_t) (rhs : t_u16_t) : t_Option_t t_u16_t := - if rhs=.?(f_into (@repr WORDSIZE16 0)) - then Option_Nonet_Option_t t_u16_t - else Option_Some (unchecked_div_u16 self rhs). +Notation "'impl_6__checked_div'" := (checked_div508301931). -Definition impl_7__overflowing_add (self : t_u16_t) (rhs : t_u16_t) : t_u16_t × bool := - add_with_overflow_u16 self rhs. +Notation "'impl_6__overflowing_add'" := (overflowing_add708890057). -Definition impl_8__checked_div (self : t_u32_t) (rhs : t_u32_t) : t_Option_t t_u32_t := - if rhs=.?(f_into (@repr WORDSIZE32 0)) - then Option_Nonet_Option_t t_u32_t - else Option_Some (unchecked_div_u32 self rhs). +Notation "'impl_7__checked_div'" := (checked_div614920780). -Definition impl_8__overflowing_add (self : t_u32_t) (rhs : t_u32_t) : t_u32_t × bool := - add_with_overflow_u32 self rhs. +Notation "'impl_7__overflowing_add'" := (overflowing_add1023344178). -Definition impl_9__checked_div (self : t_u64_t) (rhs : t_u64_t) : t_Option_t t_u64_t := - if rhs=.?(f_into (@repr WORDSIZE64 0)) - then Option_Nonet_Option_t t_u64_t - else Option_Some (unchecked_div_u64 self rhs). +Notation "'impl_8__checked_div'" := (checked_div979383477). -Definition impl_9__overflowing_add (self : t_u64_t) (rhs : t_u64_t) : t_u64_t × bool := - add_with_overflow_u64 self rhs. +Notation "'impl_8__overflowing_add'" := (overflowing_add905744292). -Definition impl_10__checked_div (self : t_u128_t) (rhs : t_u128_t) : t_Option_t t_u128_t := - if rhs=.?(f_into (@repr WORDSIZE128 0)) - then Option_Nonet_Option_t t_u128_t - else Option_Some (unchecked_div_u128 self rhs). +Notation "'impl_9__checked_div'" := (checked_div988689127). -Definition impl_10__overflowing_add (self : t_u128_t) (rhs : t_u128_t) : t_u128_t × bool := - add_with_overflow_u128 self rhs. +Notation "'impl_9__overflowing_add'" := (overflowing_add581983607). -Definition impl_11__checked_div (self : t_usize_t) (rhs : t_usize_t) : t_Option_t t_usize_t := - if rhs=.?(f_into (@repr WORDSIZE32 0)) - then Option_Nonet_Option_t t_usize_t - else Option_Some (unchecked_div_usize self rhs). +Notation "'impl_10__checked_div'" := (checked_div344106746). -Definition impl_11__overflowing_add (self : t_usize_t) (rhs : t_usize_t) : t_usize_t × bool := - add_with_overflow_usize self rhs. +Notation "'impl_10__overflowing_add'" := (overflowing_add458293681). -Definition impl_6__wrapping_add (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := - wrapping_add_u8 self rhs. +Notation "'impl_11__checked_div'" := (checked_div80223906). -Definition impl_6__wrapping_mul (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := - wrapping_mul_u8 self rhs. +Notation "'impl_11__overflowing_add'" := (overflowing_add682280407). -Definition impl_7__wrapping_add (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := - wrapping_add_u16 self rhs. +Notation "'impl__abs'" := (abs945505614). -Definition impl_7__wrapping_mul (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := - wrapping_mul_u16 self rhs. +Notation "'impl__i16__abs'" := (abs581170970). -Definition impl_8__wrapping_add (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := - wrapping_add_u32 self rhs. +Notation "'impl__i32__abs'" := (abs590464694). -Definition impl_8__wrapping_mul (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := - wrapping_mul_u32 self rhs. +Notation "'impl__i64__abs'" := (abs654781043). -Definition impl_9__wrapping_add (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := - wrapping_add_u64 self rhs. +Notation "'impl__i128__abs'" := (abs204417539). -Definition impl_9__wrapping_mul (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := - wrapping_mul_u64 self rhs. +Notation "'impl__isize__abs'" := (abs220926056). -Definition impl_10__wrapping_add (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := - wrapping_add_u128 self rhs. +Notation "'impl_6__wrapping_add'" := (wrapping_add480603777). -Definition impl_10__wrapping_mul (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := - wrapping_mul_u128 self rhs. +Notation "'impl_6__wrapping_mul'" := (wrapping_mul885216284). -Definition impl_11__wrapping_add (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := - wrapping_add_usize self rhs. +Notation "'impl_7__wrapping_add'" := (wrapping_add124432709). -Definition impl_11__wrapping_mul (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := - wrapping_mul_usize self rhs. +Notation "'impl_7__wrapping_mul'" := (wrapping_mul14465189). -Definition impl__i8__abs (self : t_i8_t) : t_i8_t := - if impl__i8__is_negative (f_clone self) - then f_neg self - else self. +Notation "'impl_8__wrapping_add'" := (wrapping_add1049665857). -Definition impl__i16__abs (self : t_i16_t) : t_i16_t := - if impl__i16__is_negative (f_clone self) - then f_neg self - else self. +Notation "'impl_8__wrapping_mul'" := (wrapping_mul203346768). -Definition impl__i32__abs (self : t_i32_t) : t_i32_t := - if impl__i32__is_negative (f_clone self) - then f_neg self - else self. +Notation "'impl_9__wrapping_add'" := (wrapping_add865565639). -Definition impl__i64__abs (self : t_i64_t) : t_i64_t := - if impl__i64__is_negative (f_clone self) - then f_neg self - else self. +Notation "'impl_9__wrapping_mul'" := (wrapping_mul742978873). -Definition impl__i128__abs (self : t_i128_t) : t_i128_t := - if impl__i128__is_negative (f_clone self) - then f_neg self - else self. +Notation "'impl_10__wrapping_add'" := (wrapping_add40844100). -Definition impl__isize__abs (self : t_isize_t) : t_isize_t := - if impl__isize__is_negative (f_clone self) - then f_neg self - else self. +Notation "'impl_10__wrapping_mul'" := (wrapping_mul294115024). -Definition impl_6__wrapping_sub (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := - wrapping_sub_u8 self rhs. +Notation "'impl_11__wrapping_add'" := (wrapping_add427637036). -Definition impl_6__wrapping_neg (self : t_u8_t) : t_u8_t := - impl_6__wrapping_sub (C_u8 f_ZERO) self. +Notation "'impl_11__wrapping_mul'" := (wrapping_mul680896953). -Definition impl_7__wrapping_sub (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := - wrapping_sub_u16 self rhs. +Notation "'impl_6__wrapping_sub'" := (wrapping_sub403906422). -Definition impl_7__wrapping_neg (self : t_u16_t) : t_u16_t := - impl_7__wrapping_sub (C_u16 f_ZERO) self. +Notation "'impl_6__wrapping_neg'" := (wrapping_neg123212788). -Definition impl_8__wrapping_sub (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := - wrapping_sub_u32 self rhs. +Notation "'impl_7__wrapping_sub'" := (wrapping_sub811251034). -Definition impl_8__wrapping_neg (self : t_u32_t) : t_u32_t := - impl_8__wrapping_sub (C_u32 f_ZERO) self. +Notation "'impl_7__wrapping_neg'" := (wrapping_neg128555595). -Definition impl_9__wrapping_sub (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := - wrapping_sub_u64 self rhs. +Notation "'impl_8__wrapping_sub'" := (wrapping_sub708953500). -Definition impl_9__wrapping_neg (self : t_u64_t) : t_u64_t := - impl_9__wrapping_sub (C_u64 f_ZERO) self. +Notation "'impl_8__wrapping_neg'" := (wrapping_neg328220773). -Definition impl_10__wrapping_sub (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := - wrapping_sub_u128 self rhs. +Notation "'impl_9__wrapping_sub'" := (wrapping_sub762520851). -Definition impl_10__wrapping_neg (self : t_u128_t) : t_u128_t := - impl_10__wrapping_sub (C_u128 f_ZERO) self. +Notation "'impl_9__wrapping_neg'" := (wrapping_neg617136337). -Definition impl_11__wrapping_sub (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := - wrapping_sub_usize self rhs. +Notation "'impl_10__wrapping_sub'" := (wrapping_sub409310259). -Definition impl_11__wrapping_neg (self : t_usize_t) : t_usize_t := - impl_11__wrapping_sub (C_usize f_ZERO) self. +Notation "'impl_10__wrapping_neg'" := (wrapping_neg729451428). -Definition impl_6__wrapping_div (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := - self./rhs. +Notation "'impl_11__wrapping_sub'" := (wrapping_sub813101882). -Definition impl_6__wrapping_div_euclid (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := - self./rhs. +Notation "'impl_11__wrapping_neg'" := (wrapping_neg342773446). -Definition impl_7__wrapping_div (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := - self./rhs. +Notation "'impl_6__wrapping_div'" := (wrapping_div660080892). -Definition impl_7__wrapping_div_euclid (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := - self./rhs. +Notation "'impl_6__wrapping_div_euclid'" := (wrapping_div_euclid481233436). -Definition impl_8__wrapping_div (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := - self./rhs. +Notation "'impl_7__wrapping_div'" := (wrapping_div366977334). -Definition impl_8__wrapping_div_euclid (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := - self./rhs. +Notation "'impl_7__wrapping_div_euclid'" := (wrapping_div_euclid22267888). -Definition impl_9__wrapping_div (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := - self./rhs. +Notation "'impl_8__wrapping_div'" := (wrapping_div931150450). -Definition impl_9__wrapping_div_euclid (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := - self./rhs. +Notation "'impl_8__wrapping_div_euclid'" := (wrapping_div_euclid606291997). -Definition impl_10__wrapping_div (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := - self./rhs. +Notation "'impl_9__wrapping_div'" := (wrapping_div168427046). -Definition impl_10__wrapping_div_euclid (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := - self./rhs. +Notation "'impl_9__wrapping_div_euclid'" := (wrapping_div_euclid321252086). -Definition impl_11__wrapping_div (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := - self./rhs. +Notation "'impl_10__wrapping_div'" := (wrapping_div692427683). -Definition impl_11__wrapping_div_euclid (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := - self./rhs. +Notation "'impl_10__wrapping_div_euclid'" := (wrapping_div_euclid926334515). -Definition impl_6__wrapping_rem (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := - self.%rhs. +Notation "'impl_11__wrapping_div'" := (wrapping_div905768546). -Definition impl_6__wrapping_rem_euclid (self : t_u8_t) (rhs : t_u8_t) : t_u8_t := - self.%rhs. +Notation "'impl_11__wrapping_div_euclid'" := (wrapping_div_euclid90317722). -Definition impl_7__wrapping_rem (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := - self.%rhs. +Notation "'impl_6__wrapping_rem'" := (wrapping_rem984569721). -Definition impl_7__wrapping_rem_euclid (self : t_u16_t) (rhs : t_u16_t) : t_u16_t := - self.%rhs. +Notation "'impl_6__wrapping_rem_euclid'" := (wrapping_rem_euclid946579345). -Definition impl_8__wrapping_rem (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := - self.%rhs. +Notation "'impl_7__wrapping_rem'" := (wrapping_rem378598035). -Definition impl_8__wrapping_rem_euclid (self : t_u32_t) (rhs : t_u32_t) : t_u32_t := - self.%rhs. +Notation "'impl_7__wrapping_rem_euclid'" := (wrapping_rem_euclid602402638). -Definition impl_9__wrapping_rem (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := - self.%rhs. +Notation "'impl_8__wrapping_rem'" := (wrapping_rem292009099). -Definition impl_9__wrapping_rem_euclid (self : t_u64_t) (rhs : t_u64_t) : t_u64_t := - self.%rhs. +Notation "'impl_8__wrapping_rem_euclid'" := (wrapping_rem_euclid1020271291). -Definition impl_10__wrapping_rem (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := - self.%rhs. +Notation "'impl_9__wrapping_rem'" := (wrapping_rem390602260). -Definition impl_10__wrapping_rem_euclid (self : t_u128_t) (rhs : t_u128_t) : t_u128_t := - self.%rhs. +Notation "'impl_9__wrapping_rem_euclid'" := (wrapping_rem_euclid839264546). -Definition impl_11__wrapping_rem (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := - self.%rhs. +Notation "'impl_10__wrapping_rem'" := (wrapping_rem332379920). -Definition impl_11__wrapping_rem_euclid (self : t_usize_t) (rhs : t_usize_t) : t_usize_t := - self.%rhs. +Notation "'impl_10__wrapping_rem_euclid'" := (wrapping_rem_euclid646122423). -Definition impl_6__rotate_left (self : t_u8_t) (n : t_u32_t) : t_u8_t := - run (let hoist1 := ControlFlow_Break (rotate_left_u8 self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist1)). +Notation "'impl_11__wrapping_rem'" := (wrapping_rem333089373). -Definition impl_6__rotate_right (self : t_u8_t) (n : t_u32_t) : t_u8_t := - run (let hoist2 := ControlFlow_Break (rotate_right_u8 self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist2)). +Notation "'impl_11__wrapping_rem_euclid'" := (wrapping_rem_euclid769656504). -Definition impl_7__rotate_left (self : t_u16_t) (n : t_u32_t) : t_u16_t := - run (let hoist3 := ControlFlow_Break (rotate_left_u16 self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist3)). +Notation "'impl_6__rotate_left'" := (rotate_left792925914). -Definition impl_7__rotate_right (self : t_u16_t) (n : t_u32_t) : t_u16_t := - run (let hoist4 := ControlFlow_Break (rotate_right_u16 self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist4)). +Notation "'impl_6__rotate_right'" := (rotate_right166090082). -Definition impl_8__rotate_left (self : t_u32_t) (n : t_u32_t) : t_u32_t := - run (let hoist5 := ControlFlow_Break (rotate_left_u32 self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist5)). +Notation "'impl_7__rotate_left'" := (rotate_left297034175). -Definition impl_8__rotate_right (self : t_u32_t) (n : t_u32_t) : t_u32_t := - run (let hoist6 := ControlFlow_Break (rotate_right_u32 self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist6)). +Notation "'impl_7__rotate_right'" := (rotate_right138522246). -Definition impl_9__rotate_left (self : t_u64_t) (n : t_u32_t) : t_u64_t := - run (let hoist7 := ControlFlow_Break (rotate_left_u64 self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist7)). +Notation "'impl_8__rotate_left'" := (rotate_left823573251). -Definition impl_9__rotate_right (self : t_u64_t) (n : t_u32_t) : t_u64_t := - run (let hoist8 := ControlFlow_Break (rotate_right_u64 self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist8)). +Notation "'impl_8__rotate_right'" := (rotate_right869195717). -Definition impl_10__rotate_left (self : t_u128_t) (n : t_u32_t) : t_u128_t := - run (let hoist9 := ControlFlow_Break (rotate_left_u128 self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist9)). +Notation "'impl_9__rotate_left'" := (rotate_left618936072). -Definition impl_10__rotate_right (self : t_u128_t) (n : t_u32_t) : t_u128_t := - run (let hoist10 := ControlFlow_Break (rotate_right_u128 self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist10)). +Notation "'impl_9__rotate_right'" := (rotate_right1041614027). -Definition impl_11__rotate_left (self : t_usize_t) (n : t_u32_t) : t_usize_t := - run (let hoist11 := ControlFlow_Break (rotate_left_usize self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist11)). +Notation "'impl_10__rotate_left'" := (rotate_left1065866885). -Definition impl_11__rotate_right (self : t_usize_t) (n : t_u32_t) : t_usize_t := - run (let hoist12 := ControlFlow_Break (rotate_right_usize self n) : t_Never_t in - ControlFlow_Continue (never_to_any hoist12)). +Notation "'impl_10__rotate_right'" := (rotate_right591112338). -Definition impl_6__count_ones (self : t_u8_t) : t_u32_t := - run (let hoist13 := ControlFlow_Break (ctpop_u8 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist13)). +Notation "'impl_11__rotate_left'" := (rotate_left996672710). -Definition impl_6__leading_zeros (self : t_u8_t) : t_u32_t := - run (let hoist14 := ControlFlow_Break (ctlz_u8 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist14)). +Notation "'impl_11__rotate_right'" := (rotate_right442734174). -Definition impl_6__swap_bytes (self : t_u8_t) : t_u8_t := - f_into (bswap_u8 self). +Notation "'impl_6__count_ones'" := (count_ones202509899). -Definition impl_6__from_be (x : t_u8_t) : t_u8_t := - impl_6__swap_bytes x. +Notation "'impl_6__leading_zeros'" := (leading_zeros75047366). -Definition impl_6__to_be (self : t_u8_t) : t_u8_t := - impl_6__swap_bytes self. +Notation "'impl_6__swap_bytes'" := (swap_bytes657156997). -Definition impl_6__trailing_zeros (self : t_u8_t) : t_u32_t := - run (let hoist15 := ControlFlow_Break (cttz_u8 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist15)). +Notation "'impl_6__from_be'" := (from_be746282521). -Definition impl_7__count_ones (self : t_u16_t) : t_u32_t := - run (let hoist16 := ControlFlow_Break (ctpop_u16 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist16)). +Notation "'impl_6__to_be'" := (to_be972448780). -Definition impl_7__leading_zeros (self : t_u16_t) : t_u32_t := - run (let hoist17 := ControlFlow_Break (ctlz_u16 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist17)). +Notation "'impl_6__trailing_zeros'" := (trailing_zeros572929871). -Definition impl_7__swap_bytes (self : t_u16_t) : t_u16_t := - f_into (bswap_u16 self). +Notation "'impl_7__count_ones'" := (count_ones91875752). -Definition impl_7__from_be (x : t_u16_t) : t_u16_t := - impl_7__swap_bytes x. +Notation "'impl_7__leading_zeros'" := (leading_zeros462412478). -Definition impl_7__to_be (self : t_u16_t) : t_u16_t := - impl_7__swap_bytes self. +Notation "'impl_7__swap_bytes'" := (swap_bytes926722059). -Definition impl_7__trailing_zeros (self : t_u16_t) : t_u32_t := - run (let hoist18 := ControlFlow_Break (cttz_u16 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist18)). +Notation "'impl_7__from_be'" := (from_be510959665). -Definition impl_8__count_ones (self : t_u32_t) : t_u32_t := - run (let hoist19 := ControlFlow_Break (ctpop_u32 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist19)). +Notation "'impl_7__to_be'" := (to_be551590602). -Definition impl_8__leading_zeros (self : t_u32_t) : t_u32_t := - run (let hoist20 := ControlFlow_Break (ctlz_u32 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist20)). +Notation "'impl_7__trailing_zeros'" := (trailing_zeros421474733). -Definition impl_8__swap_bytes (self : t_u32_t) : t_u32_t := - f_into (bswap_u32 self). +Notation "'impl_8__count_ones'" := (count_ones776185738). -Definition impl_8__from_be (x : t_u32_t) : t_u32_t := - impl_8__swap_bytes x. +Notation "'impl_8__leading_zeros'" := (leading_zeros698221972). -Definition impl_8__to_be (self : t_u32_t) : t_u32_t := - impl_8__swap_bytes self. +Notation "'impl_8__swap_bytes'" := (swap_bytes320480126). -Definition impl_8__trailing_zeros (self : t_u32_t) : t_u32_t := - run (let hoist21 := ControlFlow_Break (cttz_u32 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist21)). +Notation "'impl_8__from_be'" := (from_be664756649). -Definition impl_9__count_ones (self : t_u64_t) : t_u32_t := - run (let hoist22 := ControlFlow_Break (ctpop_u64 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist22)). +Notation "'impl_8__to_be'" := (to_be82825962). -Definition impl_9__leading_zeros (self : t_u64_t) : t_u32_t := - run (let hoist23 := ControlFlow_Break (ctlz_u64 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist23)). +Notation "'impl_8__trailing_zeros'" := (trailing_zeros1061560720). -Definition impl_9__swap_bytes (self : t_u64_t) : t_u64_t := - f_into (bswap_u64 self). +Notation "'impl_9__count_ones'" := (count_ones235885653). -Definition impl_9__from_be (x : t_u64_t) : t_u64_t := - impl_9__swap_bytes x. +Notation "'impl_9__leading_zeros'" := (leading_zeros338302110). -Definition impl_9__to_be (self : t_u64_t) : t_u64_t := - impl_9__swap_bytes self. +Notation "'impl_9__swap_bytes'" := (swap_bytes722254271). -Definition impl_9__trailing_zeros (self : t_u64_t) : t_u32_t := - run (let hoist24 := ControlFlow_Break (cttz_u64 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist24)). +Notation "'impl_9__from_be'" := (from_be16013635). -Definition impl_10__count_ones (self : t_u128_t) : t_u32_t := - run (let hoist25 := ControlFlow_Break (ctpop_u128 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist25)). +Notation "'impl_9__to_be'" := (to_be376714729). -Definition impl_10__leading_zeros (self : t_u128_t) : t_u32_t := - run (let hoist26 := ControlFlow_Break (ctlz_u128 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist26)). +Notation "'impl_9__trailing_zeros'" := (trailing_zeros188346231). -Definition impl_10__swap_bytes (self : t_u128_t) : t_u128_t := - f_into (bswap_u128 self). +Notation "'impl_10__count_ones'" := (count_ones926736261). -Definition impl_10__from_be (x : t_u128_t) : t_u128_t := - impl_10__swap_bytes x. +Notation "'impl_10__leading_zeros'" := (leading_zeros19644612). -Definition impl_10__to_be (self : t_u128_t) : t_u128_t := - impl_10__swap_bytes self. +Notation "'impl_10__swap_bytes'" := (swap_bytes420879368). -Definition impl_10__trailing_zeros (self : t_u128_t) : t_u32_t := - run (let hoist27 := ControlFlow_Break (cttz_u128 self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist27)). +Notation "'impl_10__from_be'" := (from_be191085771). -Definition impl_11__count_ones (self : t_usize_t) : t_u32_t := - run (let hoist28 := ControlFlow_Break (ctpop_usize self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist28)). +Notation "'impl_10__to_be'" := (to_be555075987). -Definition impl_11__leading_zeros (self : t_usize_t) : t_u32_t := - run (let hoist29 := ControlFlow_Break (ctlz_usize self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist29)). +Notation "'impl_10__trailing_zeros'" := (trailing_zeros821715250). -Definition impl_11__swap_bytes (self : t_usize_t) : t_usize_t := - f_into (bswap_usize self). +Notation "'impl_11__count_ones'" := (count_ones441645762). -Definition impl_11__from_be (x : t_usize_t) : t_usize_t := - impl_11__swap_bytes x. +Notation "'impl_11__leading_zeros'" := (leading_zeros905233489). -Definition impl_11__to_be (self : t_usize_t) : t_usize_t := - impl_11__swap_bytes self. +Notation "'impl_11__swap_bytes'" := (swap_bytes268673424). -Definition impl_11__trailing_zeros (self : t_usize_t) : t_u32_t := - run (let hoist30 := ControlFlow_Break (cttz_usize self) : t_Never_t in - ControlFlow_Continue (never_to_any hoist30)). +Notation "'impl_11__from_be'" := (from_be607978059). -Definition impl__i8__rem_euclid (self : t_i8_t) (rhs : t_i8_t) : t_i8_t := - let r := self.%(f_clone rhs) : t_i8_t in - if r<.?(f_into (@repr WORDSIZE8 0)) - then impl__i8__wrapping_add r (impl__i8__wrapping_abs rhs) - else r. +Notation "'impl_11__to_be'" := (to_be561847134). -Definition impl__i16__rem_euclid (self : t_i16_t) (rhs : t_i16_t) : t_i16_t := - let r := self.%(f_clone rhs) : t_i16_t in - if r<.?(f_into (@repr WORDSIZE16 0)) - then impl__i16__wrapping_add r (impl__i16__wrapping_abs rhs) - else r. +Notation "'impl_11__trailing_zeros'" := (trailing_zeros42066260). -Definition impl__i32__rem_euclid (self : t_i32_t) (rhs : t_i32_t) : t_i32_t := - let r := self.%(f_clone rhs) : t_i32_t in - if r<.?(f_into (@repr WORDSIZE32 0)) - then impl__i32__wrapping_add r (impl__i32__wrapping_abs rhs) - else r. +Notation "'impl__rem_euclid'" := (rem_euclid622298453). -Definition impl__i64__rem_euclid (self : t_i64_t) (rhs : t_i64_t) : t_i64_t := - let r := self.%(f_clone rhs) : t_i64_t in - if r<.?(f_into (@repr WORDSIZE64 0)) - then impl__i64__wrapping_add r (impl__i64__wrapping_abs rhs) - else r. +Notation "'impl__i16__rem_euclid'" := (rem_euclid158017644). -Definition impl__i128__rem_euclid (self : t_i128_t) (rhs : t_i128_t) : t_i128_t := - let r := self.%(f_clone rhs) : t_i128_t in - if r<.?(f_into (@repr WORDSIZE128 0)) - then impl__i128__wrapping_add r (impl__i128__wrapping_abs rhs) - else r. +Notation "'impl__i32__rem_euclid'" := (rem_euclid881249982). -Definition impl__isize__rem_euclid (self : t_isize_t) (rhs : t_isize_t) : t_isize_t := - let r := self.%(f_clone rhs) : t_isize_t in - if r<.?(f_into (@repr WORDSIZE32 0)) - then impl__isize__wrapping_add r (impl__isize__wrapping_abs rhs) - else r. +Notation "'impl__i64__rem_euclid'" := (rem_euclid1057082210). -Definition impl_6__count_zeros (self : t_u8_t) : t_u32_t := - impl_6__count_ones (f_not self). +Notation "'impl__i128__rem_euclid'" := (rem_euclid254910751). -Definition impl_6__leading_ones (self : t_u8_t) : t_u32_t := - impl_6__leading_zeros (f_not self). +Notation "'impl__isize__rem_euclid'" := (rem_euclid828379367). -Definition impl_6__trailing_ones (self : t_u8_t) : t_u32_t := - impl_6__trailing_zeros (f_not self). +Notation "'impl_6__count_zeros'" := (count_zeros558337492). -Definition impl_7__count_zeros (self : t_u16_t) : t_u32_t := - impl_7__count_ones (f_not self). +Notation "'impl_6__leading_ones'" := (leading_ones55148479). -Definition impl_7__leading_ones (self : t_u16_t) : t_u32_t := - impl_7__leading_zeros (f_not self). +Notation "'impl_6__trailing_ones'" := (trailing_ones359778731). -Definition impl_7__trailing_ones (self : t_u16_t) : t_u32_t := - impl_7__trailing_zeros (f_not self). +Notation "'impl_7__count_zeros'" := (count_zeros199825317). -Definition impl_8__count_zeros (self : t_u32_t) : t_u32_t := - impl_8__count_ones (f_not self). +Notation "'impl_7__leading_ones'" := (leading_ones164277656). -Definition impl_8__leading_ones (self : t_u32_t) : t_u32_t := - impl_8__leading_zeros (f_not self). +Notation "'impl_7__trailing_ones'" := (trailing_ones903944727). -Definition impl_8__trailing_ones (self : t_u32_t) : t_u32_t := - impl_8__trailing_zeros (f_not self). +Notation "'impl_8__count_zeros'" := (count_zeros942566041). -Definition impl_9__count_zeros (self : t_u64_t) : t_u32_t := - impl_9__count_ones (f_not self). +Notation "'impl_8__leading_ones'" := (leading_ones766486760). -Definition impl_9__leading_ones (self : t_u64_t) : t_u32_t := - impl_9__leading_zeros (f_not self). +Notation "'impl_8__trailing_ones'" := (trailing_ones223371510). -Definition impl_9__trailing_ones (self : t_u64_t) : t_u32_t := - impl_9__trailing_zeros (f_not self). +Notation "'impl_9__count_zeros'" := (count_zeros60346158). -Definition impl_10__count_zeros (self : t_u128_t) : t_u32_t := - impl_10__count_ones (f_not self). +Notation "'impl_9__leading_ones'" := (leading_ones404666910). -Definition impl_10__leading_ones (self : t_u128_t) : t_u32_t := - impl_10__leading_zeros (f_not self). +Notation "'impl_9__trailing_ones'" := (trailing_ones601201120). -Definition impl_10__trailing_ones (self : t_u128_t) : t_u32_t := - impl_10__trailing_zeros (f_not self). +Notation "'impl_10__count_zeros'" := (count_zeros824862815). -Definition impl_11__count_zeros (self : t_usize_t) : t_u32_t := - impl_11__count_ones (f_not self). +Notation "'impl_10__leading_ones'" := (leading_ones475503572). -Definition impl_11__leading_ones (self : t_usize_t) : t_u32_t := - impl_11__leading_zeros (f_not self). +Notation "'impl_10__trailing_ones'" := (trailing_ones705845381). -Definition impl_11__trailing_ones (self : t_usize_t) : t_u32_t := - impl_11__trailing_zeros (f_not self). +Notation "'impl_11__count_zeros'" := (count_zeros73479642). + +Notation "'impl_11__leading_ones'" := (leading_ones667660708). + +Notation "'impl_11__trailing_ones'" := (trailing_ones979548463). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Num_Int_macros.v b/proof-libs/coq/coq/generated-core/src/Core_Num_Int_macros.v index d2a03bcbb..4b1cbcbe0 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Num_Int_macros.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Num_Int_macros.v @@ -1,8 +1,59 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -(*Not implemented yet? todo(item)*) +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v b/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v index d2a03bcbb..4b1cbcbe0 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v @@ -1,8 +1,59 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -(*Not implemented yet? todo(item)*) +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops.v b/proof-libs/coq/coq/generated-core/src/Core_Ops.v index c07523131..b743c934e 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops.v @@ -1,63 +1,122 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Add. -Export Add. +(* From Core Require Import Core. *) -Require Import Div. -Export Div. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Mul. -Export Mul. -Require Import Neg. -Export Neg. -Require Import Rem. -Export Rem. +From Core Require Import Self_Arith (t_Add). +Export Self_Arith (t_Add). -Require Import Sub. -Export Sub. +From Core Require Import Self_Arith (t_Div). +Export Self_Arith (t_Div). -Require Import BitAnd. -Export BitAnd. +From Core Require Import Self_Arith (t_Mul). +Export Self_Arith (t_Mul). -Require Import BitOr. -Export BitOr. +From Core Require Import Self_Arith (t_Neg). +Export Self_Arith (t_Neg). -Require Import BitXor. -Export BitXor. +From Core Require Import Self_Arith (t_Rem). +Export Self_Arith (t_Rem). -Require Import Not. -Export Not. +From Core Require Import Self_Arith (t_Sub). +Export Self_Arith (t_Sub). -Require Import Shl. -Export Shl. -Require Import Shr. -Export Shr. -Require Import Index. -Export Index. +From Core Require Import Self_Bit (t_BitAnd). +Export Self_Bit (t_BitAnd). -Require Import Range. -Export Range. +From Core Require Import Self_Bit (t_BitOr). +Export Self_Bit (t_BitOr). -Require Import IndexRange. -Export IndexRange. +From Core Require Import Self_Bit (t_BitXor). +Export Self_Bit (t_BitXor). -(*Not implemented yet? todo(item)*) +From Core Require Import Self_Bit (t_Not). +Export Self_Bit (t_Not). -(*Not implemented yet? todo(item)*) +From Core Require Import Self_Bit (t_Shl). +Export Self_Bit (t_Shl). -(*Not implemented yet? todo(item)*) +From Core Require Import Self_Bit (t_Shr). +Export Self_Bit (t_Shr). -(*Not implemented yet? todo(item)*) -(*Not implemented yet? todo(item)*) -(*Not implemented yet? todo(item)*) +From Core Require Import Self_Index (t_Index). +Export Self_Index (t_Index). + + + +From Core Require Import Self_Range (t_Range). +Export Self_Range (t_Range). + +From Core Require Import Self_Index_range (t_IndexRange). +Export Self_Index_range (t_IndexRange). + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v index db646ea1a..86707c070 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v @@ -1,25 +1,112 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Sized. -Export Sized. +(* From Core Require Import Core. *) -(*item error backend*) +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -(*item error backend*) +From Core Require Import Core_Marker (t_Sized). +Export Core_Marker (t_Sized). -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +Class t_Add (v_Self : Type) (v_Rhs : Type) `{t_Sized (v_Rhs)} : Type := + { + Add_f_Output : Type; + _ :: `{t_Sized (Add_f_Output)}; + Add_f_add : v_Self -> v_Rhs -> Add_f_Output; + }. +Arguments t_Add (_) (_) {_}. -(*item error backend*) +Class t_Div (v_Self : Type) (v_Rhs : Type) `{t_Sized (v_Rhs)} : Type := + { + Div_f_Output : Type; + _ :: `{t_Sized (Div_f_Output)}; + Div_f_div : v_Self -> v_Rhs -> Div_f_Output; + }. +Arguments t_Div (_) (_) {_}. -(*Not implemented yet? todo(item)*) +Class t_Mul (v_Self : Type) (v_Rhs : Type) `{t_Sized (v_Rhs)} : Type := + { + Mul_f_Output : Type; + _ :: `{t_Sized (Mul_f_Output)}; + Mul_f_mul : v_Self -> v_Rhs -> Mul_f_Output; + }. +Arguments t_Mul (_) (_) {_}. -(*Not implemented yet? todo(item)*) +Class t_Neg (v_Self : Type) : Type := + { + Neg_f_Output : Type; + _ :: `{t_Sized (Neg_f_Output)}; + Neg_f_neg : v_Self -> Neg_f_Output; + }. +Arguments t_Neg (_). + +Class t_Rem (v_Self : Type) (v_Rhs : Type) `{t_Sized (v_Rhs)} : Type := + { + Rem_f_Output : Type; + _ :: `{t_Sized (Rem_f_Output)}; + Rem_f_rem : v_Self -> v_Rhs -> Rem_f_Output; + }. +Arguments t_Rem (_) (_) {_}. + +Class t_Sub (v_Self : Type) (v_Rhs : Type) `{t_Sized (v_Rhs)} : Type := + { + Sub_f_Output : Type; + _ :: `{t_Sized (Sub_f_Output)}; + Sub_f_sub : v_Self -> v_Rhs -> Sub_f_Output; + }. +Arguments t_Sub (_) (_) {_}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith_Impls_for_prims.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith_Impls_for_prims.v index 4751e5712..0ce6ebbe7 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith_Impls_for_prims.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith_Impls_for_prims.v @@ -1,186 +1,241 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import u8. -Export u8. +(* From Core Require Import Core. *) -Require Import u16. -Export u16. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import u32. -Export u32. -Require Import u64. -Export u64. -Require Import u128. -Export u128. +From Core Require Import Core_Primitive (t_u8). +Export Core_Primitive (t_u8). -Require Import usize. -Export usize. +From Core Require Import Core_Primitive (t_u16). +Export Core_Primitive (t_u16). -Require Import i8. -Export i8. +From Core Require Import Core_Primitive (t_u32). +Export Core_Primitive (t_u32). -Require Import i16. -Export i16. +From Core Require Import Core_Primitive (t_u64). +Export Core_Primitive (t_u64). -Require Import i32. -Export i32. +From Core Require Import Core_Primitive (t_u128). +Export Core_Primitive (t_u128). -Require Import i64. -Export i64. +From Core Require Import Core_Primitive (t_usize). +Export Core_Primitive (t_usize). -Require Import i128. -Export i128. -Require Import isize. -Export isize. -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_i8). +Export Core_Primitive (t_i8). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_i16). +Export Core_Primitive (t_i16). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_i32). +Export Core_Primitive (t_i32). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_i64). +Export Core_Primitive (t_i64). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_i128). +Export Core_Primitive (t_i128). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_isize). +Export Core_Primitive (t_isize). -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +Notation "'impl'" := (impl). -(*item error backend*) +Notation "'impl_1'" := (impl_1). -(*item error backend*) +Notation "'impl_2'" := (impl_2). -(*item error backend*) +Notation "'impl_3'" := (impl_3). -(*item error backend*) +Notation "'impl_4'" := (impl_4). -(*item error backend*) +Notation "'impl_5'" := (impl_5). -(*item error backend*) +Notation "'impl_12'" := (impl_12). -(*item error backend*) +Notation "'impl_13'" := (impl_13). -(*item error backend*) +Notation "'impl_14'" := (impl_14). -(*item error backend*) +Notation "'impl_15'" := (impl_15). -(*item error backend*) +Notation "'impl_16'" := (impl_16). -(*item error backend*) +Notation "'impl_17'" := (impl_17). -(*item error backend*) +Notation "'impl_24'" := (impl_24). -(*item error backend*) +Notation "'impl_25'" := (impl_25). -(*item error backend*) +Notation "'impl_26'" := (impl_26). -(*item error backend*) +Notation "'impl_27'" := (impl_27). -(*item error backend*) +Notation "'impl_28'" := (impl_28). -(*item error backend*) +Notation "'impl_29'" := (impl_29). -(*item error backend*) +Notation "'impl_6'" := (impl_6). -(*item error backend*) +Notation "'impl_7'" := (impl_7). -(*item error backend*) +Notation "'impl_8'" := (impl_8). -(*item error backend*) +Notation "'impl_9'" := (impl_9). -(*item error backend*) +Notation "'impl_10'" := (impl_10). -(*item error backend*) +Notation "'impl_11'" := (impl_11). -(*item error backend*) +Notation "'impl_30'" := (impl_30). -(*item error backend*) +Notation "'impl_31'" := (impl_31). -(*item error backend*) +Notation "'impl_32'" := (impl_32). -(*item error backend*) +Notation "'impl_33'" := (impl_33). -(*item error backend*) +Notation "'impl_34'" := (impl_34). -(*item error backend*) +Notation "'impl_35'" := (impl_35). -(*item error backend*) +Notation "'impl_36'" := (impl_36). -(*item error backend*) +Notation "'impl_37'" := (impl_37). -(*item error backend*) +Notation "'impl_38'" := (impl_38). -(*item error backend*) +Notation "'impl_39'" := (impl_39). -(*item error backend*) +Notation "'impl_40'" := (impl_40). -(*item error backend*) +Notation "'impl_41'" := (impl_41). -(*item error backend*) +Notation "'impl_42'" := (impl_42). -(*item error backend*) +Notation "'impl_43'" := (impl_43). -(*item error backend*) +Notation "'impl_44'" := (impl_44). -(*item error backend*) +Notation "'impl_45'" := (impl_45). -(*item error backend*) +Notation "'impl_46'" := (impl_46). -(*item error backend*) +Notation "'impl_47'" := (impl_47). -(*item error backend*) +Notation "'impl_54'" := (impl_54). -(*item error backend*) +Notation "'impl_55'" := (impl_55). -(*item error backend*) +Notation "'impl_56'" := (impl_56). -(*item error backend*) +Notation "'impl_57'" := (impl_57). -(*item error backend*) +Notation "'impl_58'" := (impl_58). -(*item error backend*) +Notation "'impl_59'" := (impl_59). -(*item error backend*) +Notation "'impl_18'" := (impl_18). -(*item error backend*) +Notation "'impl_19'" := (impl_19). -(*item error backend*) +Notation "'impl_20'" := (impl_20). -(*item error backend*) +Notation "'impl_21'" := (impl_21). -(*item error backend*) +Notation "'impl_22'" := (impl_22). -(*item error backend*) +Notation "'impl_23'" := (impl_23). -(*item error backend*) +Notation "'impl_48'" := (impl_48). -(*item error backend*) +Notation "'impl_49'" := (impl_49). -(*item error backend*) +Notation "'impl_50'" := (impl_50). -(*item error backend*) +Notation "'impl_51'" := (impl_51). -(*item error backend*) +Notation "'impl_52'" := (impl_52). -(*item error backend*) +Notation "'impl_53'" := (impl_53). + +Notation "'impl_60'" := (impl_60). + +Notation "'impl_61'" := (impl_61). + +Notation "'impl_62'" := (impl_62). + +Notation "'impl_63'" := (impl_63). + +Notation "'impl_64'" := (impl_64). + +Notation "'impl_65'" := (impl_65). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v index 3b8209eb8..29fe33f34 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v @@ -1,23 +1,110 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Sized. -Export Sized. +(* From Core Require Import Core. *) -(*item error backend*) +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -(*item error backend*) +From Core Require Import Core_Marker (t_Sized). +Export Core_Marker (t_Sized). -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +Class t_BitAnd (v_Self : Type) (v_Rhs : Type) `{t_Sized (v_Rhs)} : Type := + { + BitAnd_f_Output : Type; + _ :: `{t_Sized (BitAnd_f_Output)}; + BitAnd_f_bitand : v_Self -> v_Rhs -> BitAnd_f_Output; + }. +Arguments t_BitAnd (_) (_) {_}. -(*item error backend*) +Class t_BitOr (v_Self : Type) (v_Rhs : Type) `{t_Sized (v_Rhs)} : Type := + { + BitOr_f_Output : Type; + _ :: `{t_Sized (BitOr_f_Output)}; + BitOr_f_bitor : v_Self -> v_Rhs -> BitOr_f_Output; + }. +Arguments t_BitOr (_) (_) {_}. -(*item error backend*) +Class t_BitXor (v_Self : Type) (v_Rhs : Type) `{t_Sized (v_Rhs)} : Type := + { + BitXor_f_Output : Type; + _ :: `{t_Sized (BitXor_f_Output)}; + BitXor_f_bitxor : v_Self -> v_Rhs -> BitXor_f_Output; + }. +Arguments t_BitXor (_) (_) {_}. -(*Not implemented yet? todo(item)*) +Class t_Not (v_Self : Type) : Type := + { + Not_f_Output : Type; + _ :: `{t_Sized (Not_f_Output)}; + Not_f_not : v_Self -> Not_f_Output; + }. +Arguments t_Not (_). + +Class t_Shl (v_Self : Type) (v_Rhs : Type) `{t_Sized (v_Rhs)} : Type := + { + Shl_f_Output : Type; + _ :: `{t_Sized (Shl_f_Output)}; + Shl_f_shl : v_Self -> v_Rhs -> Shl_f_Output; + }. +Arguments t_Shl (_) (_) {_}. + +Class t_Shr (v_Self : Type) (v_Rhs : Type) `{t_Sized (v_Rhs)} : Type := + { + Shr_f_Output : Type; + _ :: `{t_Sized (Shr_f_Output)}; + Shr_f_shr : v_Self -> v_Rhs -> Shr_f_Output; + }. +Arguments t_Shr (_) (_) {_}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit_Impls_for_prims.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit_Impls_for_prims.v index 539e62da6..cf1efa19d 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit_Impls_for_prims.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit_Impls_for_prims.v @@ -1,262 +1,317 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import u8. -Export u8. +(* From Core Require Import Core. *) -Require Import u16. -Export u16. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import u32. -Export u32. -Require Import u64. -Export u64. -Require Import u128. -Export u128. +From Core Require Import Core_Primitive (t_u8). +Export Core_Primitive (t_u8). -Require Import usize. -Export usize. +From Core Require Import Core_Primitive (t_u16). +Export Core_Primitive (t_u16). -Require Import i8. -Export i8. +From Core Require Import Core_Primitive (t_u32). +Export Core_Primitive (t_u32). -Require Import i16. -Export i16. +From Core Require Import Core_Primitive (t_u64). +Export Core_Primitive (t_u64). -Require Import i32. -Export i32. +From Core Require Import Core_Primitive (t_u128). +Export Core_Primitive (t_u128). -Require Import i64. -Export i64. +From Core Require Import Core_Primitive (t_usize). +Export Core_Primitive (t_usize). -Require Import i128. -Export i128. -Require Import isize. -Export isize. -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_i8). +Export Core_Primitive (t_i8). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_i16). +Export Core_Primitive (t_i16). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_i32). +Export Core_Primitive (t_i32). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_i64). +Export Core_Primitive (t_i64). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_i128). +Export Core_Primitive (t_i128). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_isize). +Export Core_Primitive (t_isize). -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +Notation "'impl_84'" := (impl_84). -(*item error backend*) +Notation "'impl_85'" := (impl_85). -(*item error backend*) +Notation "'impl_86'" := (impl_86). -(*item error backend*) +Notation "'impl_87'" := (impl_87). -(*item error backend*) +Notation "'impl_88'" := (impl_88). -(*item error backend*) +Notation "'impl_89'" := (impl_89). -(*item error backend*) +Notation "'impl_6'" := (impl_6). -(*item error backend*) +Notation "'impl_7'" := (impl_7). -(*item error backend*) +Notation "'impl_8'" := (impl_8). -(*item error backend*) +Notation "'impl_9'" := (impl_9). -(*item error backend*) +Notation "'impl_10'" := (impl_10). -(*item error backend*) +Notation "'impl_11'" := (impl_11). -(*item error backend*) +Notation "'impl_12'" := (impl_12). -(*item error backend*) +Notation "'impl_13'" := (impl_13). -(*item error backend*) +Notation "'impl_14'" := (impl_14). -(*item error backend*) +Notation "'impl_15'" := (impl_15). -(*item error backend*) +Notation "'impl_16'" := (impl_16). -(*item error backend*) +Notation "'impl_17'" := (impl_17). -(*item error backend*) +Notation "'impl_18'" := (impl_18). -(*item error backend*) +Notation "'impl_19'" := (impl_19). -(*item error backend*) +Notation "'impl_20'" := (impl_20). -(*item error backend*) +Notation "'impl_21'" := (impl_21). -(*item error backend*) +Notation "'impl_22'" := (impl_22). -(*item error backend*) +Notation "'impl_23'" := (impl_23). -(*item error backend*) +Notation "'impl_24'" := (impl_24). -(*item error backend*) +Notation "'impl_25'" := (impl_25). -(*item error backend*) +Notation "'impl_26'" := (impl_26). -(*item error backend*) +Notation "'impl_27'" := (impl_27). -(*item error backend*) +Notation "'impl_28'" := (impl_28). -(*item error backend*) +Notation "'impl_29'" := (impl_29). -(*item error backend*) +Notation "'impl_30'" := (impl_30). -(*item error backend*) +Notation "'impl_31'" := (impl_31). -(*item error backend*) +Notation "'impl_32'" := (impl_32). -(*item error backend*) +Notation "'impl_33'" := (impl_33). -(*item error backend*) +Notation "'impl_34'" := (impl_34). -(*item error backend*) +Notation "'impl_35'" := (impl_35). -(*item error backend*) +Notation "'impl_36'" := (impl_36). -(*item error backend*) +Notation "'impl_37'" := (impl_37). -(*item error backend*) +Notation "'impl_38'" := (impl_38). -(*item error backend*) +Notation "'impl_39'" := (impl_39). -(*item error backend*) +Notation "'impl_40'" := (impl_40). -(*item error backend*) +Notation "'impl_41'" := (impl_41). -(*item error backend*) +Notation "'impl_42'" := (impl_42). -(*item error backend*) +Notation "'impl_43'" := (impl_43). -(*item error backend*) +Notation "'impl_44'" := (impl_44). -(*item error backend*) +Notation "'impl_45'" := (impl_45). -(*item error backend*) +Notation "'impl_46'" := (impl_46). -(*item error backend*) +Notation "'impl_47'" := (impl_47). -(*item error backend*) +Notation "'impl_48'" := (impl_48). -(*item error backend*) +Notation "'impl_49'" := (impl_49). -(*item error backend*) +Notation "'impl_50'" := (impl_50). -(*item error backend*) +Notation "'impl_51'" := (impl_51). -(*item error backend*) +Notation "'impl_52'" := (impl_52). -(*item error backend*) +Notation "'impl_53'" := (impl_53). -(*item error backend*) +Notation "'impl_54'" := (impl_54). -(*item error backend*) +Notation "'impl_55'" := (impl_55). -(*item error backend*) +Notation "'impl_56'" := (impl_56). -(*item error backend*) +Notation "'impl_57'" := (impl_57). -(*item error backend*) +Notation "'impl_58'" := (impl_58). -(*item error backend*) +Notation "'impl_59'" := (impl_59). -(*item error backend*) +Notation "'impl_60'" := (impl_60). -(*item error backend*) +Notation "'impl_61'" := (impl_61). -(*item error backend*) +Notation "'impl_62'" := (impl_62). -(*item error backend*) +Notation "'impl_63'" := (impl_63). -(*item error backend*) +Notation "'impl_64'" := (impl_64). -(*item error backend*) +Notation "'impl_65'" := (impl_65). -(*item error backend*) +Notation "'impl_66'" := (impl_66). -(*item error backend*) +Notation "'impl_67'" := (impl_67). -(*item error backend*) +Notation "'impl_68'" := (impl_68). -(*item error backend*) +Notation "'impl_69'" := (impl_69). -(*item error backend*) +Notation "'impl_70'" := (impl_70). -(*item error backend*) +Notation "'impl_71'" := (impl_71). -(*item error backend*) +Notation "'impl_72'" := (impl_72). -(*item error backend*) +Notation "'impl_73'" := (impl_73). -(*item error backend*) +Notation "'impl_74'" := (impl_74). -(*item error backend*) +Notation "'impl_75'" := (impl_75). -(*item error backend*) +Notation "'impl_76'" := (impl_76). -(*item error backend*) +Notation "'impl_77'" := (impl_77). -(*item error backend*) +Notation "'impl_78'" := (impl_78). -(*item error backend*) +Notation "'impl_79'" := (impl_79). -(*item error backend*) +Notation "'impl_80'" := (impl_80). -(*item error backend*) +Notation "'impl_81'" := (impl_81). -(*item error backend*) +Notation "'impl_82'" := (impl_82). -(*item error backend*) +Notation "'impl_83'" := (impl_83). -(*item error backend*) +Notation "'impl_90'" := (impl_90). -(*item error backend*) +Notation "'impl_91'" := (impl_91). -(*item error backend*) +Notation "'impl_92'" := (impl_92). -(*item error backend*) +Notation "'impl_93'" := (impl_93). -(*item error backend*) +Notation "'impl_94'" := (impl_94). -(*item error backend*) +Notation "'impl_95'" := (impl_95). -(*item error backend*) +Notation "'impl_96'" := (impl_96). -(*item error backend*) +Notation "'impl_97'" := (impl_97). -(*item error backend*) +Notation "'impl_98'" := (impl_98). -(*item error backend*) +Notation "'impl_99'" := (impl_99). -(*item error backend*) +Notation "'impl_100'" := (impl_100). -(*item error backend*) +Notation "'impl_101'" := (impl_101). + +Notation "'impl'" := (impl). + +Notation "'impl_1'" := (impl_1). + +Notation "'impl_2'" := (impl_2). + +Notation "'impl_3'" := (impl_3). + +Notation "'impl_4'" := (impl_4). + +Notation "'impl_5'" := (impl_5). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v index 53b3db33d..c88ac1f12 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v @@ -1,21 +1,82 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Tuple. -Export Tuple. +(* From Core Require Import Core. *) -(*item error backend*) +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Class t_FnMut (Self : _) := { - f_call_mut : (Self -> Args -> Self × _) ; -}. +From Core Require Import Core_Marker (t_Tuple). +Export Core_Marker (t_Tuple). -Class t_Fn (Self : _) := { - f_call : (Self -> Args -> _) ; -}. +(* NotImplementedYet *) -(*Not implemented yet? todo(item)*) +Class t_FnOnce (v_Self : Type) (v_Args : Type) `{t_Sized (v_Args)} `{t_Tuple (v_Args)} : Type := + { + FnOnce_f_Output : Type; + _ :: `{t_Sized (FnOnce_f_Output)}; + FnOnce_f_call_once : v_Self -> v_Args -> FnOnce_f_Output; + }. +Arguments t_FnOnce (_) (_) {_} {_}. + +Class t_FnMut (v_Self : Type) (v_Args : Type) `{t_FnOnce (v_Self) (v_Args)} `{t_Sized (v_Args)} `{t_Tuple (v_Args)} : Type := + { + FnMut_f_call_mut : v_Self -> v_Args -> (v_Self*FnOnce_f_Output); + }. +Arguments t_FnMut (_) (_) {_} {_} {_}. + +Class t_Fn (v_Self : Type) (v_Args : Type) `{t_FnMut (v_Self) (v_Args)} `{t_Sized (v_Args)} `{t_Tuple (v_Args)} : Type := + { + Fn_f_call : v_Self -> v_Args -> FnOnce_f_Output; + }. +Arguments t_Fn (_) (_) {_} {_} {_}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v index 250122964..6c1c14d87 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v @@ -1,8 +1,64 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -(*item error backend*) +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +Class t_Index (v_Self : Type) (v_Idx : Type) : Type := + { + Index_f_Output : Type; + Index_f_index : v_Self -> v_Idx -> Index_f_Output; + }. +Arguments t_Index (_) (_). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v index e8f1e95df..02b0f9574 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v @@ -1,35 +1,105 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Core_Primitive. -Export Core_Primitive. +(* From Core Require Import Core. *) -Require Import Iterator. -Export Iterator. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Record t_IndexRange : Type := { - f_start : uint_size; - f_end : uint_size; -}. +From Core Require Import Core (t_primitive). +Export Core (t_primitive). -Definition impl__IndexRange__len (self : t_IndexRange_t) : uint_size := - sub (f_end self) (f_start self). +From Core Require Import Core_Iter (t_Iterator). +Export Core_Iter (t_Iterator). -Definition impl__IndexRange__next_unchecked (self : t_IndexRange_t) : t_IndexRange_t × uint_size := - let value := f_start self : uint_size in - let self := Build_t_IndexRange (f_start := add value (@repr WORDSIZE32 1)) : t_IndexRange_t in - let hax_temp_output := value : uint_size in +Record t_IndexRange : Type := + { + IndexRange_f_start : t_usize; + IndexRange_f_end : t_usize; + }. +Arguments Build_t_IndexRange. +Arguments IndexRange_f_start. +Arguments IndexRange_f_end. +#[export] Instance settable_t_IndexRange : Settable _ := + settable! (Build_t_IndexRange) . + +Definition impl__IndexRange__zero_to (v_end : t_usize) : t_IndexRange := + Build_t_IndexRange (0) (v_end). + +Definition impl__IndexRange__next_unchecked (self : t_IndexRange) : (t_IndexRange*t_usize) := + let value := IndexRange_f_start self in + let self := self <|IndexRange_f_start := t_Add_f_add (value) (1) |> in + let hax_temp_output := value in (self,hax_temp_output). -Definition impl__IndexRange__zero_to (end : uint_size) : t_IndexRange_t := - Build_IndexRange (f_start := (@repr WORDSIZE32 0)) (f_end := end). +Definition impl__IndexRange__len (self : t_IndexRange) : t_usize := + sub (IndexRange_f_end self) (IndexRange_f_start self). -(*item error backend*) +Instance t_Iterator_538767852 : t_Iterator ((t_IndexRange)) := + { + Iterator_impl_1_f_Item := t_usize; + Iterator_impl_1_f_next := fun (self : t_IndexRange)=> + let hax_temp_output := never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))) in + (self,hax_temp_output); + Iterator_impl_1_f_size_hint := fun (self : t_IndexRange)=> + let len := impl__IndexRange__len (self) in + (len,Option_Some (len)); + Iterator_impl_1_f_fold := fun (self : t_IndexRange) (init : v_B) (f : v_F)=> + never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))); + }. -#[global] Instance t_IndexRange_t_t_ExactSizeIterator : t_ExactSizeIterator t_IndexRange_t := { - f_len (self : t_IndexRange_t) := impl__IndexRange__len self; -}. +Instance t_ExactSizeIterator_661616782 : t_ExactSizeIterator ((t_IndexRange)) := + { + ExactSizeIterator_impl_2_f_len := fun (self : t_IndexRange)=> + impl__IndexRange__len (self); + }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v index 759db1f41..64b2e14ee 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v @@ -1,11 +1,68 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Record t_Range (Idx : _) : Type := { - f_start : Idx; - f_end : Idx; -}. +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +Record t_Range (v_Idx : Type) `{t_Sized (v_Idx)} : Type := + { + Range_f_start : v_Idx; + Range_f_end : v_Idx; + }. +Arguments Build_t_Range (_) {_}. +Arguments Range_f_start {_} {_}. +Arguments Range_f_end {_} {_}. +#[export] Instance settable_t_Range `{v_Idx : Type} `{t_Sized (v_Idx)} : Settable _ := + settable! (Build_t_Range v_Idx) . diff --git a/proof-libs/coq/coq/generated-core/src/Core_Option.v b/proof-libs/coq/coq/generated-core/src/Core_Option.v index 6ecfbcca6..8e1ea84f0 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Option.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Option.v @@ -1,58 +1,120 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import panic. -Export panic. +(* From Core Require Import Core. *) -Require Import panic_display. -Export panic_display. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Inductive t_Option (T : _) : Type := -| Option_None : t_Option (T : _) -| Option_Some : T -> t_Option (T : _). -Arguments Option_None {_}. -Arguments Option_Some {_} T. -#[global] Instance t_Option_t T_t_Clone (T : _) : t_Clone (t_Option_t T) := { - f_clone (self : t_Option_t T) := match self with - | Option_Some x => - Option_Some (f_clone x) - | Option_None => - Option_Nonet_Option_t T - end; -}. -Definition impl_1__is_some (self : t_Option_t T) : bool := +From Core Require Import Core_Panicking (t_panic). +Export Core_Panicking (t_panic). + +From Core Require Import Core_Panicking (t_panic_display). +Export Core_Panicking (t_panic_display). + +Inductive t_Option (v_T : Type) `{t_Sized (v_T)} : Type := +| Option_None +| Option_Some : v_T -> _. +Arguments Option_None {_} {_}. +Arguments Option_Some {_} {_}. + +Instance t_Clone_390068633 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Option ((v_T)))) := + { + Clone_impl_f_clone := fun (self : t_Option ((v_T)))=> + match self with + | Option_Some (x) => + Option_Some (Clone_f_clone (x)) + | Option_None => + Option_None + end; + }. + +Definition impl_1__is_some `{v_T : Type} `{t_Sized (v_T)} (self : t_Option ((v_T))) : bool := match self with - | Option_Some _ => + | Option_Some (_) => true | _ => false end. -Definition impl_1__map (self : t_Option_t T) (f : F) : t_Option_t U := +Definition impl_1__map `{v_T : Type} `{v_U : Type} `{v_F : Type} `{t_Sized (v_T)} `{t_Sized (v_U)} `{t_Sized (v_F)} `{t_FnOnce (v_F) ((v_T))} `{_.(FnOnce_f_Output) = v_U} (self : t_Option ((v_T))) (f : v_F) : t_Option ((v_U)) := match self with - | Option_Some x => - Option_Some (f_call_once f x) - | Option_None => - Option_Nonet_Option_t U + | Option_Some (x) => + Option_Some (FnOnce_f_call_once (f) ((x))) + | Option_None => + Option_None end. -Definition unwrap_failed (_ : unit) : t_Never_t := - panic called `Option::unwrap()` on a `None` value. +Definition unwrap_failed '(_ : unit) : t_Never := + panic ("called `Option::unwrap()` on a `None` value"%string). -Definition impl_1__unwrap (self : t_Option_t T) : T := +Definition impl_1__unwrap `{v_T : Type} `{t_Sized (v_T)} (self : t_Option ((v_T))) `{impl_1__is_some (self___) = true} : v_T := match self with - | Option_Some val => + | Option_Some (val) => val - | Option_None => - never_to_any (unwrap_failed tt) + | Option_None => + never_to_any (unwrap_failed (tt)) end. -(*item error backend*) +Definition expect_failed (msg : string) : t_Never := + panic_display (msg). -(*item error backend*) +Definition impl_1__expect `{v_T : Type} `{t_Sized (v_T)} (self : t_Option ((v_T))) (msg : string) : v_T := + match self with + | Option_Some (val) => + val + | Option_None => + never_to_any (expect_failed (msg)) + end. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Panicking.v b/proof-libs/coq/coq/generated-core/src/Core_Panicking.v index 6ff112b62..972e26070 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Panicking.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Panicking.v @@ -1,54 +1,109 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import fmt. -Export fmt. +(* From Core Require Import Core. *) -Require Import Location. -Export Location. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import PanicInfo. -Export PanicInfo. +From Core Require Import Core (t_fmt). +Export Core (t_fmt). + + + +From Core Require Import Core_Panic (t_Location). +Export Core_Panic (t_Location). + +From Core Require Import Core_Panic (t_PanicInfo). +Export Core_Panic (t_PanicInfo). Inductive t_AssertKind : Type := -| AssertKind_Eq : t_AssertKind -| AssertKind_Ne : t_AssertKind -| AssertKind_Match : t_AssertKind. +| AssertKind_Eq +| AssertKind_Ne +| AssertKind_Match. +Arguments AssertKind_Eq. +Arguments AssertKind_Ne. +Arguments AssertKind_Match. -Definition t_AssertKind_cast_to_repr (x : t_AssertKind_t) : uint_size := +Definition t_AssertKind_cast_to_repr (x : t_AssertKind) : t_isize := match x with - | AssertKind_Eq => - (@repr WORDSIZE32 0) - | AssertKind_Ne => - (@repr WORDSIZE32 1) - | AssertKind_Match => - (@repr WORDSIZE32 3) + | AssertKind_Eq => + 0 + | AssertKind_Ne => + 1 + | AssertKind_Match => + 3 end. Inductive t_Never : Type := . -Definition t_Never_cast_to_repr (x : t_Never_t) : t_Never_t := +Definition t_Never_cast_to_repr (x : t_Never) : t_Never := match x with - end. -Definition never_to_any (x : t_Never_t) : T := - never_to_any match x with - - end. +Definition never_to_any `{v_T : Type} `{t_Sized (v_T)} (x : t_Never) : v_T := + never_to_any (match x with + end). -Definition panic_fmt (fmt : t_Arguments_t) : t_Never_t := - panic_fmt fmt. +Fixpoint panic_fmt (fmt : t_Arguments) : t_Never := + panic_fmt (fmt). -(*item error backend*) +Definition panic (expr : string) : t_Never := + panic_fmt (impl_2__new_const ([expr])). -Definition panic_display (x : T) : t_Never_t := - panic_fmt (impl_2__new_v1 (array_from_list []) (array_from_list [impl_1__new_display x])). +Definition panic_display `{v_T : Type} `{t_Sized (v_T)} `{t_Display (v_T)} (x : v_T) : t_Never := + panic_fmt (impl_2__new_v1 ([""%string]) ([impl_1__new_display (x)])). -Definition panic_explicit (_ : unit) : t_Never_t := - panic_display explicit panic. +Definition panic_explicit '(_ : unit) : t_Never := + panic_display ("explicit panic"%string). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Primitive.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive.v index 13bfebe0c..62cc6ce4d 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Primitive.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive.v @@ -1,580 +1,265 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Add. -Export Add. -Require Import Div. -Export Div. -Require Import Mul. -Export Mul. +From Core Require Import Core_Ops (t_Add). +Export Core_Ops (t_Add). -Require Import Neg. -Export Neg. +From Core Require Import Core_Ops (t_Div). +Export Core_Ops (t_Div). -Require Import Rem. -Export Rem. +From Core Require Import Core_Ops (t_Mul). +Export Core_Ops (t_Mul). -Require Import Sub. -Export Sub. +From Core Require Import Core_Ops (t_Neg). +Export Core_Ops (t_Neg). -Require Import BitAnd. -Export BitAnd. +From Core Require Import Core_Ops (t_Rem). +Export Core_Ops (t_Rem). -Require Import BitOr. -Export BitOr. +From Core Require Import Core_Ops (t_Sub). +Export Core_Ops (t_Sub). -Require Import BitXor. -Export BitXor. -Require Import Not. -Export Not. -Require Import Shl. -Export Shl. +From Core Require Import Core_Ops (t_BitAnd). +Export Core_Ops (t_BitAnd). -Require Import Shr. -Export Shr. +From Core Require Import Core_Ops (t_BitOr). +Export Core_Ops (t_BitOr). -Require Import Ordering. -Export Ordering. +From Core Require Import Core_Ops (t_BitXor). +Export Core_Ops (t_BitXor). -Require Import PartialEq. -Export PartialEq. +From Core Require Import Core_Ops (t_Not). +Export Core_Ops (t_Not). -Require Import PartialOrd. -Export PartialOrd. +From Core Require Import Core_Ops (t_Shl). +Export Core_Ops (t_Shl). -Require Import Crate_Base. -Export Crate_Base. +From Core Require Import Core_Ops (t_Shr). +Export Core_Ops (t_Shr). -Require Import Crate_Base_Number_conversion. -Export Crate_Base_Number_conversion. -Require Import Crate_Base_interface_Int. -Export Crate_Base_interface_Int. -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -Record t_Slice (T : _) : Type := { - f_v : t_Seq_t T; -}. - -#[global] Instance t_Slice_t T_t_From (T : _) : t_From (t_Slice_t T) (seq T) := { - f_from (x : seq T) := Build_Slice (f_v := Build_Seq (f_v := impl__to_vec x)); -}. - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -(*item error backend*) - -Record t_u128 : Type := { - 0 : t_U128_t; -}. - -#[global] Instance t_u128_t_t_Clone : t_Clone t_u128_t := { - f_clone (self : t_u128_t) := C_u128 (f_clone (0 self)); -}. - -#[global] Instance t_u128_t_t_PartialEq : t_PartialEq t_u128_t t_u128_t := { - f_eq (self : t_u128_t) (rhs : t_u128_t) := (0 self)=.?(0 rhs); - f_ne (self : t_u128_t) (rhs : t_u128_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_u128_t_t_PartialOrd : t_PartialOrd t_u128_t t_u128_t := { - f_partial_cmp (self : t_u128_t) (rhs : t_u128_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_u128_t) (rhs : t_u128_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_u128_t) (rhs : t_u128_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_u128_t) (rhs : t_u128_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_u128_t) (rhs : t_u128_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_u16 : Type := { - 0 : t_U16_t; -}. - -#[global] Instance t_u16_t_t_Clone : t_Clone t_u16_t := { - f_clone (self : t_u16_t) := C_u16 (f_clone (0 self)); -}. - -#[global] Instance t_u16_t_t_PartialEq : t_PartialEq t_u16_t t_u16_t := { - f_eq (self : t_u16_t) (rhs : t_u16_t) := (0 self)=.?(0 rhs); - f_ne (self : t_u16_t) (rhs : t_u16_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_u16_t_t_PartialOrd : t_PartialOrd t_u16_t t_u16_t := { - f_partial_cmp (self : t_u16_t) (rhs : t_u16_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_u16_t) (rhs : t_u16_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_u16_t) (rhs : t_u16_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_u16_t) (rhs : t_u16_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_u16_t) (rhs : t_u16_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_u32 : Type := { - 0 : t_U32_t; -}. - -#[global] Instance t_u32_t_t_Clone : t_Clone t_u32_t := { - f_clone (self : t_u32_t) := C_u32 (f_clone (0 self)); -}. - -#[global] Instance t_u32_t_t_PartialEq : t_PartialEq t_u32_t t_u32_t := { - f_eq (self : t_u32_t) (rhs : t_u32_t) := (0 self)=.?(0 rhs); - f_ne (self : t_u32_t) (rhs : t_u32_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_u32_t_t_PartialOrd : t_PartialOrd t_u32_t t_u32_t := { - f_partial_cmp (self : t_u32_t) (rhs : t_u32_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_u32_t) (rhs : t_u32_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_u32_t) (rhs : t_u32_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_u32_t) (rhs : t_u32_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_u32_t) (rhs : t_u32_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_u64 : Type := { - 0 : t_U64_t; -}. - -#[global] Instance t_u64_t_t_Clone : t_Clone t_u64_t := { - f_clone (self : t_u64_t) := C_u64 (f_clone (0 self)); -}. - -#[global] Instance t_u64_t_t_PartialEq : t_PartialEq t_u64_t t_u64_t := { - f_eq (self : t_u64_t) (rhs : t_u64_t) := (0 self)=.?(0 rhs); - f_ne (self : t_u64_t) (rhs : t_u64_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_u64_t_t_PartialOrd : t_PartialOrd t_u64_t t_u64_t := { - f_partial_cmp (self : t_u64_t) (rhs : t_u64_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_u64_t) (rhs : t_u64_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_u64_t) (rhs : t_u64_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_u64_t) (rhs : t_u64_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_u64_t) (rhs : t_u64_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_u8 : Type := { - 0 : t_U8_t; -}. - -#[global] Instance t_u8_t_t_Clone : t_Clone t_u8_t := { - f_clone (self : t_u8_t) := C_u8 (f_clone (0 self)); -}. - -#[global] Instance t_u8_t_t_PartialEq : t_PartialEq t_u8_t t_u8_t := { - f_eq (self : t_u8_t) (rhs : t_u8_t) := (0 self)=.?(0 rhs); - f_ne (self : t_u8_t) (rhs : t_u8_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_u8_t_t_PartialOrd : t_PartialOrd t_u8_t t_u8_t := { - f_partial_cmp (self : t_u8_t) (rhs : t_u8_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_u8_t) (rhs : t_u8_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_u8_t) (rhs : t_u8_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_u8_t) (rhs : t_u8_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_u8_t) (rhs : t_u8_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_usize : Type := { - 0 : t_U64_t; -}. - -#[global] Instance t_usize_t_t_Clone : t_Clone t_usize_t := { - f_clone (self : t_usize_t) := C_usize (f_clone (0 self)); -}. - -#[global] Instance t_usize_t_t_PartialEq : t_PartialEq t_usize_t t_usize_t := { - f_eq (self : t_usize_t) (rhs : t_usize_t) := (0 self)=.?(0 rhs); - f_ne (self : t_usize_t) (rhs : t_usize_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_usize_t_t_PartialOrd : t_PartialOrd t_usize_t t_usize_t := { - f_partial_cmp (self : t_usize_t) (rhs : t_usize_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_usize_t) (rhs : t_usize_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_usize_t) (rhs : t_usize_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_usize_t) (rhs : t_usize_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_usize_t) (rhs : t_usize_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_i128 : Type := { - 0 : t_I128_t; -}. - -#[global] Instance t_i128_t_t_Clone : t_Clone t_i128_t := { - f_clone (self : t_i128_t) := C_i128 (f_clone (0 self)); -}. - -#[global] Instance t_i128_t_t_PartialEq : t_PartialEq t_i128_t t_i128_t := { - f_eq (self : t_i128_t) (rhs : t_i128_t) := (0 self)=.?(0 rhs); - f_ne (self : t_i128_t) (rhs : t_i128_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_i128_t_t_PartialOrd : t_PartialOrd t_i128_t t_i128_t := { - f_partial_cmp (self : t_i128_t) (rhs : t_i128_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_i128_t) (rhs : t_i128_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_i128_t) (rhs : t_i128_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_i128_t) (rhs : t_i128_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_i128_t) (rhs : t_i128_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_i16 : Type := { - 0 : t_I16_t; -}. - -#[global] Instance t_i16_t_t_Clone : t_Clone t_i16_t := { - f_clone (self : t_i16_t) := C_i16 (f_clone (0 self)); -}. - -#[global] Instance t_i16_t_t_PartialEq : t_PartialEq t_i16_t t_i16_t := { - f_eq (self : t_i16_t) (rhs : t_i16_t) := (0 self)=.?(0 rhs); - f_ne (self : t_i16_t) (rhs : t_i16_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_i16_t_t_PartialOrd : t_PartialOrd t_i16_t t_i16_t := { - f_partial_cmp (self : t_i16_t) (rhs : t_i16_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_i16_t) (rhs : t_i16_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_i16_t) (rhs : t_i16_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_i16_t) (rhs : t_i16_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_i16_t) (rhs : t_i16_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_i32 : Type := { - 0 : t_I32_t; -}. - -#[global] Instance t_i32_t_t_Clone : t_Clone t_i32_t := { - f_clone (self : t_i32_t) := C_i32 (f_clone (0 self)); -}. - -#[global] Instance t_i32_t_t_PartialEq : t_PartialEq t_i32_t t_i32_t := { - f_eq (self : t_i32_t) (rhs : t_i32_t) := (0 self)=.?(0 rhs); - f_ne (self : t_i32_t) (rhs : t_i32_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_i32_t_t_PartialOrd : t_PartialOrd t_i32_t t_i32_t := { - f_partial_cmp (self : t_i32_t) (rhs : t_i32_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_i32_t) (rhs : t_i32_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_i32_t) (rhs : t_i32_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_i32_t) (rhs : t_i32_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_i32_t) (rhs : t_i32_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_i64 : Type := { - 0 : t_I64_t; -}. - -#[global] Instance t_i64_t_t_Clone : t_Clone t_i64_t := { - f_clone (self : t_i64_t) := C_i64 (f_clone (0 self)); -}. - -#[global] Instance t_i64_t_t_PartialEq : t_PartialEq t_i64_t t_i64_t := { - f_eq (self : t_i64_t) (rhs : t_i64_t) := (0 self)=.?(0 rhs); - f_ne (self : t_i64_t) (rhs : t_i64_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_i64_t_t_PartialOrd : t_PartialOrd t_i64_t t_i64_t := { - f_partial_cmp (self : t_i64_t) (rhs : t_i64_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_i64_t) (rhs : t_i64_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_i64_t) (rhs : t_i64_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_i64_t) (rhs : t_i64_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_i64_t) (rhs : t_i64_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_i8 : Type := { - 0 : t_I8_t; -}. - -#[global] Instance t_i8_t_t_Clone : t_Clone t_i8_t := { - f_clone (self : t_i8_t) := C_i8 (f_clone (0 self)); -}. - -#[global] Instance t_i8_t_t_PartialEq : t_PartialEq t_i8_t t_i8_t := { - f_eq (self : t_i8_t) (rhs : t_i8_t) := (0 self)=.?(0 rhs); - f_ne (self : t_i8_t) (rhs : t_i8_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_i8_t_t_PartialOrd : t_PartialOrd t_i8_t t_i8_t := { - f_partial_cmp (self : t_i8_t) (rhs : t_i8_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_i8_t) (rhs : t_i8_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_i8_t) (rhs : t_i8_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_i8_t) (rhs : t_i8_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_i8_t) (rhs : t_i8_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. - -Record t_isize : Type := { - 0 : t_I64_t; -}. - -#[global] Instance t_isize_t_t_Clone : t_Clone t_isize_t := { - f_clone (self : t_isize_t) := C_isize (f_clone (0 self)); -}. - -#[global] Instance t_isize_t_t_PartialEq : t_PartialEq t_isize_t t_isize_t := { - f_eq (self : t_isize_t) (rhs : t_isize_t) := (0 self)=.?(0 rhs); - f_ne (self : t_isize_t) (rhs : t_isize_t) := not ((0 self)=.?(0 rhs)); -}. - -#[global] Instance t_isize_t_t_PartialOrd : t_PartialOrd t_isize_t t_isize_t := { - f_partial_cmp (self : t_isize_t) (rhs : t_isize_t) := f_partial_cmp (0 self) (0 rhs); - f_lt (self : t_isize_t) (rhs : t_isize_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less => - true - | _ => - false - end; - f_le (self : t_isize_t) (rhs : t_isize_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Less | Ordering_Equal => - true - | _ => - false - end; - f_gt (self : t_isize_t) (rhs : t_isize_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater => - true - | _ => - false - end; - f_ge (self : t_isize_t) (rhs : t_isize_t) := match f_partial_cmp (0 self) (0 rhs) with - | Option_Some Ordering_Greater | Ordering_Equal => - true - | _ => - false - end; -}. +From Core Require Import Core_Cmp (t_Ordering). +Export Core_Cmp (t_Ordering). + +From Core Require Import Core_Cmp (t_PartialEq). +Export Core_Cmp (t_PartialEq). + +From Core Require Import Core_Cmp (t_PartialOrd). +Export Core_Cmp (t_PartialOrd). + +From Core Require Import Core (t_base). +Export Core (t_base). + +From Core Require Import Core_Base (t_number_conversion). +Export Core_Base (t_number_conversion). + +From Core Require Import Core_Base_interface (t_int). +Export Core_Base_interface (t_int). + +Notation "'t_Slice'" := (t_Slice). + +Notation "'Slice_f_v'" := (Slice_f_v). + +Notation "'impl_2'" := (impl_2). + +Notation "'t_Array'" := (t_Array). + +Notation "'Array_f_v'" := (Array_f_v). + +Notation "'impl_3__cast'" := (cast). + +Notation "'t_i128'" := (t_i128). + +Notation "'i128_0'" := (i128_0). + +Notation "'impl_25'" := (impl_25). + +Notation "'t_i16'" := (t_i16). + +Notation "'i16_0'" := (i16_0). + +Notation "'impl_19'" := (impl_19). + +Notation "'t_i32'" := (t_i32). + +Notation "'i32_0'" := (i32_0). + +Notation "'impl_21'" := (impl_21). + +Notation "'t_i64'" := (t_i64). + +Notation "'i64_0'" := (i64_0). + +Notation "'impl_23'" := (impl_23). + +Notation "'t_i8'" := (t_i8). + +Notation "'i8_0'" := (i8_0). + +Notation "'impl_17'" := (impl_17). + +Notation "'t_isize'" := (t_isize). + +Notation "'isize_0'" := (isize_0). + +Notation "'impl_27'" := (impl_27). + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +Notation "'t_u128'" := (t_u128). + +Notation "'u128_0'" := (u128_0). + +Notation "'t_u16'" := (t_u16). + +Notation "'u16_0'" := (u16_0). + +Notation "'t_u32'" := (t_u32). + +Notation "'u32_0'" := (u32_0). + +Notation "'t_u64'" := (t_u64). + +Notation "'u64_0'" := (u64_0). + +Notation "'t_u8'" := (t_u8). + +Notation "'u8_0'" := (u8_0). + +Notation "'t_usize'" := (t_usize). + +Notation "'usize_0'" := (usize_0). + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +Notation "'impl_1'" := (impl_1). + +Notation "'impl_5'" := (impl_5). + +Notation "'impl_7'" := (impl_7). + +Notation "'impl_9'" := (impl_9). + +Notation "'impl_11'" := (impl_11). + +Notation "'impl_13'" := (impl_13). + +Notation "'impl_15'" := (impl_15). + +Notation "'impl'" := (impl). + +Notation "'impl_29'" := (impl_29). + +Notation "'impl_30'" := (impl_30). + +Notation "'impl_31'" := (impl_31). + +Notation "'impl_32'" := (impl_32). + +Notation "'impl_33'" := (impl_33). + +Notation "'impl_34'" := (impl_34). + +Notation "'impl_35'" := (impl_35). + +Notation "'impl_36'" := (impl_36). + +Notation "'impl_37'" := (impl_37). + +Notation "'impl_38'" := (impl_38). + +Notation "'impl_39'" := (impl_39). + +Notation "'impl_40'" := (impl_40). + +Notation "'impl_41'" := (impl_41). + +Notation "'impl_42'" := (impl_42). + +Notation "'impl_43'" := (impl_43). + +Notation "'impl_44'" := (impl_44). + +Notation "'impl_45'" := (impl_45). + +Notation "'impl_46'" := (impl_46). + +Notation "'impl_47'" := (impl_47). + +Notation "'impl_48'" := (impl_48). + +Notation "'impl_49'" := (impl_49). + +Notation "'impl_50'" := (impl_50). + +Notation "'impl_51'" := (impl_51). + +Notation "'impl_52'" := (impl_52). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v index d0f04c916..b8b3f8aad 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v @@ -1,190 +1,157 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Require Import primitive. -Export primitive. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Core_Cmp. -Export Core_Cmp. +From Core Require Import Core_Primitive. +Export Core_Primitive. -Require Import Core_Convert. -Export Core_Convert. +From Core Require Import Core (t_primitive). +Export Core (t_primitive). -(*Not implemented yet? todo(item)*) +From Core Require Import Core (t_cmp). +Export Core (t_cmp). -(*Not implemented yet? todo(item)*) +From Core Require Import Core (t_convert). +Export Core (t_convert). -#[global] Instance t_u128_t_t_From : t_From t_u128_t int128 := { - f_from (x : int128) := C_u128 (Build_U128 (f_v := f_into x)); -}. +(* NotImplementedYet *) -#[global] Instance int128_t_From : t_From int128 t_u128_t := { - f_from (x : t_u128_t) := f_into (f_v (0 x)); -}. +(* NotImplementedYet *) -#[global] Instance t_u16_t_t_From : t_From t_u16_t int16 := { - f_from (x : int16) := C_u16 (Build_U16 (f_v := f_into x)); -}. +Notation "'impl_31'" := (impl_31). -#[global] Instance int16_t_From : t_From int16 t_u16_t := { - f_from (x : t_u16_t) := f_into (f_v (0 x)); -}. +Notation "'impl_40'" := (impl_40). -#[global] Instance t_u32_t_t_From : t_From t_u32_t int32 := { - f_from (x : int32) := C_u32 (Build_U32 (f_v := f_into x)); -}. +Notation "'impl'" := (impl). -#[global] Instance int32_t_From : t_From int32 t_u32_t := { - f_from (x : t_u32_t) := f_into (f_v (0 x)); -}. +Notation "'impl_1'" := (impl_1). -#[global] Instance t_u64_t_t_From : t_From t_u64_t int64 := { - f_from (x : int64) := C_u64 (Build_U64 (f_v := f_into x)); -}. +Notation "'impl_2'" := (impl_2). -#[global] Instance int64_t_From : t_From int64 t_u64_t := { - f_from (x : t_u64_t) := f_into (f_v (0 x)); -}. +Notation "'impl_3'" := (impl_3). -#[global] Instance t_u8_t_t_From : t_From t_u8_t int8 := { - f_from (x : int8) := C_u8 (Build_U8 (f_v := f_into x)); -}. +Notation "'impl_4'" := (impl_4). -#[global] Instance int8_t_From : t_From int8 t_u8_t := { - f_from (x : t_u8_t) := f_into (f_v (0 x)); -}. +Notation "'impl_5'" := (impl_5). -#[global] Instance t_usize_t_t_From : t_From t_usize_t uint_size := { - f_from (x : uint_size) := C_usize (Build_U64 (f_v := f_into x)); -}. +Notation "'impl_6'" := (impl_6). -#[global] Instance uint_size_t_From : t_From uint_size t_usize_t := { - f_from (x : t_usize_t) := f_into (f_v (0 x)); -}. +Notation "'impl_7'" := (impl_7). -#[global] Instance t_usize_t_t_From : t_From t_usize_t t_u64_t := { - f_from (x : t_u64_t) := C_usize (f_into (0 x)); -}. +Notation "'impl_8'" := (impl_8). -#[global] Instance t_u64_t_t_From : t_From t_u64_t t_usize_t := { - f_from (x : t_usize_t) := C_u64 (f_into (0 x)); -}. +Notation "'impl_9'" := (impl_9). -#[global] Instance t_u16_t_t_From : t_From t_u16_t t_u8_t := { - f_from (x : t_u8_t) := C_u16 (f_into (0 x)); -}. +Notation "'impl_10'" := (impl_10). -#[global] Instance t_u32_t_t_From : t_From t_u32_t t_u8_t := { - f_from (x : t_u8_t) := C_u32 (f_into (0 x)); -}. +Notation "'impl_11'" := (impl_11). -#[global] Instance t_u64_t_t_From : t_From t_u64_t t_u8_t := { - f_from (x : t_u8_t) := C_u64 (f_into (0 x)); -}. +Notation "'impl_12'" := (impl_12). -#[global] Instance t_u128_t_t_From : t_From t_u128_t t_u8_t := { - f_from (x : t_u8_t) := C_u128 (f_into (0 x)); -}. +Notation "'impl_13'" := (impl_13). -#[global] Instance t_usize_t_t_From : t_From t_usize_t t_u8_t := { - f_from (x : t_u8_t) := C_usize (f_into (0 x)); -}. +Notation "'impl_14'" := (impl_14). -#[global] Instance t_u8_t_t_From : t_From t_u8_t t_u16_t := { - f_from (x : t_u16_t) := C_u8 (f_into (0 x)); -}. +Notation "'impl_15'" := (impl_15). -#[global] Instance t_u32_t_t_From : t_From t_u32_t t_u16_t := { - f_from (x : t_u16_t) := C_u32 (f_into (0 x)); -}. +Notation "'impl_16'" := (impl_16). -#[global] Instance t_u64_t_t_From : t_From t_u64_t t_u16_t := { - f_from (x : t_u16_t) := C_u64 (f_into (0 x)); -}. +Notation "'impl_17'" := (impl_17). -#[global] Instance t_u128_t_t_From : t_From t_u128_t t_u16_t := { - f_from (x : t_u16_t) := C_u128 (f_into (0 x)); -}. +Notation "'impl_18'" := (impl_18). -#[global] Instance t_usize_t_t_From : t_From t_usize_t t_u16_t := { - f_from (x : t_u16_t) := C_usize (f_into (0 x)); -}. +Notation "'impl_19'" := (impl_19). -#[global] Instance t_u8_t_t_From : t_From t_u8_t t_u32_t := { - f_from (x : t_u32_t) := C_u8 (f_into (0 x)); -}. +Notation "'impl_20'" := (impl_20). -#[global] Instance t_u16_t_t_From : t_From t_u16_t t_u32_t := { - f_from (x : t_u32_t) := C_u16 (f_into (0 x)); -}. +Notation "'impl_21'" := (impl_21). -#[global] Instance t_u64_t_t_From : t_From t_u64_t t_u32_t := { - f_from (x : t_u32_t) := C_u64 (f_into (0 x)); -}. +Notation "'impl_22'" := (impl_22). -#[global] Instance t_u128_t_t_From : t_From t_u128_t t_u32_t := { - f_from (x : t_u32_t) := C_u128 (f_into (0 x)); -}. +Notation "'impl_23'" := (impl_23). -#[global] Instance t_usize_t_t_From : t_From t_usize_t t_u32_t := { - f_from (x : t_u32_t) := C_usize (f_into (0 x)); -}. +Notation "'impl_24'" := (impl_24). -#[global] Instance t_u8_t_t_From : t_From t_u8_t t_u64_t := { - f_from (x : t_u64_t) := C_u8 (f_into (0 x)); -}. +Notation "'impl_25'" := (impl_25). -#[global] Instance t_u16_t_t_From : t_From t_u16_t t_u64_t := { - f_from (x : t_u64_t) := C_u16 (f_into (0 x)); -}. +Notation "'impl_26'" := (impl_26). -#[global] Instance t_u32_t_t_From : t_From t_u32_t t_u64_t := { - f_from (x : t_u64_t) := C_u32 (f_into (0 x)); -}. +Notation "'impl_27'" := (impl_27). -#[global] Instance t_u128_t_t_From : t_From t_u128_t t_u64_t := { - f_from (x : t_u64_t) := C_u128 (f_into (0 x)); -}. +Notation "'impl_28'" := (impl_28). -#[global] Instance t_u8_t_t_From : t_From t_u8_t t_u128_t := { - f_from (x : t_u128_t) := C_u8 (f_into (0 x)); -}. +Notation "'impl_29'" := (impl_29). -#[global] Instance t_u16_t_t_From : t_From t_u16_t t_u128_t := { - f_from (x : t_u128_t) := C_u16 (f_into (0 x)); -}. +Notation "'impl_30'" := (impl_30). -#[global] Instance t_u32_t_t_From : t_From t_u32_t t_u128_t := { - f_from (x : t_u128_t) := C_u32 (f_into (0 x)); -}. +Notation "'impl_32'" := (impl_32). -#[global] Instance t_u64_t_t_From : t_From t_u64_t t_u128_t := { - f_from (x : t_u128_t) := C_u64 (f_into (0 x)); -}. +Notation "'impl_33'" := (impl_33). -#[global] Instance t_usize_t_t_From : t_From t_usize_t t_u128_t := { - f_from (x : t_u128_t) := C_usize (f_into (0 x)); -}. +Notation "'impl_34'" := (impl_34). -#[global] Instance t_u8_t_t_From : t_From t_u8_t t_usize_t := { - f_from (x : t_usize_t) := C_u8 (f_into (0 x)); -}. +Notation "'impl_35'" := (impl_35). -#[global] Instance t_u16_t_t_From : t_From t_u16_t t_usize_t := { - f_from (x : t_usize_t) := C_u16 (f_into (0 x)); -}. +Notation "'impl_36'" := (impl_36). -#[global] Instance t_u32_t_t_From : t_From t_u32_t t_usize_t := { - f_from (x : t_usize_t) := C_u32 (f_into (0 x)); -}. +Notation "'impl_37'" := (impl_37). -#[global] Instance t_u128_t_t_From : t_From t_u128_t t_usize_t := { - f_from (x : t_usize_t) := C_u128 (f_into (0 x)); -}. +Notation "'impl_38'" := (impl_38). + +Notation "'impl_39'" := (impl_39). + +Notation "'impl_41'" := (impl_41). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v index e9c31dec1..95f35d1d6 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v @@ -1,190 +1,157 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Super. -Export Super. +(* From Core Require Import Core. *) -Require Import primitive. -Export primitive. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -Require Import Core_Cmp. -Export Core_Cmp. +Notation "'impl_31'" := (impl_31). -Require Import Core_Convert. -Export Core_Convert. +Notation "'impl_40'" := (impl_40). -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive. +Export Core_Primitive. -(*Not implemented yet? todo(item)*) +From Core Require Import Core (t_primitive). +Export Core (t_primitive). -#[global] Instance t_i8_t_t_From : t_From t_i8_t int8 := { - f_from (x : int8) := C_i8 (Build_I8 (f_v := f_into x)); -}. +From Core Require Import Core (t_cmp). +Export Core (t_cmp). -#[global] Instance int8_t_From : t_From int8 t_i8_t := { - f_from (x : t_i8_t) := f_into (f_v (0 x)); -}. +From Core Require Import Core (t_convert). +Export Core (t_convert). -#[global] Instance t_i16_t_t_From : t_From t_i16_t int16 := { - f_from (x : int16) := C_i16 (Build_I16 (f_v := f_into x)); -}. +(* NotImplementedYet *) -#[global] Instance int16_t_From : t_From int16 t_i16_t := { - f_from (x : t_i16_t) := f_into (f_v (0 x)); -}. +(* NotImplementedYet *) -#[global] Instance t_i32_t_t_From : t_From t_i32_t int32 := { - f_from (x : int32) := C_i32 (Build_I32 (f_v := f_into x)); -}. +Notation "'impl'" := (impl). -#[global] Instance int32_t_From : t_From int32 t_i32_t := { - f_from (x : t_i32_t) := f_into (f_v (0 x)); -}. +Notation "'impl_1'" := (impl_1). -#[global] Instance t_i64_t_t_From : t_From t_i64_t int64 := { - f_from (x : int64) := C_i64 (Build_I64 (f_v := f_into x)); -}. +Notation "'impl_2'" := (impl_2). -#[global] Instance int64_t_From : t_From int64 t_i64_t := { - f_from (x : t_i64_t) := f_into (f_v (0 x)); -}. +Notation "'impl_3'" := (impl_3). -#[global] Instance t_i128_t_t_From : t_From t_i128_t int128 := { - f_from (x : int128) := C_i128 (Build_I128 (f_v := f_into x)); -}. +Notation "'impl_4'" := (impl_4). -#[global] Instance int128_t_From : t_From int128 t_i128_t := { - f_from (x : t_i128_t) := f_into (f_v (0 x)); -}. +Notation "'impl_5'" := (impl_5). -#[global] Instance t_isize_t_t_From : t_From t_isize_t uint_size := { - f_from (x : uint_size) := C_isize (Build_I64 (f_v := f_into x)); -}. +Notation "'impl_6'" := (impl_6). -#[global] Instance uint_size_t_From : t_From uint_size t_isize_t := { - f_from (x : t_isize_t) := f_into (f_v (0 x)); -}. +Notation "'impl_7'" := (impl_7). -#[global] Instance t_i16_t_t_From : t_From t_i16_t t_i8_t := { - f_from (x : t_i8_t) := C_i16 (f_into (0 x)); -}. +Notation "'impl_8'" := (impl_8). -#[global] Instance t_i32_t_t_From : t_From t_i32_t t_i8_t := { - f_from (x : t_i8_t) := C_i32 (f_into (0 x)); -}. +Notation "'impl_9'" := (impl_9). -#[global] Instance t_i64_t_t_From : t_From t_i64_t t_i8_t := { - f_from (x : t_i8_t) := C_i64 (f_into (0 x)); -}. +Notation "'impl_10'" := (impl_10). -#[global] Instance t_i128_t_t_From : t_From t_i128_t t_i8_t := { - f_from (x : t_i8_t) := C_i128 (f_into (0 x)); -}. +Notation "'impl_11'" := (impl_11). -#[global] Instance t_isize_t_t_From : t_From t_isize_t t_i8_t := { - f_from (x : t_i8_t) := C_isize (f_into (0 x)); -}. +Notation "'impl_12'" := (impl_12). -#[global] Instance t_i8_t_t_From : t_From t_i8_t t_i16_t := { - f_from (x : t_i16_t) := C_i8 (f_into (0 x)); -}. +Notation "'impl_13'" := (impl_13). -#[global] Instance t_i32_t_t_From : t_From t_i32_t t_i16_t := { - f_from (x : t_i16_t) := C_i32 (f_into (0 x)); -}. +Notation "'impl_14'" := (impl_14). -#[global] Instance t_i64_t_t_From : t_From t_i64_t t_i16_t := { - f_from (x : t_i16_t) := C_i64 (f_into (0 x)); -}. +Notation "'impl_15'" := (impl_15). -#[global] Instance t_i128_t_t_From : t_From t_i128_t t_i16_t := { - f_from (x : t_i16_t) := C_i128 (f_into (0 x)); -}. +Notation "'impl_16'" := (impl_16). -#[global] Instance t_isize_t_t_From : t_From t_isize_t t_i16_t := { - f_from (x : t_i16_t) := C_isize (f_into (0 x)); -}. +Notation "'impl_17'" := (impl_17). -#[global] Instance t_i8_t_t_From : t_From t_i8_t t_i32_t := { - f_from (x : t_i32_t) := C_i8 (f_into (0 x)); -}. +Notation "'impl_18'" := (impl_18). -#[global] Instance t_i16_t_t_From : t_From t_i16_t t_i32_t := { - f_from (x : t_i32_t) := C_i16 (f_into (0 x)); -}. +Notation "'impl_19'" := (impl_19). -#[global] Instance t_i64_t_t_From : t_From t_i64_t t_i32_t := { - f_from (x : t_i32_t) := C_i64 (f_into (0 x)); -}. +Notation "'impl_20'" := (impl_20). -#[global] Instance t_i128_t_t_From : t_From t_i128_t t_i32_t := { - f_from (x : t_i32_t) := C_i128 (f_into (0 x)); -}. +Notation "'impl_21'" := (impl_21). -#[global] Instance t_isize_t_t_From : t_From t_isize_t t_i32_t := { - f_from (x : t_i32_t) := C_isize (f_into (0 x)); -}. +Notation "'impl_22'" := (impl_22). -#[global] Instance t_i8_t_t_From : t_From t_i8_t t_i64_t := { - f_from (x : t_i64_t) := C_i8 (f_into (0 x)); -}. +Notation "'impl_23'" := (impl_23). -#[global] Instance t_i16_t_t_From : t_From t_i16_t t_i64_t := { - f_from (x : t_i64_t) := C_i16 (f_into (0 x)); -}. +Notation "'impl_24'" := (impl_24). -#[global] Instance t_i32_t_t_From : t_From t_i32_t t_i64_t := { - f_from (x : t_i64_t) := C_i32 (f_into (0 x)); -}. +Notation "'impl_25'" := (impl_25). -#[global] Instance t_i128_t_t_From : t_From t_i128_t t_i64_t := { - f_from (x : t_i64_t) := C_i128 (f_into (0 x)); -}. +Notation "'impl_26'" := (impl_26). -#[global] Instance t_isize_t_t_From : t_From t_isize_t t_i64_t := { - f_from (x : t_i64_t) := C_isize (f_into (0 x)); -}. +Notation "'impl_27'" := (impl_27). -#[global] Instance t_i8_t_t_From : t_From t_i8_t t_i128_t := { - f_from (x : t_i128_t) := C_i8 (f_into (0 x)); -}. +Notation "'impl_28'" := (impl_28). -#[global] Instance t_i16_t_t_From : t_From t_i16_t t_i128_t := { - f_from (x : t_i128_t) := C_i16 (f_into (0 x)); -}. +Notation "'impl_29'" := (impl_29). -#[global] Instance t_i32_t_t_From : t_From t_i32_t t_i128_t := { - f_from (x : t_i128_t) := C_i32 (f_into (0 x)); -}. +Notation "'impl_30'" := (impl_30). -#[global] Instance t_i64_t_t_From : t_From t_i64_t t_i128_t := { - f_from (x : t_i128_t) := C_i64 (f_into (0 x)); -}. +Notation "'impl_32'" := (impl_32). -#[global] Instance t_isize_t_t_From : t_From t_isize_t t_i128_t := { - f_from (x : t_i128_t) := C_isize (f_into (0 x)); -}. +Notation "'impl_33'" := (impl_33). -#[global] Instance t_i8_t_t_From : t_From t_i8_t t_isize_t := { - f_from (x : t_isize_t) := C_i8 (f_into (0 x)); -}. +Notation "'impl_34'" := (impl_34). -#[global] Instance t_i16_t_t_From : t_From t_i16_t t_isize_t := { - f_from (x : t_isize_t) := C_i16 (f_into (0 x)); -}. +Notation "'impl_35'" := (impl_35). -#[global] Instance t_i32_t_t_From : t_From t_i32_t t_isize_t := { - f_from (x : t_isize_t) := C_i32 (f_into (0 x)); -}. +Notation "'impl_36'" := (impl_36). -#[global] Instance t_i64_t_t_From : t_From t_i64_t t_isize_t := { - f_from (x : t_isize_t) := C_i64 (f_into (0 x)); -}. +Notation "'impl_37'" := (impl_37). -#[global] Instance t_i128_t_t_From : t_From t_i128_t t_isize_t := { - f_from (x : t_isize_t) := C_i128 (f_into (0 x)); -}. +Notation "'impl_38'" := (impl_38). + +Notation "'impl_39'" := (impl_39). + +Notation "'impl_41'" := (impl_41). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Result.v b/proof-libs/coq/coq/generated-core/src/Core_Result.v index acfb3a5f7..d2d421a45 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Result.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Result.v @@ -1,20 +1,71 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Inductive t_Result (T : _) (E : _) : Type := -| Result_Ok : T -> t_Result (T : _) (E : _) -| Result_Err : E -> t_Result (T : _) (E : _). -Arguments Result_Ok {_} {_} T. -Arguments Result_Err {_} {_} E. +(* From Core Require Import Core. *) -Definition impl__ok (self : t_Result_t T E) : t_Option_t T := +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) + +Inductive t_Result (v_T : Type) (v_E : Type) `{t_Sized (v_T)} `{t_Sized (v_E)} : Type := +| Result_Ok : v_T -> _ +| Result_Err : v_E -> _. +Arguments Result_Ok {_} {_} {_} {_}. +Arguments Result_Err {_} {_} {_} {_}. + +Definition impl__ok `{v_T : Type} `{v_E : Type} `{t_Sized (v_T)} `{t_Sized (v_E)} (self : t_Result ((v_T)) ((v_E))) : t_Option ((v_T)) := match self with - | Result_Ok x => - Option_Some x - | Result_Err _ => - Option_Nonet_Option_t T + | Result_Ok (x) => + Option_Some (x) + | Result_Err (_) => + Option_None end. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice.v b/proof-libs/coq/coq/generated-core/src/Core_Slice.v index 067c6cb00..62fa0c6f1 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Slice.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice.v @@ -1,25 +1,78 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import Slice. -Export Slice. +(* From Core Require Import Core. *) -Require Import Iter. -Export Iter. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Primitive (t_Slice). +Export Core_Primitive (t_Slice). -(*Not implemented yet? todo(item)*) -Definition impl__len (self : t_Slice_t T) : uint_size := - f_from (len (f_clone (f_v self))). -Definition impl__is_empty (self : t_Slice_t T) : bool := - eq (impl__len self) (@repr WORDSIZE32 0). +From Core Require Import Iter (t_Iter). +Export Iter (t_Iter). -Definition impl__iter (self : t_Slice_t T) : t_Iter_t T := - impl__new self. +(* NotImplementedYet *) + +(* NotImplementedYet *) + +Definition impl__iter `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (self : t_Slice ((v_T))) : t_Iter ((v_T)) := + impl__new (self). + +Definition impl__len `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (self : t_Slice ((v_T))) : t_usize := + From_f_from (len (Clone_f_clone (Slice_f_v self))). + +Definition impl__is_empty `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (self : t_Slice ((v_T))) : bool := + t_PartialEq_f_eq (impl__len (self)) (0). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice_Index.v b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index.v index 699e3d29a..34f393591 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Slice_Index.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index.v @@ -1,22 +1,73 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import ops. -Export ops. +(* From Core Require Import Core. *) -Require Import Slice. -Export Slice. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -(*Not implemented yet? todo(item)*) +From Core Require Import Core (t_ops). +Export Core (t_ops). -(*item error backend*) +From Core Require Import Core_Primitive (t_Slice). +Export Core_Primitive (t_Slice). -(*item error backend*) +(* NotImplementedYet *) -(*item error backend*) +Notation "'v_SliceIndex'" := (v_SliceIndex). -(*item error backend*) +Notation "'impl'" := (impl). + +Notation "'impl_2'" := (impl_2). + +Notation "'impl_1'" := (impl_1). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice_Index_Private_slice_index.v b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index_Private_slice_index.v index 2c398344a..589bd659a 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Slice_Index_Private_slice_index.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index_Private_slice_index.v @@ -1,39 +1,82 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import ops. -Export ops. +(* From Core Require Import Core. *) -Class t_Sealed := { -}. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -#[global] Instance t_RangeTo_t uint_size_t_Sealed : t_Sealed (t_RangeTo_t uint_size) := { -}. -#[global] Instance t_RangeFrom_t uint_size_t_Sealed : t_Sealed (t_RangeFrom_t uint_size) := { -}. -#[global] Instance t_RangeFull_t_t_Sealed : t_Sealed t_RangeFull_t := { -}. +From Core Require Import Core_Slice_Index_Ops. +Export Core_Slice_Index_Ops. -#[global] Instance t_RangeInclusive_t uint_size_t_Sealed : t_Sealed (t_RangeInclusive_t uint_size) := { -}. +Notation "'v_Sealed'" := (v_Sealed). -#[global] Instance t_RangeToInclusive_t uint_size_t_Sealed : t_Sealed (t_RangeToInclusive_t uint_size) := { -}. +Notation "'impl'" := (impl). -#[global] Instance t_Bound_t uint_size × t_Bound_t uint_size_t_Sealed : t_Sealed (t_Bound_t uint_size × t_Bound_t uint_size) := { -}. +Notation "'impl_1'" := (impl_1). -#[global] Instance t_Range_t uint_size_t_Sealed : t_Sealed (t_Range_t uint_size) := { -}. +Notation "'impl_2'" := (impl_2). -#[global] Instance t_IndexRange_t_t_Sealed : t_Sealed t_IndexRange_t := { -}. +Notation "'impl_3'" := (impl_3). -#[global] Instance t_usize_t_t_Sealed : t_Sealed t_usize_t := { -}. +Notation "'impl_4'" := (impl_4). + +Notation "'impl_5'" := (impl_5). + +Notation "'impl_6'" := (impl_6). + +Notation "'impl_7'" := (impl_7). + +Notation "'impl_8'" := (impl_8). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v index 31e08ace3..5bc47cc05 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v @@ -1,26 +1,85 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Require Import PhantomData. -Export PhantomData. +(* From Core Require Import Core. *) -Require Import Slice. -Export Slice. +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -(*Not implemented yet? todo(item)*) +From Core Require Import Core_Marker (t_PhantomData). +Export Core_Marker (t_PhantomData). -Record t_Iter (T : _) : Type := { - f_data : t_Slice_t T; - f__marker : t_PhantomData_t T; -}. +From Core Require Import Core_Primitive (t_Slice). +Export Core_Primitive (t_Slice). -Definition impl__new (slice : t_Slice_t T) : t_Iter_t T := - Build_Iter (f_data := f_clone slice) (f__marker := PhantomDatat_PhantomData_t T). +Record t_Iter (v_T : Type) `{t_Sized (v_T)} : Type := + { + Iter_f_data : t_Slice ((v_T)); + Iter_f__marker : t_PhantomData ((v_T)); + }. +Arguments Build_t_Iter (_) {_}. +Arguments Iter_f_data {_} {_}. +Arguments Iter_f__marker {_} {_}. +#[export] Instance settable_t_Iter `{v_T : Type} `{t_Sized (v_T)} : Settable _ := + settable! (Build_t_Iter v_T) . -#[global] Instance t_Iter_t T_t_Clone (T : _) : t_Clone (t_Iter_t T) := { - f_clone (self : t_Iter_t T) := Build_Iter (f_data := f_clone (f_data self)) (f__marker := f__marker self); -}. +Definition impl__new `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (slice : t_Slice ((v_T))) : t_Iter ((v_T)) := + Build_t_Iter (Clone_f_clone (slice)) (Build_t_PhantomData). + +Instance t_Clone_313886898 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Iter ((v_T)))) := + { + Clone_impl_1_f_clone := fun (self : t_Iter ((v_T)))=> + Build_t_Iter (Clone_f_clone (Iter_f_data self)) (Iter_f__marker self); + }. + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter_Macros.v b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter_Macros.v index 5c969987f..136832dc8 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter_Macros.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter_Macros.v @@ -1,12 +1,63 @@ (* File automatically generated by Hacspec *) -From Hacspec Require Import Hacspec_Lib MachineIntegers. From Coq Require Import ZArith. +Require Import List. Import List.ListNotations. Open Scope Z_scope. Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -(*Not implemented yet? todo(item)*) +(* From Core Require Import Core. *) -(*Not implemented yet? todo(item)*) +(* TODO: Replace this dummy lib with core lib *) +Class t_Sized (T : Type) := { }. +Definition t_u8 := Z. +Definition t_u16 := Z. +Definition t_u32 := Z. +Definition t_u64 := Z. +Definition t_u128 := Z. +Definition t_usize := Z. +Definition t_i8 := Z. +Definition t_i16 := Z. +Definition t_i32 := Z. +Definition t_i64 := Z. +Definition t_i128 := Z. +Definition t_isize := Z. +Definition t_Array T (x : t_usize) := list T. +Definition t_String := string. +Definition ToString_f_to_string (x : string) := x. +Instance Sized_any : forall {t_A}, t_Sized t_A := {}. +Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. +Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. +Definition t_Slice (T : Type) := list T. +Definition unsize {T : Type} : list T -> t_Slice T := id. +Definition t_PartialEq_f_eq x y := x =? y. +Definition t_Rem_f_rem (x y : Z) := x mod y. +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +Inductive globality := | t_Global. +Definition t_Vec T (_ : globality) : Type := list T. +Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). +Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). +Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. +Definition impl__with_capacity {A} (_ : Z) : list A := nil. +Definition impl_1__push {A} l (x : A) := cons x l. +Class t_From (A B : Type) := { From_f_from : B -> A }. +Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. +Class t_Into (A B : Type) := { Into_f_into : A -> B }. +Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. +Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). +Definition t_Option := option. +Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. +Definition t_Add_f_add x y := x + y. +Class Cast A B := { cast : A -> B }. +Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. +(* / dummy lib *) -(*Not implemented yet? todo(item)*) +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/_CoqProject b/proof-libs/coq/coq/generated-core/src/_CoqProject new file mode 100644 index 000000000..cfa82bfcc --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/_CoqProject @@ -0,0 +1,72 @@ +-R ./ TODO +-arg -w +-arg all + +Core_Slice_Iter_Macros.v +Core_Slice_Iter.v +Core_Slice_Index_Private_slice_index.v +Core_Slice_Index.v +Core_Slice.v +Core_Result.v +Core_Primitive_Number_conversion_i.v +Core_Primitive_Number_conversion.v +Core_Primitive.v +Core_Panicking.v +Core_Option.v +Core_Ops_Range.v +Core_Ops_Index_range.v +Core_Ops_Index.v +Core_Ops_Function.v +Core_Ops_Bit_Impls_for_prims.v +Core_Ops_Bit.v +Core_Ops_Arith_Impls_for_prims.v +Core_Ops_Arith.v +Core_Ops.v +Core_Num_Uint_macros.v +Core_Num_Int_macros.v +Core_Num.v +Core_Marker.v +Core_Iter_Traits_Marker.v +Core_Iter_Traits_Iterator.v +Core_Iter_Traits_Exact_size.v +Core_Iter_Traits_Collect.v +Core_Iter_Traits.v +Core_Iter_Range.v +Core_Iter.v +Core_Intrinsics.v +Core_Fmt.v +Core_Convert.v +Core_Cmp.v +Core_Clone.v +Core_Base_interface_Int_U8_proofs.v +Core_Base_interface_Int_U64_proofs.v +Core_Base_interface_Int_U32_proofs.v +Core_Base_interface_Int_U16_proofs.v +Core_Base_interface_Int_U128_proofs.v +Core_Base_interface_Int_I8_proofs.v +Core_Base_interface_Int_I64_proofs.v +Core_Base_interface_Int_I32_proofs.v +Core_Base_interface_Int_I16_proofs.v +Core_Base_interface_Int_I128_proofs.v +Core_Base_interface_Int.v +Core_Base_interface_Coerce.v +Core_Base_interface.v +Core_Base_Z.v +Core_Base_Spec_Z.v +Core_Base_Spec_Unary.v +Core_Base_Spec_Seq.v +Core_Base_Spec_Haxint.v +Core_Base_Spec_Constants.v +Core_Base_Spec_Binary_Positive.v +Core_Base_Spec_Binary_Pos.v +Core_Base_Spec_Binary.v +Core_Base_Spec.v +Core_Base_Seq.v +Core_Base_Pos.v +Core_Base_Number_conversion.v +Core_Base_Binary.v +Core_Base.v +Core_Array_Rec_bundle_579704328.v +Core_Array_Iter.v +Core_Array.v +Core.v \ No newline at end of file diff --git a/proof-libs/fstar/generated-core/Core.Array.Rec_bundle_579704328.fst b/proof-libs/fstar/generated-core/Core.Array.Rec_bundle_579704328.fst new file mode 100644 index 000000000..858a145a5 --- /dev/null +++ b/proof-libs/fstar/generated-core/Core.Array.Rec_bundle_579704328.fst @@ -0,0 +1,8018 @@ +module Core.Array.Rec_bundle_579704328 +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_TryFromSliceError = | TryFromSliceError : Prims.unit -> t_TryFromSliceError + +type t_Seq (v_T: Type0) = { f_v:Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Clone.t_Clone (t_Seq v_T) = + { + f_clone_pre = (fun (self: t_Seq v_T) -> true); + f_clone_post = (fun (self: t_Seq v_T) (out: t_Seq v_T) -> true); + f_clone + = + fun (self: t_Seq v_T) -> + { + f_v + = + Core.Clone.f_clone #(Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global) + #FStar.Tactics.Typeclasses.solve + self.f_v + } + <: + t_Seq v_T + } + +type t_LIST (v_T: Type0) = + | LIST_NIL : t_LIST v_T + | LIST_CONS : v_T -> t_Seq v_T -> t_LIST v_T + +let nil + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (_: Prims.unit) + : t_Seq v_T = { f_v = Alloc.Vec.impl__new #v_T () } <: t_Seq v_T + +type t_Slice (v_T: Type0) = { f_v:t_Seq v_T } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2 (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Convert.t_From (t_Slice v_T) (t_Slice v_T) = + { + f_from_pre = (fun (x: t_Slice v_T) -> true); + f_from_post = (fun (x: t_Slice v_T) (out: t_Slice v_T) -> true); + f_from + = + fun (x: t_Slice v_T) -> + { f_v = { f_v = Alloc.Slice.impl__to_vec #v_T x } <: t_Seq v_T } <: t_Slice v_T + } + +type t_Array (v_T: Type0) (v_N: usize) = { f_v:t_Slice v_T } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2 + (#v_T: Type0) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Clone.t_Clone (t_Array v_T v_N) = + { + f_clone_pre = (fun (self: t_Array v_T v_N) -> true); + f_clone_post = (fun (self: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); + f_clone + = + fun (self: t_Array v_T v_N) -> + { f_v = Core.Clone.f_clone #(t_Slice v_T) #FStar.Tactics.Typeclasses.solve self.f_v } + <: + t_Array v_T v_N + } + +let cast + (#v_T: Type0) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (self: t_Array v_T v_N) + : t_Slice v_T = self.f_v + +type t_i128 = | C_i128 : Core.Base_interface.Int.t_I128 -> t_i128 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Clone.t_Clone t_i128 = + { + f_clone_pre = (fun (self: t_i128) -> true); + f_clone_post = (fun (self: t_i128) (out: t_i128) -> true); + f_clone + = + fun (self: t_i128) -> + t_i128 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I128 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i128 + } + +type t_i16 = | C_i16 : Core.Base_interface.Int.t_I16 -> t_i16 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Clone.t_Clone t_i16 = + { + f_clone_pre = (fun (self: t_i16) -> true); + f_clone_post = (fun (self: t_i16) (out: t_i16) -> true); + f_clone + = + fun (self: t_i16) -> + t_i16 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I16 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i16 + } + +type t_i32 = | C_i32 : Core.Base_interface.Int.t_I32 -> t_i32 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Clone.t_Clone t_i32 = + { + f_clone_pre = (fun (self: t_i32) -> true); + f_clone_post = (fun (self: t_i32) (out: t_i32) -> true); + f_clone + = + fun (self: t_i32) -> + t_i32 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I32 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i32 + } + +type t_i64 = | C_i64 : Core.Base_interface.Int.t_I64 -> t_i64 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Clone.t_Clone t_i64 = + { + f_clone_pre = (fun (self: t_i64) -> true); + f_clone_post = (fun (self: t_i64) (out: t_i64) -> true); + f_clone + = + fun (self: t_i64) -> + t_i64 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i64 + } + +type t_i8 = | C_i8 : Core.Base_interface.Int.t_I8 -> t_i8 + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Clone.t_Clone t_i8 = + { + f_clone_pre = (fun (self: t_i8) -> true); + f_clone_post = (fun (self: t_i8) (out: t_i8) -> true); + f_clone + = + fun (self: t_i8) -> + t_i8 + (Core.Clone.f_clone #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i8 + } + +type t_isize = | C_isize : Core.Base_interface.Int.t_I64 -> t_isize + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Clone.t_Clone t_isize = + { + f_clone_pre = (fun (self: t_isize) -> true); + f_clone_post = (fun (self: t_isize) (out: t_isize) -> true); + f_clone + = + fun (self: t_isize) -> + t_isize + (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Convert.t_From t_isize t_i64 = + { + f_from_pre = (fun (x: t_i64) -> true); + f_from_post = (fun (x: t_i64) (out: t_isize) -> true); + f_from + = + fun (x: t_i64) -> + t_isize + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Convert.t_From t_i64 t_isize = + { + f_from_pre = (fun (x: t_isize) -> true); + f_from_post = (fun (x: t_isize) (out: t_i64) -> true); + f_from + = + fun (x: t_isize) -> + t_i64 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i64 + } + +type t_u128 = | C_u128 : Core.Base_interface.Int.t_U128 -> t_u128 + +let from_le715594649 (x: t_u128) : t_u128 = x + +let to_le902648378 (self: t_u128) : t_u128 = self + +type t_u16 = | C_u16 : Core.Base_interface.Int.t_U16 -> t_u16 + +let from_le793045973 (x: t_u16) : t_u16 = x + +let to_le1012469456 (self: t_u16) : t_u16 = self + +type t_u32 = | C_u32 : Core.Base_interface.Int.t_U32 -> t_u32 + +let from_le706338679 (x: t_u32) : t_u32 = x + +let to_le724624277 (self: t_u32) : t_u32 = self + +type t_u64 = | C_u64 : Core.Base_interface.Int.t_U64 -> t_u64 + +let from_le435089922 (x: t_u64) : t_u64 = x + +let to_le2703875 (self: t_u64) : t_u64 = self + +type t_u8 = | C_u8 : Core.Base_interface.Int.t_U8 -> t_u8 + +let from_le529489651 (x: t_u8) : t_u8 = x + +let to_le523556665 (self: t_u8) : t_u8 = self + +type t_usize = | C_usize : Core.Base_interface.Int.t_U64 -> t_usize + +let from_le418743864 (x: t_usize) : t_usize = x + +let to_le946822077 (self: t_usize) : t_usize = self + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Convert.t_From t_usize t_u64 = + { + f_from_pre = (fun (x: t_u64) -> true); + f_from_post = (fun (x: t_u64) (out: t_usize) -> true); + f_from + = + fun (x: t_u64) -> + t_usize + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Convert.t_From t_u64 t_usize = + { + f_from_pre = (fun (x: t_usize) -> true); + f_from_post = (fun (x: t_usize) (out: t_u64) -> true); + f_from + = + fun (x: t_usize) -> + t_u64 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u64 + } + +class v_Sealed (v_Self: Type0) = { __marker_trait_v_Sealed:Prims.unit } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: v_Sealed t_usize = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: v_Sealed (Core.Ops.Range.t_Range usize) = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: v_Sealed (Core.Ops.Range.t_RangeTo usize) = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: v_Sealed (Core.Ops.Range.t_RangeFrom usize) = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: v_Sealed Core.Ops.Range.t_RangeFull = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: v_Sealed (Core.Ops.Range.t_RangeInclusive usize) = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: v_Sealed (Core.Ops.Range.t_RangeToInclusive usize) = { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: v_Sealed (Core.Ops.Range.t_Bound usize & Core.Ops.Range.t_Bound usize) = + { __marker_trait = () } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: v_Sealed Core.Ops.Index_range.t_IndexRange = { __marker_trait = () } + +let v_BITS80497669: t_u32 = t_u32 Core.Base_interface.Int.impl_97__BITS <: t_u32 + +let v_MAX626626007: t_i8 = + t_i8 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_i8 + +let v_MIN19747349: t_i8 = + t_i8 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_i8 + +let v_BITS421056295: t_u32 = t_u32 Core.Base_interface.Int.impl_83__BITS <: t_u32 + +let v_MAX474501300: t_i16 = + t_i16 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_i16 + +let v_MIN776391606: t_i16 = + t_i16 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_i16 + +let v_BITS465526498: t_u32 = t_u32 Core.Base_interface.Int.impl_69__BITS <: t_u32 + +let v_MAX106630818: t_i32 = + t_i32 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_i32 + +let v_MIN682967538: t_i32 = + t_i32 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_i32 + +let v_BITS419886578: t_u32 = t_u32 Core.Base_interface.Int.impl_55__BITS <: t_u32 + +let v_MAX527043787: t_i64 = + t_i64 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_i64 + +let v_MIN654206259: t_i64 = + t_i64 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_i64 + +let v_BITS992667165: t_u32 = t_u32 Core.Base_interface.Int.impl_41__BITS <: t_u32 + +let v_MAX375377319: t_i128 = + t_i128 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_i128 + +let v_MIN79612531: t_i128 = + t_i128 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_i128 + +let v_BITS211584016: t_u32 = t_u32 Core.Base_interface.Int.impl_55__BITS <: t_u32 + +let v_MAX937003029: t_isize = + t_isize (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_isize + +let v_MIN1017039533: t_isize = + t_isize (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_isize + +let v_BITS690311813: t_u32 = t_u32 Core.Base_interface.Int.impl_219__BITS <: t_u32 + +let v_MAX310118176: t_u8 = + t_u8 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_u8 + +let v_MIN41851434: t_u8 = + t_u8 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_u8 + +let v_BITS277333551: t_u32 = t_u32 Core.Base_interface.Int.impl_192__BITS <: t_u32 + +let v_MAX487295910: t_u16 = + t_u16 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_u16 + +let v_MIN592300287: t_u16 = + t_u16 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_u16 + +let v_BITS473478051: t_u32 = t_u32 Core.Base_interface.Int.impl_165__BITS <: t_u32 + +let v_MAX826434525: t_u32 = + t_u32 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_u32 + +let v_MIN932777089: t_u32 = + t_u32 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_u32 + +let v_BITS177666292: t_u32 = t_u32 Core.Base_interface.Int.impl_138__BITS <: t_u32 + +let v_MAX815180633: t_u64 = + t_u64 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_u64 + +let v_MIN631333594: t_u64 = + t_u64 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_u64 + +let v_BITS136999051: t_u32 = t_u32 Core.Base_interface.Int.impl_111__BITS <: t_u32 + +let v_MAX404543799: t_u128 = + t_u128 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_u128 + +let v_MIN668621698: t_u128 = + t_u128 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_u128 + +let v_BITS229952196: t_u32 = t_u32 Core.Base_interface.Int.impl_138__BITS <: t_u32 + +let v_MAX750570916: t_usize = + t_usize (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_usize + +let v_MIN861571008: t_usize = + t_usize (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_usize + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1 + (#v_T #v_I: Type0) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i3: Core.Ops.Index.t_Index (t_Slice v_T) v_I) + : Core.Ops.Index.t_Index (t_Array v_T v_N) v_I = + { + f_Output = i3.f_Output; + f_index_pre = (fun (self: t_Array v_T v_N) (index: v_I) -> true); + f_index_post = (fun (self: t_Array v_T v_N) (index: v_I) (out: i3.f_Output) -> true); + f_index + = + fun (self: t_Array v_T v_N) (index: v_I) -> (cast #v_T v_N self <: t_Slice v_T).[ index ] + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1 + (#v_T: Type0) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Convert.t_From (t_Array v_T v_N) (t_Array v_T v_N) = + { + f_from_pre = (fun (x: t_Array v_T v_N) -> true); + f_from_post = (fun (x: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); + f_from + = + fun (x: t_Array v_T v_N) -> + match + Core.Convert.f_try_into #(Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global) + #(t_Array v_T v_N) + #FStar.Tactics.Typeclasses.solve + x.f_v.f_v.f_v + with + | Core.Result.Result_Ok x -> x + | _ -> + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_const (sz 1 + ) + (let list = ["some error?"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Clone.t_Clone t_u8 = + { + f_clone_pre = (fun (self: t_u8) -> true); + f_clone_post = (fun (self: t_u8) (out: t_u8) -> true); + f_clone + = + fun (self: t_u8) -> + t_u8 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Clone.t_Clone t_u16 = + { + f_clone_pre = (fun (self: t_u16) -> true); + f_clone_post = (fun (self: t_u16) (out: t_u16) -> true); + f_clone + = + fun (self: t_u16) -> + t_u16 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Clone.t_Clone t_u32 = + { + f_clone_pre = (fun (self: t_u32) -> true); + f_clone_post = (fun (self: t_u32) (out: t_u32) -> true); + f_clone + = + fun (self: t_u32) -> + t_u32 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Clone.t_Clone t_u64 = + { + f_clone_pre = (fun (self: t_u64) -> true); + f_clone_post = (fun (self: t_u64) (out: t_u64) -> true); + f_clone + = + fun (self: t_u64) -> + t_u64 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Clone.t_Clone t_u128 = + { + f_clone_pre = (fun (self: t_u128) -> true); + f_clone_post = (fun (self: t_u128) (out: t_u128) -> true); + f_clone + = + fun (self: t_u128) -> + t_u128 + (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Clone.t_Clone t_usize = + { + f_clone_pre = (fun (self: t_usize) -> true); + f_clone_post = (fun (self: t_usize) (out: t_usize) -> true); + f_clone + = + fun (self: t_usize) -> + t_usize + (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_usize + } + +class v_SliceIndex (v_Self: Type0) (v_T: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_9346575357466912174:v_Sealed v_Self; + f_Output:Type0; + f_index_pre:v_Self -> v_T -> Type0; + f_index_post:v_Self -> v_T -> f_Output -> Type0; + f_index:x0: v_Self -> x1: v_T + -> Prims.Pure f_Output (f_index_pre x0 x1) (fun result -> f_index_post x0 x1 result) +} + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl + (#v_T #v_I: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: v_SliceIndex v_I (t_Slice v_T)) + : Core.Ops.Index.t_Index (t_Slice v_T) v_I = + { + f_Output = i2.f_Output; + f_index_pre = (fun (self: t_Slice v_T) (index: v_I) -> true); + f_index_post = (fun (self: t_Slice v_T) (index: v_I) (out: i2.f_Output) -> true); + f_index + = + fun (self: t_Slice v_T) (index: v_I) -> + Core.Slice.Index.f_index #v_I #(t_Slice v_T) #FStar.Tactics.Typeclasses.solve index self + } + +let cons + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: t_Seq v_T) + (t: v_T) + : t_Seq v_T = + { + f_v + = + Alloc.Slice.impl__concat #(t_Slice v_T) + #v_T + ((let list = + [ + (let list = [t] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list).[ Core.Ops.Range.RangeFull + <: + Core.Ops.Range.t_RangeFull ]; + s.f_v.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] + ] + in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); + Rust_primitives.Hax.array_of_list 2 list) + <: + t_Slice (t_Slice v_T)) + } + <: + t_Seq v_T + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl + (#v_T: Type0) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Convert.t_From (t_Array v_T v_N) (t_Array v_T v_N) = + { + f_from_pre = (fun (x: t_Array v_T v_N) -> true); + f_from_post = (fun (x: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); + f_from + = + fun (x: t_Array v_T v_N) -> + { + f_v + = + { + f_v + = + { + f_v + = + Alloc.Slice.impl__to_vec #v_T + (x.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] <: t_Slice v_T) + } + <: + t_Seq v_T + } + <: + t_Slice v_T + } + <: + t_Array v_T v_N + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2 (#v_T: Type0) : v_SliceIndex Core.Ops.Range.t_RangeFull (t_Slice v_T) = + { + _super_9346575357466912174 = FStar.Tactics.Typeclasses.solve; + f_Output = t_Slice v_T; + f_index_pre = (fun (self: Core.Ops.Range.t_RangeFull) (slice: t_Slice v_T) -> true); + f_index_post + = + (fun (self: Core.Ops.Range.t_RangeFull) (slice: t_Slice v_T) (out: t_Slice v_T) -> true); + f_index = fun (self: Core.Ops.Range.t_RangeFull) (slice: t_Slice v_T) -> slice + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl + (#v_T: Type0) + (v_N: usize) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : Core.Convert.t_AsRef (t_Array v_T v_N) (t_Slice v_T) = + { + f_as_ref_pre = (fun (self: t_Array v_T v_N) -> true); + f_as_ref_post = (fun (self: t_Array v_T v_N) (out: t_Slice v_T) -> true); + f_as_ref + = + fun (self: t_Array v_T v_N) -> self.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] + } + +let match_list + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + (s: t_Seq v_T) + : t_LIST v_T = + if + Rust_primitives.Usize.eq (Alloc.Vec.impl_1__len #v_T #Alloc.Alloc.t_Global s.f_v <: usize) + (sz 0) + then LIST_NIL <: t_LIST v_T + else + LIST_CONS (Core.Clone.f_clone #v_T #FStar.Tactics.Typeclasses.solve (s.f_v.[ sz 0 ] <: v_T)) + ({ + f_v + = + Alloc.Slice.impl__concat #(t_Slice v_T) + #v_T + ((let list = + [s.f_v.[ { Core.Ops.Range.f_start = sz 1 } <: Core.Ops.Range.t_RangeFrom usize ]] + in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + t_Slice (t_Slice v_T)) + } + <: + t_Seq v_T) + <: + t_LIST v_T + +let rec from_u128_binary (x: u128) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.U128.ne x (pub_u128 0)) + (fun _ -> Prims.l_True) = + if Rust_primitives.U128.eq x (pub_u128 1) + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.U128.eq (Rust_primitives.U128.rem x (pub_u128 2) <: u128) (pub_u128 0) + then + Core.Base.Spec.Binary.Positive.xO (from_u128_binary (Rust_primitives.U128.div x (pub_u128 2) + <: + u128) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (from_u128_binary (Rust_primitives.U128.div x (pub_u128 2) + <: + u128) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u128 = + { + f_from_pre = (fun (x: u128) -> true); + f_from_post = (fun (x: u128) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: u128) -> + if Rust_primitives.U128.eq x (pub_u128 0) + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (from_u128_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Convert.t_From Core.Base.Spec.Z.t_Z i128 = + { + f_from_pre = (fun (x: i128) -> true); + f_from_post = (fun (x: i128) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: i128) -> + match Core.Cmp.f_cmp #i128 #FStar.Tactics.Typeclasses.solve x (pub_i128 0) with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG (from_u128_binary (Core.Num.impl__i128__unsigned_abs x <: u128)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS (from_u128_binary (Core.Num.impl__i128__unsigned_abs x <: u128)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec from_u16_binary (x: u16) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.U16.ne x 0us) + (fun _ -> Prims.l_True) = + if Rust_primitives.U16.eq x 1us + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.U16.eq (Rust_primitives.U16.rem x 2us <: u16) 0us + then + Core.Base.Spec.Binary.Positive.xO (from_u16_binary (Rust_primitives.U16.div x 2us <: u16) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (from_u16_binary (Rust_primitives.U16.div x 2us <: u16) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u16 = + { + f_from_pre = (fun (x: u16) -> true); + f_from_post = (fun (x: u16) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: u16) -> + if Rust_primitives.U16.eq x 0us + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (from_u16_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Convert.t_From Core.Base.Spec.Z.t_Z i16 = + { + f_from_pre = (fun (x: i16) -> true); + f_from_post = (fun (x: i16) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: i16) -> + match Core.Cmp.f_cmp #i16 #FStar.Tactics.Typeclasses.solve x 0s with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG (from_u16_binary (Core.Num.impl__i16__unsigned_abs x <: u16)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS (from_u16_binary (Core.Num.impl__i16__unsigned_abs x <: u16)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec from_u32_binary (x: u32) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.U32.ne x 0ul) + (fun _ -> Prims.l_True) = + if Rust_primitives.U32.eq x 1ul + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.U32.eq (Rust_primitives.U32.rem x 2ul <: u32) 0ul + then + Core.Base.Spec.Binary.Positive.xO (from_u32_binary (Rust_primitives.U32.div x 2ul <: u32) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (from_u32_binary (Rust_primitives.U32.div x 2ul <: u32) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u32 = + { + f_from_pre = (fun (x: u32) -> true); + f_from_post = (fun (x: u32) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: u32) -> + if Rust_primitives.U32.eq x 0ul + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (from_u32_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Convert.t_From Core.Base.Spec.Z.t_Z i32 = + { + f_from_pre = (fun (x: i32) -> true); + f_from_post = (fun (x: i32) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: i32) -> + match Core.Cmp.f_cmp #i32 #FStar.Tactics.Typeclasses.solve x 0l with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG (from_u32_binary (Core.Num.impl_2__unsigned_abs x <: u32)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS (from_u32_binary (Core.Num.impl_2__unsigned_abs x <: u32)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec from_u64_binary (x: u64) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.U64.ne x 0uL) + (fun _ -> Prims.l_True) = + if Rust_primitives.U64.eq x 1uL + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.U64.eq (Rust_primitives.U64.rem x 2uL <: u64) 0uL + then + Core.Base.Spec.Binary.Positive.xO (from_u64_binary (Rust_primitives.U64.div x 2uL <: u64) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (from_u64_binary (Rust_primitives.U64.div x 2uL <: u64) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u64 = + { + f_from_pre = (fun (x: u64) -> true); + f_from_post = (fun (x: u64) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: u64) -> + if Rust_primitives.U64.eq x 0uL + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (from_u64_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Convert.t_From Core.Base.Spec.Z.t_Z i64 = + { + f_from_pre = (fun (x: i64) -> true); + f_from_post = (fun (x: i64) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: i64) -> + match Core.Cmp.f_cmp #i64 #FStar.Tactics.Typeclasses.solve x 0L with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG (from_u64_binary (Core.Num.impl__i64__unsigned_abs x <: u64)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS (from_u64_binary (Core.Num.impl__i64__unsigned_abs x <: u64)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec from_u8_binary (x: u8) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.U8.ne x 0uy) + (fun _ -> Prims.l_True) = + if Rust_primitives.U8.eq x 1uy + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.U8.eq (Rust_primitives.U8.rem x 2uy <: u8) 0uy + then + Core.Base.Spec.Binary.Positive.xO (from_u8_binary (Rust_primitives.U8.div x 2uy <: u8) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (from_u8_binary (Rust_primitives.U8.div x 2uy <: u8) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u8 = + { + f_from_pre = (fun (x: u8) -> true); + f_from_post = (fun (x: u8) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: u8) -> + if Rust_primitives.U8.eq x 0uy + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (from_u8_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Convert.t_From Core.Base.Spec.Z.t_Z i8 = + { + f_from_pre = (fun (x: i8) -> true); + f_from_post = (fun (x: i8) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: i8) -> + match Core.Cmp.f_cmp #i8 #FStar.Tactics.Typeclasses.solve x 0y with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG (from_u8_binary (Core.Num.impl__i8__unsigned_abs x <: u8)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS (from_u8_binary (Core.Num.impl__i8__unsigned_abs x <: u8)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec from_usize_binary (x: usize) + : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive + (requires Rust_primitives.Usize.ne x (sz 0)) + (fun _ -> Prims.l_True) = + if Rust_primitives.Usize.eq x (sz 1) + then Core.Base.Spec.Binary.Positive.xH + else + if Rust_primitives.Usize.eq (Rust_primitives.Usize.rem x (sz 2) <: usize) (sz 0) + then + Core.Base.Spec.Binary.Positive.xO (from_usize_binary (Rust_primitives.Usize.div x (sz 2) + <: + usize) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + else + Core.Base.Spec.Binary.Positive.xI (from_usize_binary (Rust_primitives.Usize.div x (sz 2) + <: + usize) + <: + Core.Base.Spec.Binary.Positive.t_Positive) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt usize = + { + f_from_pre = (fun (x: usize) -> true); + f_from_post = (fun (x: usize) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from + = + fun (x: usize) -> + if Rust_primitives.Usize.eq x (sz 0) + then Core.Base.Spec.Haxint.v_HaxInt_ZERO + else + Core.Base.Spec.Binary.Positive.positive_to_int (from_usize_binary x + <: + Core.Base.Spec.Binary.Positive.t_Positive) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Convert.t_From Core.Base.Spec.Z.t_Z isize = + { + f_from_pre = (fun (x: isize) -> true); + f_from_post = (fun (x: isize) (out: Core.Base.Spec.Z.t_Z) -> true); + f_from + = + fun (x: isize) -> + match Core.Cmp.f_cmp #isize #FStar.Tactics.Typeclasses.solve x (isz 0) with + | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Less -> + Core.Base.Spec.Z.Z_NEG (from_usize_binary (Core.Num.impl__isize__unsigned_abs x <: usize)) + <: + Core.Base.Spec.Z.t_Z + | Core.Cmp.Ordering_Greater -> + Core.Base.Spec.Z.Z_POS (from_usize_binary (Core.Num.impl__isize__unsigned_abs x <: usize)) + <: + Core.Base.Spec.Z.t_Z + } + +let rec to_u128_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u128 = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> pub_u128 1 + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.U128.mul (to_u128_binary p <: u128) (pub_u128 2) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.U128.add (Rust_primitives.U128.mul (to_u128_binary p <: u128) (pub_u128 2) + <: + u128) + (pub_u128 1) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Convert.t_From u128 Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u128) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> pub_u128 0 + | Core.Base.Spec.Binary.Pos.POS_POS p -> to_u128_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Convert.t_From i128 Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i128) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.I128.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U128.sub (to_u128_binary + x + <: + u128) + (pub_u128 1) + <: + u128) + <: + i128) + <: + i128) + (pub_i128 1) + | Core.Base.Spec.Z.Z_ZERO -> pub_i128 0 + | Core.Base.Spec.Z.Z_POS x -> cast (to_u128_binary x <: u128) <: i128 + } + +let rec to_u16_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u16 = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1us + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.U16.mul (to_u16_binary p <: u16) 2us + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.U16.add (Rust_primitives.U16.mul (to_u16_binary p <: u16) 2us <: u16) 1us + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Convert.t_From u16 Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u16) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0us + | Core.Base.Spec.Binary.Pos.POS_POS p -> to_u16_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Convert.t_From i16 Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i16) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.I16.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U16.sub (to_u16_binary + x + <: + u16) + 1us + <: + u16) + <: + i16) + <: + i16) + 1s + | Core.Base.Spec.Z.Z_ZERO -> 0s + | Core.Base.Spec.Z.Z_POS x -> cast (to_u16_binary x <: u16) <: i16 + } + +let rec to_u32_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u32 = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1ul + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.U32.mul (to_u32_binary p <: u32) 2ul + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.U32.add (Rust_primitives.U32.mul (to_u32_binary p <: u32) 2ul <: u32) 1ul + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Convert.t_From u32 Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u32) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0ul + | Core.Base.Spec.Binary.Pos.POS_POS p -> to_u32_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Convert.t_From i32 Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i32) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.I32.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U32.sub (to_u32_binary + x + <: + u32) + 1ul + <: + u32) + <: + i32) + <: + i32) + 1l + | Core.Base.Spec.Z.Z_ZERO -> 0l + | Core.Base.Spec.Z.Z_POS x -> cast (to_u32_binary x <: u32) <: i32 + } + +let rec to_u64_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u64 = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1uL + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.U64.mul (to_u64_binary p <: u64) 2uL + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.U64.add (Rust_primitives.U64.mul (to_u64_binary p <: u64) 2uL <: u64) 1uL + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Convert.t_From u64 Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u64) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0uL + | Core.Base.Spec.Binary.Pos.POS_POS p -> to_u64_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Convert.t_From i64 Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i64) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.I64.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U64.sub (to_u64_binary + x + <: + u64) + 1uL + <: + u64) + <: + i64) + <: + i64) + 1L + | Core.Base.Spec.Z.Z_ZERO -> 0L + | Core.Base.Spec.Z.Z_POS x -> cast (to_u64_binary x <: u64) <: i64 + } + +let rec to_u8_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u8 = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1uy + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.U8.mul (to_u8_binary p <: u8) 2uy + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.U8.add (Rust_primitives.U8.mul (to_u8_binary p <: u8) 2uy <: u8) 1uy + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Convert.t_From u8 Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u8) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0uy + | Core.Base.Spec.Binary.Pos.POS_POS p -> to_u8_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Convert.t_From i8 Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i8) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.I8.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U8.sub (to_u8_binary x + <: + u8) + 1uy + <: + u8) + <: + i8) + <: + i8) + 1y + | Core.Base.Spec.Z.Z_ZERO -> 0y + | Core.Base.Spec.Z.Z_POS x -> cast (to_u8_binary x <: u8) <: i8 + } + +let rec to_usize_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : usize = + match Core.Base.Spec.Binary.Positive.match_positive self with + | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> sz 1 + | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> + Rust_primitives.Usize.mul (to_usize_binary p <: usize) (sz 2) + | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> + Rust_primitives.Usize.add (Rust_primitives.Usize.mul (to_usize_binary p <: usize) (sz 2) + <: + usize) + (sz 1) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Convert.t_From usize Core.Base.Spec.Haxint.t_HaxInt = + { + f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: usize) -> true); + f_from + = + fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> + match Core.Base.Spec.Binary.Pos.match_pos x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> sz 0 + | Core.Base.Spec.Binary.Pos.POS_POS p -> to_usize_binary p + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Convert.t_From isize Core.Base.Spec.Z.t_Z = + { + f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); + f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: isize) -> true); + f_from + = + fun (x: Core.Base.Spec.Z.t_Z) -> + match x with + | Core.Base.Spec.Z.Z_NEG x -> + Rust_primitives.Isize.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.Usize.sub (to_usize_binary + x + <: + usize) + (sz 1) + <: + usize) + <: + isize) + <: + isize) + (isz 1) + | Core.Base.Spec.Z.Z_ZERO -> isz 0 + | Core.Base.Spec.Z.Z_POS x -> cast (to_usize_binary x <: usize) <: isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Cmp.t_PartialEq t_u8 t_u8 = + { + f_eq_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_eq_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_eq = (fun (self: t_u8) (rhs: t_u8) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_ne_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_ne = fun (self: t_u8) (rhs: t_u8) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Cmp.t_PartialOrd t_u8 t_u8 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_partial_cmp_post + = + (fun (self: t_u8) (rhs: t_u8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_u8) (rhs: t_u8) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_lt_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_lt + = + (fun (self: t_u8) (rhs: t_u8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_le_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_le + = + (fun (self: t_u8) (rhs: t_u8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_gt_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_gt + = + (fun (self: t_u8) (rhs: t_u8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_u8) (rhs: t_u8) -> true); + f_ge_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); + f_ge + = + fun (self: t_u8) (rhs: t_u8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Cmp.t_PartialEq t_u16 t_u16 = + { + f_eq_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_eq_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_eq = (fun (self: t_u16) (rhs: t_u16) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_ne_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_ne = fun (self: t_u16) (rhs: t_u16) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Cmp.t_PartialOrd t_u16 t_u16 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_partial_cmp_post + = + (fun (self: t_u16) (rhs: t_u16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_u16) (rhs: t_u16) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_lt_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_lt + = + (fun (self: t_u16) (rhs: t_u16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_le_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_le + = + (fun (self: t_u16) (rhs: t_u16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_gt_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_gt + = + (fun (self: t_u16) (rhs: t_u16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_u16) (rhs: t_u16) -> true); + f_ge_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); + f_ge + = + fun (self: t_u16) (rhs: t_u16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Cmp.t_PartialEq t_u32 t_u32 = + { + f_eq_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_eq_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_eq = (fun (self: t_u32) (rhs: t_u32) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_ne_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_ne = fun (self: t_u32) (rhs: t_u32) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Cmp.t_PartialOrd t_u32 t_u32 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_partial_cmp_post + = + (fun (self: t_u32) (rhs: t_u32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_u32) (rhs: t_u32) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_lt_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_lt + = + (fun (self: t_u32) (rhs: t_u32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_le_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_le + = + (fun (self: t_u32) (rhs: t_u32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_gt_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_gt + = + (fun (self: t_u32) (rhs: t_u32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_u32) (rhs: t_u32) -> true); + f_ge_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); + f_ge + = + fun (self: t_u32) (rhs: t_u32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Cmp.t_PartialEq t_u64 t_u64 = + { + f_eq_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_eq_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_eq = (fun (self: t_u64) (rhs: t_u64) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_ne_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_ne = fun (self: t_u64) (rhs: t_u64) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Cmp.t_PartialOrd t_u64 t_u64 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_partial_cmp_post + = + (fun (self: t_u64) (rhs: t_u64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_u64) (rhs: t_u64) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_lt_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_lt + = + (fun (self: t_u64) (rhs: t_u64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_le_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_le + = + (fun (self: t_u64) (rhs: t_u64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_gt_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_gt + = + (fun (self: t_u64) (rhs: t_u64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_u64) (rhs: t_u64) -> true); + f_ge_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); + f_ge + = + fun (self: t_u64) (rhs: t_u64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Cmp.t_PartialEq t_u128 t_u128 = + { + f_eq_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_eq_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_eq = (fun (self: t_u128) (rhs: t_u128) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_ne_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_ne = fun (self: t_u128) (rhs: t_u128) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Cmp.t_PartialOrd t_u128 t_u128 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_partial_cmp_post + = + (fun (self: t_u128) (rhs: t_u128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_u128) (rhs: t_u128) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_lt_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_lt + = + (fun (self: t_u128) (rhs: t_u128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_le_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_le + = + (fun (self: t_u128) (rhs: t_u128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_gt_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_gt + = + (fun (self: t_u128) (rhs: t_u128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_u128) (rhs: t_u128) -> true); + f_ge_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); + f_ge + = + fun (self: t_u128) (rhs: t_u128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Cmp.t_PartialEq t_usize t_usize = + { + f_eq_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_eq_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_eq = (fun (self: t_usize) (rhs: t_usize) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_ne_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_ne = fun (self: t_usize) (rhs: t_usize) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Cmp.t_PartialOrd t_usize t_usize = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_partial_cmp_post + = + (fun (self: t_usize) (rhs: t_usize) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_usize) (rhs: t_usize) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_lt_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_lt + = + (fun (self: t_usize) (rhs: t_usize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_le_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_le + = + (fun (self: t_usize) (rhs: t_usize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_gt_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_gt + = + (fun (self: t_usize) (rhs: t_usize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_usize) (rhs: t_usize) -> true); + f_ge_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); + f_ge + = + fun (self: t_usize) (rhs: t_usize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Cmp.t_PartialEq t_i8 t_i8 = + { + f_eq_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_eq_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_eq = (fun (self: t_i8) (rhs: t_i8) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_ne_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_ne = fun (self: t_i8) (rhs: t_i8) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_42: Core.Cmp.t_PartialOrd t_i8 t_i8 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_partial_cmp_post + = + (fun (self: t_i8) (rhs: t_i8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_i8) (rhs: t_i8) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_lt_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_lt + = + (fun (self: t_i8) (rhs: t_i8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_le_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_le + = + (fun (self: t_i8) (rhs: t_i8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_gt_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_gt + = + (fun (self: t_i8) (rhs: t_i8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_i8) (rhs: t_i8) -> true); + f_ge_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); + f_ge + = + fun (self: t_i8) (rhs: t_i8) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_43: Core.Cmp.t_PartialEq t_i16 t_i16 = + { + f_eq_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_eq_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_eq = (fun (self: t_i16) (rhs: t_i16) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_ne_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_ne = fun (self: t_i16) (rhs: t_i16) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_44: Core.Cmp.t_PartialOrd t_i16 t_i16 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_partial_cmp_post + = + (fun (self: t_i16) (rhs: t_i16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_i16) (rhs: t_i16) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_lt_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_lt + = + (fun (self: t_i16) (rhs: t_i16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_le_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_le + = + (fun (self: t_i16) (rhs: t_i16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_gt_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_gt + = + (fun (self: t_i16) (rhs: t_i16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_i16) (rhs: t_i16) -> true); + f_ge_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); + f_ge + = + fun (self: t_i16) (rhs: t_i16) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_45: Core.Cmp.t_PartialEq t_i32 t_i32 = + { + f_eq_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_eq_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_eq = (fun (self: t_i32) (rhs: t_i32) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_ne_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_ne = fun (self: t_i32) (rhs: t_i32) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_46: Core.Cmp.t_PartialOrd t_i32 t_i32 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_partial_cmp_post + = + (fun (self: t_i32) (rhs: t_i32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_i32) (rhs: t_i32) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_lt_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_lt + = + (fun (self: t_i32) (rhs: t_i32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_le_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_le + = + (fun (self: t_i32) (rhs: t_i32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_gt_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_gt + = + (fun (self: t_i32) (rhs: t_i32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_i32) (rhs: t_i32) -> true); + f_ge_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); + f_ge + = + fun (self: t_i32) (rhs: t_i32) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_47: Core.Cmp.t_PartialEq t_i64 t_i64 = + { + f_eq_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_eq_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_eq = (fun (self: t_i64) (rhs: t_i64) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_ne_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_ne = fun (self: t_i64) (rhs: t_i64) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_48: Core.Cmp.t_PartialOrd t_i64 t_i64 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_partial_cmp_post + = + (fun (self: t_i64) (rhs: t_i64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_i64) (rhs: t_i64) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_lt_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_lt + = + (fun (self: t_i64) (rhs: t_i64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_le_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_le + = + (fun (self: t_i64) (rhs: t_i64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_gt_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_gt + = + (fun (self: t_i64) (rhs: t_i64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_i64) (rhs: t_i64) -> true); + f_ge_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); + f_ge + = + fun (self: t_i64) (rhs: t_i64) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_49: Core.Cmp.t_PartialEq t_i128 t_i128 = + { + f_eq_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_eq_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_eq = (fun (self: t_i128) (rhs: t_i128) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_ne_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_ne = fun (self: t_i128) (rhs: t_i128) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_50: Core.Cmp.t_PartialOrd t_i128 t_i128 = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_partial_cmp_post + = + (fun (self: t_i128) (rhs: t_i128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_i128) (rhs: t_i128) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_lt_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_lt + = + (fun (self: t_i128) (rhs: t_i128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_le_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_le + = + (fun (self: t_i128) (rhs: t_i128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_gt_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_gt + = + (fun (self: t_i128) (rhs: t_i128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_i128) (rhs: t_i128) -> true); + f_ge_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); + f_ge + = + fun (self: t_i128) (rhs: t_i128) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_51: Core.Cmp.t_PartialEq t_isize t_isize = + { + f_eq_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_eq_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_eq = (fun (self: t_isize) (rhs: t_isize) -> self._0 =. rhs._0); + f_ne_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_ne_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_ne = fun (self: t_isize) (rhs: t_isize) -> ~.(self._0 =. rhs._0 <: bool) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_52: Core.Cmp.t_PartialOrd t_isize t_isize = + { + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_partial_cmp_post + = + (fun (self: t_isize) (rhs: t_isize) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_isize) (rhs: t_isize) -> + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0); + f_lt_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_lt_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_lt + = + (fun (self: t_isize) (rhs: t_isize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true + | _ -> false); + f_le_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_le_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_le + = + (fun (self: t_isize) (rhs: t_isize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false); + f_gt_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_gt_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_gt + = + (fun (self: t_isize) (rhs: t_isize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true + | _ -> false); + f_ge_pre = (fun (self: t_isize) (rhs: t_isize) -> true); + f_ge_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); + f_ge + = + fun (self: t_isize) (rhs: t_isize) -> + match + Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + self._0 + rhs._0 + with + | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) + | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true + | _ -> false + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Convert.t_From t_u8 u8 = + { + f_from_pre = (fun (x: u8) -> true); + f_from_post = (fun (x: u8) (out: t_u8) -> true); + f_from + = + fun (x: u8) -> + t_u8 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #u8 #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_U8) + <: + t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Convert.t_From u8 t_u8 = + { + f_from_pre = (fun (x: t_u8) -> true); + f_from_post = (fun (x: t_u8) (out: u8) -> true); + f_from + = + fun (x: t_u8) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #u8 + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Convert.t_From t_u16 u16 = + { + f_from_pre = (fun (x: u16) -> true); + f_from_post = (fun (x: u16) (out: t_u16) -> true); + f_from + = + fun (x: u16) -> + t_u16 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #u16 + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + x + } + <: + Core.Base_interface.Int.t_U16) + <: + t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Convert.t_From u16 t_u16 = + { + f_from_pre = (fun (x: t_u16) -> true); + f_from_post = (fun (x: t_u16) (out: u16) -> true); + f_from + = + fun (x: t_u16) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #u16 + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Convert.t_From t_u32 u32 = + { + f_from_pre = (fun (x: u32) -> true); + f_from_post = (fun (x: u32) (out: t_u32) -> true); + f_from + = + fun (x: u32) -> + t_u32 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #u32 + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + x + } + <: + Core.Base_interface.Int.t_U32) + <: + t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Convert.t_From u32 t_u32 = + { + f_from_pre = (fun (x: t_u32) -> true); + f_from_post = (fun (x: t_u32) (out: u32) -> true); + f_from + = + fun (x: t_u32) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #u32 + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Convert.t_From t_u64 u64 = + { + f_from_pre = (fun (x: u64) -> true); + f_from_post = (fun (x: u64) (out: t_u64) -> true); + f_from + = + fun (x: u64) -> + t_u64 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #u64 + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + x + } + <: + Core.Base_interface.Int.t_U64) + <: + t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Convert.t_From u64 t_u64 = + { + f_from_pre = (fun (x: t_u64) -> true); + f_from_post = (fun (x: t_u64) (out: u64) -> true); + f_from + = + fun (x: t_u64) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #u64 + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Convert.t_From t_u128 u128 = + { + f_from_pre = (fun (x: u128) -> true); + f_from_post = (fun (x: u128) (out: t_u128) -> true); + f_from + = + fun (x: u128) -> + t_u128 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #u128 + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + x + } + <: + Core.Base_interface.Int.t_U128) + <: + t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Convert.t_From u128 t_u128 = + { + f_from_pre = (fun (x: t_u128) -> true); + f_from_post = (fun (x: t_u128) (out: u128) -> true); + f_from + = + fun (x: t_u128) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #u128 + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Convert.t_From t_usize usize = + { + f_from_pre = (fun (x: usize) -> true); + f_from_post = (fun (x: usize) (out: t_usize) -> true); + f_from + = + fun (x: usize) -> + t_usize + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #usize + #Core.Base.Spec.Haxint.t_HaxInt + #FStar.Tactics.Typeclasses.solve + x + } + <: + Core.Base_interface.Int.t_U64) + <: + t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Convert.t_From usize t_usize = + { + f_from_pre = (fun (x: t_usize) -> true); + f_from_post = (fun (x: t_usize) (out: usize) -> true); + f_from + = + fun (x: t_usize) -> + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #usize + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Convert.t_From t_i8 i8 = + { + f_from_pre = (fun (x: i8) -> true); + f_from_post = (fun (x: i8) (out: t_i8) -> true); + f_from + = + fun (x: i8) -> + t_i8 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #i8 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I8) + <: + t_i8 + } + +let is_negative350273175 (self: t_i8) : bool = + self <. (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) + +let is_positive286955196 (self: t_i8) : bool = + self >. (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) + +let signum721334203 (self: t_i8) : t_i8 = + if + (Core.Clone.f_clone #t_i8 #FStar.Tactics.Typeclasses.solve self <: t_i8) <. + (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) + then Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve (-1y) + else + if self =. (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) + then Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y + else Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 1y + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Convert.t_From i8 t_i8 = + { + f_from_pre = (fun (x: t_i8) -> true); + f_from_post = (fun (x: t_i8) (out: i8) -> true); + f_from + = + fun (x: t_i8) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #i8 + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Convert.t_From t_i16 i16 = + { + f_from_pre = (fun (x: i16) -> true); + f_from_post = (fun (x: i16) (out: t_i16) -> true); + f_from + = + fun (x: i16) -> + t_i16 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #i16 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I16) + <: + t_i16 + } + +let is_negative477067241 (self: t_i16) : bool = + self <. (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s <: t_i16) + +let is_positive821581438 (self: t_i16) : bool = + self >. (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s <: t_i16) + +let signum243706004 (self: t_i16) : t_i16 = + if + (Core.Clone.f_clone #t_i16 #FStar.Tactics.Typeclasses.solve self <: t_i16) <. + (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s <: t_i16) + then Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve (-1s) + else + if self =. (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s <: t_i16) + then Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s + else Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 1s + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Convert.t_From i16 t_i16 = + { + f_from_pre = (fun (x: t_i16) -> true); + f_from_post = (fun (x: t_i16) (out: i16) -> true); + f_from + = + fun (x: t_i16) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #i16 + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Convert.t_From t_i32 i32 = + { + f_from_pre = (fun (x: i32) -> true); + f_from_post = (fun (x: i32) (out: t_i32) -> true); + f_from + = + fun (x: i32) -> + t_i32 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #i32 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I32) + <: + t_i32 + } + +let is_negative1035644813 (self: t_i32) : bool = + self <. (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l <: t_i32) + +let is_positive401652342 (self: t_i32) : bool = + self >. (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l <: t_i32) + +let signum323641039 (self: t_i32) : t_i32 = + if + (Core.Clone.f_clone #t_i32 #FStar.Tactics.Typeclasses.solve self <: t_i32) <. + (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l <: t_i32) + then Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve (-1l) + else + if self =. (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l <: t_i32) + then Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l + else Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 1l + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Convert.t_From i32 t_i32 = + { + f_from_pre = (fun (x: t_i32) -> true); + f_from_post = (fun (x: t_i32) (out: i32) -> true); + f_from + = + fun (x: t_i32) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #i32 + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Convert.t_From t_i64 i64 = + { + f_from_pre = (fun (x: i64) -> true); + f_from_post = (fun (x: i64) (out: t_i64) -> true); + f_from + = + fun (x: i64) -> + t_i64 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #i64 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I64) + <: + t_i64 + } + +let is_negative1066124578 (self: t_i64) : bool = + self <. (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L <: t_i64) + +let is_positive16569358 (self: t_i64) : bool = + self >. (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L <: t_i64) + +let signum582963664 (self: t_i64) : t_i64 = + if + (Core.Clone.f_clone #t_i64 #FStar.Tactics.Typeclasses.solve self <: t_i64) <. + (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L <: t_i64) + then Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve (-1L) + else + if self =. (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L <: t_i64) + then Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L + else Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 1L + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Convert.t_From i64 t_i64 = + { + f_from_pre = (fun (x: t_i64) -> true); + f_from_post = (fun (x: t_i64) (out: i64) -> true); + f_from + = + fun (x: t_i64) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #i64 + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Convert.t_From t_i128 i128 = + { + f_from_pre = (fun (x: i128) -> true); + f_from_post = (fun (x: i128) (out: t_i128) -> true); + f_from + = + fun (x: i128) -> + t_i128 + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #i128 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I128) + <: + t_i128 + } + +let is_negative221698470 (self: t_i128) : bool = + self <. + (Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) <: t_i128) + +let is_positive883218309 (self: t_i128) : bool = + self >. + (Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) <: t_i128) + +let signum408800799 (self: t_i128) : t_i128 = + if + (Core.Clone.f_clone #t_i128 #FStar.Tactics.Typeclasses.solve self <: t_i128) <. + (Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) <: t_i128) + then Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 (-1)) + else + if + self =. + (Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) <: t_i128) + then Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) + else Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 1) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Convert.t_From i128 t_i128 = + { + f_from_pre = (fun (x: t_i128) -> true); + f_from_post = (fun (x: t_i128) (out: i128) -> true); + f_from + = + fun (x: t_i128) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #i128 + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Convert.t_From t_isize isize = + { + f_from_pre = (fun (x: isize) -> true); + f_from_post = (fun (x: isize) (out: t_isize) -> true); + f_from + = + fun (x: isize) -> + t_isize + ({ + Core.Base_interface.Int.f_v + = + Core.Convert.f_into #isize #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x + } + <: + Core.Base_interface.Int.t_I64) + <: + t_isize + } + +let is_negative693446369 (self: t_isize) : bool = + self <. (Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) <: t_isize) + +let is_positive169998680 (self: t_isize) : bool = + self >. (Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) <: t_isize) + +let signum91486536 (self: t_isize) : t_isize = + if + (Core.Clone.f_clone #t_isize #FStar.Tactics.Typeclasses.solve self <: t_isize) <. + (Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) <: t_isize) + then Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz (-1)) + else + if + self =. + (Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) <: t_isize) + then Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) + else Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 1) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Convert.t_From isize t_isize = + { + f_from_pre = (fun (x: t_isize) -> true); + f_from_post = (fun (x: t_isize) (out: isize) -> true); + f_from + = + fun (x: t_isize) -> + Core.Convert.f_into #Core.Base.Spec.Z.t_Z + #isize + #FStar.Tactics.Typeclasses.solve + x._0.Core.Base_interface.Int.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Convert.t_From t_i16 t_i8 = + { + f_from_pre = (fun (x: t_i8) -> true); + f_from_post = (fun (x: t_i8) (out: t_i16) -> true); + f_from + = + fun (x: t_i8) -> + t_i16 + (Core.Convert.f_into #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Convert.t_From t_i32 t_i8 = + { + f_from_pre = (fun (x: t_i8) -> true); + f_from_post = (fun (x: t_i8) (out: t_i32) -> true); + f_from + = + fun (x: t_i8) -> + t_i32 + (Core.Convert.f_into #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Convert.t_From t_i64 t_i8 = + { + f_from_pre = (fun (x: t_i8) -> true); + f_from_post = (fun (x: t_i8) (out: t_i64) -> true); + f_from + = + fun (x: t_i8) -> + t_i64 + (Core.Convert.f_into #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Convert.t_From t_i128 t_i8 = + { + f_from_pre = (fun (x: t_i8) -> true); + f_from_post = (fun (x: t_i8) (out: t_i128) -> true); + f_from + = + fun (x: t_i8) -> + t_i128 + (Core.Convert.f_into #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Convert.t_From t_isize t_i8 = + { + f_from_pre = (fun (x: t_i8) -> true); + f_from_post = (fun (x: t_i8) (out: t_isize) -> true); + f_from + = + fun (x: t_i8) -> + t_isize + (Core.Convert.f_into #Core.Base_interface.Int.t_I8 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Convert.t_From t_i8 t_i16 = + { + f_from_pre = (fun (x: t_i16) -> true); + f_from_post = (fun (x: t_i16) (out: t_i8) -> true); + f_from + = + fun (x: t_i16) -> + t_i8 + (Core.Convert.f_into #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Convert.t_From t_i32 t_i16 = + { + f_from_pre = (fun (x: t_i16) -> true); + f_from_post = (fun (x: t_i16) (out: t_i32) -> true); + f_from + = + fun (x: t_i16) -> + t_i32 + (Core.Convert.f_into #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Convert.t_From t_i64 t_i16 = + { + f_from_pre = (fun (x: t_i16) -> true); + f_from_post = (fun (x: t_i16) (out: t_i64) -> true); + f_from + = + fun (x: t_i16) -> + t_i64 + (Core.Convert.f_into #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Convert.t_From t_i128 t_i16 = + { + f_from_pre = (fun (x: t_i16) -> true); + f_from_post = (fun (x: t_i16) (out: t_i128) -> true); + f_from + = + fun (x: t_i16) -> + t_i128 + (Core.Convert.f_into #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Convert.t_From t_isize t_i16 = + { + f_from_pre = (fun (x: t_i16) -> true); + f_from_post = (fun (x: t_i16) (out: t_isize) -> true); + f_from + = + fun (x: t_i16) -> + t_isize + (Core.Convert.f_into #Core.Base_interface.Int.t_I16 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Convert.t_From t_i8 t_i32 = + { + f_from_pre = (fun (x: t_i32) -> true); + f_from_post = (fun (x: t_i32) (out: t_i8) -> true); + f_from + = + fun (x: t_i32) -> + t_i8 + (Core.Convert.f_into #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Convert.t_From t_i16 t_i32 = + { + f_from_pre = (fun (x: t_i32) -> true); + f_from_post = (fun (x: t_i32) (out: t_i16) -> true); + f_from + = + fun (x: t_i32) -> + t_i16 + (Core.Convert.f_into #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Convert.t_From t_i64 t_i32 = + { + f_from_pre = (fun (x: t_i32) -> true); + f_from_post = (fun (x: t_i32) (out: t_i64) -> true); + f_from + = + fun (x: t_i32) -> + t_i64 + (Core.Convert.f_into #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Convert.t_From t_i128 t_i32 = + { + f_from_pre = (fun (x: t_i32) -> true); + f_from_post = (fun (x: t_i32) (out: t_i128) -> true); + f_from + = + fun (x: t_i32) -> + t_i128 + (Core.Convert.f_into #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Convert.t_From t_isize t_i32 = + { + f_from_pre = (fun (x: t_i32) -> true); + f_from_post = (fun (x: t_i32) (out: t_isize) -> true); + f_from + = + fun (x: t_i32) -> + t_isize + (Core.Convert.f_into #Core.Base_interface.Int.t_I32 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Convert.t_From t_i8 t_i64 = + { + f_from_pre = (fun (x: t_i64) -> true); + f_from_post = (fun (x: t_i64) (out: t_i8) -> true); + f_from + = + fun (x: t_i64) -> + t_i8 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Convert.t_From t_i16 t_i64 = + { + f_from_pre = (fun (x: t_i64) -> true); + f_from_post = (fun (x: t_i64) (out: t_i16) -> true); + f_from + = + fun (x: t_i64) -> + t_i16 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Convert.t_From t_i32 t_i64 = + { + f_from_pre = (fun (x: t_i64) -> true); + f_from_post = (fun (x: t_i64) (out: t_i32) -> true); + f_from + = + fun (x: t_i64) -> + t_i32 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Convert.t_From t_i128 t_i64 = + { + f_from_pre = (fun (x: t_i64) -> true); + f_from_post = (fun (x: t_i64) (out: t_i128) -> true); + f_from + = + fun (x: t_i64) -> + t_i128 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Convert.t_From t_i8 t_i128 = + { + f_from_pre = (fun (x: t_i128) -> true); + f_from_post = (fun (x: t_i128) (out: t_i8) -> true); + f_from + = + fun (x: t_i128) -> + t_i8 + (Core.Convert.f_into #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Convert.t_From t_i16 t_i128 = + { + f_from_pre = (fun (x: t_i128) -> true); + f_from_post = (fun (x: t_i128) (out: t_i16) -> true); + f_from + = + fun (x: t_i128) -> + t_i16 + (Core.Convert.f_into #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Convert.t_From t_i32 t_i128 = + { + f_from_pre = (fun (x: t_i128) -> true); + f_from_post = (fun (x: t_i128) (out: t_i32) -> true); + f_from + = + fun (x: t_i128) -> + t_i32 + (Core.Convert.f_into #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Convert.t_From t_i64 t_i128 = + { + f_from_pre = (fun (x: t_i128) -> true); + f_from_post = (fun (x: t_i128) (out: t_i64) -> true); + f_from + = + fun (x: t_i128) -> + t_i64 + (Core.Convert.f_into #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Convert.t_From t_isize t_i128 = + { + f_from_pre = (fun (x: t_i128) -> true); + f_from_post = (fun (x: t_i128) (out: t_isize) -> true); + f_from + = + fun (x: t_i128) -> + t_isize + (Core.Convert.f_into #Core.Base_interface.Int.t_I128 + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Convert.t_From t_i8 t_isize = + { + f_from_pre = (fun (x: t_isize) -> true); + f_from_post = (fun (x: t_isize) (out: t_i8) -> true); + f_from + = + fun (x: t_isize) -> + t_i8 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Convert.t_From t_i16 t_isize = + { + f_from_pre = (fun (x: t_isize) -> true); + f_from_post = (fun (x: t_isize) (out: t_i16) -> true); + f_from + = + fun (x: t_isize) -> + t_i16 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Convert.t_From t_i32 t_isize = + { + f_from_pre = (fun (x: t_isize) -> true); + f_from_post = (fun (x: t_isize) (out: t_i32) -> true); + f_from + = + fun (x: t_isize) -> + t_i32 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Convert.t_From t_i128 t_isize = + { + f_from_pre = (fun (x: t_isize) -> true); + f_from_post = (fun (x: t_isize) (out: t_i128) -> true); + f_from + = + fun (x: t_isize) -> + t_i128 + (Core.Convert.f_into #Core.Base_interface.Int.t_I64 + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_i128 + } + +/// The methods `index` and `index_mut` panic if the index is out of bounds. +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1 (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) + : v_SliceIndex t_usize (t_Slice v_T) = + { + _super_9346575357466912174 = FStar.Tactics.Typeclasses.solve; + f_Output = v_T; + f_index_pre = (fun (self: t_usize) (slice: t_Slice v_T) -> true); + f_index_post = (fun (self: t_usize) (slice: t_Slice v_T) (out: v_T) -> true); + f_index + = + fun (self: t_usize) (slice: t_Slice v_T) -> + let (x: usize):usize = + Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt + #usize + #FStar.Tactics.Typeclasses.solve + self._0.Core.Base_interface.Int.f_v + in + slice.f_v.f_v.[ x ] + } + +let add_with_overflow_i128 (x y: t_i128) : (t_i128 & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I128):Core.Base_interface.Int.t_I128 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (t_i128 (Core.Clone.f_clone #Core.Base_interface.Int.t_I128 #FStar.Tactics.Typeclasses.solve res) + <: + t_i128), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (t_i128 & bool) + +let add_with_overflow_i16 (x y: t_i16) : (t_i16 & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I16):Core.Base_interface.Int.t_I16 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (t_i16 (Core.Clone.f_clone #Core.Base_interface.Int.t_I16 #FStar.Tactics.Typeclasses.solve res) + <: + t_i16), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (t_i16 & bool) + +let add_with_overflow_i32 (x y: t_i32) : (t_i32 & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I32):Core.Base_interface.Int.t_I32 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (t_i32 (Core.Clone.f_clone #Core.Base_interface.Int.t_I32 #FStar.Tactics.Typeclasses.solve res) + <: + t_i32), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (t_i32 & bool) + +let add_with_overflow_i64 (x y: t_i64) : (t_i64 & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I64):Core.Base_interface.Int.t_I64 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (t_i64 (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve res) + <: + t_i64), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (t_i64 & bool) + +let add_with_overflow_i8 (x y: t_i8) : (t_i8 & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I8):Core.Base_interface.Int.t_I8 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (t_i8 (Core.Clone.f_clone #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve res) + <: + t_i8), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (t_i8 & bool) + +let add_with_overflow_isize (x y: t_isize) : (t_isize & bool) = + let overflow:Core.Base.Spec.Z.t_Z = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + in + let (res: Core.Base_interface.Int.t_I64):Core.Base_interface.Int.t_I64 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Z.t_Z) + in + (t_isize (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve res) + <: + t_isize), + Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Z.t_Z) + overflow + <: + (t_isize & bool) + +let unchecked_add_i128 (x y: t_i128) : t_i128 = + t_i128 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I128) + <: + t_i128 + +let unchecked_add_i16 (x y: t_i16) : t_i16 = + t_i16 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I16) + <: + t_i16 + +let unchecked_add_i32 (x y: t_i32) : t_i32 = + t_i32 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I32) + <: + t_i32 + +let unchecked_add_i64 (x y: t_i64) : t_i64 = + t_i64 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I64) + <: + t_i64 + +let unchecked_add_i8 (x y: t_i8) : t_i8 = + t_i8 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I8) + <: + t_i8 + +let unchecked_add_isize (x y: t_isize) : t_isize = + t_isize + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I64) + <: + t_isize + +let unchecked_add_u128 (x y: t_u128) : t_u128 = + t_u128 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U128) + <: + t_u128 + +let unchecked_add_u16 (x y: t_u16) : t_u16 = + t_u16 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U16) + <: + t_u16 + +let unchecked_add_u32 (x y: t_u32) : t_u32 = + t_u32 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U32) + <: + t_u32 + +let unchecked_add_u64 (x y: t_u64) : t_u64 = + t_u64 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U64) + <: + t_u64 + +let unchecked_add_u8 (x y: t_u8) : t_u8 = + t_u8 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U8) + <: + t_u8 + +let unchecked_add_usize (x y: t_usize) : t_usize = + t_usize + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U64) + <: + t_usize + +let checked_add268751055 (self rhs: t_u8) : Core.Option.t_Option t_u8 = + Core.Option.Option_Some (unchecked_add_u8 self rhs) <: Core.Option.t_Option t_u8 + +let checked_add132377399 (self rhs: t_u16) : Core.Option.t_Option t_u16 = + Core.Option.Option_Some (unchecked_add_u16 self rhs) <: Core.Option.t_Option t_u16 + +let checked_add985437730 (self rhs: t_u32) : Core.Option.t_Option t_u32 = + Core.Option.Option_Some (unchecked_add_u32 self rhs) <: Core.Option.t_Option t_u32 + +let checked_add586246465 (self rhs: t_u64) : Core.Option.t_Option t_u64 = + Core.Option.Option_Some (unchecked_add_u64 self rhs) <: Core.Option.t_Option t_u64 + +let checked_add218978451 (self rhs: t_u128) : Core.Option.t_Option t_u128 = + Core.Option.Option_Some (unchecked_add_u128 self rhs) <: Core.Option.t_Option t_u128 + +let checked_add984013567 (self rhs: t_usize) : Core.Option.t_Option t_usize = + Core.Option.Option_Some (unchecked_add_usize self rhs) <: Core.Option.t_Option t_usize + +let add_with_overflow_u128 (x y: t_u128) : (t_u128 & bool) = + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + let (res: Core.Base_interface.Int.t_U128):Core.Base_interface.Int.t_U128 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + (t_u128 (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve res) + <: + t_u128), + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow + <: + (t_u128 & bool) + +let add_with_overflow_u16 (x y: t_u16) : (t_u16 & bool) = + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + let (res: Core.Base_interface.Int.t_U16):Core.Base_interface.Int.t_U16 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + (t_u16 (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve res) + <: + t_u16), + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow + <: + (t_u16 & bool) + +let add_with_overflow_u32 (x y: t_u32) : (t_u32 & bool) = + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + let (res: Core.Base_interface.Int.t_U32):Core.Base_interface.Int.t_U32 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + (t_u32 (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve res) + <: + t_u32), + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow + <: + (t_u32 & bool) + +let add_with_overflow_u64 (x y: t_u64) : (t_u64 & bool) = + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + let (res: Core.Base_interface.Int.t_U64):Core.Base_interface.Int.t_U64 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + (t_u64 (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) + <: + t_u64), + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow + <: + (t_u64 & bool) + +let add_with_overflow_u8 (x y: t_u8) : (t_u8 & bool) = + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + let (res: Core.Base_interface.Int.t_U8):Core.Base_interface.Int.t_U8 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + (t_u8 (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve res) + <: + t_u8), + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow + <: + (t_u8 & bool) + +let add_with_overflow_usize (x y: t_usize) : (t_usize & bool) = + let overflow:Core.Base.Spec.Haxint.t_HaxInt = + Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + let (res: Core.Base_interface.Int.t_U64):Core.Base_interface.Int.t_U64 = + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow + <: + Core.Base.Spec.Haxint.t_HaxInt) + in + (t_usize (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) + <: + t_usize), + Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + res + <: + Core.Base.Spec.Haxint.t_HaxInt) + overflow + <: + (t_usize & bool) + +let unchecked_div_u128 (x y: t_u128) : t_u128 = + t_u128 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U128) + <: + t_u128 + +let unchecked_div_u16 (x y: t_u16) : t_u16 = + t_u16 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U16) + <: + t_u16 + +let unchecked_div_u32 (x y: t_u32) : t_u32 = + t_u32 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U32) + <: + t_u32 + +let unchecked_div_u64 (x y: t_u64) : t_u64 = + t_u64 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U64) + <: + t_u64 + +let unchecked_div_u8 (x y: t_u8) : t_u8 = + t_u8 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U8) + <: + t_u8 + +let unchecked_div_usize (x y: t_usize) : t_usize = + t_usize + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Haxint.t_HaxInt) + } + <: + Core.Base_interface.Int.t_U64) + <: + t_usize + +let wrapping_add_i128 (a b: t_i128) : t_i128 = t_i128 (a._0 +! b._0) <: t_i128 + +let wrapping_add_i16 (a b: t_i16) : t_i16 = t_i16 (a._0 +! b._0) <: t_i16 + +let wrapping_add_i32 (a b: t_i32) : t_i32 = t_i32 (a._0 +! b._0) <: t_i32 + +let wrapping_add_i64 (a b: t_i64) : t_i64 = t_i64 (a._0 +! b._0) <: t_i64 + +let wrapping_add_i8 (a b: t_i8) : t_i8 = t_i8 (a._0 +! b._0) <: t_i8 + +let wrapping_add_isize (a b: t_isize) : t_isize = t_isize (a._0 +! b._0) <: t_isize + +let wrapping_sub_i128 (a b: t_i128) : t_i128 = t_i128 (a._0 -! b._0) <: t_i128 + +let wrapping_sub_i16 (a b: t_i16) : t_i16 = t_i16 (a._0 -! b._0) <: t_i16 + +let wrapping_sub_i32 (a b: t_i32) : t_i32 = t_i32 (a._0 -! b._0) <: t_i32 + +let wrapping_sub_i64 (a b: t_i64) : t_i64 = t_i64 (a._0 -! b._0) <: t_i64 + +let wrapping_sub_i8 (a b: t_i8) : t_i8 = t_i8 (a._0 -! b._0) <: t_i8 + +let wrapping_sub_isize (a b: t_isize) : t_isize = t_isize (a._0 -! b._0) <: t_isize + +let wrapping_add634491935 (self rhs: t_i8) : t_i8 = wrapping_add_i8 self rhs + +let wrapping_sub973428293 (self rhs: t_i8) : t_i8 = wrapping_sub_i8 self rhs + +let wrapping_neg400701205 (self: t_i8) : t_i8 = + wrapping_sub973428293 (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) + self + +let wrapping_abs400396545 (self: t_i8) : t_i8 = + if is_negative350273175 (Core.Clone.f_clone #t_i8 #FStar.Tactics.Typeclasses.solve self <: t_i8) + then wrapping_neg400701205 self + else self + +let wrapping_add868559108 (self rhs: t_i16) : t_i16 = wrapping_add_i16 self rhs + +let wrapping_sub189469152 (self rhs: t_i16) : t_i16 = wrapping_sub_i16 self rhs + +let wrapping_neg860505723 (self: t_i16) : t_i16 = + wrapping_sub189469152 (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s + <: + t_i16) + self + +let wrapping_abs229076826 (self: t_i16) : t_i16 = + if is_negative477067241 (Core.Clone.f_clone #t_i16 #FStar.Tactics.Typeclasses.solve self <: t_i16) + then wrapping_neg860505723 self + else self + +let wrapping_add475006616 (self rhs: t_i32) : t_i32 = wrapping_add_i32 self rhs + +let wrapping_sub298337071 (self rhs: t_i32) : t_i32 = wrapping_sub_i32 self rhs + +let wrapping_neg636433078 (self: t_i32) : t_i32 = + wrapping_sub298337071 (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l + <: + t_i32) + self + +let wrapping_abs729536875 (self: t_i32) : t_i32 = + if + is_negative1035644813 (Core.Clone.f_clone #t_i32 #FStar.Tactics.Typeclasses.solve self <: t_i32) + then wrapping_neg636433078 self + else self + +let wrapping_add590074241 (self rhs: t_i64) : t_i64 = wrapping_add_i64 self rhs + +let wrapping_sub334584751 (self rhs: t_i64) : t_i64 = wrapping_sub_i64 self rhs + +let wrapping_neg868282938 (self: t_i64) : t_i64 = + wrapping_sub334584751 (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L + <: + t_i64) + self + +let wrapping_abs285829312 (self: t_i64) : t_i64 = + if + is_negative1066124578 (Core.Clone.f_clone #t_i64 #FStar.Tactics.Typeclasses.solve self <: t_i64) + then wrapping_neg868282938 self + else self + +let wrapping_add251385439 (self rhs: t_i128) : t_i128 = wrapping_add_i128 self rhs + +let wrapping_sub681598071 (self rhs: t_i128) : t_i128 = wrapping_sub_i128 self rhs + +let wrapping_neg446546984 (self: t_i128) : t_i128 = + wrapping_sub681598071 (Core.Convert.f_into #i128 + #t_i128 + #FStar.Tactics.Typeclasses.solve + (pub_i128 0) + <: + t_i128) + self + +let wrapping_abs281925696 (self: t_i128) : t_i128 = + if + is_negative221698470 (Core.Clone.f_clone #t_i128 #FStar.Tactics.Typeclasses.solve self <: t_i128 + ) + then wrapping_neg446546984 self + else self + +let wrapping_add226040243 (self rhs: t_isize) : t_isize = wrapping_add_isize self rhs + +let wrapping_sub698035192 (self rhs: t_isize) : t_isize = wrapping_sub_isize self rhs + +let wrapping_neg912291768 (self: t_isize) : t_isize = + wrapping_sub698035192 (Core.Convert.f_into #isize + #t_isize + #FStar.Tactics.Typeclasses.solve + (isz 0) + <: + t_isize) + self + +let wrapping_abs347300819 (self: t_isize) : t_isize = + if + is_negative693446369 (Core.Clone.f_clone #t_isize #FStar.Tactics.Typeclasses.solve self + <: + t_isize) + then wrapping_neg912291768 self + else self + +let checked_div508301931 (self rhs: t_u8) : Core.Option.t_Option t_u8 = + if rhs =. (Core.Convert.f_into #u8 #t_u8 #FStar.Tactics.Typeclasses.solve 0uy <: t_u8) + then Core.Option.Option_None <: Core.Option.t_Option t_u8 + else Core.Option.Option_Some (unchecked_div_u8 self rhs) <: Core.Option.t_Option t_u8 + +let overflowing_add708890057 (self rhs: t_u8) : (t_u8 & bool) = add_with_overflow_u8 self rhs + +let checked_div614920780 (self rhs: t_u16) : Core.Option.t_Option t_u16 = + if rhs =. (Core.Convert.f_into #u16 #t_u16 #FStar.Tactics.Typeclasses.solve 0us <: t_u16) + then Core.Option.Option_None <: Core.Option.t_Option t_u16 + else Core.Option.Option_Some (unchecked_div_u16 self rhs) <: Core.Option.t_Option t_u16 + +let overflowing_add1023344178 (self rhs: t_u16) : (t_u16 & bool) = add_with_overflow_u16 self rhs + +let checked_div979383477 (self rhs: t_u32) : Core.Option.t_Option t_u32 = + if rhs =. (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul <: t_u32) + then Core.Option.Option_None <: Core.Option.t_Option t_u32 + else Core.Option.Option_Some (unchecked_div_u32 self rhs) <: Core.Option.t_Option t_u32 + +let overflowing_add905744292 (self rhs: t_u32) : (t_u32 & bool) = add_with_overflow_u32 self rhs + +let checked_div988689127 (self rhs: t_u64) : Core.Option.t_Option t_u64 = + if rhs =. (Core.Convert.f_into #u64 #t_u64 #FStar.Tactics.Typeclasses.solve 0uL <: t_u64) + then Core.Option.Option_None <: Core.Option.t_Option t_u64 + else Core.Option.Option_Some (unchecked_div_u64 self rhs) <: Core.Option.t_Option t_u64 + +let overflowing_add581983607 (self rhs: t_u64) : (t_u64 & bool) = add_with_overflow_u64 self rhs + +let checked_div344106746 (self rhs: t_u128) : Core.Option.t_Option t_u128 = + if + rhs =. + (Core.Convert.f_into #u128 #t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 0) <: t_u128) + then Core.Option.Option_None <: Core.Option.t_Option t_u128 + else Core.Option.Option_Some (unchecked_div_u128 self rhs) <: Core.Option.t_Option t_u128 + +let overflowing_add458293681 (self rhs: t_u128) : (t_u128 & bool) = add_with_overflow_u128 self rhs + +let checked_div80223906 (self rhs: t_usize) : Core.Option.t_Option t_usize = + if rhs =. (Core.Convert.f_into #usize #t_usize #FStar.Tactics.Typeclasses.solve (sz 0) <: t_usize) + then Core.Option.Option_None <: Core.Option.t_Option t_usize + else Core.Option.Option_Some (unchecked_div_usize self rhs) <: Core.Option.t_Option t_usize + +let overflowing_add682280407 (self rhs: t_usize) : (t_usize & bool) = + add_with_overflow_usize self rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Ops.Arith.t_Neg t_i8 = + { + f_Output = t_i8; + f_neg_pre = (fun (self: t_i8) -> true); + f_neg_post = (fun (self: t_i8) (out: t_i8) -> true); + f_neg + = + fun (self: t_i8) -> + t_i8 + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i8 + } + +let abs945505614 (self: t_i8) : t_i8 = + if is_negative350273175 (Core.Clone.f_clone #t_i8 #FStar.Tactics.Typeclasses.solve self <: t_i8) + then Core.Ops.Arith.f_neg #t_i8 #FStar.Tactics.Typeclasses.solve self + else self + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Ops.Arith.t_Neg t_i16 = + { + f_Output = t_i16; + f_neg_pre = (fun (self: t_i16) -> true); + f_neg_post = (fun (self: t_i16) (out: t_i16) -> true); + f_neg + = + fun (self: t_i16) -> + t_i16 + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I16 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i16 + } + +let abs581170970 (self: t_i16) : t_i16 = + if is_negative477067241 (Core.Clone.f_clone #t_i16 #FStar.Tactics.Typeclasses.solve self <: t_i16) + then Core.Ops.Arith.f_neg #t_i16 #FStar.Tactics.Typeclasses.solve self + else self + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Ops.Arith.t_Neg t_i32 = + { + f_Output = t_i32; + f_neg_pre = (fun (self: t_i32) -> true); + f_neg_post = (fun (self: t_i32) (out: t_i32) -> true); + f_neg + = + fun (self: t_i32) -> + t_i32 + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I32 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i32 + } + +let abs590464694 (self: t_i32) : t_i32 = + if + is_negative1035644813 (Core.Clone.f_clone #t_i32 #FStar.Tactics.Typeclasses.solve self <: t_i32) + then Core.Ops.Arith.f_neg #t_i32 #FStar.Tactics.Typeclasses.solve self + else self + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Ops.Arith.t_Neg t_i64 = + { + f_Output = t_i64; + f_neg_pre = (fun (self: t_i64) -> true); + f_neg_post = (fun (self: t_i64) (out: t_i64) -> true); + f_neg + = + fun (self: t_i64) -> + t_i64 + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_i64 + } + +let abs654781043 (self: t_i64) : t_i64 = + if + is_negative1066124578 (Core.Clone.f_clone #t_i64 #FStar.Tactics.Typeclasses.solve self <: t_i64) + then Core.Ops.Arith.f_neg #t_i64 #FStar.Tactics.Typeclasses.solve self + else self + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Ops.Arith.t_Neg t_i128 = + { + f_Output = t_i128; + f_neg_pre = (fun (self: t_i128) -> true); + f_neg_post = (fun (self: t_i128) (out: t_i128) -> true); + f_neg + = + fun (self: t_i128) -> + t_i128 + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I128 #FStar.Tactics.Typeclasses.solve self._0 + ) + <: + t_i128 + } + +let abs204417539 (self: t_i128) : t_i128 = + if + is_negative221698470 (Core.Clone.f_clone #t_i128 #FStar.Tactics.Typeclasses.solve self <: t_i128 + ) + then Core.Ops.Arith.f_neg #t_i128 #FStar.Tactics.Typeclasses.solve self + else self + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Ops.Arith.t_Neg t_isize = + { + f_Output = t_isize; + f_neg_pre = (fun (self: t_isize) -> true); + f_neg_post = (fun (self: t_isize) (out: t_isize) -> true); + f_neg + = + fun (self: t_isize) -> + t_isize + (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) + <: + t_isize + } + +let abs220926056 (self: t_isize) : t_isize = + if + is_negative693446369 (Core.Clone.f_clone #t_isize #FStar.Tactics.Typeclasses.solve self + <: + t_isize) + then Core.Ops.Arith.f_neg #t_isize #FStar.Tactics.Typeclasses.solve self + else self + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_84: Core.Ops.Bit.t_BitOr t_i8 t_i8 = + { + f_Output = t_i8; + f_bitor_pre = (fun (self: t_i8) (other: t_i8) -> true); + f_bitor_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); + f_bitor = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 |. other._0) <: t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_85: Core.Ops.Bit.t_BitOr t_i16 t_i16 = + { + f_Output = t_i16; + f_bitor_pre = (fun (self: t_i16) (other: t_i16) -> true); + f_bitor_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); + f_bitor = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 |. other._0) <: t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_86: Core.Ops.Bit.t_BitOr t_i32 t_i32 = + { + f_Output = t_i32; + f_bitor_pre = (fun (self: t_i32) (other: t_i32) -> true); + f_bitor_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); + f_bitor = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 |. other._0) <: t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_87: Core.Ops.Bit.t_BitOr t_i64 t_i64 = + { + f_Output = t_i64; + f_bitor_pre = (fun (self: t_i64) (other: t_i64) -> true); + f_bitor_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); + f_bitor = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 |. other._0) <: t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_88: Core.Ops.Bit.t_BitOr t_i128 t_i128 = + { + f_Output = t_i128; + f_bitor_pre = (fun (self: t_i128) (other: t_i128) -> true); + f_bitor_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); + f_bitor = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 |. other._0) <: t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_89: Core.Ops.Bit.t_BitOr t_isize t_isize = + { + f_Output = t_isize; + f_bitor_pre = (fun (self: t_isize) (other: t_isize) -> true); + f_bitor_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); + f_bitor = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 |. other._0) <: t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Convert.t_From t_u16 t_u8 = + { + f_from_pre = (fun (x: t_u8) -> true); + f_from_post = (fun (x: t_u8) (out: t_u16) -> true); + f_from + = + fun (x: t_u8) -> + t_u16 + (Core.Convert.f_into #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Convert.t_From t_u32 t_u8 = + { + f_from_pre = (fun (x: t_u8) -> true); + f_from_post = (fun (x: t_u8) (out: t_u32) -> true); + f_from + = + fun (x: t_u8) -> + t_u32 + (Core.Convert.f_into #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Convert.t_From t_u64 t_u8 = + { + f_from_pre = (fun (x: t_u8) -> true); + f_from_post = (fun (x: t_u8) (out: t_u64) -> true); + f_from + = + fun (x: t_u8) -> + t_u64 + (Core.Convert.f_into #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Convert.t_From t_u128 t_u8 = + { + f_from_pre = (fun (x: t_u8) -> true); + f_from_post = (fun (x: t_u8) (out: t_u128) -> true); + f_from + = + fun (x: t_u8) -> + t_u128 + (Core.Convert.f_into #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Convert.t_From t_usize t_u8 = + { + f_from_pre = (fun (x: t_u8) -> true); + f_from_post = (fun (x: t_u8) (out: t_usize) -> true); + f_from + = + fun (x: t_u8) -> + t_usize + (Core.Convert.f_into #Core.Base_interface.Int.t_U8 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Convert.t_From t_u8 t_u16 = + { + f_from_pre = (fun (x: t_u16) -> true); + f_from_post = (fun (x: t_u16) (out: t_u8) -> true); + f_from + = + fun (x: t_u16) -> + t_u8 + (Core.Convert.f_into #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Convert.t_From t_u32 t_u16 = + { + f_from_pre = (fun (x: t_u16) -> true); + f_from_post = (fun (x: t_u16) (out: t_u32) -> true); + f_from + = + fun (x: t_u16) -> + t_u32 + (Core.Convert.f_into #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Convert.t_From t_u64 t_u16 = + { + f_from_pre = (fun (x: t_u16) -> true); + f_from_post = (fun (x: t_u16) (out: t_u64) -> true); + f_from + = + fun (x: t_u16) -> + t_u64 + (Core.Convert.f_into #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Convert.t_From t_u128 t_u16 = + { + f_from_pre = (fun (x: t_u16) -> true); + f_from_post = (fun (x: t_u16) (out: t_u128) -> true); + f_from + = + fun (x: t_u16) -> + t_u128 + (Core.Convert.f_into #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Convert.t_From t_usize t_u16 = + { + f_from_pre = (fun (x: t_u16) -> true); + f_from_post = (fun (x: t_u16) (out: t_usize) -> true); + f_from + = + fun (x: t_u16) -> + t_usize + (Core.Convert.f_into #Core.Base_interface.Int.t_U16 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Convert.t_From t_u8 t_u32 = + { + f_from_pre = (fun (x: t_u32) -> true); + f_from_post = (fun (x: t_u32) (out: t_u8) -> true); + f_from + = + fun (x: t_u32) -> + t_u8 + (Core.Convert.f_into #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Convert.t_From t_u16 t_u32 = + { + f_from_pre = (fun (x: t_u32) -> true); + f_from_post = (fun (x: t_u32) (out: t_u16) -> true); + f_from + = + fun (x: t_u32) -> + t_u16 + (Core.Convert.f_into #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Convert.t_From t_u64 t_u32 = + { + f_from_pre = (fun (x: t_u32) -> true); + f_from_post = (fun (x: t_u32) (out: t_u64) -> true); + f_from + = + fun (x: t_u32) -> + t_u64 + (Core.Convert.f_into #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Convert.t_From t_u128 t_u32 = + { + f_from_pre = (fun (x: t_u32) -> true); + f_from_post = (fun (x: t_u32) (out: t_u128) -> true); + f_from + = + fun (x: t_u32) -> + t_u128 + (Core.Convert.f_into #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Convert.t_From t_usize t_u32 = + { + f_from_pre = (fun (x: t_u32) -> true); + f_from_post = (fun (x: t_u32) (out: t_usize) -> true); + f_from + = + fun (x: t_u32) -> + t_usize + (Core.Convert.f_into #Core.Base_interface.Int.t_U32 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Convert.t_From t_u8 t_u64 = + { + f_from_pre = (fun (x: t_u64) -> true); + f_from_post = (fun (x: t_u64) (out: t_u8) -> true); + f_from + = + fun (x: t_u64) -> + t_u8 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Convert.t_From t_u16 t_u64 = + { + f_from_pre = (fun (x: t_u64) -> true); + f_from_post = (fun (x: t_u64) (out: t_u16) -> true); + f_from + = + fun (x: t_u64) -> + t_u16 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Convert.t_From t_u32 t_u64 = + { + f_from_pre = (fun (x: t_u64) -> true); + f_from_post = (fun (x: t_u64) (out: t_u32) -> true); + f_from + = + fun (x: t_u64) -> + t_u32 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Convert.t_From t_u128 t_u64 = + { + f_from_pre = (fun (x: t_u64) -> true); + f_from_post = (fun (x: t_u64) (out: t_u128) -> true); + f_from + = + fun (x: t_u64) -> + t_u128 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Convert.t_From t_u8 t_u128 = + { + f_from_pre = (fun (x: t_u128) -> true); + f_from_post = (fun (x: t_u128) (out: t_u8) -> true); + f_from + = + fun (x: t_u128) -> + t_u8 + (Core.Convert.f_into #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Convert.t_From t_u16 t_u128 = + { + f_from_pre = (fun (x: t_u128) -> true); + f_from_post = (fun (x: t_u128) (out: t_u16) -> true); + f_from + = + fun (x: t_u128) -> + t_u16 + (Core.Convert.f_into #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Convert.t_From t_u32 t_u128 = + { + f_from_pre = (fun (x: t_u128) -> true); + f_from_post = (fun (x: t_u128) (out: t_u32) -> true); + f_from + = + fun (x: t_u128) -> + t_u32 + (Core.Convert.f_into #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Convert.t_From t_u64 t_u128 = + { + f_from_pre = (fun (x: t_u128) -> true); + f_from_post = (fun (x: t_u128) (out: t_u64) -> true); + f_from + = + fun (x: t_u128) -> + t_u64 + (Core.Convert.f_into #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Convert.t_From t_usize t_u128 = + { + f_from_pre = (fun (x: t_u128) -> true); + f_from_post = (fun (x: t_u128) (out: t_usize) -> true); + f_from + = + fun (x: t_u128) -> + t_usize + (Core.Convert.f_into #Core.Base_interface.Int.t_U128 + #Core.Base_interface.Int.t_U64 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Convert.t_From t_u8 t_usize = + { + f_from_pre = (fun (x: t_usize) -> true); + f_from_post = (fun (x: t_usize) (out: t_u8) -> true); + f_from + = + fun (x: t_usize) -> + t_u8 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U8 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Convert.t_From t_u16 t_usize = + { + f_from_pre = (fun (x: t_usize) -> true); + f_from_post = (fun (x: t_usize) (out: t_u16) -> true); + f_from + = + fun (x: t_usize) -> + t_u16 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U16 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Convert.t_From t_u32 t_usize = + { + f_from_pre = (fun (x: t_usize) -> true); + f_from_post = (fun (x: t_usize) (out: t_u32) -> true); + f_from + = + fun (x: t_usize) -> + t_u32 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U32 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Convert.t_From t_u128 t_usize = + { + f_from_pre = (fun (x: t_usize) -> true); + f_from_post = (fun (x: t_usize) (out: t_u128) -> true); + f_from + = + fun (x: t_usize) -> + t_u128 + (Core.Convert.f_into #Core.Base_interface.Int.t_U64 + #Core.Base_interface.Int.t_U128 + #FStar.Tactics.Typeclasses.solve + x._0) + <: + t_u128 + } + +let unchecked_div_i128 (x y: t_i128) : t_i128 = + t_i128 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I128) + <: + t_i128 + +let unchecked_div_i16 (x y: t_i16) : t_i16 = + t_i16 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I16) + <: + t_i16 + +let unchecked_div_i32 (x y: t_i32) : t_i32 = + t_i32 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I32) + <: + t_i32 + +let unchecked_div_i64 (x y: t_i64) : t_i64 = + t_i64 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I64) + <: + t_i64 + +let unchecked_div_i8 (x y: t_i8) : t_i8 = + t_i8 + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I8) + <: + t_i8 + +let unchecked_div_isize (x y: t_isize) : t_isize = + t_isize + ({ + Core.Base_interface.Int.f_v + = + Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + x._0 + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 + #FStar.Tactics.Typeclasses.solve + y._0 + <: + Core.Base.Spec.Z.t_Z) + } + <: + Core.Base_interface.Int.t_I64) + <: + t_isize + +let wrapping_add_u128 (a b: t_u128) : t_u128 = t_u128 (a._0 +! b._0) <: t_u128 + +let wrapping_add_u16 (a b: t_u16) : t_u16 = t_u16 (a._0 +! b._0) <: t_u16 + +let wrapping_add_u32 (a b: t_u32) : t_u32 = t_u32 (a._0 +! b._0) <: t_u32 + +let wrapping_add_u64 (a b: t_u64) : t_u64 = t_u64 (a._0 +! b._0) <: t_u64 + +let wrapping_add_u8 (a b: t_u8) : t_u8 = t_u8 (a._0 +! b._0) <: t_u8 + +let wrapping_add_usize (a b: t_usize) : t_usize = t_usize (a._0 +! b._0) <: t_usize + +let wrapping_mul_i128 (a b: t_i128) : t_i128 = t_i128 (a._0 *! b._0) <: t_i128 + +let wrapping_mul_i16 (a b: t_i16) : t_i16 = t_i16 (a._0 *! b._0) <: t_i16 + +let wrapping_mul_i32 (a b: t_i32) : t_i32 = t_i32 (a._0 *! b._0) <: t_i32 + +let wrapping_mul_i64 (a b: t_i64) : t_i64 = t_i64 (a._0 *! b._0) <: t_i64 + +let wrapping_mul_i8 (a b: t_i8) : t_i8 = t_i8 (a._0 *! b._0) <: t_i8 + +let wrapping_mul_isize (a b: t_isize) : t_isize = t_isize (a._0 *! b._0) <: t_isize + +let wrapping_mul_u128 (a b: t_u128) : t_u128 = t_u128 (a._0 *! b._0) <: t_u128 + +let wrapping_mul_u16 (a b: t_u16) : t_u16 = t_u16 (a._0 *! b._0) <: t_u16 + +let wrapping_mul_u32 (a b: t_u32) : t_u32 = t_u32 (a._0 *! b._0) <: t_u32 + +let wrapping_mul_u64 (a b: t_u64) : t_u64 = t_u64 (a._0 *! b._0) <: t_u64 + +let wrapping_mul_u8 (a b: t_u8) : t_u8 = t_u8 (a._0 *! b._0) <: t_u8 + +let wrapping_mul_usize (a b: t_usize) : t_usize = t_usize (a._0 *! b._0) <: t_usize + +let wrapping_add480603777 (self rhs: t_u8) : t_u8 = wrapping_add_u8 self rhs + +let wrapping_mul885216284 (self rhs: t_u8) : t_u8 = wrapping_mul_u8 self rhs + +let wrapping_add124432709 (self rhs: t_u16) : t_u16 = wrapping_add_u16 self rhs + +let wrapping_mul14465189 (self rhs: t_u16) : t_u16 = wrapping_mul_u16 self rhs + +let wrapping_add1049665857 (self rhs: t_u32) : t_u32 = wrapping_add_u32 self rhs + +let wrapping_mul203346768 (self rhs: t_u32) : t_u32 = wrapping_mul_u32 self rhs + +let wrapping_add865565639 (self rhs: t_u64) : t_u64 = wrapping_add_u64 self rhs + +let wrapping_mul742978873 (self rhs: t_u64) : t_u64 = wrapping_mul_u64 self rhs + +let wrapping_add40844100 (self rhs: t_u128) : t_u128 = wrapping_add_u128 self rhs + +let wrapping_mul294115024 (self rhs: t_u128) : t_u128 = wrapping_mul_u128 self rhs + +let wrapping_add427637036 (self rhs: t_usize) : t_usize = wrapping_add_usize self rhs + +let wrapping_mul680896953 (self rhs: t_usize) : t_usize = wrapping_mul_usize self rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Ops.Arith.t_Add t_i8 t_i8 = + { + f_Output = t_i8; + f_add_pre = (fun (self: t_i8) (other: t_i8) -> true); + f_add_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); + f_add = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 +! other._0) <: t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Ops.Arith.t_Add t_i16 t_i16 = + { + f_Output = t_i16; + f_add_pre = (fun (self: t_i16) (other: t_i16) -> true); + f_add_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); + f_add = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 +! other._0) <: t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Ops.Arith.t_Add t_i32 t_i32 = + { + f_Output = t_i32; + f_add_pre = (fun (self: t_i32) (other: t_i32) -> true); + f_add_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); + f_add = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 +! other._0) <: t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Ops.Arith.t_Add t_i64 t_i64 = + { + f_Output = t_i64; + f_add_pre = (fun (self: t_i64) (other: t_i64) -> true); + f_add_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); + f_add = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 +! other._0) <: t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Ops.Arith.t_Add t_i128 t_i128 = + { + f_Output = t_i128; + f_add_pre = (fun (self: t_i128) (other: t_i128) -> true); + f_add_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); + f_add = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 +! other._0) <: t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Ops.Arith.t_Add t_isize t_isize = + { + f_Output = t_isize; + f_add_pre = (fun (self: t_isize) (other: t_isize) -> true); + f_add_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); + f_add = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 +! other._0) <: t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Ops.Arith.t_Sub t_i8 t_i8 = + { + f_Output = t_i8; + f_sub_pre = (fun (self: t_i8) (other: t_i8) -> true); + f_sub_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); + f_sub = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 -! other._0) <: t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Ops.Arith.t_Sub t_i16 t_i16 = + { + f_Output = t_i16; + f_sub_pre = (fun (self: t_i16) (other: t_i16) -> true); + f_sub_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); + f_sub = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 -! other._0) <: t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Ops.Arith.t_Sub t_i32 t_i32 = + { + f_Output = t_i32; + f_sub_pre = (fun (self: t_i32) (other: t_i32) -> true); + f_sub_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); + f_sub = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 -! other._0) <: t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Ops.Arith.t_Sub t_i64 t_i64 = + { + f_Output = t_i64; + f_sub_pre = (fun (self: t_i64) (other: t_i64) -> true); + f_sub_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); + f_sub = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 -! other._0) <: t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Ops.Arith.t_Sub t_i128 t_i128 = + { + f_Output = t_i128; + f_sub_pre = (fun (self: t_i128) (other: t_i128) -> true); + f_sub_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); + f_sub = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 -! other._0) <: t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Ops.Arith.t_Sub t_isize t_isize = + { + f_Output = t_isize; + f_sub_pre = (fun (self: t_isize) (other: t_isize) -> true); + f_sub_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); + f_sub = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 -! other._0) <: t_isize + } + +let wrapping_sub_u128 (a b: t_u128) : t_u128 = t_u128 (a._0 -! b._0) <: t_u128 + +let wrapping_sub_u16 (a b: t_u16) : t_u16 = t_u16 (a._0 -! b._0) <: t_u16 + +let wrapping_sub_u32 (a b: t_u32) : t_u32 = t_u32 (a._0 -! b._0) <: t_u32 + +let wrapping_sub_u64 (a b: t_u64) : t_u64 = t_u64 (a._0 -! b._0) <: t_u64 + +let wrapping_sub_u8 (a b: t_u8) : t_u8 = t_u8 (a._0 -! b._0) <: t_u8 + +let wrapping_sub_usize (a b: t_usize) : t_usize = t_usize (a._0 -! b._0) <: t_usize + +let wrapping_sub403906422 (self rhs: t_u8) : t_u8 = wrapping_sub_u8 self rhs + +let wrapping_neg123212788 (self: t_u8) : t_u8 = + wrapping_sub403906422 (t_u8 + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U8) + <: + t_u8) + self + +let wrapping_sub811251034 (self rhs: t_u16) : t_u16 = wrapping_sub_u16 self rhs + +let wrapping_neg128555595 (self: t_u16) : t_u16 = + wrapping_sub811251034 (t_u16 + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U16) + <: + t_u16) + self + +let wrapping_sub708953500 (self rhs: t_u32) : t_u32 = wrapping_sub_u32 self rhs + +let wrapping_neg328220773 (self: t_u32) : t_u32 = + wrapping_sub708953500 (t_u32 + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U32) + <: + t_u32) + self + +let wrapping_sub762520851 (self rhs: t_u64) : t_u64 = wrapping_sub_u64 self rhs + +let wrapping_neg617136337 (self: t_u64) : t_u64 = + wrapping_sub762520851 (t_u64 + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U64) + <: + t_u64) + self + +let wrapping_sub409310259 (self rhs: t_u128) : t_u128 = wrapping_sub_u128 self rhs + +let wrapping_neg729451428 (self: t_u128) : t_u128 = + wrapping_sub409310259 (t_u128 + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U128) + <: + t_u128) + self + +let wrapping_sub813101882 (self rhs: t_usize) : t_usize = wrapping_sub_usize self rhs + +let wrapping_neg342773446 (self: t_usize) : t_usize = + wrapping_sub813101882 (t_usize + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U64) + <: + t_usize) + self + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Ops.Arith.t_Add t_u8 t_u8 = + { + f_Output = t_u8; + f_add_pre = (fun (self: t_u8) (other: t_u8) -> true); + f_add_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); + f_add = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 +! other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Ops.Arith.t_Add t_u16 t_u16 = + { + f_Output = t_u16; + f_add_pre = (fun (self: t_u16) (other: t_u16) -> true); + f_add_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); + f_add = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 +! other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Ops.Arith.t_Add t_u32 t_u32 = + { + f_Output = t_u32; + f_add_pre = (fun (self: t_u32) (other: t_u32) -> true); + f_add_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); + f_add = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 +! other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Ops.Arith.t_Add t_u64 t_u64 = + { + f_Output = t_u64; + f_add_pre = (fun (self: t_u64) (other: t_u64) -> true); + f_add_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); + f_add = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 +! other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Ops.Arith.t_Add t_u128 t_u128 = + { + f_Output = t_u128; + f_add_pre = (fun (self: t_u128) (other: t_u128) -> true); + f_add_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); + f_add = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 +! other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Ops.Arith.t_Add t_usize t_usize = + { + f_Output = t_usize; + f_add_pre = (fun (self: t_usize) (other: t_usize) -> true); + f_add_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); + f_add = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 +! other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Ops.Arith.t_Mul t_u8 t_u8 = + { + f_Output = t_u8; + f_mul_pre = (fun (self: t_u8) (other: t_u8) -> true); + f_mul_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); + f_mul = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 *! other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Ops.Arith.t_Mul t_u16 t_u16 = + { + f_Output = t_u16; + f_mul_pre = (fun (self: t_u16) (other: t_u16) -> true); + f_mul_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); + f_mul = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 *! other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Ops.Arith.t_Mul t_u32 t_u32 = + { + f_Output = t_u32; + f_mul_pre = (fun (self: t_u32) (other: t_u32) -> true); + f_mul_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); + f_mul = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 *! other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Ops.Arith.t_Mul t_u64 t_u64 = + { + f_Output = t_u64; + f_mul_pre = (fun (self: t_u64) (other: t_u64) -> true); + f_mul_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); + f_mul = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 *! other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Ops.Arith.t_Mul t_u128 t_u128 = + { + f_Output = t_u128; + f_mul_pre = (fun (self: t_u128) (other: t_u128) -> true); + f_mul_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); + f_mul = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 *! other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Ops.Arith.t_Mul t_usize t_usize = + { + f_Output = t_usize; + f_mul_pre = (fun (self: t_usize) (other: t_usize) -> true); + f_mul_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); + f_mul = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 *! other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Ops.Arith.t_Mul t_i8 t_i8 = + { + f_Output = t_i8; + f_mul_pre = (fun (self: t_i8) (other: t_i8) -> true); + f_mul_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); + f_mul = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 *! other._0) <: t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Ops.Arith.t_Mul t_i16 t_i16 = + { + f_Output = t_i16; + f_mul_pre = (fun (self: t_i16) (other: t_i16) -> true); + f_mul_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); + f_mul = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 *! other._0) <: t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Ops.Arith.t_Mul t_i32 t_i32 = + { + f_Output = t_i32; + f_mul_pre = (fun (self: t_i32) (other: t_i32) -> true); + f_mul_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); + f_mul = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 *! other._0) <: t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Ops.Arith.t_Mul t_i64 t_i64 = + { + f_Output = t_i64; + f_mul_pre = (fun (self: t_i64) (other: t_i64) -> true); + f_mul_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); + f_mul = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 *! other._0) <: t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Ops.Arith.t_Mul t_i128 t_i128 = + { + f_Output = t_i128; + f_mul_pre = (fun (self: t_i128) (other: t_i128) -> true); + f_mul_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); + f_mul = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 *! other._0) <: t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Ops.Arith.t_Mul t_isize t_isize = + { + f_Output = t_isize; + f_mul_pre = (fun (self: t_isize) (other: t_isize) -> true); + f_mul_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); + f_mul = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 *! other._0) <: t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_42: Core.Ops.Arith.t_Div t_u8 t_u8 = + { + f_Output = t_u8; + f_div_pre = (fun (self: t_u8) (other: t_u8) -> true); + f_div_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); + f_div = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 /! other._0) <: t_u8 + } + +let wrapping_div660080892 (self rhs: t_u8) : t_u8 = self /! rhs + +let wrapping_div_euclid481233436 (self rhs: t_u8) : t_u8 = self /! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_43: Core.Ops.Arith.t_Div t_u16 t_u16 = + { + f_Output = t_u16; + f_div_pre = (fun (self: t_u16) (other: t_u16) -> true); + f_div_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); + f_div = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 /! other._0) <: t_u16 + } + +let wrapping_div366977334 (self rhs: t_u16) : t_u16 = self /! rhs + +let wrapping_div_euclid22267888 (self rhs: t_u16) : t_u16 = self /! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_44: Core.Ops.Arith.t_Div t_u32 t_u32 = + { + f_Output = t_u32; + f_div_pre = (fun (self: t_u32) (other: t_u32) -> true); + f_div_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); + f_div = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 /! other._0) <: t_u32 + } + +let wrapping_div931150450 (self rhs: t_u32) : t_u32 = self /! rhs + +let wrapping_div_euclid606291997 (self rhs: t_u32) : t_u32 = self /! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_45: Core.Ops.Arith.t_Div t_u64 t_u64 = + { + f_Output = t_u64; + f_div_pre = (fun (self: t_u64) (other: t_u64) -> true); + f_div_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); + f_div = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 /! other._0) <: t_u64 + } + +let wrapping_div168427046 (self rhs: t_u64) : t_u64 = self /! rhs + +let wrapping_div_euclid321252086 (self rhs: t_u64) : t_u64 = self /! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_46: Core.Ops.Arith.t_Div t_u128 t_u128 = + { + f_Output = t_u128; + f_div_pre = (fun (self: t_u128) (other: t_u128) -> true); + f_div_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); + f_div = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 /! other._0) <: t_u128 + } + +let wrapping_div692427683 (self rhs: t_u128) : t_u128 = self /! rhs + +let wrapping_div_euclid926334515 (self rhs: t_u128) : t_u128 = self /! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_47: Core.Ops.Arith.t_Div t_usize t_usize = + { + f_Output = t_usize; + f_div_pre = (fun (self: t_usize) (other: t_usize) -> true); + f_div_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); + f_div = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 /! other._0) <: t_usize + } + +let wrapping_div905768546 (self rhs: t_usize) : t_usize = self /! rhs + +let wrapping_div_euclid90317722 (self rhs: t_usize) : t_usize = self /! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_54: Core.Ops.Arith.t_Rem t_u8 t_u8 = + { + f_Output = t_u8; + f_rem_pre = (fun (self: t_u8) (other: t_u8) -> true); + f_rem_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); + f_rem = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 %! other._0) <: t_u8 + } + +let wrapping_rem984569721 (self rhs: t_u8) : t_u8 = self %! rhs + +let wrapping_rem_euclid946579345 (self rhs: t_u8) : t_u8 = self %! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_55: Core.Ops.Arith.t_Rem t_u16 t_u16 = + { + f_Output = t_u16; + f_rem_pre = (fun (self: t_u16) (other: t_u16) -> true); + f_rem_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); + f_rem = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 %! other._0) <: t_u16 + } + +let wrapping_rem378598035 (self rhs: t_u16) : t_u16 = self %! rhs + +let wrapping_rem_euclid602402638 (self rhs: t_u16) : t_u16 = self %! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_56: Core.Ops.Arith.t_Rem t_u32 t_u32 = + { + f_Output = t_u32; + f_rem_pre = (fun (self: t_u32) (other: t_u32) -> true); + f_rem_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); + f_rem = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 %! other._0) <: t_u32 + } + +let wrapping_rem292009099 (self rhs: t_u32) : t_u32 = self %! rhs + +let wrapping_rem_euclid1020271291 (self rhs: t_u32) : t_u32 = self %! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_57: Core.Ops.Arith.t_Rem t_u64 t_u64 = + { + f_Output = t_u64; + f_rem_pre = (fun (self: t_u64) (other: t_u64) -> true); + f_rem_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); + f_rem = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 %! other._0) <: t_u64 + } + +let wrapping_rem390602260 (self rhs: t_u64) : t_u64 = self %! rhs + +let wrapping_rem_euclid839264546 (self rhs: t_u64) : t_u64 = self %! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_58: Core.Ops.Arith.t_Rem t_u128 t_u128 = + { + f_Output = t_u128; + f_rem_pre = (fun (self: t_u128) (other: t_u128) -> true); + f_rem_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); + f_rem = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 %! other._0) <: t_u128 + } + +let wrapping_rem332379920 (self rhs: t_u128) : t_u128 = self %! rhs + +let wrapping_rem_euclid646122423 (self rhs: t_u128) : t_u128 = self %! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_59: Core.Ops.Arith.t_Rem t_usize t_usize = + { + f_Output = t_usize; + f_rem_pre = (fun (self: t_usize) (other: t_usize) -> true); + f_rem_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); + f_rem = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 %! other._0) <: t_usize + } + +let wrapping_rem333089373 (self rhs: t_usize) : t_usize = self %! rhs + +let wrapping_rem_euclid769656504 (self rhs: t_usize) : t_usize = self %! rhs + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_6: Core.Ops.Bit.t_Shr t_u8 t_u8 = + { + f_Output = t_u8; + f_shr_pre = (fun (self: t_u8) (other: t_u8) -> true); + f_shr_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); + f_shr = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 >>! other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_7: Core.Ops.Bit.t_Shr t_u8 t_u16 = + { + f_Output = t_u8; + f_shr_pre = (fun (self: t_u8) (other: t_u16) -> true); + f_shr_post = (fun (self: t_u8) (other: t_u16) (out: t_u8) -> true); + f_shr = fun (self: t_u8) (other: t_u16) -> t_u8 (self._0 >>! other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_8: Core.Ops.Bit.t_Shr t_u8 t_u32 = + { + f_Output = t_u8; + f_shr_pre = (fun (self: t_u8) (other: t_u32) -> true); + f_shr_post = (fun (self: t_u8) (other: t_u32) (out: t_u8) -> true); + f_shr = fun (self: t_u8) (other: t_u32) -> t_u8 (self._0 >>! other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_9: Core.Ops.Bit.t_Shr t_u8 t_u64 = + { + f_Output = t_u8; + f_shr_pre = (fun (self: t_u8) (other: t_u64) -> true); + f_shr_post = (fun (self: t_u8) (other: t_u64) (out: t_u8) -> true); + f_shr = fun (self: t_u8) (other: t_u64) -> t_u8 (self._0 >>! other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_10: Core.Ops.Bit.t_Shr t_u8 t_u128 = + { + f_Output = t_u8; + f_shr_pre = (fun (self: t_u8) (other: t_u128) -> true); + f_shr_post = (fun (self: t_u8) (other: t_u128) (out: t_u8) -> true); + f_shr = fun (self: t_u8) (other: t_u128) -> t_u8 (self._0 >>! other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_11: Core.Ops.Bit.t_Shr t_u8 t_usize = + { + f_Output = t_u8; + f_shr_pre = (fun (self: t_u8) (other: t_usize) -> true); + f_shr_post = (fun (self: t_u8) (other: t_usize) (out: t_u8) -> true); + f_shr = fun (self: t_u8) (other: t_usize) -> t_u8 (self._0 >>! other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_12: Core.Ops.Bit.t_Shr t_u16 t_u8 = + { + f_Output = t_u16; + f_shr_pre = (fun (self: t_u16) (other: t_u8) -> true); + f_shr_post = (fun (self: t_u16) (other: t_u8) (out: t_u16) -> true); + f_shr = fun (self: t_u16) (other: t_u8) -> t_u16 (self._0 >>! other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_13: Core.Ops.Bit.t_Shr t_u16 t_u16 = + { + f_Output = t_u16; + f_shr_pre = (fun (self: t_u16) (other: t_u16) -> true); + f_shr_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); + f_shr = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 >>! other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_14: Core.Ops.Bit.t_Shr t_u16 t_u32 = + { + f_Output = t_u16; + f_shr_pre = (fun (self: t_u16) (other: t_u32) -> true); + f_shr_post = (fun (self: t_u16) (other: t_u32) (out: t_u16) -> true); + f_shr = fun (self: t_u16) (other: t_u32) -> t_u16 (self._0 >>! other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_15: Core.Ops.Bit.t_Shr t_u16 t_u64 = + { + f_Output = t_u16; + f_shr_pre = (fun (self: t_u16) (other: t_u64) -> true); + f_shr_post = (fun (self: t_u16) (other: t_u64) (out: t_u16) -> true); + f_shr = fun (self: t_u16) (other: t_u64) -> t_u16 (self._0 >>! other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_16: Core.Ops.Bit.t_Shr t_u16 t_u128 = + { + f_Output = t_u16; + f_shr_pre = (fun (self: t_u16) (other: t_u128) -> true); + f_shr_post = (fun (self: t_u16) (other: t_u128) (out: t_u16) -> true); + f_shr = fun (self: t_u16) (other: t_u128) -> t_u16 (self._0 >>! other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_17: Core.Ops.Bit.t_Shr t_u16 t_usize = + { + f_Output = t_u16; + f_shr_pre = (fun (self: t_u16) (other: t_usize) -> true); + f_shr_post = (fun (self: t_u16) (other: t_usize) (out: t_u16) -> true); + f_shr = fun (self: t_u16) (other: t_usize) -> t_u16 (self._0 >>! other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Ops.Bit.t_Shr t_u32 t_u8 = + { + f_Output = t_u32; + f_shr_pre = (fun (self: t_u32) (other: t_u8) -> true); + f_shr_post = (fun (self: t_u32) (other: t_u8) (out: t_u32) -> true); + f_shr = fun (self: t_u32) (other: t_u8) -> t_u32 (self._0 >>! other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Ops.Bit.t_Shr t_u32 t_u16 = + { + f_Output = t_u32; + f_shr_pre = (fun (self: t_u32) (other: t_u16) -> true); + f_shr_post = (fun (self: t_u32) (other: t_u16) (out: t_u32) -> true); + f_shr = fun (self: t_u32) (other: t_u16) -> t_u32 (self._0 >>! other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Ops.Bit.t_Shr t_u32 t_u32 = + { + f_Output = t_u32; + f_shr_pre = (fun (self: t_u32) (other: t_u32) -> true); + f_shr_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); + f_shr = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 >>! other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_21: Core.Ops.Bit.t_Shr t_u32 t_u64 = + { + f_Output = t_u32; + f_shr_pre = (fun (self: t_u32) (other: t_u64) -> true); + f_shr_post = (fun (self: t_u32) (other: t_u64) (out: t_u32) -> true); + f_shr = fun (self: t_u32) (other: t_u64) -> t_u32 (self._0 >>! other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Ops.Bit.t_Shr t_u32 t_u128 = + { + f_Output = t_u32; + f_shr_pre = (fun (self: t_u32) (other: t_u128) -> true); + f_shr_post = (fun (self: t_u32) (other: t_u128) (out: t_u32) -> true); + f_shr = fun (self: t_u32) (other: t_u128) -> t_u32 (self._0 >>! other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Ops.Bit.t_Shr t_u32 t_usize = + { + f_Output = t_u32; + f_shr_pre = (fun (self: t_u32) (other: t_usize) -> true); + f_shr_post = (fun (self: t_u32) (other: t_usize) (out: t_u32) -> true); + f_shr = fun (self: t_u32) (other: t_usize) -> t_u32 (self._0 >>! other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_24: Core.Ops.Bit.t_Shr t_u64 t_u8 = + { + f_Output = t_u64; + f_shr_pre = (fun (self: t_u64) (other: t_u8) -> true); + f_shr_post = (fun (self: t_u64) (other: t_u8) (out: t_u64) -> true); + f_shr = fun (self: t_u64) (other: t_u8) -> t_u64 (self._0 >>! other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_25: Core.Ops.Bit.t_Shr t_u64 t_u16 = + { + f_Output = t_u64; + f_shr_pre = (fun (self: t_u64) (other: t_u16) -> true); + f_shr_post = (fun (self: t_u64) (other: t_u16) (out: t_u64) -> true); + f_shr = fun (self: t_u64) (other: t_u16) -> t_u64 (self._0 >>! other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_26: Core.Ops.Bit.t_Shr t_u64 t_u32 = + { + f_Output = t_u64; + f_shr_pre = (fun (self: t_u64) (other: t_u32) -> true); + f_shr_post = (fun (self: t_u64) (other: t_u32) (out: t_u64) -> true); + f_shr = fun (self: t_u64) (other: t_u32) -> t_u64 (self._0 >>! other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_27: Core.Ops.Bit.t_Shr t_u64 t_u64 = + { + f_Output = t_u64; + f_shr_pre = (fun (self: t_u64) (other: t_u64) -> true); + f_shr_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); + f_shr = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 >>! other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_28: Core.Ops.Bit.t_Shr t_u64 t_u128 = + { + f_Output = t_u64; + f_shr_pre = (fun (self: t_u64) (other: t_u128) -> true); + f_shr_post = (fun (self: t_u64) (other: t_u128) (out: t_u64) -> true); + f_shr = fun (self: t_u64) (other: t_u128) -> t_u64 (self._0 >>! other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Ops.Bit.t_Shr t_u64 t_usize = + { + f_Output = t_u64; + f_shr_pre = (fun (self: t_u64) (other: t_usize) -> true); + f_shr_post = (fun (self: t_u64) (other: t_usize) (out: t_u64) -> true); + f_shr = fun (self: t_u64) (other: t_usize) -> t_u64 (self._0 >>! other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Ops.Bit.t_Shr t_u128 t_u8 = + { + f_Output = t_u128; + f_shr_pre = (fun (self: t_u128) (other: t_u8) -> true); + f_shr_post = (fun (self: t_u128) (other: t_u8) (out: t_u128) -> true); + f_shr = fun (self: t_u128) (other: t_u8) -> t_u128 (self._0 >>! other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Ops.Bit.t_Shr t_u128 t_u16 = + { + f_Output = t_u128; + f_shr_pre = (fun (self: t_u128) (other: t_u16) -> true); + f_shr_post = (fun (self: t_u128) (other: t_u16) (out: t_u128) -> true); + f_shr = fun (self: t_u128) (other: t_u16) -> t_u128 (self._0 >>! other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Ops.Bit.t_Shr t_u128 t_u32 = + { + f_Output = t_u128; + f_shr_pre = (fun (self: t_u128) (other: t_u32) -> true); + f_shr_post = (fun (self: t_u128) (other: t_u32) (out: t_u128) -> true); + f_shr = fun (self: t_u128) (other: t_u32) -> t_u128 (self._0 >>! other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Ops.Bit.t_Shr t_u128 t_u64 = + { + f_Output = t_u128; + f_shr_pre = (fun (self: t_u128) (other: t_u64) -> true); + f_shr_post = (fun (self: t_u128) (other: t_u64) (out: t_u128) -> true); + f_shr = fun (self: t_u128) (other: t_u64) -> t_u128 (self._0 >>! other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Ops.Bit.t_Shr t_u128 t_u128 = + { + f_Output = t_u128; + f_shr_pre = (fun (self: t_u128) (other: t_u128) -> true); + f_shr_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); + f_shr = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 >>! other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Ops.Bit.t_Shr t_u128 t_usize = + { + f_Output = t_u128; + f_shr_pre = (fun (self: t_u128) (other: t_usize) -> true); + f_shr_post = (fun (self: t_u128) (other: t_usize) (out: t_u128) -> true); + f_shr = fun (self: t_u128) (other: t_usize) -> t_u128 (self._0 >>! other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Ops.Bit.t_Shr t_usize t_u8 = + { + f_Output = t_usize; + f_shr_pre = (fun (self: t_usize) (other: t_u8) -> true); + f_shr_post = (fun (self: t_usize) (other: t_u8) (out: t_usize) -> true); + f_shr = fun (self: t_usize) (other: t_u8) -> t_usize (self._0 >>! other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Ops.Bit.t_Shr t_usize t_u16 = + { + f_Output = t_usize; + f_shr_pre = (fun (self: t_usize) (other: t_u16) -> true); + f_shr_post = (fun (self: t_usize) (other: t_u16) (out: t_usize) -> true); + f_shr = fun (self: t_usize) (other: t_u16) -> t_usize (self._0 >>! other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_38: Core.Ops.Bit.t_Shr t_usize t_u32 = + { + f_Output = t_usize; + f_shr_pre = (fun (self: t_usize) (other: t_u32) -> true); + f_shr_post = (fun (self: t_usize) (other: t_u32) (out: t_usize) -> true); + f_shr = fun (self: t_usize) (other: t_u32) -> t_usize (self._0 >>! other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_39: Core.Ops.Bit.t_Shr t_usize t_u64 = + { + f_Output = t_usize; + f_shr_pre = (fun (self: t_usize) (other: t_u64) -> true); + f_shr_post = (fun (self: t_usize) (other: t_u64) (out: t_usize) -> true); + f_shr = fun (self: t_usize) (other: t_u64) -> t_usize (self._0 >>! other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_40: Core.Ops.Bit.t_Shr t_usize t_u128 = + { + f_Output = t_usize; + f_shr_pre = (fun (self: t_usize) (other: t_u128) -> true); + f_shr_post = (fun (self: t_usize) (other: t_u128) (out: t_usize) -> true); + f_shr = fun (self: t_usize) (other: t_u128) -> t_usize (self._0 >>! other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_41: Core.Ops.Bit.t_Shr t_usize t_usize = + { + f_Output = t_usize; + f_shr_pre = (fun (self: t_usize) (other: t_usize) -> true); + f_shr_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); + f_shr = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 >>! other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_42: Core.Ops.Bit.t_Shl t_u8 t_u8 = + { + f_Output = t_u8; + f_shl_pre = (fun (self: t_u8) (other: t_u8) -> true); + f_shl_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); + f_shl = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 < true); + f_shl_post = (fun (self: t_u8) (other: t_u16) (out: t_u8) -> true); + f_shl = fun (self: t_u8) (other: t_u16) -> t_u8 (self._0 < true); + f_shl_post = (fun (self: t_u8) (other: t_u32) (out: t_u8) -> true); + f_shl = fun (self: t_u8) (other: t_u32) -> t_u8 (self._0 < true); + f_shl_post = (fun (self: t_u8) (other: t_u64) (out: t_u8) -> true); + f_shl = fun (self: t_u8) (other: t_u64) -> t_u8 (self._0 < true); + f_shl_post = (fun (self: t_u8) (other: t_u128) (out: t_u8) -> true); + f_shl = fun (self: t_u8) (other: t_u128) -> t_u8 (self._0 < true); + f_shl_post = (fun (self: t_u8) (other: t_usize) (out: t_u8) -> true); + f_shl = fun (self: t_u8) (other: t_usize) -> t_u8 (self._0 < true); + f_shl_post = (fun (self: t_u16) (other: t_u8) (out: t_u16) -> true); + f_shl = fun (self: t_u16) (other: t_u8) -> t_u16 (self._0 < true); + f_shl_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); + f_shl = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 < true); + f_shl_post = (fun (self: t_u16) (other: t_u32) (out: t_u16) -> true); + f_shl = fun (self: t_u16) (other: t_u32) -> t_u16 (self._0 < true); + f_shl_post = (fun (self: t_u16) (other: t_u64) (out: t_u16) -> true); + f_shl = fun (self: t_u16) (other: t_u64) -> t_u16 (self._0 < true); + f_shl_post = (fun (self: t_u16) (other: t_u128) (out: t_u16) -> true); + f_shl = fun (self: t_u16) (other: t_u128) -> t_u16 (self._0 < true); + f_shl_post = (fun (self: t_u16) (other: t_usize) (out: t_u16) -> true); + f_shl = fun (self: t_u16) (other: t_usize) -> t_u16 (self._0 < true); + f_shl_post = (fun (self: t_u32) (other: t_u8) (out: t_u32) -> true); + f_shl = fun (self: t_u32) (other: t_u8) -> t_u32 (self._0 < true); + f_shl_post = (fun (self: t_u32) (other: t_u16) (out: t_u32) -> true); + f_shl = fun (self: t_u32) (other: t_u16) -> t_u32 (self._0 < true); + f_shl_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); + f_shl = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 < true); + f_shl_post = (fun (self: t_u32) (other: t_u64) (out: t_u32) -> true); + f_shl = fun (self: t_u32) (other: t_u64) -> t_u32 (self._0 < true); + f_shl_post = (fun (self: t_u32) (other: t_u128) (out: t_u32) -> true); + f_shl = fun (self: t_u32) (other: t_u128) -> t_u32 (self._0 < true); + f_shl_post = (fun (self: t_u32) (other: t_usize) (out: t_u32) -> true); + f_shl = fun (self: t_u32) (other: t_usize) -> t_u32 (self._0 < true); + f_shl_post = (fun (self: t_u64) (other: t_u8) (out: t_u64) -> true); + f_shl = fun (self: t_u64) (other: t_u8) -> t_u64 (self._0 < true); + f_shl_post = (fun (self: t_u64) (other: t_u16) (out: t_u64) -> true); + f_shl = fun (self: t_u64) (other: t_u16) -> t_u64 (self._0 < true); + f_shl_post = (fun (self: t_u64) (other: t_u32) (out: t_u64) -> true); + f_shl = fun (self: t_u64) (other: t_u32) -> t_u64 (self._0 < true); + f_shl_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); + f_shl = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 < true); + f_shl_post = (fun (self: t_u64) (other: t_u128) (out: t_u64) -> true); + f_shl = fun (self: t_u64) (other: t_u128) -> t_u64 (self._0 < true); + f_shl_post = (fun (self: t_u64) (other: t_usize) (out: t_u64) -> true); + f_shl = fun (self: t_u64) (other: t_usize) -> t_u64 (self._0 < true); + f_shl_post = (fun (self: t_u128) (other: t_u8) (out: t_u128) -> true); + f_shl = fun (self: t_u128) (other: t_u8) -> t_u128 (self._0 < true); + f_shl_post = (fun (self: t_u128) (other: t_u16) (out: t_u128) -> true); + f_shl = fun (self: t_u128) (other: t_u16) -> t_u128 (self._0 < true); + f_shl_post = (fun (self: t_u128) (other: t_u32) (out: t_u128) -> true); + f_shl = fun (self: t_u128) (other: t_u32) -> t_u128 (self._0 < true); + f_shl_post = (fun (self: t_u128) (other: t_u64) (out: t_u128) -> true); + f_shl = fun (self: t_u128) (other: t_u64) -> t_u128 (self._0 < true); + f_shl_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); + f_shl = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 < true); + f_shl_post = (fun (self: t_u128) (other: t_usize) (out: t_u128) -> true); + f_shl = fun (self: t_u128) (other: t_usize) -> t_u128 (self._0 < true); + f_shl_post = (fun (self: t_usize) (other: t_u8) (out: t_usize) -> true); + f_shl = fun (self: t_usize) (other: t_u8) -> t_usize (self._0 < true); + f_shl_post = (fun (self: t_usize) (other: t_u16) (out: t_usize) -> true); + f_shl = fun (self: t_usize) (other: t_u16) -> t_usize (self._0 < true); + f_shl_post = (fun (self: t_usize) (other: t_u32) (out: t_usize) -> true); + f_shl = fun (self: t_usize) (other: t_u32) -> t_usize (self._0 < true); + f_shl_post = (fun (self: t_usize) (other: t_u64) (out: t_usize) -> true); + f_shl = fun (self: t_usize) (other: t_u64) -> t_usize (self._0 < true); + f_shl_post = (fun (self: t_usize) (other: t_u128) (out: t_usize) -> true); + f_shl = fun (self: t_usize) (other: t_u128) -> t_usize (self._0 < true); + f_shl_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); + f_shl = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 < true); + f_bitor_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); + f_bitor = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 |. other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_79: Core.Ops.Bit.t_BitOr t_u16 t_u16 = + { + f_Output = t_u16; + f_bitor_pre = (fun (self: t_u16) (other: t_u16) -> true); + f_bitor_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); + f_bitor = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 |. other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_80: Core.Ops.Bit.t_BitOr t_u32 t_u32 = + { + f_Output = t_u32; + f_bitor_pre = (fun (self: t_u32) (other: t_u32) -> true); + f_bitor_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); + f_bitor = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 |. other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_81: Core.Ops.Bit.t_BitOr t_u64 t_u64 = + { + f_Output = t_u64; + f_bitor_pre = (fun (self: t_u64) (other: t_u64) -> true); + f_bitor_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); + f_bitor = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 |. other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_82: Core.Ops.Bit.t_BitOr t_u128 t_u128 = + { + f_Output = t_u128; + f_bitor_pre = (fun (self: t_u128) (other: t_u128) -> true); + f_bitor_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); + f_bitor = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 |. other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_83: Core.Ops.Bit.t_BitOr t_usize t_usize = + { + f_Output = t_usize; + f_bitor_pre = (fun (self: t_usize) (other: t_usize) -> true); + f_bitor_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); + f_bitor = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 |. other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_90: Core.Ops.Bit.t_BitXor t_u8 t_u8 = + { + f_Output = t_u8; + f_bitxor_pre = (fun (self: t_u8) (other: t_u8) -> true); + f_bitxor_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); + f_bitxor = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 ^. other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_91: Core.Ops.Bit.t_BitXor t_u16 t_u16 = + { + f_Output = t_u16; + f_bitxor_pre = (fun (self: t_u16) (other: t_u16) -> true); + f_bitxor_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); + f_bitxor = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 ^. other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_92: Core.Ops.Bit.t_BitXor t_u32 t_u32 = + { + f_Output = t_u32; + f_bitxor_pre = (fun (self: t_u32) (other: t_u32) -> true); + f_bitxor_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); + f_bitxor = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 ^. other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_93: Core.Ops.Bit.t_BitXor t_u64 t_u64 = + { + f_Output = t_u64; + f_bitxor_pre = (fun (self: t_u64) (other: t_u64) -> true); + f_bitxor_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); + f_bitxor = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 ^. other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_94: Core.Ops.Bit.t_BitXor t_u128 t_u128 = + { + f_Output = t_u128; + f_bitxor_pre = (fun (self: t_u128) (other: t_u128) -> true); + f_bitxor_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); + f_bitxor = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 ^. other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_95: Core.Ops.Bit.t_BitXor t_usize t_usize = + { + f_Output = t_usize; + f_bitxor_pre = (fun (self: t_usize) (other: t_usize) -> true); + f_bitxor_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); + f_bitxor = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 ^. other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_96: Core.Ops.Bit.t_BitAnd t_u8 t_u8 = + { + f_Output = t_u8; + f_bitand_pre = (fun (self: t_u8) (other: t_u8) -> true); + f_bitand_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); + f_bitand = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 &. other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_97: Core.Ops.Bit.t_BitAnd t_u16 t_u16 = + { + f_Output = t_u16; + f_bitand_pre = (fun (self: t_u16) (other: t_u16) -> true); + f_bitand_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); + f_bitand = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 &. other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_98: Core.Ops.Bit.t_BitAnd t_u32 t_u32 = + { + f_Output = t_u32; + f_bitand_pre = (fun (self: t_u32) (other: t_u32) -> true); + f_bitand_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); + f_bitand = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 &. other._0) <: t_u32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_99: Core.Ops.Bit.t_BitAnd t_u64 t_u64 = + { + f_Output = t_u64; + f_bitand_pre = (fun (self: t_u64) (other: t_u64) -> true); + f_bitand_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); + f_bitand = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 &. other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_100: Core.Ops.Bit.t_BitAnd t_u128 t_u128 = + { + f_Output = t_u128; + f_bitand_pre = (fun (self: t_u128) (other: t_u128) -> true); + f_bitand_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); + f_bitand = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 &. other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_101: Core.Ops.Bit.t_BitAnd t_usize t_usize = + { + f_Output = t_usize; + f_bitand_pre = (fun (self: t_usize) (other: t_usize) -> true); + f_bitand_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); + f_bitand = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 &. other._0) <: t_usize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_18: Core.Ops.Arith.t_Sub t_u8 t_u8 = + { + f_Output = t_u8; + f_sub_pre = (fun (self: t_u8) (other: t_u8) -> true); + f_sub_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); + f_sub = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 -! other._0) <: t_u8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_19: Core.Ops.Arith.t_Sub t_u16 t_u16 = + { + f_Output = t_u16; + f_sub_pre = (fun (self: t_u16) (other: t_u16) -> true); + f_sub_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); + f_sub = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 -! other._0) <: t_u16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_20: Core.Ops.Arith.t_Sub t_u32 t_u32 = + { + f_Output = t_u32; + f_sub_pre = (fun (self: t_u32) (other: t_u32) -> true); + f_sub_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); + f_sub = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 -! other._0) <: t_u32 + } + +let rotate_left_u128 (x: t_u128) (shift: t_u32) : t_u128 = + let (shift: t_u32):t_u32 = shift %! v_BITS136999051 in + let (left: t_u128):t_u128 = + (Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) <>! + (v_BITS136999051 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + <: + t_u32) + in + left |. right + +let rotate_left_u16 (x: t_u16) (shift: t_u32) : t_u16 = + let (shift: t_u32):t_u32 = shift %! v_BITS277333551 in + let (left: t_u16):t_u16 = + (Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) <>! + (v_BITS277333551 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + <: + t_u32) + in + left |. right + +let rotate_left_u32 (x shift: t_u32) : t_u32 = + let (shift: t_u32):t_u32 = shift %! v_BITS473478051 in + let (left: t_u32):t_u32 = + (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) <>! + (v_BITS473478051 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + <: + t_u32) + in + left |. right + +let rotate_left_u64 (x: t_u64) (shift: t_u32) : t_u64 = + let (shift: t_u32):t_u32 = shift %! v_BITS177666292 in + let (left: t_u64):t_u64 = + (Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) <>! + (v_BITS177666292 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + <: + t_u32) + in + left |. right + +let rotate_left_u8 (x: t_u8) (shift: t_u32) : t_u8 = + let (shift: t_u32):t_u32 = shift %! v_BITS690311813 in + let (left: t_u8):t_u8 = + (Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) <>! + (v_BITS690311813 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + <: + t_u32) + in + left |. right + +let rotate_left_usize (x: t_usize) (shift: t_u32) : t_usize = + let (shift: t_u32):t_u32 = shift %! v_BITS229952196 in + let (left: t_usize):t_usize = + (Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) <>! + (v_BITS229952196 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + <: + t_u32) + in + left |. right + +let rotate_right_u128 (x: t_u128) (shift: t_u32) : t_u128 = + let (shift: t_u32):t_u32 = shift %! v_BITS136999051 in + let (left: t_u128):t_u128 = + (Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) >>! + (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + in + let (right: t_u128):t_u128 = + (Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) <>! + (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + in + let (right: t_u16):t_u16 = + (Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) <>! + (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + in + let (right: t_u32):t_u32 = + (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) <>! + (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + in + let (right: t_u64):t_u64 = + (Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) <>! + (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + in + let (right: t_u8):t_u8 = + (Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) <>! + (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) + in + let (right: t_usize):t_usize = + (Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) < true); + f_sub_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); + f_sub = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 -! other._0) <: t_u64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_22: Core.Ops.Arith.t_Sub t_u128 t_u128 = + { + f_Output = t_u128; + f_sub_pre = (fun (self: t_u128) (other: t_u128) -> true); + f_sub_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); + f_sub = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 -! other._0) <: t_u128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_23: Core.Ops.Arith.t_Sub t_usize t_usize = + { + f_Output = t_usize; + f_sub_pre = (fun (self: t_usize) (other: t_usize) -> true); + f_sub_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); + f_sub = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 -! other._0) <: t_usize + } + +let bswap_u128 (x: t_u128) : t_u128 = + let (count: t_u128):t_u128 = + Core.Convert.f_into #u128 #t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 0) + in + let count:t_u128 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS136999051 <: u32) + (fun count temp_1_ -> + let count:t_u128 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u128 = count in + let i:u32 = i in + let (low_bit: t_u128):t_u128 = + Core.Convert.f_into #t_u128 + #t_u128 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u128) &. + (Core.Convert.f_into #u128 #t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 1) + <: + t_u128) + <: + t_u128) + in + let count:t_u128 = + (count < + let count:t_u16 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u16 = count in + let i:u32 = i in + let (low_bit: t_u16):t_u16 = + Core.Convert.f_into #t_u16 + #t_u16 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u16) &. + (Core.Convert.f_into #u16 #t_u16 #FStar.Tactics.Typeclasses.solve 1us <: t_u16) + <: + t_u16) + in + let count:t_u16 = + (count < + let count:t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u32 = count in + let i:u32 = i in + let (low_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u32 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u32) &. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + <: + t_u32) + in + let count:t_u32 = + (count < + let count:t_u64 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u64 = count in + let i:u32 = i in + let (low_bit: t_u64):t_u64 = + Core.Convert.f_into #t_u64 + #t_u64 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u64) &. + (Core.Convert.f_into #u64 #t_u64 #FStar.Tactics.Typeclasses.solve 1uL <: t_u64) + <: + t_u64) + in + let count:t_u64 = + (count < + let count:t_u8 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u8 = count in + let i:u32 = i in + let (low_bit: t_u8):t_u8 = + Core.Convert.f_into #t_u8 + #t_u8 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u8) &. + (Core.Convert.f_into #u8 #t_u8 #FStar.Tactics.Typeclasses.solve 1uy <: t_u8) + <: + t_u8) + in + let count:t_u8 = + (count < + let count:t_usize = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_usize = count in + let i:u32 = i in + let (low_bit: t_usize):t_usize = + Core.Convert.f_into #t_usize + #t_usize + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_usize) &. + (Core.Convert.f_into #usize #t_usize #FStar.Tactics.Typeclasses.solve (sz 1) + <: + t_usize) + <: + t_usize) + in + let count:t_usize = + (count < + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u128 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) <>! + (Core.Convert.f_into #t_u32 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (v_BITS136999051 -! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 + ) + <: + t_u32) + <: + t_u32) + <: + t_u128) + in + if + high_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let ctlz_u16 (x: t_u16) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS277333551 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u16 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) <>! + (Core.Convert.f_into #t_u32 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (v_BITS277333551 -! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 + ) + <: + t_u32) + <: + t_u32) + <: + t_u16) + in + if + high_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let ctlz_u32 (x: t_u32) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS473478051 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u32 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) <>! + (Core.Convert.f_into #t_u32 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (v_BITS473478051 -! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 + ) + <: + t_u32) + <: + t_u32) + <: + t_u32) + in + if + high_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let ctlz_u64 (x: t_u64) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS177666292 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u64 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) <>! + (Core.Convert.f_into #t_u32 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (v_BITS177666292 -! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 + ) + <: + t_u32) + <: + t_u32) + <: + t_u64) + in + if + high_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let ctlz_u8 (x: t_u8) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS690311813 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u8 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) <>! + (Core.Convert.f_into #t_u32 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (v_BITS690311813 -! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 + ) + <: + t_u32) + <: + t_u32) + <: + t_u8) + in + if + high_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let ctlz_usize (x: t_usize) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS229952196 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (high_bit: t_u32):t_u32 = + Core.Convert.f_into #t_usize + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) <>! + (Core.Convert.f_into #t_u32 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (v_BITS229952196 -! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 + ) + <: + t_u32) + <: + t_u32) + <: + t_usize) + in + if + high_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let ctpop_u128 (x: t_u128) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let count:t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS136999051 <: u32) + (fun count temp_1_ -> + let count:t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #t_u128 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u128) &. + (Core.Convert.f_into #u128 #t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 1) + <: + t_u128) + <: + t_u128) + <: + t_u32) + <: + t_u32) + in + count + +let ctpop_u16 (x: t_u16) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let count:t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS277333551 <: u32) + (fun count temp_1_ -> + let count:t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #t_u16 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u16) &. + (Core.Convert.f_into #u16 #t_u16 #FStar.Tactics.Typeclasses.solve 1us <: t_u16) + <: + t_u16) + <: + t_u32) + <: + t_u32) + in + count + +let ctpop_u32 (x: t_u32) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let count:t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS473478051 <: u32) + (fun count temp_1_ -> + let count:t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #t_u32 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u32) &. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + <: + t_u32) + <: + t_u32) + <: + t_u32) + in + count + +let ctpop_u64 (x: t_u64) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let count:t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS177666292 <: u32) + (fun count temp_1_ -> + let count:t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #t_u64 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u64) &. + (Core.Convert.f_into #u64 #t_u64 #FStar.Tactics.Typeclasses.solve 1uL <: t_u64) + <: + t_u64) + <: + t_u32) + <: + t_u32) + in + count + +let ctpop_u8 (x: t_u8) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let count:t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS690311813 <: u32) + (fun count temp_1_ -> + let count:t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #t_u8 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u8) &. + (Core.Convert.f_into #u8 #t_u8 #FStar.Tactics.Typeclasses.solve 1uy <: t_u8) + <: + t_u8) + <: + t_u32) + <: + t_u32) + in + count + +let ctpop_usize (x: t_usize) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let count:t_u32 = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS229952196 <: u32) + (fun count temp_1_ -> + let count:t_u32 = count in + let _:u32 = temp_1_ in + true) + count + (fun count i -> + let count:t_u32 = count in + let i:u32 = i in + count +! + (Core.Convert.f_into #t_usize + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_usize) &. + (Core.Convert.f_into #usize #t_usize #FStar.Tactics.Typeclasses.solve (sz 1) + <: + t_usize) + <: + t_usize) + <: + t_u32) + <: + t_u32) + in + count + +let cttz_u128 (x: t_u128) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS136999051 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u128 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u128) &. + (Core.Convert.f_into #u128 #t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 1) + <: + t_u128) + <: + t_u128) + in + if + low_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let cttz_u16 (x: t_u16) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS277333551 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u16 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u16) &. + (Core.Convert.f_into #u16 #t_u16 #FStar.Tactics.Typeclasses.solve 1us <: t_u16) + <: + t_u16) + in + if + low_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let cttz_u32 (x: t_u32) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS473478051 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u32 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u32) &. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + <: + t_u32) + in + if + low_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let cttz_u64 (x: t_u64) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS177666292 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u64 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u64) &. + (Core.Convert.f_into #u64 #t_u64 #FStar.Tactics.Typeclasses.solve 1uL <: t_u64) + <: + t_u64) + in + if + low_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let cttz_u8 (x: t_u8) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS690311813 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: t_u32):t_u32 = + Core.Convert.f_into #t_u8 + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_u8) &. + (Core.Convert.f_into #u8 #t_u8 #FStar.Tactics.Typeclasses.solve 1uy <: t_u8) + <: + t_u8) + in + if + low_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let cttz_usize (x: t_usize) : t_u32 = + let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in + let done:bool = false in + let count, done:(t_u32 & bool) = + Rust_primitives.Hax.Folds.fold_range 0ul + (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS229952196 <: u32) + (fun temp_0_ temp_1_ -> + let count, done:(t_u32 & bool) = temp_0_ in + let _:u32 = temp_1_ in + true) + (count, done <: (t_u32 & bool)) + (fun temp_0_ i -> + let count, done:(t_u32 & bool) = temp_0_ in + let i:u32 = i in + let (low_bit: t_u32):t_u32 = + Core.Convert.f_into #t_usize + #t_u32 + #FStar.Tactics.Typeclasses.solve + (((Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) >>! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) + <: + t_usize) &. + (Core.Convert.f_into #usize #t_usize #FStar.Tactics.Typeclasses.solve (sz 1) + <: + t_usize) + <: + t_usize) + in + if + low_bit =. + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || + done + then + let done:bool = true in + count, done <: (t_u32 & bool) + else + let count:t_u32 = + count +! + (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) + in + count, done <: (t_u32 & bool)) + in + count + +let count_ones202509899 (self: t_u8) : t_u32 = ctpop_u8 self + +let leading_zeros75047366 (self: t_u8) : t_u32 = ctlz_u8 self + +let swap_bytes657156997 (self: t_u8) : t_u8 = + Core.Convert.f_into #t_u8 #t_u8 #FStar.Tactics.Typeclasses.solve (bswap_u8 self <: t_u8) + +let from_be746282521 (x: t_u8) : t_u8 = swap_bytes657156997 x + +let to_be972448780 (self: t_u8) : t_u8 = swap_bytes657156997 self + +let trailing_zeros572929871 (self: t_u8) : t_u32 = cttz_u8 self + +let count_ones91875752 (self: t_u16) : t_u32 = ctpop_u16 self + +let leading_zeros462412478 (self: t_u16) : t_u32 = ctlz_u16 self + +let swap_bytes926722059 (self: t_u16) : t_u16 = + Core.Convert.f_into #t_u16 #t_u16 #FStar.Tactics.Typeclasses.solve (bswap_u16 self <: t_u16) + +let from_be510959665 (x: t_u16) : t_u16 = swap_bytes926722059 x + +let to_be551590602 (self: t_u16) : t_u16 = swap_bytes926722059 self + +let trailing_zeros421474733 (self: t_u16) : t_u32 = cttz_u16 self + +let count_ones776185738 (self: t_u32) : t_u32 = ctpop_u32 self + +let leading_zeros698221972 (self: t_u32) : t_u32 = ctlz_u32 self + +let swap_bytes320480126 (self: t_u32) : t_u32 = + Core.Convert.f_into #t_u32 #t_u32 #FStar.Tactics.Typeclasses.solve (bswap_u32 self <: t_u32) + +let from_be664756649 (x: t_u32) : t_u32 = swap_bytes320480126 x + +let to_be82825962 (self: t_u32) : t_u32 = swap_bytes320480126 self + +let trailing_zeros1061560720 (self: t_u32) : t_u32 = cttz_u32 self + +let count_ones235885653 (self: t_u64) : t_u32 = ctpop_u64 self + +let leading_zeros338302110 (self: t_u64) : t_u32 = ctlz_u64 self + +let swap_bytes722254271 (self: t_u64) : t_u64 = + Core.Convert.f_into #t_u64 #t_u64 #FStar.Tactics.Typeclasses.solve (bswap_u64 self <: t_u64) + +let from_be16013635 (x: t_u64) : t_u64 = swap_bytes722254271 x + +let to_be376714729 (self: t_u64) : t_u64 = swap_bytes722254271 self + +let trailing_zeros188346231 (self: t_u64) : t_u32 = cttz_u64 self + +let count_ones926736261 (self: t_u128) : t_u32 = ctpop_u128 self + +let leading_zeros19644612 (self: t_u128) : t_u32 = ctlz_u128 self + +let swap_bytes420879368 (self: t_u128) : t_u128 = + Core.Convert.f_into #t_u128 #t_u128 #FStar.Tactics.Typeclasses.solve (bswap_u128 self <: t_u128) + +let from_be191085771 (x: t_u128) : t_u128 = swap_bytes420879368 x + +let to_be555075987 (self: t_u128) : t_u128 = swap_bytes420879368 self + +let trailing_zeros821715250 (self: t_u128) : t_u32 = cttz_u128 self + +let count_ones441645762 (self: t_usize) : t_u32 = ctpop_usize self + +let leading_zeros905233489 (self: t_usize) : t_u32 = ctlz_usize self + +let swap_bytes268673424 (self: t_usize) : t_usize = + Core.Convert.f_into #t_usize + #t_usize + #FStar.Tactics.Typeclasses.solve + (bswap_usize self <: t_usize) + +let from_be607978059 (x: t_usize) : t_usize = swap_bytes268673424 x + +let to_be561847134 (self: t_usize) : t_usize = swap_bytes268673424 self + +let trailing_zeros42066260 (self: t_usize) : t_u32 = cttz_usize self + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_48: Core.Ops.Arith.t_Div t_i8 t_i8 = + { + f_Output = t_i8; + f_div_pre = (fun (self: t_i8) (other: t_i8) -> true); + f_div_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); + f_div = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 /! other._0) <: t_i8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_49: Core.Ops.Arith.t_Div t_i16 t_i16 = + { + f_Output = t_i16; + f_div_pre = (fun (self: t_i16) (other: t_i16) -> true); + f_div_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); + f_div = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 /! other._0) <: t_i16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_50: Core.Ops.Arith.t_Div t_i32 t_i32 = + { + f_Output = t_i32; + f_div_pre = (fun (self: t_i32) (other: t_i32) -> true); + f_div_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); + f_div = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 /! other._0) <: t_i32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_51: Core.Ops.Arith.t_Div t_i64 t_i64 = + { + f_Output = t_i64; + f_div_pre = (fun (self: t_i64) (other: t_i64) -> true); + f_div_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); + f_div = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 /! other._0) <: t_i64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_52: Core.Ops.Arith.t_Div t_i128 t_i128 = + { + f_Output = t_i128; + f_div_pre = (fun (self: t_i128) (other: t_i128) -> true); + f_div_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); + f_div = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 /! other._0) <: t_i128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_53: Core.Ops.Arith.t_Div t_isize t_isize = + { + f_Output = t_isize; + f_div_pre = (fun (self: t_isize) (other: t_isize) -> true); + f_div_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); + f_div = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 /! other._0) <: t_isize + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_60: Core.Ops.Arith.t_Rem t_i8 t_i8 = + { + f_Output = t_i8; + f_rem_pre = (fun (self: t_i8) (other: t_i8) -> true); + f_rem_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); + f_rem = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 %! other._0) <: t_i8 + } + +let rem_euclid622298453 (self rhs: t_i8) : t_i8 = + let r:t_i8 = self %! (Core.Clone.f_clone #t_i8 #FStar.Tactics.Typeclasses.solve rhs <: t_i8) in + if r <. (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) + then wrapping_add634491935 r (wrapping_abs400396545 rhs <: t_i8) + else r + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_61: Core.Ops.Arith.t_Rem t_i16 t_i16 = + { + f_Output = t_i16; + f_rem_pre = (fun (self: t_i16) (other: t_i16) -> true); + f_rem_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); + f_rem = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 %! other._0) <: t_i16 + } + +let rem_euclid158017644 (self rhs: t_i16) : t_i16 = + let r:t_i16 = self %! (Core.Clone.f_clone #t_i16 #FStar.Tactics.Typeclasses.solve rhs <: t_i16) in + if r <. (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s <: t_i16) + then wrapping_add868559108 r (wrapping_abs229076826 rhs <: t_i16) + else r + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_62: Core.Ops.Arith.t_Rem t_i32 t_i32 = + { + f_Output = t_i32; + f_rem_pre = (fun (self: t_i32) (other: t_i32) -> true); + f_rem_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); + f_rem = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 %! other._0) <: t_i32 + } + +let rem_euclid881249982 (self rhs: t_i32) : t_i32 = + let r:t_i32 = self %! (Core.Clone.f_clone #t_i32 #FStar.Tactics.Typeclasses.solve rhs <: t_i32) in + if r <. (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l <: t_i32) + then wrapping_add475006616 r (wrapping_abs729536875 rhs <: t_i32) + else r + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_63: Core.Ops.Arith.t_Rem t_i64 t_i64 = + { + f_Output = t_i64; + f_rem_pre = (fun (self: t_i64) (other: t_i64) -> true); + f_rem_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); + f_rem = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 %! other._0) <: t_i64 + } + +let rem_euclid1057082210 (self rhs: t_i64) : t_i64 = + let r:t_i64 = self %! (Core.Clone.f_clone #t_i64 #FStar.Tactics.Typeclasses.solve rhs <: t_i64) in + if r <. (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L <: t_i64) + then wrapping_add590074241 r (wrapping_abs285829312 rhs <: t_i64) + else r + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_64: Core.Ops.Arith.t_Rem t_i128 t_i128 = + { + f_Output = t_i128; + f_rem_pre = (fun (self: t_i128) (other: t_i128) -> true); + f_rem_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); + f_rem = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 %! other._0) <: t_i128 + } + +let rem_euclid254910751 (self rhs: t_i128) : t_i128 = + let r:t_i128 = + self %! (Core.Clone.f_clone #t_i128 #FStar.Tactics.Typeclasses.solve rhs <: t_i128) + in + if + r <. (Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) <: t_i128) + then wrapping_add251385439 r (wrapping_abs281925696 rhs <: t_i128) + else r + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_65: Core.Ops.Arith.t_Rem t_isize t_isize = + { + f_Output = t_isize; + f_rem_pre = (fun (self: t_isize) (other: t_isize) -> true); + f_rem_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); + f_rem = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 %! other._0) <: t_isize + } + +let rem_euclid828379367 (self rhs: t_isize) : t_isize = + let r:t_isize = + self %! (Core.Clone.f_clone #t_isize #FStar.Tactics.Typeclasses.solve rhs <: t_isize) + in + if r <. (Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) <: t_isize) + then wrapping_add226040243 r (wrapping_abs347300819 rhs <: t_isize) + else r + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl: Core.Ops.Bit.t_Not t_u8 = + { + f_Output = t_u8; + f_not_pre = (fun (self: t_u8) -> true); + f_not_post = (fun (self: t_u8) (out: t_u8) -> true); + f_not = fun (self: t_u8) -> t_u8 ~.self._0 <: t_u8 + } + +let count_zeros558337492 (self: t_u8) : t_u32 = count_ones202509899 (~.self <: t_u8) + +let leading_ones55148479 (self: t_u8) : t_u32 = leading_zeros75047366 (~.self <: t_u8) + +let trailing_ones359778731 (self: t_u8) : t_u32 = trailing_zeros572929871 (~.self <: t_u8) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_1: Core.Ops.Bit.t_Not t_u16 = + { + f_Output = t_u16; + f_not_pre = (fun (self: t_u16) -> true); + f_not_post = (fun (self: t_u16) (out: t_u16) -> true); + f_not = fun (self: t_u16) -> t_u16 ~.self._0 <: t_u16 + } + +let count_zeros199825317 (self: t_u16) : t_u32 = count_ones91875752 (~.self <: t_u16) + +let leading_ones164277656 (self: t_u16) : t_u32 = leading_zeros462412478 (~.self <: t_u16) + +let trailing_ones903944727 (self: t_u16) : t_u32 = trailing_zeros421474733 (~.self <: t_u16) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_2: Core.Ops.Bit.t_Not t_u32 = + { + f_Output = t_u32; + f_not_pre = (fun (self: t_u32) -> true); + f_not_post = (fun (self: t_u32) (out: t_u32) -> true); + f_not = fun (self: t_u32) -> t_u32 ~.self._0 <: t_u32 + } + +let count_zeros942566041 (self: t_u32) : t_u32 = count_ones776185738 (~.self <: t_u32) + +let leading_ones766486760 (self: t_u32) : t_u32 = leading_zeros698221972 (~.self <: t_u32) + +let trailing_ones223371510 (self: t_u32) : t_u32 = trailing_zeros1061560720 (~.self <: t_u32) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_3: Core.Ops.Bit.t_Not t_u64 = + { + f_Output = t_u64; + f_not_pre = (fun (self: t_u64) -> true); + f_not_post = (fun (self: t_u64) (out: t_u64) -> true); + f_not = fun (self: t_u64) -> t_u64 ~.self._0 <: t_u64 + } + +let count_zeros60346158 (self: t_u64) : t_u32 = count_ones235885653 (~.self <: t_u64) + +let leading_ones404666910 (self: t_u64) : t_u32 = leading_zeros338302110 (~.self <: t_u64) + +let trailing_ones601201120 (self: t_u64) : t_u32 = trailing_zeros188346231 (~.self <: t_u64) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_4: Core.Ops.Bit.t_Not t_u128 = + { + f_Output = t_u128; + f_not_pre = (fun (self: t_u128) -> true); + f_not_post = (fun (self: t_u128) (out: t_u128) -> true); + f_not = fun (self: t_u128) -> t_u128 ~.self._0 <: t_u128 + } + +let count_zeros824862815 (self: t_u128) : t_u32 = count_ones926736261 (~.self <: t_u128) + +let leading_ones475503572 (self: t_u128) : t_u32 = leading_zeros19644612 (~.self <: t_u128) + +let trailing_ones705845381 (self: t_u128) : t_u32 = trailing_zeros821715250 (~.self <: t_u128) + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_5: Core.Ops.Bit.t_Not t_usize = + { + f_Output = t_usize; + f_not_pre = (fun (self: t_usize) -> true); + f_not_post = (fun (self: t_usize) (out: t_usize) -> true); + f_not = fun (self: t_usize) -> t_usize ~.self._0 <: t_usize + } + +let count_zeros73479642 (self: t_usize) : t_u32 = count_ones441645762 (~.self <: t_usize) + +let leading_ones667660708 (self: t_usize) : t_u32 = leading_zeros905233489 (~.self <: t_usize) + +let trailing_ones979548463 (self: t_usize) : t_u32 = trailing_zeros42066260 (~.self <: t_usize) diff --git a/proof-libs/fstar/generated-core/Core.Array.fst b/proof-libs/fstar/generated-core/Core.Array.fst index 5aeb49ad9..7528c5612 100644 --- a/proof-libs/fstar/generated-core/Core.Array.fst +++ b/proof-libs/fstar/generated-core/Core.Array.fst @@ -3,67 +3,12 @@ module Core.Array open Core open FStar.Mul -type t_TryFromSliceError = | TryFromSliceError : Prims.unit -> t_TryFromSliceError +include Core.Array.Rec_bundle_579704328 {t_TryFromSliceError as t_TryFromSliceError} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2 - (#v_T: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Clone.t_Clone (Core.Primitive.t_Array v_T v_N) = - { - f_clone_pre = (fun (self: Core.Primitive.t_Array v_T v_N) -> true); - f_clone_post - = - (fun (self: Core.Primitive.t_Array v_T v_N) (out: Core.Primitive.t_Array v_T v_N) -> true); - f_clone - = - fun (self: Core.Primitive.t_Array v_T v_N) -> - { - Core.Primitive.f_v - = - Core.Clone.f_clone #(Core.Primitive.t_Slice v_T) - #FStar.Tactics.Typeclasses.solve - self.Core.Primitive.f_v - } - <: - Core.Primitive.t_Array v_T v_N - } +include Core.Array.Rec_bundle_579704328 {_0 as _0} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1 - (#v_T #v_I: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (#[FStar.Tactics.Typeclasses.tcresolve ()] - i3: - Core.Ops.Index.t_Index (Core.Primitive.t_Slice v_T) v_I) - : Core.Ops.Index.t_Index (Core.Primitive.t_Array v_T v_N) v_I = - { - f_Output = i3.f_Output; - f_index_pre = (fun (self: Core.Primitive.t_Array v_T v_N) (index: v_I) -> true); - f_index_post - = - (fun (self: Core.Primitive.t_Array v_T v_N) (index: v_I) (out: i3.f_Output) -> true); - f_index - = - fun (self: Core.Primitive.t_Array v_T v_N) (index: v_I) -> - (Core.Primitive.impl_3__cast #v_T v_N self <: Core.Primitive.t_Slice v_T).[ index ] - } +include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl - (#v_T: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Convert.t_AsRef (Core.Primitive.t_Array v_T v_N) (Core.Primitive.t_Slice v_T) = - { - f_as_ref_pre = (fun (self: Core.Primitive.t_Array v_T v_N) -> true); - f_as_ref_post - = - (fun (self: Core.Primitive.t_Array v_T v_N) (out: Core.Primitive.t_Slice v_T) -> true); - f_as_ref - = - fun (self: Core.Primitive.t_Array v_T v_N) -> - self.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] - } +include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} + +include Core.Array.Rec_bundle_579704328 {impl as impl} diff --git a/proof-libs/fstar/generated-core/Core.Base.Binary.fst b/proof-libs/fstar/generated-core/Core.Base.Binary.fst index 9d4b38325..b2599d7bd 100644 --- a/proof-libs/fstar/generated-core/Core.Base.Binary.fst +++ b/proof-libs/fstar/generated-core/Core.Base.Binary.fst @@ -123,7 +123,7 @@ let rec positive_add__add (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) <: Core.Base.Spec.Binary.Positive.t_Positive) -let rec positive_add__add_carry (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) +and positive_add__add_carry (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) : Core.Base.Spec.Binary.Positive.t_Positive = match Core.Base.Spec.Binary.Positive.match_positive lhs with | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> diff --git a/proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst b/proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst index 74e412d50..6b8427f68 100644 --- a/proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst +++ b/proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst @@ -3,649 +3,74 @@ module Core.Base.Number_conversion open Core open FStar.Mul -let rec impl_24__from_u128_binary (x: u128) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.U128.ne x (pub_u128 0)) - (fun _ -> Prims.l_True) = - if Rust_primitives.U128.eq x (pub_u128 1) - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.U128.eq (Rust_primitives.U128.rem x (pub_u128 2) <: u128) (pub_u128 0) - then - Core.Base.Spec.Binary.Positive.xO (impl_24__from_u128_binary (Rust_primitives.U128.div x - (pub_u128 2) - <: - u128) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (impl_24__from_u128_binary (Rust_primitives.U128.div x - (pub_u128 2) - <: - u128) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u128 = - { - f_from_pre = (fun (x: u128) -> true); - f_from_post = (fun (x: u128) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: u128) -> - if Rust_primitives.U128.eq x (pub_u128 0) - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_u128_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Convert.t_From Core.Base.Spec.Z.t_Z i128 = - { - f_from_pre = (fun (x: i128) -> true); - f_from_post = (fun (x: i128) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: i128) -> - match Core.Cmp.f_cmp #i128 #FStar.Tactics.Typeclasses.solve x (pub_i128 0) with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG - (impl_24__from_u128_binary (Core.Num.impl__i128__unsigned_abs x <: u128)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS - (impl_24__from_u128_binary (Core.Num.impl__i128__unsigned_abs x <: u128)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec impl_24__from_u16_binary (x: u16) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.U16.ne x 0us) - (fun _ -> Prims.l_True) = - if Rust_primitives.U16.eq x 1us - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.U16.eq (Rust_primitives.U16.rem x 2us <: u16) 0us - then - Core.Base.Spec.Binary.Positive.xO (impl_24__from_u16_binary (Rust_primitives.U16.div x 2us - <: - u16) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (impl_24__from_u16_binary (Rust_primitives.U16.div x 2us - <: - u16) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u16 = - { - f_from_pre = (fun (x: u16) -> true); - f_from_post = (fun (x: u16) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: u16) -> - if Rust_primitives.U16.eq x 0us - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_u16_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Convert.t_From Core.Base.Spec.Z.t_Z i16 = - { - f_from_pre = (fun (x: i16) -> true); - f_from_post = (fun (x: i16) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: i16) -> - match Core.Cmp.f_cmp #i16 #FStar.Tactics.Typeclasses.solve x 0s with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG - (impl_24__from_u16_binary (Core.Num.impl__i16__unsigned_abs x <: u16)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS - (impl_24__from_u16_binary (Core.Num.impl__i16__unsigned_abs x <: u16)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec impl_24__from_u32_binary (x: u32) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.U32.ne x 0ul) - (fun _ -> Prims.l_True) = - if Rust_primitives.U32.eq x 1ul - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.U32.eq (Rust_primitives.U32.rem x 2ul <: u32) 0ul - then - Core.Base.Spec.Binary.Positive.xO (impl_24__from_u32_binary (Rust_primitives.U32.div x 2ul - <: - u32) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (impl_24__from_u32_binary (Rust_primitives.U32.div x 2ul - <: - u32) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u32 = - { - f_from_pre = (fun (x: u32) -> true); - f_from_post = (fun (x: u32) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: u32) -> - if Rust_primitives.U32.eq x 0ul - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_u32_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Convert.t_From Core.Base.Spec.Z.t_Z i32 = - { - f_from_pre = (fun (x: i32) -> true); - f_from_post = (fun (x: i32) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: i32) -> - match Core.Cmp.f_cmp #i32 #FStar.Tactics.Typeclasses.solve x 0l with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG - (impl_24__from_u32_binary (Core.Num.impl__i32__unsigned_abs x <: u32)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS - (impl_24__from_u32_binary (Core.Num.impl__i32__unsigned_abs x <: u32)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec impl_24__from_u64_binary (x: u64) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.U64.ne x 0uL) - (fun _ -> Prims.l_True) = - if Rust_primitives.U64.eq x 1uL - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.U64.eq (Rust_primitives.U64.rem x 2uL <: u64) 0uL - then - Core.Base.Spec.Binary.Positive.xO (impl_24__from_u64_binary (Rust_primitives.U64.div x 2uL - <: - u64) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (impl_24__from_u64_binary (Rust_primitives.U64.div x 2uL - <: - u64) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u64 = - { - f_from_pre = (fun (x: u64) -> true); - f_from_post = (fun (x: u64) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: u64) -> - if Rust_primitives.U64.eq x 0uL - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_u64_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Convert.t_From Core.Base.Spec.Z.t_Z i64 = - { - f_from_pre = (fun (x: i64) -> true); - f_from_post = (fun (x: i64) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: i64) -> - match Core.Cmp.f_cmp #i64 #FStar.Tactics.Typeclasses.solve x 0L with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG - (impl_24__from_u64_binary (Core.Num.impl__i64__unsigned_abs x <: u64)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS - (impl_24__from_u64_binary (Core.Num.impl__i64__unsigned_abs x <: u64)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec impl_24__from_u8_binary (x: u8) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.U8.ne x 0uy) - (fun _ -> Prims.l_True) = - if Rust_primitives.U8.eq x 1uy - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.U8.eq (Rust_primitives.U8.rem x 2uy <: u8) 0uy - then - Core.Base.Spec.Binary.Positive.xO (impl_24__from_u8_binary (Rust_primitives.U8.div x 2uy <: u8 - ) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (impl_24__from_u8_binary (Rust_primitives.U8.div x 2uy <: u8 - ) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u8 = - { - f_from_pre = (fun (x: u8) -> true); - f_from_post = (fun (x: u8) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: u8) -> - if Rust_primitives.U8.eq x 0uy - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_u8_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Convert.t_From Core.Base.Spec.Z.t_Z i8 = - { - f_from_pre = (fun (x: i8) -> true); - f_from_post = (fun (x: i8) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: i8) -> - match Core.Cmp.f_cmp #i8 #FStar.Tactics.Typeclasses.solve x 0y with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG (impl_24__from_u8_binary (Core.Num.impl__i8__unsigned_abs x <: u8)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS (impl_24__from_u8_binary (Core.Num.impl__i8__unsigned_abs x <: u8)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec impl_24__from_usize_binary (x: usize) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.Usize.ne x (sz 0)) - (fun _ -> Prims.l_True) = - if Rust_primitives.Usize.eq x (sz 1) - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.Usize.eq (Rust_primitives.Usize.rem x (sz 2) <: usize) (sz 0) - then - Core.Base.Spec.Binary.Positive.xO (impl_24__from_usize_binary (Rust_primitives.Usize.div x - (sz 2) - <: - usize) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (impl_24__from_usize_binary (Rust_primitives.Usize.div x - (sz 2) - <: - usize) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt usize = - { - f_from_pre = (fun (x: usize) -> true); - f_from_post = (fun (x: usize) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: usize) -> - if Rust_primitives.Usize.eq x (sz 0) - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (impl_24__from_usize_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Convert.t_From Core.Base.Spec.Z.t_Z isize = - { - f_from_pre = (fun (x: isize) -> true); - f_from_post = (fun (x: isize) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: isize) -> - match Core.Cmp.f_cmp #isize #FStar.Tactics.Typeclasses.solve x (isz 0) with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG - (impl_24__from_usize_binary (Core.Num.impl__isize__unsigned_abs x <: usize)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS - (impl_24__from_usize_binary (Core.Num.impl__isize__unsigned_abs x <: usize)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec impl_24__to_u128_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u128 = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> pub_u128 1 - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.U128.mul (impl_24__to_u128_binary p <: u128) (pub_u128 2) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.U128.add (Rust_primitives.U128.mul (impl_24__to_u128_binary p <: u128) - (pub_u128 2) - <: - u128) - (pub_u128 1) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Convert.t_From u128 Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u128) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> pub_u128 0 - | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_u128_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Convert.t_From i128 Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i128) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.I128.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U128.sub (impl_24__to_u128_binary - x - <: - u128) - (pub_u128 1) - <: - u128) - <: - i128) - <: - i128) - (pub_i128 1) - | Core.Base.Spec.Z.Z_ZERO -> pub_i128 0 - | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_u128_binary x <: u128) <: i128 - } - -let rec impl_24__to_u16_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u16 = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1us - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.U16.mul (impl_24__to_u16_binary p <: u16) 2us - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.U16.add (Rust_primitives.U16.mul (impl_24__to_u16_binary p <: u16) 2us <: u16) - 1us - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Convert.t_From u16 Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u16) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0us - | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_u16_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Convert.t_From i16 Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i16) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.I16.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U16.sub (impl_24__to_u16_binary - x - <: - u16) - 1us - <: - u16) - <: - i16) - <: - i16) - 1s - | Core.Base.Spec.Z.Z_ZERO -> 0s - | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_u16_binary x <: u16) <: i16 - } - -let rec impl_24__to_u32_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u32 = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1ul - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.U32.mul (impl_24__to_u32_binary p <: u32) 2ul - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.U32.add (Rust_primitives.U32.mul (impl_24__to_u32_binary p <: u32) 2ul <: u32) - 1ul - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Convert.t_From u32 Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u32) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0ul - | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_u32_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Convert.t_From i32 Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i32) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.I32.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U32.sub (impl_24__to_u32_binary - x - <: - u32) - 1ul - <: - u32) - <: - i32) - <: - i32) - 1l - | Core.Base.Spec.Z.Z_ZERO -> 0l - | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_u32_binary x <: u32) <: i32 - } - -let rec impl_24__to_u64_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u64 = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1uL - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.U64.mul (impl_24__to_u64_binary p <: u64) 2uL - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.U64.add (Rust_primitives.U64.mul (impl_24__to_u64_binary p <: u64) 2uL <: u64) - 1uL - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Convert.t_From u64 Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u64) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0uL - | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_u64_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Convert.t_From i64 Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i64) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.I64.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U64.sub (impl_24__to_u64_binary - x - <: - u64) - 1uL - <: - u64) - <: - i64) - <: - i64) - 1L - | Core.Base.Spec.Z.Z_ZERO -> 0L - | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_u64_binary x <: u64) <: i64 - } - -let rec impl_24__to_u8_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u8 = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1uy - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.U8.mul (impl_24__to_u8_binary p <: u8) 2uy - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.U8.add (Rust_primitives.U8.mul (impl_24__to_u8_binary p <: u8) 2uy <: u8) 1uy - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Convert.t_From u8 Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u8) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0uy - | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_u8_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Convert.t_From i8 Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i8) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.I8.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U8.sub (impl_24__to_u8_binary - x - <: - u8) - 1uy - <: - u8) - <: - i8) - <: - i8) - 1y - | Core.Base.Spec.Z.Z_ZERO -> 0y - | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_u8_binary x <: u8) <: i8 - } - -let rec impl_24__to_usize_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : usize = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> sz 1 - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.Usize.mul (impl_24__to_usize_binary p <: usize) (sz 2) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.Usize.add (Rust_primitives.Usize.mul (impl_24__to_usize_binary p <: usize) - (sz 2) - <: - usize) - (sz 1) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Convert.t_From usize Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: usize) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> sz 0 - | Core.Base.Spec.Binary.Pos.POS_POS p -> impl_24__to_usize_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Convert.t_From isize Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: isize) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.Isize.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.Usize.sub (impl_24__to_usize_binary - x - <: - usize) - (sz 1) - <: - usize) - <: - isize) - <: - isize) - (isz 1) - | Core.Base.Spec.Z.Z_ZERO -> isz 0 - | Core.Base.Spec.Z.Z_POS x -> cast (impl_24__to_usize_binary x <: usize) <: isize - } +include Core.Array.Rec_bundle_579704328 {from_u128_binary as impl_24__from_u128_binary} + +include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} + +include Core.Array.Rec_bundle_579704328 {impl_20 as impl_20} + +include Core.Array.Rec_bundle_579704328 {from_u16_binary as impl_24__from_u16_binary} + +include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} + +include Core.Array.Rec_bundle_579704328 {impl_14 as impl_14} + +include Core.Array.Rec_bundle_579704328 {from_u32_binary as impl_24__from_u32_binary} + +include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} + +include Core.Array.Rec_bundle_579704328 {impl_16 as impl_16} + +include Core.Array.Rec_bundle_579704328 {from_u64_binary as impl_24__from_u64_binary} + +include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} + +include Core.Array.Rec_bundle_579704328 {impl_18 as impl_18} + +include Core.Array.Rec_bundle_579704328 {from_u8_binary as impl_24__from_u8_binary} + +include Core.Array.Rec_bundle_579704328 {impl as impl} + +include Core.Array.Rec_bundle_579704328 {impl_12 as impl_12} + +include Core.Array.Rec_bundle_579704328 {from_usize_binary as impl_24__from_usize_binary} + +include Core.Array.Rec_bundle_579704328 {impl_10 as impl_10} + +include Core.Array.Rec_bundle_579704328 {impl_22 as impl_22} + +include Core.Array.Rec_bundle_579704328 {to_u128_binary as impl_24__to_u128_binary} + +include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} + +include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} + +include Core.Array.Rec_bundle_579704328 {to_u16_binary as impl_24__to_u16_binary} + +include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} + +include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} + +include Core.Array.Rec_bundle_579704328 {to_u32_binary as impl_24__to_u32_binary} + +include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} + +include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} + +include Core.Array.Rec_bundle_579704328 {to_u64_binary as impl_24__to_u64_binary} + +include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} + +include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} + +include Core.Array.Rec_bundle_579704328 {to_u8_binary as impl_24__to_u8_binary} + +include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} + +include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} + +include Core.Array.Rec_bundle_579704328 {to_usize_binary as impl_24__to_usize_binary} + +include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} + +include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} diff --git a/proof-libs/fstar/generated-core/Core.Base.Pos.fst b/proof-libs/fstar/generated-core/Core.Base.Pos.fst index d162b8707..267337919 100644 --- a/proof-libs/fstar/generated-core/Core.Base.Pos.fst +++ b/proof-libs/fstar/generated-core/Core.Base.Pos.fst @@ -3,6 +3,14 @@ module Core.Base.Pos open Core open FStar.Mul +let haxint_double (s: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos s with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Pos.POS_POS p -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + let haxint_shr__half (s: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = match Core.Base.Spec.Binary.Pos.match_pos s with | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO @@ -14,6 +22,14 @@ let haxint_shr__half (s: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> Core.Base.Spec.Binary.Positive.positive_to_int p +let haxint_sub__double_mask (lhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = + match Core.Base.Spec.Binary.Pos.match_pos lhs with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO + | Core.Base.Spec.Binary.Pos.POS_POS p -> + Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p + <: + Core.Base.Spec.Binary.Positive.t_Positive) + let haxint_sub__succ_double_mask (lhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = match Core.Base.Spec.Binary.Pos.match_pos lhs with @@ -30,22 +46,6 @@ let haxint_succ_double (s: Core.Base.Spec.Haxint.t_HaxInt) | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.xH | Core.Base.Spec.Binary.Pos.POS_POS p -> Core.Base.Spec.Binary.Positive.xI p -let haxint_double (s: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos s with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Pos.POS_POS p -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let haxint_sub__double_mask (lhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Pos.POS_POS p -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - let rec bitand_binary (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) : Core.Base.Spec.Haxint.t_HaxInt = match Core.Base.Spec.Binary.Positive.match_positive lhs with @@ -200,9 +200,7 @@ let haxint_lt (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : bool = | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true | _ -> false -let rec haxint_shl__shl_helper - (rhs: Core.Base.Spec.Unary.t_Unary) - (lhs: Core.Base.Spec.Haxint.t_HaxInt) +let rec haxint_shl__shl_helper (rhs: Core.Base.Spec.Unary.t_Unary) (lhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = if Core.Base.Spec.Haxint.is_zero (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt @@ -221,9 +219,7 @@ let haxint_shl (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint haxint_shl__shl_helper (Core.Base.Spec.Unary.unary_from_int rhs <: Core.Base.Spec.Unary.t_Unary) lhs -let rec haxint_shr__shr_helper - (rhs: Core.Base.Spec.Unary.t_Unary) - (lhs: Core.Base.Spec.Haxint.t_HaxInt) +let rec haxint_shr__shr_helper (rhs: Core.Base.Spec.Unary.t_Unary) (lhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = if Core.Base.Spec.Haxint.is_zero (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt @@ -428,7 +424,7 @@ let rec haxint_sub__sub_binary (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positi | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> haxint_sub__double_mask (haxint_sub__sub_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) -let rec haxint_sub__sub_carry (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) +and haxint_sub__sub_carry (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) : Core.Base.Spec.Haxint.t_HaxInt = match Core.Base.Spec.Binary.Positive.match_positive lhs with | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO diff --git a/proof-libs/fstar/generated-core/Core.Base.Seq.fst b/proof-libs/fstar/generated-core/Core.Base.Seq.fst index 776254ea5..0b6d938eb 100644 --- a/proof-libs/fstar/generated-core/Core.Base.Seq.fst +++ b/proof-libs/fstar/generated-core/Core.Base.Seq.fst @@ -9,24 +9,24 @@ let hd__panic_cold_explicit (_: Prims.unit) : Rust_primitives.Hax.t_Never = let set_index__set_index_unary__panic_cold_explicit (_: Prims.unit) : Rust_primitives.Hax.t_Never = Core.Panicking.panic_explicit () -let hd +let is_empty (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) (s: Core.Base.Spec.Seq.t_Seq v_T) - : Prims.Pure v_T (requires ~.(is_empty #v_T s <: bool)) (fun _ -> Prims.l_True) = + : bool = match Core.Base.Spec.Seq.match_list #v_T s with - | Core.Base.Spec.Seq.LIST_NIL -> - Rust_primitives.Hax.never_to_any (hd__panic_cold_explicit () <: Rust_primitives.Hax.t_Never) - | Core.Base.Spec.Seq.LIST_CONS hd _ -> hd + | Core.Base.Spec.Seq.LIST_NIL -> true + | Core.Base.Spec.Seq.LIST_CONS _ _ -> false -let is_empty +let hd (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) (s: Core.Base.Spec.Seq.t_Seq v_T) - : bool = + : Prims.Pure v_T (requires ~.(is_empty #v_T s <: bool)) (fun _ -> Prims.l_True) = match Core.Base.Spec.Seq.match_list #v_T s with - | Core.Base.Spec.Seq.LIST_NIL -> true - | Core.Base.Spec.Seq.LIST_CONS _ _ -> false + | Core.Base.Spec.Seq.LIST_NIL -> + Rust_primitives.Hax.never_to_any (hd__panic_cold_explicit () <: Rust_primitives.Hax.t_Never) + | Core.Base.Spec.Seq.LIST_CONS hd _ -> hd let tl (#v_T: Type0) diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst index aa92324dc..7bb9bd61f 100644 --- a/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst +++ b/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst @@ -5,6 +5,17 @@ open FStar.Mul type t_Positive = | Positive : Core.Base.Spec.Haxint.t_HaxInt -> t_Positive +type t_POSITIVE = + | POSITIVE_XH : t_POSITIVE + | POSITIVE_XO : t_Positive -> t_POSITIVE + | POSITIVE_XI : t_Positive -> t_POSITIVE + +let positive_from_int (x: Core.Base.Spec.Haxint.t_HaxInt) : t_Positive = Positive x <: t_Positive + +let positive_to_int (s: t_Positive) : Core.Base.Spec.Haxint.t_HaxInt = s._0 + +let xH: t_Positive = Positive Core.Base.Spec.Haxint.v_HaxInt_ONE <: t_Positive + [@@ FStar.Tactics.Typeclasses.tcinstance] let impl: Core.Clone.t_Clone t_Positive = { @@ -25,11 +36,6 @@ let impl: Core.Clone.t_Clone t_Positive = Rust_primitives.Hax.t_Never) } -type t_POSITIVE = - | POSITIVE_XH : t_POSITIVE - | POSITIVE_XO : t_Positive -> t_POSITIVE - | POSITIVE_XI : t_Positive -> t_POSITIVE - let match_positive__is_xH (s: t_Positive) : bool = Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) (sz 0) @@ -66,9 +72,29 @@ let match_positive__is_xO (s: t_Positive) : bool = <: Rust_primitives.Hax.t_Never) -let positive_from_int (x: Core.Base.Spec.Haxint.t_HaxInt) : t_Positive = Positive x <: t_Positive +let xI (s: t_Positive) : t_Positive = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) -let positive_to_int (s: t_Positive) : Core.Base.Spec.Haxint.t_HaxInt = s._0 +let xO (s: t_Positive) : t_Positive = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) let match_positive (s: t_Positive) : t_POSITIVE = if @@ -99,29 +125,3 @@ let match_positive (s: t_Positive) : t_POSITIVE = Core.Base.Spec.Haxint.t_HaxInt)) <: t_POSITIVE - -let xH: t_Positive = Positive Core.Base.Spec.Haxint.v_HaxInt_ONE <: t_Positive - -let xI (s: t_Positive) : t_Positive = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - -let xO (s: t_Positive) : t_Positive = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst index 35d672a0c..0912d71d0 100644 --- a/proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst +++ b/proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst @@ -3,92 +3,20 @@ module Core.Base.Spec.Seq open Core open FStar.Mul -type t_Seq (v_T: Type0) = { f_v:Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global } +include Core.Array.Rec_bundle_579704328 {t_Seq as t_Seq} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Clone.t_Clone (t_Seq v_T) = - { - f_clone_pre = (fun (self: t_Seq v_T) -> true); - f_clone_post = (fun (self: t_Seq v_T) (out: t_Seq v_T) -> true); - f_clone - = - fun (self: t_Seq v_T) -> - { - f_v - = - Core.Clone.f_clone #(Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global) - #FStar.Tactics.Typeclasses.solve - self.f_v - } - <: - t_Seq v_T - } +include Core.Array.Rec_bundle_579704328 {f_v as f_v} -type t_LIST (v_T: Type0) = - | LIST_NIL : t_LIST v_T - | LIST_CONS : v_T -> t_Seq v_T -> t_LIST v_T +include Core.Array.Rec_bundle_579704328 {impl as impl} -let nil - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (_: Prims.unit) - : t_Seq v_T = { f_v = Alloc.Vec.impl__new #v_T () } <: t_Seq v_T +include Core.Array.Rec_bundle_579704328 {t_LIST as t_LIST} -let cons - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: t_Seq v_T) - (t: v_T) - : t_Seq v_T = - { - f_v - = - Alloc.Slice.impl__concat #(t_Slice v_T) - #v_T - ((let list = - [ - (let list = [t] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list).[ Core.Ops.Range.RangeFull - <: - Core.Ops.Range.t_RangeFull ]; - s.f_v.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] - ] - in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); - Rust_primitives.Hax.array_of_list 2 list) - <: - t_Slice (t_Slice v_T)) - } - <: - t_Seq v_T +include Core.Array.Rec_bundle_579704328 {LIST_NIL as LIST_NIL} -let match_list - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: t_Seq v_T) - : t_LIST v_T = - if - Rust_primitives.Usize.eq (Alloc.Vec.impl_1__len #v_T #Alloc.Alloc.t_Global s.f_v <: usize) - (sz 0) - then LIST_NIL <: t_LIST v_T - else - LIST_CONS (Core.Clone.f_clone #v_T #FStar.Tactics.Typeclasses.solve (s.f_v.[ sz 0 ] <: v_T)) - ({ - f_v - = - Alloc.Slice.impl__concat #(t_Slice v_T) - #v_T - ((let list = - [s.f_v.[ { Core.Ops.Range.f_start = sz 1 } <: Core.Ops.Range.t_RangeFrom usize ]] - in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice (t_Slice v_T)) - } - <: - t_Seq v_T) - <: - t_LIST v_T +include Core.Array.Rec_bundle_579704328 {LIST_CONS as LIST_CONS} + +include Core.Array.Rec_bundle_579704328 {nil as nil} + +include Core.Array.Rec_bundle_579704328 {cons as cons} + +include Core.Array.Rec_bundle_579704328 {match_list as match_list} diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst index 0f02c995b..9bae9d16a 100644 --- a/proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst +++ b/proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst @@ -5,6 +5,14 @@ open FStar.Mul type t_Unary = | Unary : Core.Base.Spec.Haxint.t_HaxInt -> t_Unary +type t_UNARY = + | UNARY_ZERO : t_UNARY + | UNARY_SUCC : t_Unary -> t_UNARY + +let unary_from_int (x: Core.Base.Spec.Haxint.t_HaxInt) : t_Unary = Unary x <: t_Unary + +let unary_to_int (s: t_Unary) : Core.Base.Spec.Haxint.t_HaxInt = s._0 + [@@ FStar.Tactics.Typeclasses.tcinstance] let impl: Core.Clone.t_Clone t_Unary = { @@ -25,10 +33,6 @@ let impl: Core.Clone.t_Clone t_Unary = Rust_primitives.Hax.t_Never) } -type t_UNARY = - | UNARY_ZERO : t_UNARY - | UNARY_SUCC : t_Unary -> t_UNARY - let pred (x: t_Unary) : t_Unary = Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) (sz 0) @@ -41,22 +45,6 @@ let pred (x: t_Unary) : t_Unary = <: Rust_primitives.Hax.t_Never) -let succ (x: t_Unary) : t_Unary = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - -let unary_from_int (x: Core.Base.Spec.Haxint.t_HaxInt) : t_Unary = Unary x <: t_Unary - -let unary_to_int (s: t_Unary) : Core.Base.Spec.Haxint.t_HaxInt = s._0 - let match_unary (s: t_Unary) : t_UNARY = if Core.Base.Spec.Haxint.is_zero (unary_to_int (Core.Clone.f_clone #t_Unary @@ -68,3 +56,15 @@ let match_unary (s: t_Unary) : t_UNARY = Core.Base.Spec.Haxint.t_HaxInt) then UNARY_ZERO <: t_UNARY else UNARY_SUCC (pred s) <: t_UNARY + +let succ (x: t_Unary) : t_Unary = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) + (sz 0) + (let list = ["not yet implemented: specification needed"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) diff --git a/proof-libs/fstar/generated-core/Core.Base.Z.fst b/proof-libs/fstar/generated-core/Core.Base.Z.fst index e7edf06b7..f8acae7a7 100644 --- a/proof-libs/fstar/generated-core/Core.Base.Z.fst +++ b/proof-libs/fstar/generated-core/Core.Base.Z.fst @@ -3,6 +3,23 @@ module Core.Base.Z open Core open FStar.Mul +let z_neg (x: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = + match x with + | Core.Base.Spec.Z.Z_NEG p -> Core.Base.Spec.Z.Z_POS p <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z + | Core.Base.Spec.Z.Z_POS p -> Core.Base.Spec.Z.Z_NEG p <: Core.Base.Spec.Z.t_Z + +let z_bitor__n_succ (x: Core.Base.Spec.Binary.Pos.t_POS) : Core.Base.Spec.Binary.Positive.t_Positive = + match x with + | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.xH + | Core.Base.Spec.Binary.Pos.POS_POS p -> + Core.Base.Spec.Binary.Positive.positive_from_int (Core.Base.Spec.Haxint.succ (Core.Base.Spec.Binary.Positive.positive_to_int + p + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Base.Spec.Haxint.t_HaxInt) + let z_add__z_double (s: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = match s with | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z @@ -33,23 +50,6 @@ let z_bitor__haxint_ldiff__n_succ_double (x: Core.Base.Spec.Binary.Pos.t_POS) <: Core.Base.Spec.Binary.Pos.t_POS -let z_bitor__n_succ (x: Core.Base.Spec.Binary.Pos.t_POS) : Core.Base.Spec.Binary.Positive.t_Positive = - match x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.xH - | Core.Base.Spec.Binary.Pos.POS_POS p -> - Core.Base.Spec.Binary.Positive.positive_from_int (Core.Base.Spec.Haxint.succ (Core.Base.Spec.Binary.Positive.positive_to_int - p - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - -let z_neg (x: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - match x with - | Core.Base.Spec.Z.Z_NEG p -> Core.Base.Spec.Z.Z_POS p <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS p -> Core.Base.Spec.Z.Z_NEG p <: Core.Base.Spec.Z.t_Z - let z_add__z_pred_double (s: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = match s with | Core.Base.Spec.Z.Z_ZERO -> diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst index 250730625..c829e1248 100644 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst @@ -3,6 +3,13 @@ module Core.Base_interface.Coerce open Core open FStar.Mul +class t_Concretization (v_Self: Type0) (v_T: Type0) = { + f_concretize_pre:v_Self -> Type0; + f_concretize_post:v_Self -> v_T -> Type0; + f_concretize:x0: v_Self + -> Prims.Pure v_T (f_concretize_pre x0) (fun result -> f_concretize_post x0 result) +} + class t_Abstraction (v_Self: Type0) = { f_AbstractType:Type0; f_lift_pre:v_Self -> Type0; @@ -10,10 +17,3 @@ class t_Abstraction (v_Self: Type0) = { f_lift:x0: v_Self -> Prims.Pure f_AbstractType (f_lift_pre x0) (fun result -> f_lift_post x0 result) } - -class t_Concretization (v_Self: Type0) (v_T: Type0) = { - f_concretize_pre:v_Self -> Type0; - f_concretize_post:v_Self -> v_T -> Type0; - f_concretize:x0: v_Self - -> Prims.Pure v_T (f_concretize_pre x0) (fun result -> f_concretize_post x0 result) -} diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst index 46c880bb7..5eca1bab0 100644 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst @@ -137,8 +137,15 @@ let mod_mul (x y z: Core.Base_interface.Int.t_U128) let mod_one (x: Core.Base_interface.Int.t_U128) : Lemma Prims.l_True (ensures - (x %! Core.Base_interface.Int.f_ONE <: Core.Base_interface.Int.t_U128) =. - Core.Base_interface.Int.f_ZERO) = () + (x %! + (Core.Base_interface.Int.f_ONE #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U128) + <: + Core.Base_interface.Int.t_U128) =. + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U128)) = () let mod_sub (x y z: Core.Base_interface.Int.t_U128) : Lemma Prims.l_True diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst index 490134128..8e0153bb5 100644 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst @@ -137,8 +137,15 @@ let mod_mul (x y z: Core.Base_interface.Int.t_U16) let mod_one (x: Core.Base_interface.Int.t_U16) : Lemma Prims.l_True (ensures - (x %! Core.Base_interface.Int.f_ONE <: Core.Base_interface.Int.t_U16) =. - Core.Base_interface.Int.f_ZERO) = () + (x %! + (Core.Base_interface.Int.f_ONE #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U16) + <: + Core.Base_interface.Int.t_U16) =. + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U16)) = () let mod_sub (x y z: Core.Base_interface.Int.t_U16) : Lemma Prims.l_True diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst index e6d45b9dd..89f493b40 100644 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst @@ -137,8 +137,15 @@ let mod_mul (x y z: Core.Base_interface.Int.t_U32) let mod_one (x: Core.Base_interface.Int.t_U32) : Lemma Prims.l_True (ensures - (x %! Core.Base_interface.Int.f_ONE <: Core.Base_interface.Int.t_U32) =. - Core.Base_interface.Int.f_ZERO) = () + (x %! + (Core.Base_interface.Int.f_ONE #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U32) + <: + Core.Base_interface.Int.t_U32) =. + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U32)) = () let mod_sub (x y z: Core.Base_interface.Int.t_U32) : Lemma Prims.l_True diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst index 40b746075..08f3dcc1b 100644 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst @@ -137,8 +137,15 @@ let mod_mul (x y z: Core.Base_interface.Int.t_U64) let mod_one (x: Core.Base_interface.Int.t_U64) : Lemma Prims.l_True (ensures - (x %! Core.Base_interface.Int.f_ONE <: Core.Base_interface.Int.t_U64) =. - Core.Base_interface.Int.f_ZERO) = () + (x %! + (Core.Base_interface.Int.f_ONE #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U64) + <: + Core.Base_interface.Int.t_U64) =. + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U64)) = () let mod_sub (x y z: Core.Base_interface.Int.t_U64) : Lemma Prims.l_True diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst index a562a9589..98d6ce9d0 100644 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst @@ -133,8 +133,15 @@ let mod_mul (x y z: Core.Base_interface.Int.t_U8) let mod_one (x: Core.Base_interface.Int.t_U8) : Lemma Prims.l_True (ensures - (x %! Core.Base_interface.Int.f_ONE <: Core.Base_interface.Int.t_U8) =. - Core.Base_interface.Int.f_ZERO) = () + (x %! + (Core.Base_interface.Int.f_ONE #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U8) + <: + Core.Base_interface.Int.t_U8) =. + (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve + <: + Core.Base_interface.Int.t_U8)) = () let mod_sub (x y z: Core.Base_interface.Int.t_U8) : Lemma Prims.l_True diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.fst index a3b35a54b..d2a8ebb92 100644 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.fst +++ b/proof-libs/fstar/generated-core/Core.Base_interface.Int.fst @@ -10,1363 +10,1467 @@ class t_Constants (v_Self: Type0) = { f_MAX:v_Self } -let impl_41__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_128_ - -let impl_55__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_64_ +type t_I128 = { f_v:Core.Base.Spec.Z.t_Z } -let impl_69__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_32_ +type t_I16 = { f_v:Core.Base.Spec.Z.t_Z } -let impl_83__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_16_ +type t_I32 = { f_v:Core.Base.Spec.Z.t_Z } -let impl_97__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_8_ +type t_I64 = { f_v:Core.Base.Spec.Z.t_Z } -let impl_111__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_128_ +type t_I8 = { f_v:Core.Base.Spec.Z.t_Z } -let impl_138__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_64_ +type t_U128 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } -let impl_165__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_32_ +type t_U16 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } -let impl_192__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_16_ +type t_U32 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } -let impl_219__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_8_ +type t_U64 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } -type t_U128 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } +type t_U8 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_110: t_Constants t_U128 = +let impl_43: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I128 = { - f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U128; - f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U128; - f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U128; - f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_128_SUB_1_ } <: t_U128 + f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I128) -> true); + f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I128 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_134: Core.Clone.t_Clone t_U128 = +let impl_51: Core.Clone.t_Clone t_I128 = { - f_clone_pre = (fun (self: t_U128) -> true); - f_clone_post = (fun (self: t_U128) (out: t_U128) -> true); + f_clone_pre = (fun (self: t_I128) -> true); + f_clone_post = (fun (self: t_I128) (out: t_I128) -> true); f_clone = - fun (self: t_U128) -> - { - f_v - = - Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v - } + fun (self: t_I128) -> + { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } <: - t_U128 + t_I128 } -type t_U16 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } - [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_191: t_Constants t_U16 = +let impl_57: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I64 = { - f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U16; - f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U16; - f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U16; - f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_16_SUB_1_ } <: t_U16 + f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I64) -> true); + f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I64 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_215: Core.Clone.t_Clone t_U16 = +let impl_65: Core.Clone.t_Clone t_I64 = { - f_clone_pre = (fun (self: t_U16) -> true); - f_clone_post = (fun (self: t_U16) (out: t_U16) -> true); + f_clone_pre = (fun (self: t_I64) -> true); + f_clone_post = (fun (self: t_I64) (out: t_I64) -> true); f_clone = - fun (self: t_U16) -> - { - f_v - = - Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v - } + fun (self: t_I64) -> + { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } <: - t_U16 + t_I64 } -type t_U32 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } - -let impl_41__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_128_ } <: t_U32 - -let impl_55__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_64_ } <: t_U32 - -let impl_69__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_32_ } <: t_U32 - -let impl_83__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_16_ } <: t_U32 - -let impl_97__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_8_ } <: t_U32 - -let impl_111__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_128_ } <: t_U32 - -let impl_138__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_64_ } <: t_U32 - [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_164: t_Constants t_U32 = +let impl_71: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I32 = { - f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U32; - f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U32; - f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U32; - f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_32_SUB_1_ } <: t_U32 + f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I32) -> true); + f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I32 } -let impl_165__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_32_ } <: t_U32 - [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_188: Core.Clone.t_Clone t_U32 = +let impl_79: Core.Clone.t_Clone t_I32 = { - f_clone_pre = (fun (self: t_U32) -> true); - f_clone_post = (fun (self: t_U32) (out: t_U32) -> true); + f_clone_pre = (fun (self: t_I32) -> true); + f_clone_post = (fun (self: t_I32) (out: t_I32) -> true); f_clone = - fun (self: t_U32) -> - { - f_v - = - Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v - } + fun (self: t_I32) -> + { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } <: - t_U32 + t_I32 } -let impl_192__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_16_ } <: t_U32 - -let impl_219__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_8_ } <: t_U32 - -type t_U64 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } - [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_137: t_Constants t_U64 = +let impl_85: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I16 = { - f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U64; - f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U64; - f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U64; - f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_64_SUB_1_ } <: t_U64 + f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I16) -> true); + f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I16 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_161: Core.Clone.t_Clone t_U64 = +let impl_93: Core.Clone.t_Clone t_I16 = { - f_clone_pre = (fun (self: t_U64) -> true); - f_clone_post = (fun (self: t_U64) (out: t_U64) -> true); + f_clone_pre = (fun (self: t_I16) -> true); + f_clone_post = (fun (self: t_I16) (out: t_I16) -> true); f_clone = - fun (self: t_U64) -> - { - f_v - = - Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v - } + fun (self: t_I16) -> + { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } <: - t_U64 + t_I16 } -type t_U8 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } - [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_218: t_Constants t_U8 = +let impl_99: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I8 = { - f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U8; - f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U8; - f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U8; - f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_8_SUB_1_ } <: t_U8 + f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); + f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I8) -> true); + f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I8 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_242: Core.Clone.t_Clone t_U8 = +let impl_107: Core.Clone.t_Clone t_I8 = { - f_clone_pre = (fun (self: t_U8) -> true); - f_clone_post = (fun (self: t_U8) (out: t_U8) -> true); + f_clone_pre = (fun (self: t_I8) -> true); + f_clone_post = (fun (self: t_I8) (out: t_I8) -> true); f_clone = - fun (self: t_U8) -> - { - f_v - = - Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v - } + fun (self: t_I8) -> + { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } <: - t_U8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_112: Core.Base_interface.Coerce.t_Abstraction t_U128 = - { - f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; - f_lift_pre = (fun (self: t_U128) -> true); - f_lift_post = (fun (self: t_U128) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_lift = fun (self: t_U128) -> self.f_v + t_I8 } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_135: Core.Cmp.t_PartialEq t_U128 t_U128 = +let impl_40: t_Constants t_I128 = { - f_eq_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_eq_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_eq + f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I128; + f_ONE = - (fun (self: t_U128) (rhs: t_U128) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_ne_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_ne + { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } + <: + t_I128; + f_MIN = - fun (self: t_U128) (rhs: t_U128) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) + { + f_v + = + Core.Base.Spec.Z.Z_NEG + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_64_ <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I128; + f_MAX + = + { + f_v + = + Core.Base.Spec.Z.Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_64_SUB_1_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I128 } +let impl_41__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_128_ } <: t_U32 + +let impl_41__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_128_ + [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_136: Core.Cmp.t_PartialOrd t_U128 t_U128 = +let impl_54: t_Constants t_I64 = { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_partial_cmp_post + f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I64; + f_ONE = - (fun (self: t_U128) (rhs: t_U128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp + { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } + <: + t_I64; + f_MIN = - (fun (self: t_U128) (rhs: t_U128) -> - Core.Option.Option_Some - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt)) + { + f_v + = + Core.Base.Spec.Z.Z_NEG + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_32_ <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_lt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_lt - = - (fun (self: t_U128) (rhs: t_U128) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_le_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_le - = - (fun (self: t_U128) (rhs: t_U128) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_gt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_gt - = - (fun (self: t_U128) (rhs: t_U128) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_ge_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_ge + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I64; + f_MAX = - fun (self: t_U128) (rhs: t_U128) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false + { + f_v + = + Core.Base.Spec.Z.Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_32_SUB_1_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I64 } +let impl_55__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_64_ } <: t_U32 + +let impl_55__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_64_ + [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_139: Core.Base_interface.Coerce.t_Abstraction t_U64 = +let impl_68: t_Constants t_I32 = { - f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; - f_lift_pre = (fun (self: t_U64) -> true); - f_lift_post = (fun (self: t_U64) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_lift = fun (self: t_U64) -> self.f_v + f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I32; + f_ONE + = + { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } + <: + t_I32; + f_MIN + = + { + f_v + = + Core.Base.Spec.Z.Z_NEG + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_16_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I32; + f_MAX + = + { + f_v + = + Core.Base.Spec.Z.Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_16_SUB_1_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I32 } +let impl_69__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_32_ } <: t_U32 + +let impl_69__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_32_ + [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_162: Core.Cmp.t_PartialEq t_U64 t_U64 = +let impl_82: t_Constants t_I16 = { - f_eq_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_eq_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_eq + f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I16; + f_ONE = - (fun (self: t_U64) (rhs: t_U64) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_ne_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_ne + { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } + <: + t_I16; + f_MIN = - fun (self: t_U64) (rhs: t_U64) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) + { + f_v + = + Core.Base.Spec.Z.Z_NEG + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_8_ <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I16; + f_MAX + = + { + f_v + = + Core.Base.Spec.Z.Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_8_SUB_1_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I16 } +let impl_83__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_16_ } <: t_U32 + +let impl_83__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_16_ + [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_163: Core.Cmp.t_PartialOrd t_U64 t_U64 = +let impl_96: t_Constants t_I8 = { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_partial_cmp_post + f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I8; + f_ONE = - (fun (self: t_U64) (rhs: t_U64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp + { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } + <: + t_I8; + f_MIN = - (fun (self: t_U64) (rhs: t_U64) -> - Core.Option.Option_Some - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt)) + { + f_v + = + Core.Base.Spec.Z.Z_NEG + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_4_ <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_lt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_lt + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I8; + f_MAX = - (fun (self: t_U64) (rhs: t_U64) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_le_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_le + { + f_v + = + Core.Base.Spec.Z.Z_POS + (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_4_SUB_1_ + <: + Core.Base.Spec.Binary.Positive.t_Positive) + <: + Core.Base.Spec.Z.t_Z + } + <: + t_I8 + } + +let impl_97__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_8_ } <: t_U32 + +let impl_97__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_8_ + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_110: t_Constants t_U128 = + { + f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U128; + f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U128; + f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U128; + f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_128_SUB_1_ } <: t_U128 + } + +let impl_111__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_128_ } <: t_U32 + +let impl_111__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_128_ + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_137: t_Constants t_U64 = + { + f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U64; + f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U64; + f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U64; + f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_64_SUB_1_ } <: t_U64 + } + +let impl_138__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_64_ } <: t_U32 + +let impl_138__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_64_ + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_164: t_Constants t_U32 = + { + f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U32; + f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U32; + f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U32; + f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_32_SUB_1_ } <: t_U32 + } + +let impl_165__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_32_ } <: t_U32 + +let impl_165__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_32_ + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_191: t_Constants t_U16 = + { + f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U16; + f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U16; + f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U16; + f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_16_SUB_1_ } <: t_U16 + } + +let impl_192__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_16_ } <: t_U32 + +let impl_192__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_16_ + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_218: t_Constants t_U8 = + { + f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U8; + f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U8; + f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U8; + f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_8_SUB_1_ } <: t_U8 + } + +let impl_219__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_8_ } <: t_U32 + +let impl_219__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_8_ + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_134: Core.Clone.t_Clone t_U128 = + { + f_clone_pre = (fun (self: t_U128) -> true); + f_clone_post = (fun (self: t_U128) (out: t_U128) -> true); + f_clone = - (fun (self: t_U64) (rhs: t_U64) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_gt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_gt + fun (self: t_U128) -> + { + f_v + = + Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v + } + <: + t_U128 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_161: Core.Clone.t_Clone t_U64 = + { + f_clone_pre = (fun (self: t_U64) -> true); + f_clone_post = (fun (self: t_U64) (out: t_U64) -> true); + f_clone = - (fun (self: t_U64) (rhs: t_U64) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_ge_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_ge + fun (self: t_U64) -> + { + f_v + = + Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v + } + <: + t_U64 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_188: Core.Clone.t_Clone t_U32 = + { + f_clone_pre = (fun (self: t_U32) -> true); + f_clone_post = (fun (self: t_U32) (out: t_U32) -> true); + f_clone + = + fun (self: t_U32) -> + { + f_v + = + Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v + } + <: + t_U32 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_215: Core.Clone.t_Clone t_U16 = + { + f_clone_pre = (fun (self: t_U16) -> true); + f_clone_post = (fun (self: t_U16) (out: t_U16) -> true); + f_clone + = + fun (self: t_U16) -> + { + f_v + = + Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v + } + <: + t_U16 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_242: Core.Clone.t_Clone t_U8 = + { + f_clone_pre = (fun (self: t_U8) -> true); + f_clone_post = (fun (self: t_U8) (out: t_U8) -> true); + f_clone + = + fun (self: t_U8) -> + { + f_v + = + Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v + } + <: + t_U8 + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_42: Core.Base_interface.Coerce.t_Abstraction t_I128 = + { + f_AbstractType = Core.Base.Spec.Z.t_Z; + f_lift_pre = (fun (self: t_I128) -> true); + f_lift_post = (fun (self: t_I128) (out: Core.Base.Spec.Z.t_Z) -> true); + f_lift = fun (self: t_I128) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_36: Core.Convert.t_From t_I8 t_I128 = + { + f_from_pre = (fun (x: t_I128) -> true); + f_from_post = (fun (x: t_I128) (out: t_I8) -> true); + f_from + = + fun (x: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_37: Core.Convert.t_From t_I16 t_I128 = + { + f_from_pre = (fun (x: t_I128) -> true); + f_from_post = (fun (x: t_I128) (out: t_I16) -> true); + f_from = - fun (self: t_U64) (rhs: t_U64) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false + fun (x: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_166: Core.Base_interface.Coerce.t_Abstraction t_U32 = +let impl_38: Core.Convert.t_From t_I32 t_I128 = { - f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; - f_lift_pre = (fun (self: t_U32) -> true); - f_lift_post = (fun (self: t_U32) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_lift = fun (self: t_U32) -> self.f_v + f_from_pre = (fun (x: t_I128) -> true); + f_from_post = (fun (x: t_I128) (out: t_I32) -> true); + f_from + = + fun (x: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_189: Core.Cmp.t_PartialEq t_U32 t_U32 = +let impl_39: Core.Convert.t_From t_I64 t_I128 = { - f_eq_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_eq_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_from_pre = (fun (x: t_I128) -> true); + f_from_post = (fun (x: t_I128) (out: t_I64) -> true); + f_from + = + fun (x: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_52: Core.Cmp.t_PartialEq t_I128 t_I128 = + { + f_eq_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_eq_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); f_eq = - (fun (self: t_U32) (rhs: t_U32) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + (fun (self: t_I128) (rhs: t_I128) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) <: Core.Cmp.t_Ordering) =. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_ne_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_ne_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_ne_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); f_ne = - fun (self: t_U32) (rhs: t_U32) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + fun (self: t_I128) (rhs: t_I128) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) <: Core.Cmp.t_Ordering) <>. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_190: Core.Cmp.t_PartialOrd t_U32 t_U32 = +let impl_53: Core.Cmp.t_PartialOrd t_I128 t_I128 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_partial_cmp_pre = (fun (self: t_I128) (rhs: t_I128) -> true); f_partial_cmp_post = - (fun (self: t_U32) (rhs: t_U32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + (fun (self: t_I128) (rhs: t_I128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); f_partial_cmp = - (fun (self: t_U32) (rhs: t_U32) -> + (fun (self: t_I128) (rhs: t_I128) -> Core.Option.Option_Some - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt)) + Core.Base.Spec.Z.t_Z)) <: Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_lt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_lt_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_lt_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); f_lt = - (fun (self: t_U32) (rhs: t_U32) -> + (fun (self: t_I128) (rhs: t_I128) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Less -> true | _ -> false); - f_le_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_le_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_le_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_le_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); f_le = - (fun (self: t_U32) (rhs: t_U32) -> + (fun (self: t_I128) (rhs: t_I128) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true | _ -> false); - f_gt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_gt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_gt_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_gt_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); f_gt = - (fun (self: t_U32) (rhs: t_U32) -> + (fun (self: t_I128) (rhs: t_I128) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Greater -> true | _ -> false); - f_ge_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_ge_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_ge_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_ge_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); f_ge = - fun (self: t_U32) (rhs: t_U32) -> + fun (self: t_I128) (rhs: t_I128) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true | _ -> false } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_193: Core.Base_interface.Coerce.t_Abstraction t_U16 = +let impl_56: Core.Base_interface.Coerce.t_Abstraction t_I64 = { - f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; - f_lift_pre = (fun (self: t_U16) -> true); - f_lift_post = (fun (self: t_U16) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_lift = fun (self: t_U16) -> self.f_v + f_AbstractType = Core.Base.Spec.Z.t_Z; + f_lift_pre = (fun (self: t_I64) -> true); + f_lift_post = (fun (self: t_I64) (out: Core.Base.Spec.Z.t_Z) -> true); + f_lift = fun (self: t_I64) -> self.f_v + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_32: Core.Convert.t_From t_I8 t_I64 = + { + f_from_pre = (fun (x: t_I64) -> true); + f_from_post = (fun (x: t_I64) (out: t_I8) -> true); + f_from + = + fun (x: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_33: Core.Convert.t_From t_I16 t_I64 = + { + f_from_pre = (fun (x: t_I64) -> true); + f_from_post = (fun (x: t_I64) (out: t_I16) -> true); + f_from + = + fun (x: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_34: Core.Convert.t_From t_I32 t_I64 = + { + f_from_pre = (fun (x: t_I64) -> true); + f_from_post = (fun (x: t_I64) (out: t_I32) -> true); + f_from + = + fun (x: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_35: Core.Convert.t_From t_I128 t_I64 = + { + f_from_pre = (fun (x: t_I64) -> true); + f_from_post = (fun (x: t_I64) (out: t_I128) -> true); + f_from + = + fun (x: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_216: Core.Cmp.t_PartialEq t_U16 t_U16 = +let impl_66: Core.Cmp.t_PartialEq t_I64 t_I64 = { - f_eq_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_eq_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_eq_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_eq_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); f_eq = - (fun (self: t_U16) (rhs: t_U16) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + (fun (self: t_I64) (rhs: t_I64) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) <: Core.Cmp.t_Ordering) =. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_ne_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_ne_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_ne_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); f_ne = - fun (self: t_U16) (rhs: t_U16) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + fun (self: t_I64) (rhs: t_I64) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) <: Core.Cmp.t_Ordering) <>. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_217: Core.Cmp.t_PartialOrd t_U16 t_U16 = +let impl_67: Core.Cmp.t_PartialOrd t_I64 t_I64 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_partial_cmp_pre = (fun (self: t_I64) (rhs: t_I64) -> true); f_partial_cmp_post = - (fun (self: t_U16) (rhs: t_U16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + (fun (self: t_I64) (rhs: t_I64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); f_partial_cmp = - (fun (self: t_U16) (rhs: t_U16) -> + (fun (self: t_I64) (rhs: t_I64) -> Core.Option.Option_Some - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt)) + Core.Base.Spec.Z.t_Z)) <: Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_lt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_lt_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_lt_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); f_lt = - (fun (self: t_U16) (rhs: t_U16) -> + (fun (self: t_I64) (rhs: t_I64) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Less -> true | _ -> false); - f_le_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_le_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_le_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_le_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); f_le = - (fun (self: t_U16) (rhs: t_U16) -> + (fun (self: t_I64) (rhs: t_I64) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true | _ -> false); - f_gt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_gt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_gt_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_gt_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); f_gt = - (fun (self: t_U16) (rhs: t_U16) -> + (fun (self: t_I64) (rhs: t_I64) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Greater -> true | _ -> false); - f_ge_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_ge_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); + f_ge_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_ge_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); f_ge = - fun (self: t_U16) (rhs: t_U16) -> + fun (self: t_I64) (rhs: t_I64) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) + (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true | _ -> false } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_220: Core.Base_interface.Coerce.t_Abstraction t_U8 = +let impl_70: Core.Base_interface.Coerce.t_Abstraction t_I32 = { - f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; - f_lift_pre = (fun (self: t_U8) -> true); - f_lift_post = (fun (self: t_U8) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_lift = fun (self: t_U8) -> self.f_v + f_AbstractType = Core.Base.Spec.Z.t_Z; + f_lift_pre = (fun (self: t_I32) -> true); + f_lift_post = (fun (self: t_I32) (out: Core.Base.Spec.Z.t_Z) -> true); + f_lift = fun (self: t_I32) -> self.f_v } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_243: Core.Cmp.t_PartialEq t_U8 t_U8 = +let impl_28: Core.Convert.t_From t_I8 t_I32 = { - f_eq_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_eq_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_from_pre = (fun (x: t_I32) -> true); + f_from_post = (fun (x: t_I32) (out: t_I8) -> true); + f_from + = + fun (x: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_29: Core.Convert.t_From t_I16 t_I32 = + { + f_from_pre = (fun (x: t_I32) -> true); + f_from_post = (fun (x: t_I32) (out: t_I16) -> true); + f_from + = + fun (x: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_30: Core.Convert.t_From t_I64 t_I32 = + { + f_from_pre = (fun (x: t_I32) -> true); + f_from_post = (fun (x: t_I32) (out: t_I64) -> true); + f_from + = + fun (x: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_31: Core.Convert.t_From t_I128 t_I32 = + { + f_from_pre = (fun (x: t_I32) -> true); + f_from_post = (fun (x: t_I32) (out: t_I128) -> true); + f_from + = + fun (x: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_80: Core.Cmp.t_PartialEq t_I32 t_I32 = + { + f_eq_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_eq_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); f_eq = - (fun (self: t_U8) (rhs: t_U8) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + (fun (self: t_I32) (rhs: t_I32) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) <: Core.Cmp.t_Ordering) =. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_ne_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_ne_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_ne_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); f_ne = - fun (self: t_U8) (rhs: t_U8) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + fun (self: t_I32) (rhs: t_I32) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) <: Core.Cmp.t_Ordering) <>. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_244: Core.Cmp.t_PartialOrd t_U8 t_U8 = +let impl_81: Core.Cmp.t_PartialOrd t_I32 t_I32 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_partial_cmp_pre = (fun (self: t_I32) (rhs: t_I32) -> true); f_partial_cmp_post = - (fun (self: t_U8) (rhs: t_U8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + (fun (self: t_I32) (rhs: t_I32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); f_partial_cmp = - (fun (self: t_U8) (rhs: t_U8) -> + (fun (self: t_I32) (rhs: t_I32) -> Core.Option.Option_Some - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt)) + Core.Base.Spec.Z.t_Z)) <: Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_lt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_lt_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_lt_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); f_lt = - (fun (self: t_U8) (rhs: t_U8) -> + (fun (self: t_I32) (rhs: t_I32) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Less -> true | _ -> false); - f_le_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_le_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_le_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_le_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); f_le = - (fun (self: t_U8) (rhs: t_U8) -> + (fun (self: t_I32) (rhs: t_I32) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true | _ -> false); - f_gt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_gt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_gt_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_gt_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); f_gt = - (fun (self: t_U8) (rhs: t_U8) -> + (fun (self: t_I32) (rhs: t_I32) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Greater -> true | _ -> false); - f_ge_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_ge_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); + f_ge_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_ge_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); f_ge = - fun (self: t_U8) (rhs: t_U8) -> + fun (self: t_I32) (rhs: t_I32) -> match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) + (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) <: - Core.Base.Spec.Haxint.t_HaxInt) + Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -type t_I128 = { f_v:Core.Base.Spec.Z.t_Z } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: t_Constants t_I128 = - { - f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I128; - f_ONE - = - { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } - <: - t_I128; - f_MIN - = - { - f_v - = - Core.Base.Spec.Z.Z_NEG - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_64_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I128; - f_MAX - = - { - f_v - = - Core.Base.Spec.Z.Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_64_SUB_1_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_43: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I128 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I128) -> true); - f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_51: Core.Clone.t_Clone t_I128 = - { - f_clone_pre = (fun (self: t_I128) -> true); - f_clone_post = (fun (self: t_I128) (out: t_I128) -> true); - f_clone - = - fun (self: t_I128) -> - { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_I128 - } - -type t_I16 = { f_v:Core.Base.Spec.Z.t_Z } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_82: t_Constants t_I16 = - { - f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I16; - f_ONE - = - { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } - <: - t_I16; - f_MIN - = - { - f_v - = - Core.Base.Spec.Z.Z_NEG - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_8_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I16; - f_MAX - = - { - f_v - = - Core.Base.Spec.Z.Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_8_SUB_1_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_85: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I16 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I16) -> true); - f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_93: Core.Clone.t_Clone t_I16 = - { - f_clone_pre = (fun (self: t_I16) -> true); - f_clone_post = (fun (self: t_I16) (out: t_I16) -> true); - f_clone - = - fun (self: t_I16) -> - { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_I16 - } - -type t_I32 = { f_v:Core.Base.Spec.Z.t_Z } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_68: t_Constants t_I32 = - { - f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I32; - f_ONE - = - { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } - <: - t_I32; - f_MIN - = - { - f_v - = - Core.Base.Spec.Z.Z_NEG - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_16_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I32; - f_MAX - = - { - f_v - = - Core.Base.Spec.Z.Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_16_SUB_1_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I32 + | _ -> false } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_71: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I32 = +let impl_84: Core.Base_interface.Coerce.t_Abstraction t_I16 = { - f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I32) -> true); - f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I32 + f_AbstractType = Core.Base.Spec.Z.t_Z; + f_lift_pre = (fun (self: t_I16) -> true); + f_lift_post = (fun (self: t_I16) (out: Core.Base.Spec.Z.t_Z) -> true); + f_lift = fun (self: t_I16) -> self.f_v } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_79: Core.Clone.t_Clone t_I32 = +let impl_24: Core.Convert.t_From t_I8 t_I16 = { - f_clone_pre = (fun (self: t_I32) -> true); - f_clone_post = (fun (self: t_I32) (out: t_I32) -> true); - f_clone + f_from_pre = (fun (x: t_I16) -> true); + f_from_post = (fun (x: t_I16) (out: t_I8) -> true); + f_from = - fun (self: t_I32) -> - { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_I32 + fun (x: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I8 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) } -type t_I64 = { f_v:Core.Base.Spec.Z.t_Z } - [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_54: t_Constants t_I64 = +let impl_25: Core.Convert.t_From t_I32 t_I16 = { - f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I64; - f_ONE - = - { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } - <: - t_I64; - f_MIN - = - { - f_v - = - Core.Base.Spec.Z.Z_NEG - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_32_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I64; - f_MAX + f_from_pre = (fun (x: t_I16) -> true); + f_from_post = (fun (x: t_I16) (out: t_I32) -> true); + f_from = - { - f_v - = - Core.Base.Spec.Z.Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_32_SUB_1_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I64 + fun (x: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_57: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I64 = +let impl_26: Core.Convert.t_From t_I64 t_I16 = { - f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I64) -> true); - f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I64 + f_from_pre = (fun (x: t_I16) -> true); + f_from_post = (fun (x: t_I16) (out: t_I64) -> true); + f_from + = + fun (x: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_65: Core.Clone.t_Clone t_I64 = +let impl_27: Core.Convert.t_From t_I128 t_I16 = { - f_clone_pre = (fun (self: t_I64) -> true); - f_clone_post = (fun (self: t_I64) (out: t_I64) -> true); - f_clone + f_from_pre = (fun (x: t_I16) -> true); + f_from_post = (fun (x: t_I16) (out: t_I128) -> true); + f_from = - fun (self: t_I64) -> - { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_I64 + fun (x: t_I16) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x + <: + Core.Base.Spec.Z.t_Z) } -type t_I8 = { f_v:Core.Base.Spec.Z.t_Z } - [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_96: t_Constants t_I8 = +let impl_94: Core.Cmp.t_PartialEq t_I16 t_I16 = { - f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I8; - f_ONE - = - { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } - <: - t_I8; - f_MIN + f_eq_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_eq_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_eq = - { - f_v - = - Core.Base.Spec.Z.Z_NEG - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_4_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I8; - f_MAX + (fun (self: t_I16) (rhs: t_I16) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_ne_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_ne = - { - f_v - = - Core.Base.Spec.Z.Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_4_SUB_1_ + fun (self: t_I16) (rhs: t_I16) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_99: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I8 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I8) -> true); - f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I8 + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_107: Core.Clone.t_Clone t_I8 = +let impl_95: Core.Cmp.t_PartialOrd t_I16 t_I16 = { - f_clone_pre = (fun (self: t_I8) -> true); - f_clone_post = (fun (self: t_I8) (out: t_I8) -> true); - f_clone + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_partial_cmp_post + = + (fun (self: t_I16) (rhs: t_I16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_I16) (rhs: t_I16) -> + Core.Option.Option_Some + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_lt_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_lt + = + (fun (self: t_I16) (rhs: t_I16) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_le_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_le + = + (fun (self: t_I16) (rhs: t_I16) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_gt_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_gt + = + (fun (self: t_I16) (rhs: t_I16) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_ge_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_ge = - fun (self: t_I8) -> - { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_I8 + fun (self: t_I16) (rhs: t_I16) -> + match + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_42: Core.Base_interface.Coerce.t_Abstraction t_I128 = +let impl_98: Core.Base_interface.Coerce.t_Abstraction t_I8 = { f_AbstractType = Core.Base.Spec.Z.t_Z; - f_lift_pre = (fun (self: t_I128) -> true); - f_lift_post = (fun (self: t_I128) (out: Core.Base.Spec.Z.t_Z) -> true); - f_lift = fun (self: t_I128) -> self.f_v + f_lift_pre = (fun (self: t_I8) -> true); + f_lift_post = (fun (self: t_I8) (out: Core.Base.Spec.Z.t_Z) -> true); + f_lift = fun (self: t_I8) -> self.f_v } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Convert.t_From t_I8 t_I128 = +let impl_20: Core.Convert.t_From t_I16 t_I8 = { - f_from_pre = (fun (x: t_I128) -> true); - f_from_post = (fun (x: t_I128) (out: t_I8) -> true); + f_from_pre = (fun (x: t_I8) -> true); + f_from_post = (fun (x: t_I8) (out: t_I16) -> true); f_from = - fun (x: t_I128) -> + fun (x: t_I8) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 + #t_I16 #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Convert.t_From t_I16 t_I128 = +let impl_21: Core.Convert.t_From t_I32 t_I8 = { - f_from_pre = (fun (x: t_I128) -> true); - f_from_post = (fun (x: t_I128) (out: t_I16) -> true); + f_from_pre = (fun (x: t_I8) -> true); + f_from_post = (fun (x: t_I8) (out: t_I32) -> true); f_from = - fun (x: t_I128) -> + fun (x: t_I8) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 + #t_I32 #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Convert.t_From t_I32 t_I128 = +let impl_22: Core.Convert.t_From t_I64 t_I8 = { - f_from_pre = (fun (x: t_I128) -> true); - f_from_post = (fun (x: t_I128) (out: t_I32) -> true); + f_from_pre = (fun (x: t_I8) -> true); + f_from_post = (fun (x: t_I8) (out: t_I64) -> true); f_from = - fun (x: t_I128) -> + fun (x: t_I8) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 + #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Convert.t_From t_I64 t_I128 = +let impl_23: Core.Convert.t_From t_I128 t_I8 = { - f_from_pre = (fun (x: t_I128) -> true); - f_from_post = (fun (x: t_I128) (out: t_I64) -> true); + f_from_pre = (fun (x: t_I8) -> true); + f_from_post = (fun (x: t_I8) (out: t_I128) -> true); f_from = - fun (x: t_I128) -> + fun (x: t_I8) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 + #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x <: Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_52: Core.Cmp.t_PartialEq t_I128 t_I128 = +let impl_108: Core.Cmp.t_PartialEq t_I8 t_I8 = { - f_eq_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_eq_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_eq_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_eq_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); f_eq = - (fun (self: t_I128) (rhs: t_I128) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + (fun (self: t_I8) (rhs: t_I8) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) <: Core.Base.Spec.Z.t_Z) <: Core.Cmp.t_Ordering) =. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_ne_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_ne_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_ne_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); f_ne = - fun (self: t_I128) (rhs: t_I128) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + fun (self: t_I8) (rhs: t_I8) -> + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) <: Core.Base.Spec.Z.t_Z) <: @@ -1375,1058 +1479,1086 @@ let impl_52: Core.Cmp.t_PartialEq t_I128 t_I128 = } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_53: Core.Cmp.t_PartialOrd t_I128 t_I128 = +let impl_109: Core.Cmp.t_PartialOrd t_I8 t_I8 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_partial_cmp_pre = (fun (self: t_I8) (rhs: t_I8) -> true); f_partial_cmp_post = - (fun (self: t_I128) (rhs: t_I128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + (fun (self: t_I8) (rhs: t_I8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); f_partial_cmp = - (fun (self: t_I128) (rhs: t_I128) -> + (fun (self: t_I8) (rhs: t_I8) -> Core.Option.Option_Some - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) <: Core.Base.Spec.Z.t_Z)) <: Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_lt_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_lt_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_lt_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); f_lt = - (fun (self: t_I128) (rhs: t_I128) -> + (fun (self: t_I8) (rhs: t_I8) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) <: Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Less -> true | _ -> false); - f_le_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_le_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_le_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_le_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); f_le = - (fun (self: t_I128) (rhs: t_I128) -> + (fun (self: t_I8) (rhs: t_I8) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) <: Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true | _ -> false); - f_gt_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_gt_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_gt_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_gt_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); f_gt = - (fun (self: t_I128) (rhs: t_I128) -> + (fun (self: t_I8) (rhs: t_I8) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) <: Core.Base.Spec.Z.t_Z) with | Core.Cmp.Ordering_Greater -> true | _ -> false); - f_ge_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_ge_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); + f_ge_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_ge_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); f_ge = - fun (self: t_I128) (rhs: t_I128) -> + fun (self: t_I8) (rhs: t_I8) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 + Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_56: Core.Base_interface.Coerce.t_Abstraction t_I64 = - { - f_AbstractType = Core.Base.Spec.Z.t_Z; - f_lift_pre = (fun (self: t_I64) -> true); - f_lift_post = (fun (self: t_I64) (out: Core.Base.Spec.Z.t_Z) -> true); - f_lift = fun (self: t_I64) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Convert.t_From t_I8 t_I64 = - { - f_from_pre = (fun (x: t_I64) -> true); - f_from_post = (fun (x: t_I64) (out: t_I8) -> true); - f_from - = - fun (x: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Convert.t_From t_I16 t_I64 = - { - f_from_pre = (fun (x: t_I64) -> true); - f_from_post = (fun (x: t_I64) (out: t_I16) -> true); - f_from - = - fun (x: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Convert.t_From t_I32 t_I64 = - { - f_from_pre = (fun (x: t_I64) -> true); - f_from_post = (fun (x: t_I64) (out: t_I32) -> true); - f_from - = - fun (x: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) + (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + <: + Core.Base.Spec.Z.t_Z) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Convert.t_From t_I128 t_I64 = +let impl_112: Core.Base_interface.Coerce.t_Abstraction t_U128 = { - f_from_pre = (fun (x: t_I64) -> true); - f_from_post = (fun (x: t_I64) (out: t_I128) -> true); - f_from - = - fun (x: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) + f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; + f_lift_pre = (fun (self: t_U128) -> true); + f_lift_post = (fun (self: t_U128) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_lift = fun (self: t_U128) -> self.f_v } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_66: Core.Cmp.t_PartialEq t_I64 t_I64 = +let impl_135: Core.Cmp.t_PartialEq t_U128 t_U128 = { - f_eq_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_eq_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_eq_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_eq_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); f_eq = - (fun (self: t_I64) (rhs: t_I64) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + (fun (self: t_U128) (rhs: t_U128) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) <: Core.Cmp.t_Ordering) =. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_ne_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_ne_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_ne_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); f_ne = - fun (self: t_I64) (rhs: t_I64) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + fun (self: t_U128) (rhs: t_U128) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) <: Core.Cmp.t_Ordering) <>. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_67: Core.Cmp.t_PartialOrd t_I64 t_I64 = +let impl_136: Core.Cmp.t_PartialOrd t_U128 t_U128 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_partial_cmp_pre = (fun (self: t_U128) (rhs: t_U128) -> true); f_partial_cmp_post = - (fun (self: t_I64) (rhs: t_I64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + (fun (self: t_U128) (rhs: t_U128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); f_partial_cmp = - (fun (self: t_I64) (rhs: t_I64) -> + (fun (self: t_U128) (rhs: t_U128) -> Core.Option.Option_Some - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) <: - Core.Base.Spec.Z.t_Z)) + Core.Base.Spec.Haxint.t_HaxInt)) <: Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_lt_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_lt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_lt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); f_lt = - (fun (self: t_I64) (rhs: t_I64) -> + (fun (self: t_U128) (rhs: t_U128) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Less -> true | _ -> false); - f_le_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_le_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_le_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_le_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); f_le = - (fun (self: t_I64) (rhs: t_I64) -> + (fun (self: t_U128) (rhs: t_U128) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true | _ -> false); - f_gt_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_gt_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_gt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_gt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); f_gt = - (fun (self: t_I64) (rhs: t_I64) -> + (fun (self: t_U128) (rhs: t_U128) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Greater -> true | _ -> false); - f_ge_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_ge_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); + f_ge_pre = (fun (self: t_U128) (rhs: t_U128) -> true); + f_ge_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); f_ge = - fun (self: t_I64) (rhs: t_I64) -> + fun (self: t_U128) (rhs: t_U128) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) + (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true | _ -> false } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_70: Core.Base_interface.Coerce.t_Abstraction t_I32 = - { - f_AbstractType = Core.Base.Spec.Z.t_Z; - f_lift_pre = (fun (self: t_I32) -> true); - f_lift_post = (fun (self: t_I32) (out: Core.Base.Spec.Z.t_Z) -> true); - f_lift = fun (self: t_I32) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Convert.t_From t_I8 t_I32 = - { - f_from_pre = (fun (x: t_I32) -> true); - f_from_post = (fun (x: t_I32) (out: t_I8) -> true); - f_from - = - fun (x: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Convert.t_From t_I16 t_I32 = - { - f_from_pre = (fun (x: t_I32) -> true); - f_from_post = (fun (x: t_I32) (out: t_I16) -> true); - f_from - = - fun (x: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Convert.t_From t_I64 t_I32 = - { - f_from_pre = (fun (x: t_I32) -> true); - f_from_post = (fun (x: t_I32) (out: t_I64) -> true); - f_from - = - fun (x: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Convert.t_From t_I128 t_I32 = +let impl_139: Core.Base_interface.Coerce.t_Abstraction t_U64 = { - f_from_pre = (fun (x: t_I32) -> true); - f_from_post = (fun (x: t_I32) (out: t_I128) -> true); - f_from - = - fun (x: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) + f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; + f_lift_pre = (fun (self: t_U64) -> true); + f_lift_post = (fun (self: t_U64) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_lift = fun (self: t_U64) -> self.f_v } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_80: Core.Cmp.t_PartialEq t_I32 t_I32 = +let impl_162: Core.Cmp.t_PartialEq t_U64 t_U64 = { - f_eq_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_eq_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_eq_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_eq_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); f_eq = - (fun (self: t_I32) (rhs: t_I32) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + (fun (self: t_U64) (rhs: t_U64) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) <: Core.Cmp.t_Ordering) =. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_ne_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_ne_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_ne_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); f_ne = - fun (self: t_I32) (rhs: t_I32) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + fun (self: t_U64) (rhs: t_U64) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) <: Core.Cmp.t_Ordering) <>. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_81: Core.Cmp.t_PartialOrd t_I32 t_I32 = +let impl_163: Core.Cmp.t_PartialOrd t_U64 t_U64 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_partial_cmp_pre = (fun (self: t_U64) (rhs: t_U64) -> true); f_partial_cmp_post = - (fun (self: t_I32) (rhs: t_I32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + (fun (self: t_U64) (rhs: t_U64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); f_partial_cmp = - (fun (self: t_I32) (rhs: t_I32) -> + (fun (self: t_U64) (rhs: t_U64) -> Core.Option.Option_Some - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) <: - Core.Base.Spec.Z.t_Z)) + Core.Base.Spec.Haxint.t_HaxInt)) <: Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_lt_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_lt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_lt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); f_lt = - (fun (self: t_I32) (rhs: t_I32) -> + (fun (self: t_U64) (rhs: t_U64) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Less -> true | _ -> false); - f_le_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_le_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_le_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_le_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); f_le = - (fun (self: t_I32) (rhs: t_I32) -> + (fun (self: t_U64) (rhs: t_U64) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true | _ -> false); - f_gt_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_gt_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_gt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_gt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); f_gt = - (fun (self: t_I32) (rhs: t_I32) -> + (fun (self: t_U64) (rhs: t_U64) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Greater -> true | _ -> false); - f_ge_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_ge_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); + f_ge_pre = (fun (self: t_U64) (rhs: t_U64) -> true); + f_ge_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); f_ge = - fun (self: t_I32) (rhs: t_I32) -> + fun (self: t_U64) (rhs: t_U64) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) + (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true | _ -> false } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_84: Core.Base_interface.Coerce.t_Abstraction t_I16 = +let impl_166: Core.Base_interface.Coerce.t_Abstraction t_U32 = { - f_AbstractType = Core.Base.Spec.Z.t_Z; - f_lift_pre = (fun (self: t_I16) -> true); - f_lift_post = (fun (self: t_I16) (out: Core.Base.Spec.Z.t_Z) -> true); - f_lift = fun (self: t_I16) -> self.f_v + f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; + f_lift_pre = (fun (self: t_U32) -> true); + f_lift_post = (fun (self: t_U32) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_lift = fun (self: t_U32) -> self.f_v } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Convert.t_From t_I8 t_I16 = +let impl_189: Core.Cmp.t_PartialEq t_U32 t_U32 = { - f_from_pre = (fun (x: t_I16) -> true); - f_from_post = (fun (x: t_I16) (out: t_I8) -> true); - f_from + f_eq_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_eq_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_eq = - fun (x: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x + (fun (self: t_U32) (rhs: t_U32) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Convert.t_From t_I32 t_I16 = - { - f_from_pre = (fun (x: t_I16) -> true); - f_from_post = (fun (x: t_I16) (out: t_I32) -> true); - f_from + Core.Cmp.t_Ordering) =. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); + f_ne_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_ne_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_ne = - fun (x: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) + fun (self: t_U32) (rhs: t_U32) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + <: + Core.Cmp.t_Ordering) <>. + (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Convert.t_From t_I64 t_I16 = +let impl_190: Core.Cmp.t_PartialOrd t_U32 t_U32 = { - f_from_pre = (fun (x: t_I16) -> true); - f_from_post = (fun (x: t_I16) (out: t_I64) -> true); - f_from + _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; + f_partial_cmp_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_partial_cmp_post = - fun (x: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) + (fun (self: t_U32) (rhs: t_U32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + f_partial_cmp + = + (fun (self: t_U32) (rhs: t_U32) -> + Core.Option.Option_Some + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt)) + <: + Core.Option.t_Option Core.Cmp.t_Ordering); + f_lt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_lt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_lt + = + (fun (self: t_U32) (rhs: t_U32) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less -> true + | _ -> false); + f_le_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_le_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_le + = + (fun (self: t_U32) (rhs: t_U32) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true + | _ -> false); + f_gt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_gt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_gt + = + (fun (self: t_U32) (rhs: t_U32) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater -> true + | _ -> false); + f_ge_pre = (fun (self: t_U32) (rhs: t_U32) -> true); + f_ge_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); + f_ge + = + fun (self: t_U32) (rhs: t_U32) -> + match + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U32 + #FStar.Tactics.Typeclasses.solve + (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) + <: + Core.Base.Spec.Haxint.t_HaxInt) + with + | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true + | _ -> false } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Convert.t_From t_I128 t_I16 = +let impl_193: Core.Base_interface.Coerce.t_Abstraction t_U16 = { - f_from_pre = (fun (x: t_I16) -> true); - f_from_post = (fun (x: t_I16) (out: t_I128) -> true); - f_from - = - fun (x: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) + f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; + f_lift_pre = (fun (self: t_U16) -> true); + f_lift_post = (fun (self: t_U16) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_lift = fun (self: t_U16) -> self.f_v } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_94: Core.Cmp.t_PartialEq t_I16 t_I16 = +let impl_216: Core.Cmp.t_PartialEq t_U16 t_U16 = { - f_eq_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_eq_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_eq_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_eq_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); f_eq = - (fun (self: t_I16) (rhs: t_I16) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + (fun (self: t_U16) (rhs: t_U16) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) <: Core.Cmp.t_Ordering) =. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_ne_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_ne_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_ne_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); f_ne = - fun (self: t_I16) (rhs: t_I16) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + fun (self: t_U16) (rhs: t_U16) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) <: Core.Cmp.t_Ordering) <>. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_95: Core.Cmp.t_PartialOrd t_I16 t_I16 = +let impl_217: Core.Cmp.t_PartialOrd t_U16 t_U16 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_partial_cmp_pre = (fun (self: t_U16) (rhs: t_U16) -> true); f_partial_cmp_post = - (fun (self: t_I16) (rhs: t_I16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + (fun (self: t_U16) (rhs: t_U16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); f_partial_cmp = - (fun (self: t_I16) (rhs: t_I16) -> + (fun (self: t_U16) (rhs: t_U16) -> Core.Option.Option_Some - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) <: - Core.Base.Spec.Z.t_Z)) + Core.Base.Spec.Haxint.t_HaxInt)) <: Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_lt_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_lt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_lt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); f_lt = - (fun (self: t_I16) (rhs: t_I16) -> + (fun (self: t_U16) (rhs: t_U16) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Less -> true | _ -> false); - f_le_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_le_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_le_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_le_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); f_le = - (fun (self: t_I16) (rhs: t_I16) -> + (fun (self: t_U16) (rhs: t_U16) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true | _ -> false); - f_gt_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_gt_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_gt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_gt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); f_gt = - (fun (self: t_I16) (rhs: t_I16) -> + (fun (self: t_U16) (rhs: t_U16) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Greater -> true | _ -> false); - f_ge_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_ge_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); + f_ge_pre = (fun (self: t_U16) (rhs: t_U16) -> true); + f_ge_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); f_ge = - fun (self: t_I16) (rhs: t_I16) -> + fun (self: t_U16) (rhs: t_U16) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) + (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true | _ -> false } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_98: Core.Base_interface.Coerce.t_Abstraction t_I8 = - { - f_AbstractType = Core.Base.Spec.Z.t_Z; - f_lift_pre = (fun (self: t_I8) -> true); - f_lift_post = (fun (self: t_I8) (out: Core.Base.Spec.Z.t_Z) -> true); - f_lift = fun (self: t_I8) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Convert.t_From t_I16 t_I8 = - { - f_from_pre = (fun (x: t_I8) -> true); - f_from_post = (fun (x: t_I8) (out: t_I16) -> true); - f_from - = - fun (x: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Convert.t_From t_I32 t_I8 = - { - f_from_pre = (fun (x: t_I8) -> true); - f_from_post = (fun (x: t_I8) (out: t_I32) -> true); - f_from - = - fun (x: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Convert.t_From t_I64 t_I8 = - { - f_from_pre = (fun (x: t_I8) -> true); - f_from_post = (fun (x: t_I8) (out: t_I64) -> true); - f_from - = - fun (x: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Convert.t_From t_I128 t_I8 = +let impl_220: Core.Base_interface.Coerce.t_Abstraction t_U8 = { - f_from_pre = (fun (x: t_I8) -> true); - f_from_post = (fun (x: t_I8) (out: t_I128) -> true); - f_from - = - fun (x: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) + f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; + f_lift_pre = (fun (self: t_U8) -> true); + f_lift_post = (fun (self: t_U8) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); + f_lift = fun (self: t_U8) -> self.f_v } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_108: Core.Cmp.t_PartialEq t_I8 t_I8 = +let impl_243: Core.Cmp.t_PartialEq t_U8 t_U8 = { - f_eq_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_eq_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_eq_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_eq_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); f_eq = - (fun (self: t_I8) (rhs: t_I8) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + (fun (self: t_U8) (rhs: t_U8) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) <: Core.Cmp.t_Ordering) =. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_ne_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_ne_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_ne_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); f_ne = - fun (self: t_I8) (rhs: t_I8) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + fun (self: t_U8) (rhs: t_U8) -> + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) <: Core.Cmp.t_Ordering) <>. (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_109: Core.Cmp.t_PartialOrd t_I8 t_I8 = +let impl_244: Core.Cmp.t_PartialOrd t_U8 t_U8 = { _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_partial_cmp_pre = (fun (self: t_U8) (rhs: t_U8) -> true); f_partial_cmp_post = - (fun (self: t_I8) (rhs: t_I8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); + (fun (self: t_U8) (rhs: t_U8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); f_partial_cmp = - (fun (self: t_I8) (rhs: t_I8) -> + (fun (self: t_U8) (rhs: t_U8) -> Core.Option.Option_Some - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) <: - Core.Base.Spec.Z.t_Z)) + Core.Base.Spec.Haxint.t_HaxInt)) <: Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_lt_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_lt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_lt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); f_lt = - (fun (self: t_I8) (rhs: t_I8) -> + (fun (self: t_U8) (rhs: t_U8) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Less -> true | _ -> false); - f_le_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_le_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_le_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_le_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); f_le = - (fun (self: t_I8) (rhs: t_I8) -> + (fun (self: t_U8) (rhs: t_U8) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true | _ -> false); - f_gt_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_gt_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_gt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_gt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); f_gt = - (fun (self: t_I8) (rhs: t_I8) -> + (fun (self: t_U8) (rhs: t_U8) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Greater -> true | _ -> false); - f_ge_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_ge_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); + f_ge_pre = (fun (self: t_U8) (rhs: t_U8) -> true); + f_ge_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); f_ge = - fun (self: t_I8) (rhs: t_I8) -> + fun (self: t_U8) (rhs: t_U8) -> match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 + Core.Base.Spec.Haxint.t_HaxInt) + (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) + (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) <: - Core.Base.Spec.Z.t_Z) + Core.Base.Spec.Haxint.t_HaxInt) with | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true | _ -> false } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_46: Core.Ops.Arith.t_Add t_I128 t_I128 = +let impl_48: Core.Ops.Arith.t_Neg t_I128 = { f_Output = t_I128; - f_add_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_add_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); - f_add + f_neg_pre = (fun (self: t_I128) -> true); + f_neg_post = (fun (self: t_I128) (out: t_I128) -> true); + f_neg + = + fun (self: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_50: Core.Ops.Bit.t_BitOr t_I128 t_I128 = + { + f_Output = t_I128; + f_bitor_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_bitor_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); + f_bitor + = + fun (self: t_I128) (rhs: t_I128) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I128 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I128 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_62: Core.Ops.Arith.t_Neg t_I64 = + { + f_Output = t_I64; + f_neg_pre = (fun (self: t_I64) -> true); + f_neg_post = (fun (self: t_I64) (out: t_I64) -> true); + f_neg + = + fun (self: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_64: Core.Ops.Bit.t_BitOr t_I64 t_I64 = + { + f_Output = t_I64; + f_bitor_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_bitor_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); + f_bitor + = + fun (self: t_I64) (rhs: t_I64) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I64 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I64 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_76: Core.Ops.Arith.t_Neg t_I32 = + { + f_Output = t_I32; + f_neg_pre = (fun (self: t_I32) -> true); + f_neg_post = (fun (self: t_I32) (out: t_I32) -> true); + f_neg + = + fun (self: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_78: Core.Ops.Bit.t_BitOr t_I32 t_I32 = + { + f_Output = t_I32; + f_bitor_pre = (fun (self: t_I32) (rhs: t_I32) -> true); + f_bitor_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); + f_bitor + = + fun (self: t_I32) (rhs: t_I32) -> + Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z + #t_I32 + #FStar.Tactics.Typeclasses.solve + (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I32 + #FStar.Tactics.Typeclasses.solve + self + <: + Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) + <: + Core.Base.Spec.Z.t_Z) + } + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_90: Core.Ops.Arith.t_Neg t_I16 = + { + f_Output = t_I16; + f_neg_pre = (fun (self: t_I16) -> true); + f_neg_post = (fun (self: t_I16) (out: t_I16) -> true); + f_neg = - fun (self: t_I128) (rhs: t_I128) -> + fun (self: t_I16) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 + #t_I16 #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve self <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) <: Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_48: Core.Ops.Arith.t_Neg t_I128 = +let impl_92: Core.Ops.Bit.t_BitOr t_I16 t_I16 = { - f_Output = t_I128; - f_neg_pre = (fun (self: t_I128) -> true); - f_neg_post = (fun (self: t_I128) (out: t_I128) -> true); - f_neg + f_Output = t_I16; + f_bitor_pre = (fun (self: t_I16) (rhs: t_I16) -> true); + f_bitor_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); + f_bitor = - fun (self: t_I128) -> + fun (self: t_I16) (rhs: t_I16) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 + #t_I16 #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve self <: Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) <: Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_49: Core.Ops.Arith.t_Sub t_I128 t_I128 = +let impl_104: Core.Ops.Arith.t_Neg t_I8 = { - f_Output = t_I128; - f_sub_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_sub_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); - f_sub + f_Output = t_I8; + f_neg_pre = (fun (self: t_I8) -> true); + f_neg_post = (fun (self: t_I8) (out: t_I8) -> true); + f_neg = - fun (self: t_I128) (rhs: t_I128) -> + fun (self: t_I8) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 + #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve self <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) <: Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_50: Core.Ops.Bit.t_BitOr t_I128 t_I128 = +let impl_106: Core.Ops.Bit.t_BitOr t_I8 t_I8 = { - f_Output = t_I128; - f_bitor_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_bitor_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); + f_Output = t_I8; + f_bitor_pre = (fun (self: t_I8) (rhs: t_I8) -> true); + f_bitor_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); f_bitor = - fun (self: t_I128) (rhs: t_I128) -> + fun (self: t_I8) (rhs: t_I8) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 + #t_I8 #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I128 + (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve self <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs + (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Spec.Z.t_Z) <: @@ -2434,23 +2566,23 @@ let impl_50: Core.Ops.Bit.t_BitOr t_I128 t_I128 = } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_60: Core.Ops.Arith.t_Add t_I64 t_I64 = +let impl_46: Core.Ops.Arith.t_Add t_I128 t_I128 = { - f_Output = t_I64; - f_add_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_add_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); + f_Output = t_I128; + f_add_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_add_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); f_add = - fun (self: t_I64) (rhs: t_I64) -> + fun (self: t_I128) (rhs: t_I128) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 + #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I64 + (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve self <: Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: Core.Base.Spec.Z.t_Z) <: @@ -2458,39 +2590,42 @@ let impl_60: Core.Ops.Arith.t_Add t_I64 t_I64 = } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_62: Core.Ops.Arith.t_Neg t_I64 = +let impl_49: Core.Ops.Arith.t_Sub t_I128 t_I128 = { - f_Output = t_I64; - f_neg_pre = (fun (self: t_I64) -> true); - f_neg_post = (fun (self: t_I64) (out: t_I64) -> true); - f_neg + f_Output = t_I128; + f_sub_pre = (fun (self: t_I128) (rhs: t_I128) -> true); + f_sub_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); + f_sub = - fun (self: t_I64) -> + fun (self: t_I128) (rhs: t_I128) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 + #t_I128 #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I64 + (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve self <: Core.Base.Spec.Z.t_Z) + (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs + <: + Core.Base.Spec.Z.t_Z) <: Core.Base.Spec.Z.t_Z) } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_63: Core.Ops.Arith.t_Sub t_I64 t_I64 = +let impl_60: Core.Ops.Arith.t_Add t_I64 t_I64 = { f_Output = t_I64; - f_sub_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_sub_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); - f_sub + f_add_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_add_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); + f_add = fun (self: t_I64) (rhs: t_I64) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I64 + (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve self <: @@ -2503,18 +2638,18 @@ let impl_63: Core.Ops.Arith.t_Sub t_I64 t_I64 = } [@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_64: Core.Ops.Bit.t_BitOr t_I64 t_I64 = +let impl_63: Core.Ops.Arith.t_Sub t_I64 t_I64 = { f_Output = t_I64; - f_bitor_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_bitor_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); - f_bitor + f_sub_pre = (fun (self: t_I64) (rhs: t_I64) -> true); + f_sub_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); + f_sub = fun (self: t_I64) (rhs: t_I64) -> Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z #t_I64 #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I64 + (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve self <: @@ -2550,27 +2685,6 @@ let impl_74: Core.Ops.Arith.t_Add t_I32 t_I32 = Core.Base.Spec.Z.t_Z) } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_76: Core.Ops.Arith.t_Neg t_I32 = - { - f_Output = t_I32; - f_neg_pre = (fun (self: t_I32) -> true); - f_neg_post = (fun (self: t_I32) (out: t_I32) -> true); - f_neg - = - fun (self: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_77: Core.Ops.Arith.t_Sub t_I32 t_I32 = { @@ -2595,30 +2709,6 @@ let impl_77: Core.Ops.Arith.t_Sub t_I32 t_I32 = Core.Base.Spec.Z.t_Z) } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_78: Core.Ops.Bit.t_BitOr t_I32 t_I32 = - { - f_Output = t_I32; - f_bitor_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_bitor_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); - f_bitor - = - fun (self: t_I32) (rhs: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_88: Core.Ops.Arith.t_Add t_I16 t_I16 = { @@ -2643,27 +2733,6 @@ let impl_88: Core.Ops.Arith.t_Add t_I16 t_I16 = Core.Base.Spec.Z.t_Z) } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_90: Core.Ops.Arith.t_Neg t_I16 = - { - f_Output = t_I16; - f_neg_pre = (fun (self: t_I16) -> true); - f_neg_post = (fun (self: t_I16) (out: t_I16) -> true); - f_neg - = - fun (self: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_91: Core.Ops.Arith.t_Sub t_I16 t_I16 = { @@ -2688,30 +2757,6 @@ let impl_91: Core.Ops.Arith.t_Sub t_I16 t_I16 = Core.Base.Spec.Z.t_Z) } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_92: Core.Ops.Bit.t_BitOr t_I16 t_I16 = - { - f_Output = t_I16; - f_bitor_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_bitor_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); - f_bitor - = - fun (self: t_I16) (rhs: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_102: Core.Ops.Arith.t_Add t_I8 t_I8 = { @@ -2736,27 +2781,6 @@ let impl_102: Core.Ops.Arith.t_Add t_I8 t_I8 = Core.Base.Spec.Z.t_Z) } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_104: Core.Ops.Arith.t_Neg t_I8 = - { - f_Output = t_I8; - f_neg_pre = (fun (self: t_I8) -> true); - f_neg_post = (fun (self: t_I8) (out: t_I8) -> true); - f_neg - = - fun (self: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_105: Core.Ops.Arith.t_Sub t_I8 t_I8 = { @@ -2781,30 +2805,6 @@ let impl_105: Core.Ops.Arith.t_Sub t_I8 t_I8 = Core.Base.Spec.Z.t_Z) } -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_106: Core.Ops.Bit.t_BitOr t_I8 t_I8 = - { - f_Output = t_I8; - f_bitor_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_bitor_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); - f_bitor - = - fun (self: t_I8) (rhs: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_113: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U128 = { @@ -5723,7 +5723,7 @@ let impl_116: Core.Ops.Bit.t_Not t_U128 = f_Output = t_U128; f_not_pre = (fun (self: t_U128) -> true); f_not_post = (fun (self: t_U128) (out: t_U128) -> true); - f_not = fun (self: t_U128) -> self ^. f_MAX + f_not = fun (self: t_U128) -> self ^. (f_MAX #FStar.Tactics.Typeclasses.solve <: t_U128) } [@@ FStar.Tactics.Typeclasses.tcinstance] @@ -5744,7 +5744,7 @@ let impl_143: Core.Ops.Bit.t_Not t_U64 = f_Output = t_U64; f_not_pre = (fun (self: t_U64) -> true); f_not_post = (fun (self: t_U64) (out: t_U64) -> true); - f_not = fun (self: t_U64) -> self ^. f_MAX + f_not = fun (self: t_U64) -> self ^. (f_MAX #FStar.Tactics.Typeclasses.solve <: t_U64) } [@@ FStar.Tactics.Typeclasses.tcinstance] @@ -5765,7 +5765,7 @@ let impl_170: Core.Ops.Bit.t_Not t_U32 = f_Output = t_U32; f_not_pre = (fun (self: t_U32) -> true); f_not_post = (fun (self: t_U32) (out: t_U32) -> true); - f_not = fun (self: t_U32) -> self ^. f_MAX + f_not = fun (self: t_U32) -> self ^. (f_MAX #FStar.Tactics.Typeclasses.solve <: t_U32) } [@@ FStar.Tactics.Typeclasses.tcinstance] @@ -5786,7 +5786,7 @@ let impl_197: Core.Ops.Bit.t_Not t_U16 = f_Output = t_U16; f_not_pre = (fun (self: t_U16) -> true); f_not_post = (fun (self: t_U16) (out: t_U16) -> true); - f_not = fun (self: t_U16) -> self ^. f_MAX + f_not = fun (self: t_U16) -> self ^. (f_MAX #FStar.Tactics.Typeclasses.solve <: t_U16) } [@@ FStar.Tactics.Typeclasses.tcinstance] @@ -5807,5 +5807,5 @@ let impl_224: Core.Ops.Bit.t_Not t_U8 = f_Output = t_U8; f_not_pre = (fun (self: t_U8) -> true); f_not_post = (fun (self: t_U8) (out: t_U8) -> true); - f_not = fun (self: t_U8) -> self ^. f_MAX + f_not = fun (self: t_U8) -> self ^. (f_MAX #FStar.Tactics.Typeclasses.solve <: t_U8) } diff --git a/proof-libs/fstar/generated-core/Core.Intrinsics.fst b/proof-libs/fstar/generated-core/Core.Intrinsics.fst index 36850a54a..90fd57715 100644 --- a/proof-libs/fstar/generated-core/Core.Intrinsics.fst +++ b/proof-libs/fstar/generated-core/Core.Intrinsics.fst @@ -3,2664 +3,218 @@ module Core.Intrinsics open Core open FStar.Mul -let unchecked_add_u128 (x y: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - Core.Primitive.C_u128 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U128) - <: - Core.Primitive.t_u128 - -let unchecked_add_u16 (x y: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - Core.Primitive.C_u16 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U16) - <: - Core.Primitive.t_u16 - -let unchecked_add_u32 (x y: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Core.Primitive.C_u32 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U32) - <: - Core.Primitive.t_u32 - -let unchecked_add_u64 (x y: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - Core.Primitive.C_u64 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U64) - <: - Core.Primitive.t_u64 - -let unchecked_add_u8 (x y: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - Core.Primitive.C_u8 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U8) - <: - Core.Primitive.t_u8 - -let unchecked_add_usize (x y: Core.Primitive.t_usize) : Core.Primitive.t_usize = - Core.Primitive.C_usize - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U64) - <: - Core.Primitive.t_usize - -let add_with_overflow_i128 (x y: Core.Primitive.t_i128) : (Core.Primitive.t_i128 & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I128):Core.Base_interface.Int.t_I128 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (Core.Primitive.C_i128 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I128 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_i128), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (Core.Primitive.t_i128 & bool) - -let unchecked_add_i128 (x y: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - Core.Primitive.C_i128 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I128) - <: - Core.Primitive.t_i128 - -let add_with_overflow_i16 (x y: Core.Primitive.t_i16) : (Core.Primitive.t_i16 & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I16):Core.Base_interface.Int.t_I16 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (Core.Primitive.C_i16 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I16 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_i16), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (Core.Primitive.t_i16 & bool) - -let unchecked_add_i16 (x y: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - Core.Primitive.C_i16 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I16) - <: - Core.Primitive.t_i16 - -let add_with_overflow_i32 (x y: Core.Primitive.t_i32) : (Core.Primitive.t_i32 & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I32):Core.Base_interface.Int.t_I32 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (Core.Primitive.C_i32 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I32 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_i32), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (Core.Primitive.t_i32 & bool) - -let unchecked_add_i32 (x y: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - Core.Primitive.C_i32 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I32) - <: - Core.Primitive.t_i32 - -let add_with_overflow_i64 (x y: Core.Primitive.t_i64) : (Core.Primitive.t_i64 & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I64):Core.Base_interface.Int.t_I64 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (Core.Primitive.C_i64 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_i64), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (Core.Primitive.t_i64 & bool) - -let unchecked_add_i64 (x y: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - Core.Primitive.C_i64 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I64) - <: - Core.Primitive.t_i64 - -let add_with_overflow_i8 (x y: Core.Primitive.t_i8) : (Core.Primitive.t_i8 & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I8):Core.Base_interface.Int.t_I8 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (Core.Primitive.C_i8 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_i8), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (Core.Primitive.t_i8 & bool) - -let unchecked_add_i8 (x y: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - Core.Primitive.C_i8 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I8) - <: - Core.Primitive.t_i8 - -let add_with_overflow_isize (x y: Core.Primitive.t_isize) : (Core.Primitive.t_isize & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I64):Core.Base_interface.Int.t_I64 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (Core.Primitive.C_isize - (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_isize), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (Core.Primitive.t_isize & bool) - -let unchecked_add_isize (x y: Core.Primitive.t_isize) : Core.Primitive.t_isize = - Core.Primitive.C_isize - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I64) - <: - Core.Primitive.t_isize - -let add_with_overflow_u128 (x y: Core.Primitive.t_u128) : (Core.Primitive.t_u128 & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U128):Core.Base_interface.Int.t_U128 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (Core.Primitive.C_u128 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_u128), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (Core.Primitive.t_u128 & bool) - -let add_with_overflow_u16 (x y: Core.Primitive.t_u16) : (Core.Primitive.t_u16 & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U16):Core.Base_interface.Int.t_U16 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (Core.Primitive.C_u16 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_u16), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (Core.Primitive.t_u16 & bool) - -let add_with_overflow_u32 (x y: Core.Primitive.t_u32) : (Core.Primitive.t_u32 & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U32):Core.Base_interface.Int.t_U32 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (Core.Primitive.C_u32 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_u32), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (Core.Primitive.t_u32 & bool) - -let add_with_overflow_u64 (x y: Core.Primitive.t_u64) : (Core.Primitive.t_u64 & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U64):Core.Base_interface.Int.t_U64 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (Core.Primitive.C_u64 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_u64), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (Core.Primitive.t_u64 & bool) - -let add_with_overflow_u8 (x y: Core.Primitive.t_u8) : (Core.Primitive.t_u8 & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U8):Core.Base_interface.Int.t_U8 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (Core.Primitive.C_u8 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_u8), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (Core.Primitive.t_u8 & bool) - -let add_with_overflow_usize (x y: Core.Primitive.t_usize) : (Core.Primitive.t_usize & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U64):Core.Base_interface.Int.t_U64 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (Core.Primitive.C_usize - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) - <: - Core.Primitive.t_usize), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (Core.Primitive.t_usize & bool) - -let unchecked_div_u128 (x y: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - Core.Primitive.C_u128 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U128) - <: - Core.Primitive.t_u128 - -let unchecked_div_u16 (x y: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - Core.Primitive.C_u16 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U16) - <: - Core.Primitive.t_u16 - -let unchecked_div_u32 (x y: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Core.Primitive.C_u32 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U32) - <: - Core.Primitive.t_u32 - -let unchecked_div_u64 (x y: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - Core.Primitive.C_u64 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U64) - <: - Core.Primitive.t_u64 - -let unchecked_div_u8 (x y: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - Core.Primitive.C_u8 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U8) - <: - Core.Primitive.t_u8 - -let unchecked_div_usize (x y: Core.Primitive.t_usize) : Core.Primitive.t_usize = - Core.Primitive.C_usize - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U64) - <: - Core.Primitive.t_usize - -let wrapping_add_i128 (a b: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - Core.Primitive.C_i128 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_i128 - -let wrapping_add_i16 (a b: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - Core.Primitive.C_i16 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_i16 - -let wrapping_add_i32 (a b: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - Core.Primitive.C_i32 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_i32 - -let wrapping_add_i64 (a b: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - Core.Primitive.C_i64 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_i64 - -let wrapping_add_i8 (a b: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - Core.Primitive.C_i8 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_i8 - -let wrapping_add_isize (a b: Core.Primitive.t_isize) : Core.Primitive.t_isize = - Core.Primitive.C_isize (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_isize - -let wrapping_sub_i128 (a b: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - Core.Primitive.C_i128 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_i128 - -let wrapping_sub_i16 (a b: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - Core.Primitive.C_i16 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_i16 - -let wrapping_sub_i32 (a b: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - Core.Primitive.C_i32 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_i32 - -let wrapping_sub_i64 (a b: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - Core.Primitive.C_i64 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_i64 - -let wrapping_sub_i8 (a b: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - Core.Primitive.C_i8 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_i8 - -let wrapping_sub_isize (a b: Core.Primitive.t_isize) : Core.Primitive.t_isize = - Core.Primitive.C_isize (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_isize - -let unchecked_div_i128 (x y: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - Core.Primitive.C_i128 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I128) - <: - Core.Primitive.t_i128 - -let unchecked_div_i16 (x y: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - Core.Primitive.C_i16 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I16) - <: - Core.Primitive.t_i16 - -let unchecked_div_i32 (x y: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - Core.Primitive.C_i32 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I32) - <: - Core.Primitive.t_i32 - -let unchecked_div_i64 (x y: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - Core.Primitive.C_i64 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I64) - <: - Core.Primitive.t_i64 - -let unchecked_div_i8 (x y: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - Core.Primitive.C_i8 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I8) - <: - Core.Primitive.t_i8 - -let unchecked_div_isize (x y: Core.Primitive.t_isize) : Core.Primitive.t_isize = - Core.Primitive.C_isize - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y.Core.Primitive._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I64) - <: - Core.Primitive.t_isize - -let wrapping_add_u128 (a b: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - Core.Primitive.C_u128 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u128 - -let wrapping_add_u16 (a b: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - Core.Primitive.C_u16 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u16 - -let wrapping_add_u32 (a b: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Core.Primitive.C_u32 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u32 - -let wrapping_add_u64 (a b: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - Core.Primitive.C_u64 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u64 - -let wrapping_add_u8 (a b: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - Core.Primitive.C_u8 (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_u8 - -let wrapping_add_usize (a b: Core.Primitive.t_usize) : Core.Primitive.t_usize = - Core.Primitive.C_usize (a.Core.Primitive._0 +! b.Core.Primitive._0) <: Core.Primitive.t_usize - -let wrapping_mul_i128 (a b: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - Core.Primitive.C_i128 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_i128 - -let wrapping_mul_i16 (a b: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - Core.Primitive.C_i16 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_i16 - -let wrapping_mul_i32 (a b: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - Core.Primitive.C_i32 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_i32 - -let wrapping_mul_i64 (a b: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - Core.Primitive.C_i64 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_i64 - -let wrapping_mul_i8 (a b: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - Core.Primitive.C_i8 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_i8 - -let wrapping_mul_isize (a b: Core.Primitive.t_isize) : Core.Primitive.t_isize = - Core.Primitive.C_isize (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_isize - -let wrapping_mul_u128 (a b: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - Core.Primitive.C_u128 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u128 - -let wrapping_mul_u16 (a b: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - Core.Primitive.C_u16 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u16 - -let wrapping_mul_u32 (a b: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Core.Primitive.C_u32 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u32 - -let wrapping_mul_u64 (a b: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - Core.Primitive.C_u64 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u64 - -let wrapping_mul_u8 (a b: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - Core.Primitive.C_u8 (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_u8 - -let wrapping_mul_usize (a b: Core.Primitive.t_usize) : Core.Primitive.t_usize = - Core.Primitive.C_usize (a.Core.Primitive._0 *! b.Core.Primitive._0) <: Core.Primitive.t_usize - -let wrapping_sub_u128 (a b: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - Core.Primitive.C_u128 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_u128 - -let wrapping_sub_u16 (a b: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - Core.Primitive.C_u16 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_u16 - -let wrapping_sub_u32 (a b: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Core.Primitive.C_u32 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_u32 - -let wrapping_sub_u64 (a b: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - Core.Primitive.C_u64 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_u64 - -let wrapping_sub_u8 (a b: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - Core.Primitive.C_u8 (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_u8 - -let wrapping_sub_usize (a b: Core.Primitive.t_usize) : Core.Primitive.t_usize = - Core.Primitive.C_usize (a.Core.Primitive._0 -! b.Core.Primitive._0) <: Core.Primitive.t_usize - -let rotate_left_u128 (x: Core.Primitive.t_u128) (shift: Core.Primitive.t_u32) - : Core.Primitive.t_u128 = - let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_10__BITS in - let (left: Core.Primitive.t_u128):Core.Primitive.t_u128 = - (Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u128) <>! - (Core.Num.impl_10__BITS -! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - left |. right - -let rotate_left_u16 (x: Core.Primitive.t_u16) (shift: Core.Primitive.t_u32) : Core.Primitive.t_u16 = - let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_7__BITS in - let (left: Core.Primitive.t_u16):Core.Primitive.t_u16 = - (Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u16) <>! - (Core.Num.impl_7__BITS -! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - left |. right - -let rotate_left_u32 (x shift: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_8__BITS in - let (left: Core.Primitive.t_u32):Core.Primitive.t_u32 = - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u32) <>! - (Core.Num.impl_8__BITS -! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - left |. right - -let rotate_left_u64 (x: Core.Primitive.t_u64) (shift: Core.Primitive.t_u32) : Core.Primitive.t_u64 = - let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_9__BITS in - let (left: Core.Primitive.t_u64):Core.Primitive.t_u64 = - (Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u64) <>! - (Core.Num.impl_9__BITS -! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - left |. right - -let rotate_left_u8 (x: Core.Primitive.t_u8) (shift: Core.Primitive.t_u32) : Core.Primitive.t_u8 = - let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_6__BITS in - let (left: Core.Primitive.t_u8):Core.Primitive.t_u8 = - (Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u8) <>! - (Core.Num.impl_6__BITS -! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - left |. right - -let rotate_left_usize (x: Core.Primitive.t_usize) (shift: Core.Primitive.t_u32) - : Core.Primitive.t_usize = - let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_11__BITS in - let (left: Core.Primitive.t_usize):Core.Primitive.t_usize = - (Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_usize) <>! - (Core.Num.impl_11__BITS -! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - left |. right - -let rotate_right_u128 (x: Core.Primitive.t_u128) (shift: Core.Primitive.t_u32) - : Core.Primitive.t_u128 = - let (shift: Core.Primitive.t_u32):Core.Primitive.t_u32 = shift %! Core.Num.impl_10__BITS in - let (left: Core.Primitive.t_u128):Core.Primitive.t_u128 = - (Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u128) >>! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - in - let (right: Core.Primitive.t_u128):Core.Primitive.t_u128 = - (Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u128) <>! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - in - let (right: Core.Primitive.t_u16):Core.Primitive.t_u16 = - (Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u16) <>! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - in - let (right: Core.Primitive.t_u32):Core.Primitive.t_u32 = - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u32) <>! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - in - let (right: Core.Primitive.t_u64):Core.Primitive.t_u64 = - (Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u64) <>! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - in - let (right: Core.Primitive.t_u8):Core.Primitive.t_u8 = - (Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u8) <>! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve shift - <: - Core.Primitive.t_u32) - in - let (right: Core.Primitive.t_usize):Core.Primitive.t_usize = - (Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_usize) < - let count:Core.Primitive.t_u128 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u128 = count in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u128):Core.Primitive.t_u128 = - Core.Convert.f_into #Core.Primitive.t_u128 - #Core.Primitive.t_u128 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u128) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u128) &. - (Core.Convert.f_into #u128 - #Core.Primitive.t_u128 - #FStar.Tactics.Typeclasses.solve - (pub_u128 1) - <: - Core.Primitive.t_u128) - <: - Core.Primitive.t_u128) - in - let count:Core.Primitive.t_u128 = - (count < - let count:Core.Primitive.t_u16 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u16 = count in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u16):Core.Primitive.t_u16 = - Core.Convert.f_into #Core.Primitive.t_u16 - #Core.Primitive.t_u16 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u16) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u16) &. - (Core.Convert.f_into #u16 #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve 1us - <: - Core.Primitive.t_u16) - <: - Core.Primitive.t_u16) - in - let count:Core.Primitive.t_u16 = - (count < - let count:Core.Primitive.t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u32 = count in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u32) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) &. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - let count:Core.Primitive.t_u32 = - (count < - let count:Core.Primitive.t_u64 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u64 = count in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u64):Core.Primitive.t_u64 = - Core.Convert.f_into #Core.Primitive.t_u64 - #Core.Primitive.t_u64 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u64) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u64) &. - (Core.Convert.f_into #u64 #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve 1uL - <: - Core.Primitive.t_u64) - <: - Core.Primitive.t_u64) - in - let count:Core.Primitive.t_u64 = - (count < - let count:Core.Primitive.t_u8 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u8 = count in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u8):Core.Primitive.t_u8 = - Core.Convert.f_into #Core.Primitive.t_u8 - #Core.Primitive.t_u8 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u8) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u8) &. - (Core.Convert.f_into #u8 #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve 1uy - <: - Core.Primitive.t_u8) - <: - Core.Primitive.t_u8) - in - let count:Core.Primitive.t_u8 = - (count < - let count:Core.Primitive.t_usize = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_usize = count in - let i:u32 = i in - let (low_bit: Core.Primitive.t_usize):Core.Primitive.t_usize = - Core.Convert.f_into #Core.Primitive.t_usize - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_usize) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_usize) &. - (Core.Convert.f_into #usize - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - (sz 1) - <: - Core.Primitive.t_usize) - <: - Core.Primitive.t_usize) - in - let count:Core.Primitive.t_usize = - (count < - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u128 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u128) <>! - (Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (Core.Num.impl_10__BITS -! - (Core.Convert.f_into #u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - 1ul - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u128) - in - if - high_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let ctlz_u16 (x: Core.Primitive.t_u16) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_7__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u16 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u16) <>! - (Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (Core.Num.impl_7__BITS -! - (Core.Convert.f_into #u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - 1ul - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u16) - in - if - high_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let ctlz_u32 (x: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_8__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u32) <>! - (Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (Core.Num.impl_8__BITS -! - (Core.Convert.f_into #u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - 1ul - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - if - high_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let ctlz_u64 (x: Core.Primitive.t_u64) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_9__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u64 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u64) <>! - (Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (Core.Num.impl_9__BITS -! - (Core.Convert.f_into #u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - 1ul - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u64) - in - if - high_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let ctlz_u8 (x: Core.Primitive.t_u8) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_6__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u8 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u8) <>! - (Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (Core.Num.impl_6__BITS -! - (Core.Convert.f_into #u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - 1ul - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u8) - in - if - high_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let ctlz_usize (x: Core.Primitive.t_usize) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_11__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_usize - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_usize) <>! - (Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (Core.Num.impl_11__BITS -! - (Core.Convert.f_into #u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - 1ul - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_usize) - in - if - high_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let ctpop_u128 (x: Core.Primitive.t_u128) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let count:Core.Primitive.t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_10__BITS - <: - u32) - (fun count temp_1_ -> - let count:Core.Primitive.t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #Core.Primitive.t_u128 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u128) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u128) &. - (Core.Convert.f_into #u128 - #Core.Primitive.t_u128 - #FStar.Tactics.Typeclasses.solve - (pub_u128 1) - <: - Core.Primitive.t_u128) - <: - Core.Primitive.t_u128) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - count - -let ctpop_u16 (x: Core.Primitive.t_u16) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let count:Core.Primitive.t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_7__BITS - <: - u32) - (fun count temp_1_ -> - let count:Core.Primitive.t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #Core.Primitive.t_u16 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u16) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u16) &. - (Core.Convert.f_into #u16 #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve 1us - <: - Core.Primitive.t_u16) - <: - Core.Primitive.t_u16) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - count - -let ctpop_u32 (x: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let count:Core.Primitive.t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_8__BITS - <: - u32) - (fun count temp_1_ -> - let count:Core.Primitive.t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u32) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) &. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - count - -let ctpop_u64 (x: Core.Primitive.t_u64) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let count:Core.Primitive.t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_9__BITS - <: - u32) - (fun count temp_1_ -> - let count:Core.Primitive.t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #Core.Primitive.t_u64 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u64) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u64) &. - (Core.Convert.f_into #u64 #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve 1uL - <: - Core.Primitive.t_u64) - <: - Core.Primitive.t_u64) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - count - -let ctpop_u8 (x: Core.Primitive.t_u8) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let count:Core.Primitive.t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_6__BITS - <: - u32) - (fun count temp_1_ -> - let count:Core.Primitive.t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #Core.Primitive.t_u8 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u8) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u8) &. - (Core.Convert.f_into #u8 #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve 1uy - <: - Core.Primitive.t_u8) - <: - Core.Primitive.t_u8) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - count - -let ctpop_usize (x: Core.Primitive.t_usize) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let count:Core.Primitive.t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_11__BITS - <: - u32) - (fun count temp_1_ -> - let count:Core.Primitive.t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:Core.Primitive.t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #Core.Primitive.t_usize - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_usize) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_usize) &. - (Core.Convert.f_into #usize - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - (sz 1) - <: - Core.Primitive.t_usize) - <: - Core.Primitive.t_usize) - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - count - -let cttz_u128 (x: Core.Primitive.t_u128) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_10__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u128 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u128) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u128) &. - (Core.Convert.f_into #u128 - #Core.Primitive.t_u128 - #FStar.Tactics.Typeclasses.solve - (pub_u128 1) - <: - Core.Primitive.t_u128) - <: - Core.Primitive.t_u128) - in - if - low_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let cttz_u16 (x: Core.Primitive.t_u16) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_7__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u16 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u16) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u16) &. - (Core.Convert.f_into #u16 #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve 1us - <: - Core.Primitive.t_u16) - <: - Core.Primitive.t_u16) - in - if - low_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let cttz_u32 (x: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_8__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u32) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) &. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32) - in - if - low_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let cttz_u64 (x: Core.Primitive.t_u64) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_9__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u64 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u64) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u64) &. - (Core.Convert.f_into #u64 #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve 1uL - <: - Core.Primitive.t_u64) - <: - Core.Primitive.t_u64) - in - if - low_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let cttz_u8 (x: Core.Primitive.t_u8) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_6__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u8 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_u8) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u8) &. - (Core.Convert.f_into #u8 #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve 1uy - <: - Core.Primitive.t_u8) - <: - Core.Primitive.t_u8) - in - if - low_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count - -let cttz_usize (x: Core.Primitive.t_usize) : Core.Primitive.t_u32 = - let (count: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - in - let done:bool = false in - let count, done:(Core.Primitive.t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #Core.Primitive.t_u32 - #u32 - #FStar.Tactics.Typeclasses.solve - Core.Num.impl_11__BITS - <: - u32) - (fun temp_0_ temp_1_ -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (Core.Primitive.t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(Core.Primitive.t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: Core.Primitive.t_u32):Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_usize - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve x - <: - Core.Primitive.t_usize) >>! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve i - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_usize) &. - (Core.Convert.f_into #usize - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - (sz 1) - <: - Core.Primitive.t_usize) - <: - Core.Primitive.t_usize) - in - if - low_bit =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) || - done - then - let done:bool = true in - count, done <: (Core.Primitive.t_u32 & bool) - else - let count:Core.Primitive.t_u32 = - count +! - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 1ul - <: - Core.Primitive.t_u32) - in - count, done <: (Core.Primitive.t_u32 & bool)) - in - count +include Core.Array.Rec_bundle_579704328 {add_with_overflow_i128 as add_with_overflow_i128} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_i16 as add_with_overflow_i16} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_i32 as add_with_overflow_i32} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_i64 as add_with_overflow_i64} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_i8 as add_with_overflow_i8} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_isize as add_with_overflow_isize} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_i128 as unchecked_add_i128} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_i16 as unchecked_add_i16} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_i32 as unchecked_add_i32} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_i64 as unchecked_add_i64} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_i8 as unchecked_add_i8} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_isize as unchecked_add_isize} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_u128 as unchecked_add_u128} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_u16 as unchecked_add_u16} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_u32 as unchecked_add_u32} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_u64 as unchecked_add_u64} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_u8 as unchecked_add_u8} + +include Core.Array.Rec_bundle_579704328 {unchecked_add_usize as unchecked_add_usize} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_u128 as add_with_overflow_u128} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_u16 as add_with_overflow_u16} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_u32 as add_with_overflow_u32} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_u64 as add_with_overflow_u64} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_u8 as add_with_overflow_u8} + +include Core.Array.Rec_bundle_579704328 {add_with_overflow_usize as add_with_overflow_usize} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_u128 as unchecked_div_u128} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_u16 as unchecked_div_u16} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_u32 as unchecked_div_u32} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_u64 as unchecked_div_u64} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_u8 as unchecked_div_u8} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_usize as unchecked_div_usize} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_i128 as wrapping_add_i128} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_i16 as wrapping_add_i16} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_i32 as wrapping_add_i32} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_i64 as wrapping_add_i64} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_i8 as wrapping_add_i8} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_isize as wrapping_add_isize} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_i128 as wrapping_sub_i128} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_i16 as wrapping_sub_i16} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_i32 as wrapping_sub_i32} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_i64 as wrapping_sub_i64} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_i8 as wrapping_sub_i8} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_isize as wrapping_sub_isize} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_i128 as unchecked_div_i128} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_i16 as unchecked_div_i16} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_i32 as unchecked_div_i32} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_i64 as unchecked_div_i64} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_i8 as unchecked_div_i8} + +include Core.Array.Rec_bundle_579704328 {unchecked_div_isize as unchecked_div_isize} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_u128 as wrapping_add_u128} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_u16 as wrapping_add_u16} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_u32 as wrapping_add_u32} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_u64 as wrapping_add_u64} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_u8 as wrapping_add_u8} + +include Core.Array.Rec_bundle_579704328 {wrapping_add_usize as wrapping_add_usize} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_i128 as wrapping_mul_i128} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_i16 as wrapping_mul_i16} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_i32 as wrapping_mul_i32} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_i64 as wrapping_mul_i64} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_i8 as wrapping_mul_i8} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_isize as wrapping_mul_isize} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_u128 as wrapping_mul_u128} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_u16 as wrapping_mul_u16} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_u32 as wrapping_mul_u32} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_u64 as wrapping_mul_u64} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_u8 as wrapping_mul_u8} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul_usize as wrapping_mul_usize} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_u128 as wrapping_sub_u128} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_u16 as wrapping_sub_u16} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_u32 as wrapping_sub_u32} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_u64 as wrapping_sub_u64} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_u8 as wrapping_sub_u8} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub_usize as wrapping_sub_usize} + +include Core.Array.Rec_bundle_579704328 {rotate_left_u128 as rotate_left_u128} + +include Core.Array.Rec_bundle_579704328 {rotate_left_u16 as rotate_left_u16} + +include Core.Array.Rec_bundle_579704328 {rotate_left_u32 as rotate_left_u32} + +include Core.Array.Rec_bundle_579704328 {rotate_left_u64 as rotate_left_u64} + +include Core.Array.Rec_bundle_579704328 {rotate_left_u8 as rotate_left_u8} + +include Core.Array.Rec_bundle_579704328 {rotate_left_usize as rotate_left_usize} + +include Core.Array.Rec_bundle_579704328 {rotate_right_u128 as rotate_right_u128} + +include Core.Array.Rec_bundle_579704328 {rotate_right_u16 as rotate_right_u16} + +include Core.Array.Rec_bundle_579704328 {rotate_right_u32 as rotate_right_u32} + +include Core.Array.Rec_bundle_579704328 {rotate_right_u64 as rotate_right_u64} + +include Core.Array.Rec_bundle_579704328 {rotate_right_u8 as rotate_right_u8} + +include Core.Array.Rec_bundle_579704328 {rotate_right_usize as rotate_right_usize} + +include Core.Array.Rec_bundle_579704328 {bswap_u128 as bswap_u128} + +include Core.Array.Rec_bundle_579704328 {bswap_u16 as bswap_u16} + +include Core.Array.Rec_bundle_579704328 {bswap_u32 as bswap_u32} + +include Core.Array.Rec_bundle_579704328 {bswap_u64 as bswap_u64} + +include Core.Array.Rec_bundle_579704328 {bswap_u8 as bswap_u8} + +include Core.Array.Rec_bundle_579704328 {bswap_usize as bswap_usize} + +include Core.Array.Rec_bundle_579704328 {ctlz_u128 as ctlz_u128} + +include Core.Array.Rec_bundle_579704328 {ctlz_u16 as ctlz_u16} + +include Core.Array.Rec_bundle_579704328 {ctlz_u32 as ctlz_u32} + +include Core.Array.Rec_bundle_579704328 {ctlz_u64 as ctlz_u64} + +include Core.Array.Rec_bundle_579704328 {ctlz_u8 as ctlz_u8} + +include Core.Array.Rec_bundle_579704328 {ctlz_usize as ctlz_usize} + +include Core.Array.Rec_bundle_579704328 {ctpop_u128 as ctpop_u128} + +include Core.Array.Rec_bundle_579704328 {ctpop_u16 as ctpop_u16} + +include Core.Array.Rec_bundle_579704328 {ctpop_u32 as ctpop_u32} + +include Core.Array.Rec_bundle_579704328 {ctpop_u64 as ctpop_u64} + +include Core.Array.Rec_bundle_579704328 {ctpop_u8 as ctpop_u8} + +include Core.Array.Rec_bundle_579704328 {ctpop_usize as ctpop_usize} + +include Core.Array.Rec_bundle_579704328 {cttz_u128 as cttz_u128} + +include Core.Array.Rec_bundle_579704328 {cttz_u16 as cttz_u16} + +include Core.Array.Rec_bundle_579704328 {cttz_u32 as cttz_u32} + +include Core.Array.Rec_bundle_579704328 {cttz_u64 as cttz_u64} + +include Core.Array.Rec_bundle_579704328 {cttz_u8 as cttz_u8} + +include Core.Array.Rec_bundle_579704328 {cttz_usize as cttz_usize} diff --git a/proof-libs/fstar/generated-core/Core.Iter.Range.fst b/proof-libs/fstar/generated-core/Core.Iter.Range.fst index 918c25bf3..ac3d512db 100644 --- a/proof-libs/fstar/generated-core/Core.Iter.Range.fst +++ b/proof-libs/fstar/generated-core/Core.Iter.Range.fst @@ -3,16 +3,6 @@ module Core.Iter.Range open Core open FStar.Mul -class t_RangeIteratorImpl (v_Self: Type0) = { - f_Item:Type0; - f_spec_next_pre:v_Self -> Type0; - f_spec_next_post:v_Self -> (v_Self & Core.Option.t_Option f_Item) -> Type0; - f_spec_next:x0: v_Self - -> Prims.Pure (v_Self & Core.Option.t_Option f_Item) - (f_spec_next_pre x0) - (fun result -> f_spec_next_post x0 result) -} - class t_Step (v_Self: Type0) = { [@@@ FStar.Tactics.Typeclasses.no_method]_super_9442900250278684536:Core.Clone.t_Clone v_Self; [@@@ FStar.Tactics.Typeclasses.no_method]_super_12866954522599331834:Core.Cmp.t_PartialOrd v_Self @@ -31,6 +21,16 @@ class t_Step (v_Self: Type0) = { (fun result -> f_forward_checked_post x0 x1 result) } +class t_RangeIteratorImpl (v_Self: Type0) = { + f_Item:Type0; + f_spec_next_pre:v_Self -> Type0; + f_spec_next_post:v_Self -> (v_Self & Core.Option.t_Option f_Item) -> Type0; + f_spec_next:x0: v_Self + -> Prims.Pure (v_Self & Core.Option.t_Option f_Item) + (f_spec_next_pre x0) + (fun result -> f_spec_next_post x0 result) +} + [@@ FStar.Tactics.Typeclasses.tcinstance] let impl (#v_A: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Step v_A) : t_RangeIteratorImpl (Core.Ops.Range.t_Range v_A) = diff --git a/proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst b/proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst index 0f9aeaf5b..489e6afdd 100644 --- a/proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst +++ b/proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst @@ -6,7 +6,7 @@ open FStar.Mul class t_IntoIterator (v_Self: Type0) = { f_Item:Type0; f_IntoIter:Type0; - f_IntoIter_11554253487815790481:Core.Iter.Traits.Iterator.t_Iterator f_IntoIter; + f_IntoIter_7190679858849254189:Core.Iter.Traits.Iterator.t_Iterator f_IntoIter; f_into_iter_pre:v_Self -> Type0; f_into_iter_post:v_Self -> f_IntoIter -> Type0; f_into_iter:x0: v_Self @@ -30,7 +30,7 @@ let impl { f_Item = i1.f_Item; f_IntoIter = v_I; - f_IntoIter_11554253487815790481 = FStar.Tactics.Typeclasses.solve; + f_IntoIter_7190679858849254189 = FStar.Tactics.Typeclasses.solve; f_into_iter_pre = (fun (self: v_I) -> true); f_into_iter_post = (fun (self: v_I) (out: v_I) -> true); f_into_iter = fun (self: v_I) -> self diff --git a/proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst b/proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst index 88ab37d62..0992457f1 100644 --- a/proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst +++ b/proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst @@ -5,6 +5,11 @@ open FStar.Mul class t_TrustedFused (v_Self: Type0) = { __marker_trait_t_TrustedFused:Prims.unit } +class t_TrustedStep (v_Self: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_13722385431118852294:Core.Iter.Range.t_Step v_Self; + [@@@ FStar.Tactics.Typeclasses.no_method]_super_11581440318597584651:Core.Marker.t_Copy v_Self +} + class t_FusedIterator (v_Self: Type0) = { [@@@ FStar.Tactics.Typeclasses.no_method]_super_15444444506782437531:Core.Iter.Traits.Iterator.t_Iterator v_Self @@ -14,8 +19,3 @@ class t_TrustedLen (v_Self: Type0) = { [@@@ FStar.Tactics.Typeclasses.no_method]_super_15444444506782437531:Core.Iter.Traits.Iterator.t_Iterator v_Self } - -class t_TrustedStep (v_Self: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_13722385431118852294:Core.Iter.Range.t_Step v_Self; - [@@@ FStar.Tactics.Typeclasses.no_method]_super_11581440318597584651:Core.Marker.t_Copy v_Self -} diff --git a/proof-libs/fstar/generated-core/Core.Num.fst b/proof-libs/fstar/generated-core/Core.Num.fst index 0ea0d9393..bbb03f4a4 100644 --- a/proof-libs/fstar/generated-core/Core.Num.fst +++ b/proof-libs/fstar/generated-core/Core.Num.fst @@ -3,1311 +3,470 @@ module Core.Num open Core open FStar.Mul -let impl_10__MAX: Core.Primitive.t_u128 = - Core.Primitive.C_u128 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_u128 +include Core.Array.Rec_bundle_579704328 {from_le715594649 as impl_10__from_le} -let impl_10__MIN: Core.Primitive.t_u128 = - Core.Primitive.C_u128 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_u128 +include Core.Array.Rec_bundle_579704328 {to_le902648378 as impl_10__to_le} -let impl_10__from_le (x: Core.Primitive.t_u128) : Core.Primitive.t_u128 = x +include Core.Array.Rec_bundle_579704328 {from_le793045973 as impl_7__from_le} -let impl_10__to_le (self: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self +include Core.Array.Rec_bundle_579704328 {to_le1012469456 as impl_7__to_le} -let impl_7__MAX: Core.Primitive.t_u16 = - Core.Primitive.C_u16 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_u16 +include Core.Array.Rec_bundle_579704328 {from_le706338679 as impl_8__from_le} -let impl_7__MIN: Core.Primitive.t_u16 = - Core.Primitive.C_u16 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_u16 +include Core.Array.Rec_bundle_579704328 {to_le724624277 as impl_8__to_le} -let impl_7__from_le (x: Core.Primitive.t_u16) : Core.Primitive.t_u16 = x +include Core.Array.Rec_bundle_579704328 {from_le435089922 as impl_9__from_le} -let impl_7__to_le (self: Core.Primitive.t_u16) : Core.Primitive.t_u16 = self +include Core.Array.Rec_bundle_579704328 {to_le2703875 as impl_9__to_le} -let impl__i8__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_97__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {from_le529489651 as impl_6__from_le} -let impl__i16__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_83__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {to_le523556665 as impl_6__to_le} -let impl__i32__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_69__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {from_le418743864 as impl_11__from_le} -let impl__i64__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_55__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {to_le946822077 as impl_11__to_le} -let impl__i128__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_41__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_BITS80497669 as impl__i8__BITS} -let impl__isize__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_55__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_MAX626626007 as impl__i8__MAX} -let impl_6__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_219__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_MIN19747349 as impl__i8__MIN} -let impl_7__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_192__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_BITS421056295 as impl__i16__BITS} -let impl_8__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_165__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_MAX474501300 as impl__i16__MAX} -let impl_8__MAX: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_MIN776391606 as impl__i16__MIN} -let impl_8__MIN: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_BITS465526498 as impl_2__BITS} -let impl_8__from_le (x: Core.Primitive.t_u32) : Core.Primitive.t_u32 = x +include Core.Array.Rec_bundle_579704328 {v_MAX106630818 as impl_2__MAX} -let impl_8__to_le (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self +include Core.Array.Rec_bundle_579704328 {v_MIN682967538 as impl_2__MIN} -let impl_9__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_138__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_BITS419886578 as impl__i64__BITS} -let impl_10__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_111__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_MAX527043787 as impl__i64__MAX} -let impl_11__BITS: Core.Primitive.t_u32 = - Core.Primitive.C_u32 Core.Base_interface.Int.impl_138__BITS <: Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_MIN654206259 as impl__i64__MIN} -let impl_9__MAX: Core.Primitive.t_u64 = - Core.Primitive.C_u64 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_u64 +include Core.Array.Rec_bundle_579704328 {v_BITS992667165 as impl__i128__BITS} -let impl_9__MIN: Core.Primitive.t_u64 = - Core.Primitive.C_u64 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_u64 +include Core.Array.Rec_bundle_579704328 {v_MAX375377319 as impl__i128__MAX} -let impl_9__from_le (x: Core.Primitive.t_u64) : Core.Primitive.t_u64 = x +include Core.Array.Rec_bundle_579704328 {v_MIN79612531 as impl__i128__MIN} -let impl_9__to_le (self: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self +include Core.Array.Rec_bundle_579704328 {v_BITS211584016 as impl__isize__BITS} -let impl_6__MAX: Core.Primitive.t_u8 = - Core.Primitive.C_u8 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_u8 +include Core.Array.Rec_bundle_579704328 {v_MAX937003029 as impl__isize__MAX} -let impl_6__MIN: Core.Primitive.t_u8 = - Core.Primitive.C_u8 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_u8 +include Core.Array.Rec_bundle_579704328 {v_MIN1017039533 as impl__isize__MIN} -let impl_6__from_le (x: Core.Primitive.t_u8) : Core.Primitive.t_u8 = x +include Core.Array.Rec_bundle_579704328 {v_BITS690311813 as impl_6__BITS} -let impl_6__to_le (self: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self +include Core.Array.Rec_bundle_579704328 {v_MAX310118176 as impl_6__MAX} -let impl_11__MAX: Core.Primitive.t_usize = - Core.Primitive.C_usize Core.Base_interface.Int.f_MAX <: Core.Primitive.t_usize +include Core.Array.Rec_bundle_579704328 {v_MIN41851434 as impl_6__MIN} -let impl_11__MIN: Core.Primitive.t_usize = - Core.Primitive.C_usize Core.Base_interface.Int.f_MIN <: Core.Primitive.t_usize +include Core.Array.Rec_bundle_579704328 {v_BITS277333551 as impl_7__BITS} -let impl_11__from_le (x: Core.Primitive.t_usize) : Core.Primitive.t_usize = x +include Core.Array.Rec_bundle_579704328 {v_MAX487295910 as impl_7__MAX} -let impl_11__to_le (self: Core.Primitive.t_usize) : Core.Primitive.t_usize = self +include Core.Array.Rec_bundle_579704328 {v_MIN592300287 as impl_7__MIN} -let impl_6__checked_add (self rhs: Core.Primitive.t_u8) : Core.Option.t_Option Core.Primitive.t_u8 = - Core.Option.Option_Some (Core.Intrinsics.unchecked_add_u8 self rhs) - <: - Core.Option.t_Option Core.Primitive.t_u8 +include Core.Array.Rec_bundle_579704328 {v_BITS473478051 as impl_8__BITS} -let impl_7__checked_add (self rhs: Core.Primitive.t_u16) : Core.Option.t_Option Core.Primitive.t_u16 = - Core.Option.Option_Some (Core.Intrinsics.unchecked_add_u16 self rhs) - <: - Core.Option.t_Option Core.Primitive.t_u16 +include Core.Array.Rec_bundle_579704328 {v_MAX826434525 as impl_8__MAX} -let impl_8__checked_add (self rhs: Core.Primitive.t_u32) : Core.Option.t_Option Core.Primitive.t_u32 = - Core.Option.Option_Some (Core.Intrinsics.unchecked_add_u32 self rhs) - <: - Core.Option.t_Option Core.Primitive.t_u32 +include Core.Array.Rec_bundle_579704328 {v_MIN932777089 as impl_8__MIN} -let impl_9__checked_add (self rhs: Core.Primitive.t_u64) : Core.Option.t_Option Core.Primitive.t_u64 = - Core.Option.Option_Some (Core.Intrinsics.unchecked_add_u64 self rhs) - <: - Core.Option.t_Option Core.Primitive.t_u64 +include Core.Array.Rec_bundle_579704328 {v_BITS177666292 as impl_9__BITS} -let impl_10__checked_add (self rhs: Core.Primitive.t_u128) - : Core.Option.t_Option Core.Primitive.t_u128 = - Core.Option.Option_Some (Core.Intrinsics.unchecked_add_u128 self rhs) - <: - Core.Option.t_Option Core.Primitive.t_u128 +include Core.Array.Rec_bundle_579704328 {v_MAX815180633 as impl_9__MAX} -let impl_11__checked_add (self rhs: Core.Primitive.t_usize) - : Core.Option.t_Option Core.Primitive.t_usize = - Core.Option.Option_Some (Core.Intrinsics.unchecked_add_usize self rhs) - <: - Core.Option.t_Option Core.Primitive.t_usize +include Core.Array.Rec_bundle_579704328 {v_MIN631333594 as impl_9__MIN} -let impl__i128__MAX: Core.Primitive.t_i128 = - Core.Primitive.C_i128 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_i128 +include Core.Array.Rec_bundle_579704328 {v_BITS136999051 as impl_10__BITS} -let impl__i128__MIN: Core.Primitive.t_i128 = - Core.Primitive.C_i128 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_i128 - -let impl__i16__MAX: Core.Primitive.t_i16 = - Core.Primitive.C_i16 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_i16 - -let impl__i16__MIN: Core.Primitive.t_i16 = - Core.Primitive.C_i16 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_i16 - -let impl__i32__MAX: Core.Primitive.t_i32 = - Core.Primitive.C_i32 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_i32 - -let impl__i32__MIN: Core.Primitive.t_i32 = - Core.Primitive.C_i32 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_i32 - -let impl__i64__MAX: Core.Primitive.t_i64 = - Core.Primitive.C_i64 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_i64 - -let impl__i64__MIN: Core.Primitive.t_i64 = - Core.Primitive.C_i64 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_i64 - -let impl__i8__MAX: Core.Primitive.t_i8 = - Core.Primitive.C_i8 Core.Base_interface.Int.f_MAX <: Core.Primitive.t_i8 - -let impl__i8__MIN: Core.Primitive.t_i8 = - Core.Primitive.C_i8 Core.Base_interface.Int.f_MIN <: Core.Primitive.t_i8 - -let impl__isize__MAX: Core.Primitive.t_isize = - Core.Primitive.C_isize Core.Base_interface.Int.f_MAX <: Core.Primitive.t_isize - -let impl__isize__MIN: Core.Primitive.t_isize = - Core.Primitive.C_isize Core.Base_interface.Int.f_MIN <: Core.Primitive.t_isize - -let impl__i8__is_negative (self: Core.Primitive.t_i8) : bool = - self <. - (Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y - <: - Core.Primitive.t_i8) - -let impl__i8__is_positive (self: Core.Primitive.t_i8) : bool = - self >. - (Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y - <: - Core.Primitive.t_i8) - -let impl__i8__signum (self: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - if - (Core.Clone.f_clone #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve self - <: - Core.Primitive.t_i8) <. - (Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y - <: - Core.Primitive.t_i8) - then Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve (-1y) - else - if - self =. - (Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y - <: - Core.Primitive.t_i8) - then Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y - else Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 1y - -let impl__i16__is_negative (self: Core.Primitive.t_i16) : bool = - self <. - (Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s - <: - Core.Primitive.t_i16) - -let impl__i16__is_positive (self: Core.Primitive.t_i16) : bool = - self >. - (Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s - <: - Core.Primitive.t_i16) - -let impl__i16__signum (self: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - if - (Core.Clone.f_clone #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve self - <: - Core.Primitive.t_i16) <. - (Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s - <: - Core.Primitive.t_i16) - then Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve (-1s) - else - if - self =. - (Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s - <: - Core.Primitive.t_i16) - then Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s - else Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 1s - -let impl__i32__is_negative (self: Core.Primitive.t_i32) : bool = - self <. - (Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l - <: - Core.Primitive.t_i32) - -let impl__i32__is_positive (self: Core.Primitive.t_i32) : bool = - self >. - (Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l - <: - Core.Primitive.t_i32) - -let impl__i32__signum (self: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - if - (Core.Clone.f_clone #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve self - <: - Core.Primitive.t_i32) <. - (Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l - <: - Core.Primitive.t_i32) - then Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve (-1l) - else - if - self =. - (Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l - <: - Core.Primitive.t_i32) - then Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l - else Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 1l - -let impl__i64__is_negative (self: Core.Primitive.t_i64) : bool = - self <. - (Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L - <: - Core.Primitive.t_i64) - -let impl__i64__is_positive (self: Core.Primitive.t_i64) : bool = - self >. - (Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L - <: - Core.Primitive.t_i64) - -let impl__i64__signum (self: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - if - (Core.Clone.f_clone #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve self - <: - Core.Primitive.t_i64) <. - (Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L - <: - Core.Primitive.t_i64) - then Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve (-1L) - else - if - self =. - (Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L - <: - Core.Primitive.t_i64) - then Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L - else Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 1L - -let impl__i128__is_negative (self: Core.Primitive.t_i128) : bool = - self <. - (Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) - <: - Core.Primitive.t_i128) - -let impl__i128__is_positive (self: Core.Primitive.t_i128) : bool = - self >. - (Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) - <: - Core.Primitive.t_i128) - -let impl__i128__signum (self: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - if - (Core.Clone.f_clone #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve self - <: - Core.Primitive.t_i128) <. - (Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) - <: - Core.Primitive.t_i128) - then - Core.Convert.f_into #i128 - #Core.Primitive.t_i128 - #FStar.Tactics.Typeclasses.solve - (pub_i128 (-1)) - else - if - self =. - (Core.Convert.f_into #i128 - #Core.Primitive.t_i128 - #FStar.Tactics.Typeclasses.solve - (pub_i128 0) - <: - Core.Primitive.t_i128) - then - Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) - else - Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 1) - -let impl__isize__is_negative (self: Core.Primitive.t_isize) : bool = - self <. - (Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) - <: - Core.Primitive.t_isize) - -let impl__isize__is_positive (self: Core.Primitive.t_isize) : bool = - self >. - (Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) - <: - Core.Primitive.t_isize) - -let impl__isize__signum (self: Core.Primitive.t_isize) : Core.Primitive.t_isize = - if - (Core.Clone.f_clone #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve self - <: - Core.Primitive.t_isize) <. - (Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) - <: - Core.Primitive.t_isize) - then - Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz (-1)) - else - if - self =. - (Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) - <: - Core.Primitive.t_isize) - then Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) - else Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 1) - -let impl__i8__wrapping_add (self rhs: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - Core.Intrinsics.wrapping_add_i8 self rhs - -let impl__i8__wrapping_sub (self rhs: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - Core.Intrinsics.wrapping_sub_i8 self rhs - -let impl__i8__wrapping_neg (self: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - impl__i8__wrapping_sub (Core.Convert.f_into #i8 - #Core.Primitive.t_i8 - #FStar.Tactics.Typeclasses.solve - 0y - <: - Core.Primitive.t_i8) - self - -let impl__i8__wrapping_abs (self: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - if - impl__i8__is_negative (Core.Clone.f_clone #Core.Primitive.t_i8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_i8) - then impl__i8__wrapping_neg self - else self - -let impl__i16__wrapping_add (self rhs: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - Core.Intrinsics.wrapping_add_i16 self rhs - -let impl__i16__wrapping_sub (self rhs: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - Core.Intrinsics.wrapping_sub_i16 self rhs - -let impl__i16__wrapping_neg (self: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - impl__i16__wrapping_sub (Core.Convert.f_into #i16 - #Core.Primitive.t_i16 - #FStar.Tactics.Typeclasses.solve - 0s - <: - Core.Primitive.t_i16) - self - -let impl__i16__wrapping_abs (self: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - if - impl__i16__is_negative (Core.Clone.f_clone #Core.Primitive.t_i16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_i16) - then impl__i16__wrapping_neg self - else self - -let impl__i32__wrapping_add (self rhs: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - Core.Intrinsics.wrapping_add_i32 self rhs - -let impl__i32__wrapping_sub (self rhs: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - Core.Intrinsics.wrapping_sub_i32 self rhs - -let impl__i32__wrapping_neg (self: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - impl__i32__wrapping_sub (Core.Convert.f_into #i32 - #Core.Primitive.t_i32 - #FStar.Tactics.Typeclasses.solve - 0l - <: - Core.Primitive.t_i32) - self - -let impl__i32__wrapping_abs (self: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - if - impl__i32__is_negative (Core.Clone.f_clone #Core.Primitive.t_i32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_i32) - then impl__i32__wrapping_neg self - else self - -let impl__i64__wrapping_add (self rhs: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - Core.Intrinsics.wrapping_add_i64 self rhs - -let impl__i64__wrapping_sub (self rhs: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - Core.Intrinsics.wrapping_sub_i64 self rhs - -let impl__i64__wrapping_neg (self: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - impl__i64__wrapping_sub (Core.Convert.f_into #i64 - #Core.Primitive.t_i64 - #FStar.Tactics.Typeclasses.solve - 0L - <: - Core.Primitive.t_i64) - self - -let impl__i64__wrapping_abs (self: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - if - impl__i64__is_negative (Core.Clone.f_clone #Core.Primitive.t_i64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_i64) - then impl__i64__wrapping_neg self - else self - -let impl__i128__wrapping_add (self rhs: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - Core.Intrinsics.wrapping_add_i128 self rhs - -let impl__i128__wrapping_sub (self rhs: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - Core.Intrinsics.wrapping_sub_i128 self rhs - -let impl__i128__wrapping_neg (self: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - impl__i128__wrapping_sub (Core.Convert.f_into #i128 - #Core.Primitive.t_i128 - #FStar.Tactics.Typeclasses.solve - (pub_i128 0) - <: - Core.Primitive.t_i128) - self - -let impl__i128__wrapping_abs (self: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - if - impl__i128__is_negative (Core.Clone.f_clone #Core.Primitive.t_i128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_i128) - then impl__i128__wrapping_neg self - else self - -let impl__isize__wrapping_add (self rhs: Core.Primitive.t_isize) : Core.Primitive.t_isize = - Core.Intrinsics.wrapping_add_isize self rhs - -let impl__isize__wrapping_sub (self rhs: Core.Primitive.t_isize) : Core.Primitive.t_isize = - Core.Intrinsics.wrapping_sub_isize self rhs - -let impl__isize__wrapping_neg (self: Core.Primitive.t_isize) : Core.Primitive.t_isize = - impl__isize__wrapping_sub (Core.Convert.f_into #isize - #Core.Primitive.t_isize - #FStar.Tactics.Typeclasses.solve - (isz 0) - <: - Core.Primitive.t_isize) - self - -let impl__isize__wrapping_abs (self: Core.Primitive.t_isize) : Core.Primitive.t_isize = - if - impl__isize__is_negative (Core.Clone.f_clone #Core.Primitive.t_isize - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_isize) - then impl__isize__wrapping_neg self - else self - -let impl_6__checked_div (self rhs: Core.Primitive.t_u8) : Core.Option.t_Option Core.Primitive.t_u8 = - if - rhs =. - (Core.Convert.f_into #u8 #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve 0uy - <: - Core.Primitive.t_u8) - then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u8 - else - Core.Option.Option_Some (Core.Intrinsics.unchecked_div_u8 self rhs) - <: - Core.Option.t_Option Core.Primitive.t_u8 - -let impl_6__overflowing_add (self rhs: Core.Primitive.t_u8) : (Core.Primitive.t_u8 & bool) = - Core.Intrinsics.add_with_overflow_u8 self rhs - -let impl_7__checked_div (self rhs: Core.Primitive.t_u16) : Core.Option.t_Option Core.Primitive.t_u16 = - if - rhs =. - (Core.Convert.f_into #u16 #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve 0us - <: - Core.Primitive.t_u16) - then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u16 - else - Core.Option.Option_Some (Core.Intrinsics.unchecked_div_u16 self rhs) - <: - Core.Option.t_Option Core.Primitive.t_u16 - -let impl_7__overflowing_add (self rhs: Core.Primitive.t_u16) : (Core.Primitive.t_u16 & bool) = - Core.Intrinsics.add_with_overflow_u16 self rhs - -let impl_8__checked_div (self rhs: Core.Primitive.t_u32) : Core.Option.t_Option Core.Primitive.t_u32 = - if - rhs =. - (Core.Convert.f_into #u32 #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve 0ul - <: - Core.Primitive.t_u32) - then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u32 - else - Core.Option.Option_Some (Core.Intrinsics.unchecked_div_u32 self rhs) - <: - Core.Option.t_Option Core.Primitive.t_u32 - -let impl_8__overflowing_add (self rhs: Core.Primitive.t_u32) : (Core.Primitive.t_u32 & bool) = - Core.Intrinsics.add_with_overflow_u32 self rhs - -let impl_9__checked_div (self rhs: Core.Primitive.t_u64) : Core.Option.t_Option Core.Primitive.t_u64 = - if - rhs =. - (Core.Convert.f_into #u64 #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve 0uL - <: - Core.Primitive.t_u64) - then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u64 - else - Core.Option.Option_Some (Core.Intrinsics.unchecked_div_u64 self rhs) - <: - Core.Option.t_Option Core.Primitive.t_u64 - -let impl_9__overflowing_add (self rhs: Core.Primitive.t_u64) : (Core.Primitive.t_u64 & bool) = - Core.Intrinsics.add_with_overflow_u64 self rhs - -let impl_10__checked_div (self rhs: Core.Primitive.t_u128) - : Core.Option.t_Option Core.Primitive.t_u128 = - if - rhs =. - (Core.Convert.f_into #u128 #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 0) - <: - Core.Primitive.t_u128) - then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u128 - else - Core.Option.Option_Some (Core.Intrinsics.unchecked_div_u128 self rhs) - <: - Core.Option.t_Option Core.Primitive.t_u128 - -let impl_10__overflowing_add (self rhs: Core.Primitive.t_u128) : (Core.Primitive.t_u128 & bool) = - Core.Intrinsics.add_with_overflow_u128 self rhs - -let impl_11__checked_div (self rhs: Core.Primitive.t_usize) - : Core.Option.t_Option Core.Primitive.t_usize = - if - rhs =. - (Core.Convert.f_into #usize #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve (sz 0) - <: - Core.Primitive.t_usize) - then Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize - else - Core.Option.Option_Some (Core.Intrinsics.unchecked_div_usize self rhs) - <: - Core.Option.t_Option Core.Primitive.t_usize - -let impl_11__overflowing_add (self rhs: Core.Primitive.t_usize) : (Core.Primitive.t_usize & bool) = - Core.Intrinsics.add_with_overflow_usize self rhs - -let impl_6__wrapping_add (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - Core.Intrinsics.wrapping_add_u8 self rhs - -let impl_6__wrapping_mul (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - Core.Intrinsics.wrapping_mul_u8 self rhs - -let impl_7__wrapping_add (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - Core.Intrinsics.wrapping_add_u16 self rhs - -let impl_7__wrapping_mul (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - Core.Intrinsics.wrapping_mul_u16 self rhs - -let impl_8__wrapping_add (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Core.Intrinsics.wrapping_add_u32 self rhs - -let impl_8__wrapping_mul (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Core.Intrinsics.wrapping_mul_u32 self rhs - -let impl_9__wrapping_add (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - Core.Intrinsics.wrapping_add_u64 self rhs - -let impl_9__wrapping_mul (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - Core.Intrinsics.wrapping_mul_u64 self rhs - -let impl_10__wrapping_add (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - Core.Intrinsics.wrapping_add_u128 self rhs - -let impl_10__wrapping_mul (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - Core.Intrinsics.wrapping_mul_u128 self rhs - -let impl_11__wrapping_add (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = - Core.Intrinsics.wrapping_add_usize self rhs - -let impl_11__wrapping_mul (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = - Core.Intrinsics.wrapping_mul_usize self rhs - -let impl__i8__abs (self: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - if - impl__i8__is_negative (Core.Clone.f_clone #Core.Primitive.t_i8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_i8) - then Core.Ops.Arith.f_neg #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve self - else self - -let impl__i16__abs (self: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - if - impl__i16__is_negative (Core.Clone.f_clone #Core.Primitive.t_i16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_i16) - then Core.Ops.Arith.f_neg #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve self - else self - -let impl__i32__abs (self: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - if - impl__i32__is_negative (Core.Clone.f_clone #Core.Primitive.t_i32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_i32) - then Core.Ops.Arith.f_neg #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve self - else self - -let impl__i64__abs (self: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - if - impl__i64__is_negative (Core.Clone.f_clone #Core.Primitive.t_i64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_i64) - then Core.Ops.Arith.f_neg #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve self - else self - -let impl__i128__abs (self: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - if - impl__i128__is_negative (Core.Clone.f_clone #Core.Primitive.t_i128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_i128) - then Core.Ops.Arith.f_neg #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve self - else self +include Core.Array.Rec_bundle_579704328 {v_MAX404543799 as impl_10__MAX} -let impl__isize__abs (self: Core.Primitive.t_isize) : Core.Primitive.t_isize = - if - impl__isize__is_negative (Core.Clone.f_clone #Core.Primitive.t_isize - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Primitive.t_isize) - then Core.Ops.Arith.f_neg #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve self - else self +include Core.Array.Rec_bundle_579704328 {v_MIN668621698 as impl_10__MIN} -let impl_6__wrapping_sub (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - Core.Intrinsics.wrapping_sub_u8 self rhs +include Core.Array.Rec_bundle_579704328 {v_BITS229952196 as impl_11__BITS} -let impl_6__wrapping_neg (self: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - impl_6__wrapping_sub (Core.Primitive.C_u8 Core.Base_interface.Int.f_ZERO <: Core.Primitive.t_u8) - self +include Core.Array.Rec_bundle_579704328 {v_MAX750570916 as impl_11__MAX} -let impl_7__wrapping_sub (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - Core.Intrinsics.wrapping_sub_u16 self rhs +include Core.Array.Rec_bundle_579704328 {v_MIN861571008 as impl_11__MIN} -let impl_7__wrapping_neg (self: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - impl_7__wrapping_sub (Core.Primitive.C_u16 Core.Base_interface.Int.f_ZERO <: Core.Primitive.t_u16) - self +include Core.Array.Rec_bundle_579704328 {is_negative350273175 as impl__i8__is_negative} -let impl_8__wrapping_sub (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Core.Intrinsics.wrapping_sub_u32 self rhs +include Core.Array.Rec_bundle_579704328 {is_positive286955196 as impl__i8__is_positive} -let impl_8__wrapping_neg (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - impl_8__wrapping_sub (Core.Primitive.C_u32 Core.Base_interface.Int.f_ZERO <: Core.Primitive.t_u32) - self +include Core.Array.Rec_bundle_579704328 {signum721334203 as impl__i8__signum} -let impl_9__wrapping_sub (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - Core.Intrinsics.wrapping_sub_u64 self rhs +include Core.Array.Rec_bundle_579704328 {is_negative477067241 as impl__i16__is_negative} -let impl_9__wrapping_neg (self: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - impl_9__wrapping_sub (Core.Primitive.C_u64 Core.Base_interface.Int.f_ZERO <: Core.Primitive.t_u64) - self - -let impl_10__wrapping_sub (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - Core.Intrinsics.wrapping_sub_u128 self rhs - -let impl_10__wrapping_neg (self: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - impl_10__wrapping_sub (Core.Primitive.C_u128 Core.Base_interface.Int.f_ZERO - <: - Core.Primitive.t_u128) - self - -let impl_11__wrapping_sub (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = - Core.Intrinsics.wrapping_sub_usize self rhs - -let impl_11__wrapping_neg (self: Core.Primitive.t_usize) : Core.Primitive.t_usize = - impl_11__wrapping_sub (Core.Primitive.C_usize Core.Base_interface.Int.f_ZERO - <: - Core.Primitive.t_usize) - self - -let impl_6__wrapping_div (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self /! rhs - -let impl_6__wrapping_div_euclid (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self /! rhs - -let impl_7__wrapping_div (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = self /! rhs - -let impl_7__wrapping_div_euclid (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - self /! rhs - -let impl_8__wrapping_div (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self /! rhs - -let impl_8__wrapping_div_euclid (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - self /! rhs - -let impl_9__wrapping_div (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self /! rhs - -let impl_9__wrapping_div_euclid (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - self /! rhs - -let impl_10__wrapping_div (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self /! rhs - -let impl_10__wrapping_div_euclid (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - self /! rhs - -let impl_11__wrapping_div (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = self /! rhs - -let impl_11__wrapping_div_euclid (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = - self /! rhs - -let impl_6__wrapping_rem (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self %! rhs - -let impl_6__wrapping_rem_euclid (self rhs: Core.Primitive.t_u8) : Core.Primitive.t_u8 = self %! rhs - -let impl_7__wrapping_rem (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = self %! rhs - -let impl_7__wrapping_rem_euclid (self rhs: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - self %! rhs - -let impl_8__wrapping_rem (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = self %! rhs - -let impl_8__wrapping_rem_euclid (self rhs: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - self %! rhs - -let impl_9__wrapping_rem (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = self %! rhs - -let impl_9__wrapping_rem_euclid (self rhs: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - self %! rhs - -let impl_10__wrapping_rem (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = self %! rhs - -let impl_10__wrapping_rem_euclid (self rhs: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - self %! rhs - -let impl_11__wrapping_rem (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = self %! rhs - -let impl_11__wrapping_rem_euclid (self rhs: Core.Primitive.t_usize) : Core.Primitive.t_usize = - self %! rhs - -let impl_6__rotate_left (self: Core.Primitive.t_u8) (n: Core.Primitive.t_u32) : Core.Primitive.t_u8 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist1:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_u8 self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u8 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist1) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u8 Core.Primitive.t_u8) - -let impl_6__rotate_right (self: Core.Primitive.t_u8) (n: Core.Primitive.t_u32) : Core.Primitive.t_u8 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist2:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_u8 self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u8 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist2) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u8 Core.Primitive.t_u8) - -let impl_7__rotate_left (self: Core.Primitive.t_u16) (n: Core.Primitive.t_u32) - : Core.Primitive.t_u16 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist3:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_u16 self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u16 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist3) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u16 Core.Primitive.t_u16) - -let impl_7__rotate_right (self: Core.Primitive.t_u16) (n: Core.Primitive.t_u32) - : Core.Primitive.t_u16 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist4:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_u16 self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u16 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist4) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u16 Core.Primitive.t_u16) - -let impl_8__rotate_left (self n: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist5:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_u32 self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist5) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_8__rotate_right (self n: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist6:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_u32 self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist6) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_9__rotate_left (self: Core.Primitive.t_u64) (n: Core.Primitive.t_u32) - : Core.Primitive.t_u64 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist7:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_u64 self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u64 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist7) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u64 Core.Primitive.t_u64) - -let impl_9__rotate_right (self: Core.Primitive.t_u64) (n: Core.Primitive.t_u32) - : Core.Primitive.t_u64 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist8:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_u64 self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u64 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist8) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u64 Core.Primitive.t_u64) - -let impl_10__rotate_left (self: Core.Primitive.t_u128) (n: Core.Primitive.t_u32) - : Core.Primitive.t_u128 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist9:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_u128 self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u128 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist9) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u128 Core.Primitive.t_u128) - -let impl_10__rotate_right (self: Core.Primitive.t_u128) (n: Core.Primitive.t_u32) - : Core.Primitive.t_u128 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist10:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_u128 self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u128 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist10) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u128 Core.Primitive.t_u128) - -let impl_11__rotate_left (self: Core.Primitive.t_usize) (n: Core.Primitive.t_u32) - : Core.Primitive.t_usize = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist11:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_left_usize self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_usize Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist11) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_usize Core.Primitive.t_usize) - -let impl_11__rotate_right (self: Core.Primitive.t_usize) (n: Core.Primitive.t_u32) - : Core.Primitive.t_usize = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist12:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.rotate_right_usize self n) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_usize Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist12) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_usize Core.Primitive.t_usize) - -let impl_6__count_ones (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist13:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_u8 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist13) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_6__leading_zeros (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist14:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_u8 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist14) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_6__swap_bytes (self: Core.Primitive.t_u8) : Core.Primitive.t_u8 = - Core.Convert.f_into #Core.Primitive.t_u8 - #Core.Primitive.t_u8 - #FStar.Tactics.Typeclasses.solve - (Core.Intrinsics.bswap_u8 self <: Core.Primitive.t_u8) - -let impl_6__from_be (x: Core.Primitive.t_u8) : Core.Primitive.t_u8 = impl_6__swap_bytes x - -let impl_6__to_be (self: Core.Primitive.t_u8) : Core.Primitive.t_u8 = impl_6__swap_bytes self - -let impl_6__trailing_zeros (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist15:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_u8 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist15) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_7__count_ones (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist16:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_u16 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist16) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_7__leading_zeros (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist17:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_u16 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist17) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_7__swap_bytes (self: Core.Primitive.t_u16) : Core.Primitive.t_u16 = - Core.Convert.f_into #Core.Primitive.t_u16 - #Core.Primitive.t_u16 - #FStar.Tactics.Typeclasses.solve - (Core.Intrinsics.bswap_u16 self <: Core.Primitive.t_u16) - -let impl_7__from_be (x: Core.Primitive.t_u16) : Core.Primitive.t_u16 = impl_7__swap_bytes x - -let impl_7__to_be (self: Core.Primitive.t_u16) : Core.Primitive.t_u16 = impl_7__swap_bytes self - -let impl_7__trailing_zeros (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist18:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_u16 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist18) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_8__count_ones (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist19:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_u32 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist19) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_8__leading_zeros (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist20:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_u32 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist20) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_8__swap_bytes (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_u32 - #FStar.Tactics.Typeclasses.solve - (Core.Intrinsics.bswap_u32 self <: Core.Primitive.t_u32) - -let impl_8__from_be (x: Core.Primitive.t_u32) : Core.Primitive.t_u32 = impl_8__swap_bytes x - -let impl_8__to_be (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = impl_8__swap_bytes self - -let impl_8__trailing_zeros (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist21:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_u32 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist21) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_9__count_ones (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist22:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_u64 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist22) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_9__leading_zeros (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist23:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_u64 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist23) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_9__swap_bytes (self: Core.Primitive.t_u64) : Core.Primitive.t_u64 = - Core.Convert.f_into #Core.Primitive.t_u64 - #Core.Primitive.t_u64 - #FStar.Tactics.Typeclasses.solve - (Core.Intrinsics.bswap_u64 self <: Core.Primitive.t_u64) - -let impl_9__from_be (x: Core.Primitive.t_u64) : Core.Primitive.t_u64 = impl_9__swap_bytes x - -let impl_9__to_be (self: Core.Primitive.t_u64) : Core.Primitive.t_u64 = impl_9__swap_bytes self - -let impl_9__trailing_zeros (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist24:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_u64 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist24) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_10__count_ones (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist25:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_u128 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist25) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_10__leading_zeros (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist26:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_u128 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist26) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_10__swap_bytes (self: Core.Primitive.t_u128) : Core.Primitive.t_u128 = - Core.Convert.f_into #Core.Primitive.t_u128 - #Core.Primitive.t_u128 - #FStar.Tactics.Typeclasses.solve - (Core.Intrinsics.bswap_u128 self <: Core.Primitive.t_u128) - -let impl_10__from_be (x: Core.Primitive.t_u128) : Core.Primitive.t_u128 = impl_10__swap_bytes x - -let impl_10__to_be (self: Core.Primitive.t_u128) : Core.Primitive.t_u128 = impl_10__swap_bytes self - -let impl_10__trailing_zeros (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist27:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_u128 self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist27) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_11__count_ones (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist28:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctpop_usize self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist28) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_11__leading_zeros (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist29:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.ctlz_usize self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist29) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl_11__swap_bytes (self: Core.Primitive.t_usize) : Core.Primitive.t_usize = - Core.Convert.f_into #Core.Primitive.t_usize - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - (Core.Intrinsics.bswap_usize self <: Core.Primitive.t_usize) - -let impl_11__from_be (x: Core.Primitive.t_usize) : Core.Primitive.t_usize = impl_11__swap_bytes x - -let impl_11__to_be (self: Core.Primitive.t_usize) : Core.Primitive.t_usize = - impl_11__swap_bytes self - -let impl_11__trailing_zeros (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = - Rust_primitives.Hax.Control_flow_monad.Mexception.run (let! hoist30:Rust_primitives.Hax.t_Never = - Core.Ops.Control_flow.ControlFlow_Break (Core.Intrinsics.cttz_usize self) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Rust_primitives.Hax.t_Never - in - Core.Ops.Control_flow.ControlFlow_Continue (Rust_primitives.Hax.never_to_any hoist30) - <: - Core.Ops.Control_flow.t_ControlFlow Core.Primitive.t_u32 Core.Primitive.t_u32) - -let impl__i8__rem_euclid (self rhs: Core.Primitive.t_i8) : Core.Primitive.t_i8 = - let r:Core.Primitive.t_i8 = - self %! - (Core.Clone.f_clone #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Primitive.t_i8) - in - if - r <. - (Core.Convert.f_into #i8 #Core.Primitive.t_i8 #FStar.Tactics.Typeclasses.solve 0y - <: - Core.Primitive.t_i8) - then impl__i8__wrapping_add r (impl__i8__wrapping_abs rhs <: Core.Primitive.t_i8) - else r - -let impl__i16__rem_euclid (self rhs: Core.Primitive.t_i16) : Core.Primitive.t_i16 = - let r:Core.Primitive.t_i16 = - self %! - (Core.Clone.f_clone #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Primitive.t_i16) - in - if - r <. - (Core.Convert.f_into #i16 #Core.Primitive.t_i16 #FStar.Tactics.Typeclasses.solve 0s - <: - Core.Primitive.t_i16) - then impl__i16__wrapping_add r (impl__i16__wrapping_abs rhs <: Core.Primitive.t_i16) - else r - -let impl__i32__rem_euclid (self rhs: Core.Primitive.t_i32) : Core.Primitive.t_i32 = - let r:Core.Primitive.t_i32 = - self %! - (Core.Clone.f_clone #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Primitive.t_i32) - in - if - r <. - (Core.Convert.f_into #i32 #Core.Primitive.t_i32 #FStar.Tactics.Typeclasses.solve 0l - <: - Core.Primitive.t_i32) - then impl__i32__wrapping_add r (impl__i32__wrapping_abs rhs <: Core.Primitive.t_i32) - else r - -let impl__i64__rem_euclid (self rhs: Core.Primitive.t_i64) : Core.Primitive.t_i64 = - let r:Core.Primitive.t_i64 = - self %! - (Core.Clone.f_clone #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Primitive.t_i64) - in - if - r <. - (Core.Convert.f_into #i64 #Core.Primitive.t_i64 #FStar.Tactics.Typeclasses.solve 0L - <: - Core.Primitive.t_i64) - then impl__i64__wrapping_add r (impl__i64__wrapping_abs rhs <: Core.Primitive.t_i64) - else r - -let impl__i128__rem_euclid (self rhs: Core.Primitive.t_i128) : Core.Primitive.t_i128 = - let r:Core.Primitive.t_i128 = - self %! - (Core.Clone.f_clone #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Primitive.t_i128) - in - if - r <. - (Core.Convert.f_into #i128 #Core.Primitive.t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) - <: - Core.Primitive.t_i128) - then impl__i128__wrapping_add r (impl__i128__wrapping_abs rhs <: Core.Primitive.t_i128) - else r - -let impl__isize__rem_euclid (self rhs: Core.Primitive.t_isize) : Core.Primitive.t_isize = - let r:Core.Primitive.t_isize = - self %! - (Core.Clone.f_clone #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Primitive.t_isize) - in - if - r <. - (Core.Convert.f_into #isize #Core.Primitive.t_isize #FStar.Tactics.Typeclasses.solve (isz 0) - <: - Core.Primitive.t_isize) - then impl__isize__wrapping_add r (impl__isize__wrapping_abs rhs <: Core.Primitive.t_isize) - else r - -let impl_6__count_zeros (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = - impl_6__count_ones (~.self <: Core.Primitive.t_u8) - -let impl_6__leading_ones (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = - impl_6__leading_zeros (~.self <: Core.Primitive.t_u8) - -let impl_6__trailing_ones (self: Core.Primitive.t_u8) : Core.Primitive.t_u32 = - impl_6__trailing_zeros (~.self <: Core.Primitive.t_u8) - -let impl_7__count_zeros (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = - impl_7__count_ones (~.self <: Core.Primitive.t_u16) - -let impl_7__leading_ones (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = - impl_7__leading_zeros (~.self <: Core.Primitive.t_u16) - -let impl_7__trailing_ones (self: Core.Primitive.t_u16) : Core.Primitive.t_u32 = - impl_7__trailing_zeros (~.self <: Core.Primitive.t_u16) - -let impl_8__count_zeros (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - impl_8__count_ones (~.self <: Core.Primitive.t_u32) - -let impl_8__leading_ones (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - impl_8__leading_zeros (~.self <: Core.Primitive.t_u32) - -let impl_8__trailing_ones (self: Core.Primitive.t_u32) : Core.Primitive.t_u32 = - impl_8__trailing_zeros (~.self <: Core.Primitive.t_u32) - -let impl_9__count_zeros (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = - impl_9__count_ones (~.self <: Core.Primitive.t_u64) - -let impl_9__leading_ones (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = - impl_9__leading_zeros (~.self <: Core.Primitive.t_u64) - -let impl_9__trailing_ones (self: Core.Primitive.t_u64) : Core.Primitive.t_u32 = - impl_9__trailing_zeros (~.self <: Core.Primitive.t_u64) - -let impl_10__count_zeros (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = - impl_10__count_ones (~.self <: Core.Primitive.t_u128) - -let impl_10__leading_ones (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = - impl_10__leading_zeros (~.self <: Core.Primitive.t_u128) - -let impl_10__trailing_ones (self: Core.Primitive.t_u128) : Core.Primitive.t_u32 = - impl_10__trailing_zeros (~.self <: Core.Primitive.t_u128) - -let impl_11__count_zeros (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = - impl_11__count_ones (~.self <: Core.Primitive.t_usize) - -let impl_11__leading_ones (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = - impl_11__leading_zeros (~.self <: Core.Primitive.t_usize) - -let impl_11__trailing_ones (self: Core.Primitive.t_usize) : Core.Primitive.t_u32 = - impl_11__trailing_zeros (~.self <: Core.Primitive.t_usize) +include Core.Array.Rec_bundle_579704328 {is_positive821581438 as impl__i16__is_positive} + +include Core.Array.Rec_bundle_579704328 {signum243706004 as impl__i16__signum} + +include Core.Array.Rec_bundle_579704328 {is_negative1035644813 as impl_2__is_negative} + +include Core.Array.Rec_bundle_579704328 {is_positive401652342 as impl_2__is_positive} + +include Core.Array.Rec_bundle_579704328 {signum323641039 as impl_2__signum} + +include Core.Array.Rec_bundle_579704328 {is_negative1066124578 as impl__i64__is_negative} + +include Core.Array.Rec_bundle_579704328 {is_positive16569358 as impl__i64__is_positive} + +include Core.Array.Rec_bundle_579704328 {signum582963664 as impl__i64__signum} + +include Core.Array.Rec_bundle_579704328 {is_negative221698470 as impl__i128__is_negative} + +include Core.Array.Rec_bundle_579704328 {is_positive883218309 as impl__i128__is_positive} + +include Core.Array.Rec_bundle_579704328 {signum408800799 as impl__i128__signum} + +include Core.Array.Rec_bundle_579704328 {is_negative693446369 as impl__isize__is_negative} + +include Core.Array.Rec_bundle_579704328 {is_positive169998680 as impl__isize__is_positive} + +include Core.Array.Rec_bundle_579704328 {signum91486536 as impl__isize__signum} + +include Core.Array.Rec_bundle_579704328 {checked_add268751055 as impl_6__checked_add} + +include Core.Array.Rec_bundle_579704328 {checked_add132377399 as impl_7__checked_add} + +include Core.Array.Rec_bundle_579704328 {checked_add985437730 as impl_8__checked_add} + +include Core.Array.Rec_bundle_579704328 {checked_add586246465 as impl_9__checked_add} + +include Core.Array.Rec_bundle_579704328 {checked_add218978451 as impl_10__checked_add} + +include Core.Array.Rec_bundle_579704328 {checked_add984013567 as impl_11__checked_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_add634491935 as impl__i8__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub973428293 as impl__i8__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg400701205 as impl__i8__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_abs400396545 as impl__i8__wrapping_abs} + +include Core.Array.Rec_bundle_579704328 {wrapping_add868559108 as impl__i16__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub189469152 as impl__i16__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg860505723 as impl__i16__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_abs229076826 as impl__i16__wrapping_abs} + +include Core.Array.Rec_bundle_579704328 {wrapping_add475006616 as impl_2__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub298337071 as impl_2__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg636433078 as impl_2__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_abs729536875 as impl_2__wrapping_abs} + +include Core.Array.Rec_bundle_579704328 {wrapping_add590074241 as impl__i64__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub334584751 as impl__i64__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg868282938 as impl__i64__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_abs285829312 as impl__i64__wrapping_abs} + +include Core.Array.Rec_bundle_579704328 {wrapping_add251385439 as impl__i128__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub681598071 as impl__i128__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg446546984 as impl__i128__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_abs281925696 as impl__i128__wrapping_abs} + +include Core.Array.Rec_bundle_579704328 {wrapping_add226040243 as impl__isize__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub698035192 as impl__isize__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg912291768 as impl__isize__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_abs347300819 as impl__isize__wrapping_abs} + +include Core.Array.Rec_bundle_579704328 {checked_div508301931 as impl_6__checked_div} + +include Core.Array.Rec_bundle_579704328 {overflowing_add708890057 as impl_6__overflowing_add} + +include Core.Array.Rec_bundle_579704328 {checked_div614920780 as impl_7__checked_div} + +include Core.Array.Rec_bundle_579704328 {overflowing_add1023344178 as impl_7__overflowing_add} + +include Core.Array.Rec_bundle_579704328 {checked_div979383477 as impl_8__checked_div} + +include Core.Array.Rec_bundle_579704328 {overflowing_add905744292 as impl_8__overflowing_add} + +include Core.Array.Rec_bundle_579704328 {checked_div988689127 as impl_9__checked_div} + +include Core.Array.Rec_bundle_579704328 {overflowing_add581983607 as impl_9__overflowing_add} + +include Core.Array.Rec_bundle_579704328 {checked_div344106746 as impl_10__checked_div} + +include Core.Array.Rec_bundle_579704328 {overflowing_add458293681 as impl_10__overflowing_add} + +include Core.Array.Rec_bundle_579704328 {checked_div80223906 as impl_11__checked_div} + +include Core.Array.Rec_bundle_579704328 {overflowing_add682280407 as impl_11__overflowing_add} + +include Core.Array.Rec_bundle_579704328 {abs945505614 as impl__i8__abs} + +include Core.Array.Rec_bundle_579704328 {abs581170970 as impl__i16__abs} + +include Core.Array.Rec_bundle_579704328 {abs590464694 as impl_2__abs} + +include Core.Array.Rec_bundle_579704328 {abs654781043 as impl__i64__abs} + +include Core.Array.Rec_bundle_579704328 {abs204417539 as impl__i128__abs} + +include Core.Array.Rec_bundle_579704328 {abs220926056 as impl__isize__abs} + +include Core.Array.Rec_bundle_579704328 {wrapping_add480603777 as impl_6__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul885216284 as impl_6__wrapping_mul} + +include Core.Array.Rec_bundle_579704328 {wrapping_add124432709 as impl_7__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul14465189 as impl_7__wrapping_mul} + +include Core.Array.Rec_bundle_579704328 {wrapping_add1049665857 as impl_8__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul203346768 as impl_8__wrapping_mul} + +include Core.Array.Rec_bundle_579704328 {wrapping_add865565639 as impl_9__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul742978873 as impl_9__wrapping_mul} + +include Core.Array.Rec_bundle_579704328 {wrapping_add40844100 as impl_10__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul294115024 as impl_10__wrapping_mul} + +include Core.Array.Rec_bundle_579704328 {wrapping_add427637036 as impl_11__wrapping_add} + +include Core.Array.Rec_bundle_579704328 {wrapping_mul680896953 as impl_11__wrapping_mul} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub403906422 as impl_6__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg123212788 as impl_6__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub811251034 as impl_7__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg128555595 as impl_7__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub708953500 as impl_8__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg328220773 as impl_8__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub762520851 as impl_9__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg617136337 as impl_9__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub409310259 as impl_10__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg729451428 as impl_10__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_sub813101882 as impl_11__wrapping_sub} + +include Core.Array.Rec_bundle_579704328 {wrapping_neg342773446 as impl_11__wrapping_neg} + +include Core.Array.Rec_bundle_579704328 {wrapping_div660080892 as impl_6__wrapping_div} + +include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid481233436 as impl_6__wrapping_div_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_div366977334 as impl_7__wrapping_div} + +include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid22267888 as impl_7__wrapping_div_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_div931150450 as impl_8__wrapping_div} + +include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid606291997 as impl_8__wrapping_div_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_div168427046 as impl_9__wrapping_div} + +include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid321252086 as impl_9__wrapping_div_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_div692427683 as impl_10__wrapping_div} + +include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid926334515 as impl_10__wrapping_div_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_div905768546 as impl_11__wrapping_div} + +include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid90317722 as impl_11__wrapping_div_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem984569721 as impl_6__wrapping_rem} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid946579345 as impl_6__wrapping_rem_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem378598035 as impl_7__wrapping_rem} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid602402638 as impl_7__wrapping_rem_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem292009099 as impl_8__wrapping_rem} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid1020271291 as impl_8__wrapping_rem_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem390602260 as impl_9__wrapping_rem} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid839264546 as impl_9__wrapping_rem_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem332379920 as impl_10__wrapping_rem} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid646122423 as impl_10__wrapping_rem_euclid} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem333089373 as impl_11__wrapping_rem} + +include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid769656504 as impl_11__wrapping_rem_euclid} + +include Core.Array.Rec_bundle_579704328 {rotate_left792925914 as impl_6__rotate_left} + +include Core.Array.Rec_bundle_579704328 {rotate_right166090082 as impl_6__rotate_right} + +include Core.Array.Rec_bundle_579704328 {rotate_left297034175 as impl_7__rotate_left} + +include Core.Array.Rec_bundle_579704328 {rotate_right138522246 as impl_7__rotate_right} + +include Core.Array.Rec_bundle_579704328 {rotate_left823573251 as impl_8__rotate_left} + +include Core.Array.Rec_bundle_579704328 {rotate_right869195717 as impl_8__rotate_right} + +include Core.Array.Rec_bundle_579704328 {rotate_left618936072 as impl_9__rotate_left} + +include Core.Array.Rec_bundle_579704328 {rotate_right1041614027 as impl_9__rotate_right} + +include Core.Array.Rec_bundle_579704328 {rotate_left1065866885 as impl_10__rotate_left} + +include Core.Array.Rec_bundle_579704328 {rotate_right591112338 as impl_10__rotate_right} + +include Core.Array.Rec_bundle_579704328 {rotate_left996672710 as impl_11__rotate_left} + +include Core.Array.Rec_bundle_579704328 {rotate_right442734174 as impl_11__rotate_right} + +include Core.Array.Rec_bundle_579704328 {count_ones202509899 as impl_6__count_ones} + +include Core.Array.Rec_bundle_579704328 {leading_zeros75047366 as impl_6__leading_zeros} + +include Core.Array.Rec_bundle_579704328 {swap_bytes657156997 as impl_6__swap_bytes} + +include Core.Array.Rec_bundle_579704328 {from_be746282521 as impl_6__from_be} + +include Core.Array.Rec_bundle_579704328 {to_be972448780 as impl_6__to_be} + +include Core.Array.Rec_bundle_579704328 {trailing_zeros572929871 as impl_6__trailing_zeros} + +include Core.Array.Rec_bundle_579704328 {count_ones91875752 as impl_7__count_ones} + +include Core.Array.Rec_bundle_579704328 {leading_zeros462412478 as impl_7__leading_zeros} + +include Core.Array.Rec_bundle_579704328 {swap_bytes926722059 as impl_7__swap_bytes} + +include Core.Array.Rec_bundle_579704328 {from_be510959665 as impl_7__from_be} + +include Core.Array.Rec_bundle_579704328 {to_be551590602 as impl_7__to_be} + +include Core.Array.Rec_bundle_579704328 {trailing_zeros421474733 as impl_7__trailing_zeros} + +include Core.Array.Rec_bundle_579704328 {count_ones776185738 as impl_8__count_ones} + +include Core.Array.Rec_bundle_579704328 {leading_zeros698221972 as impl_8__leading_zeros} + +include Core.Array.Rec_bundle_579704328 {swap_bytes320480126 as impl_8__swap_bytes} + +include Core.Array.Rec_bundle_579704328 {from_be664756649 as impl_8__from_be} + +include Core.Array.Rec_bundle_579704328 {to_be82825962 as impl_8__to_be} + +include Core.Array.Rec_bundle_579704328 {trailing_zeros1061560720 as impl_8__trailing_zeros} + +include Core.Array.Rec_bundle_579704328 {count_ones235885653 as impl_9__count_ones} + +include Core.Array.Rec_bundle_579704328 {leading_zeros338302110 as impl_9__leading_zeros} + +include Core.Array.Rec_bundle_579704328 {swap_bytes722254271 as impl_9__swap_bytes} + +include Core.Array.Rec_bundle_579704328 {from_be16013635 as impl_9__from_be} + +include Core.Array.Rec_bundle_579704328 {to_be376714729 as impl_9__to_be} + +include Core.Array.Rec_bundle_579704328 {trailing_zeros188346231 as impl_9__trailing_zeros} + +include Core.Array.Rec_bundle_579704328 {count_ones926736261 as impl_10__count_ones} + +include Core.Array.Rec_bundle_579704328 {leading_zeros19644612 as impl_10__leading_zeros} + +include Core.Array.Rec_bundle_579704328 {swap_bytes420879368 as impl_10__swap_bytes} + +include Core.Array.Rec_bundle_579704328 {from_be191085771 as impl_10__from_be} + +include Core.Array.Rec_bundle_579704328 {to_be555075987 as impl_10__to_be} + +include Core.Array.Rec_bundle_579704328 {trailing_zeros821715250 as impl_10__trailing_zeros} + +include Core.Array.Rec_bundle_579704328 {count_ones441645762 as impl_11__count_ones} + +include Core.Array.Rec_bundle_579704328 {leading_zeros905233489 as impl_11__leading_zeros} + +include Core.Array.Rec_bundle_579704328 {swap_bytes268673424 as impl_11__swap_bytes} + +include Core.Array.Rec_bundle_579704328 {from_be607978059 as impl_11__from_be} + +include Core.Array.Rec_bundle_579704328 {to_be561847134 as impl_11__to_be} + +include Core.Array.Rec_bundle_579704328 {trailing_zeros42066260 as impl_11__trailing_zeros} + +include Core.Array.Rec_bundle_579704328 {rem_euclid622298453 as impl__i8__rem_euclid} + +include Core.Array.Rec_bundle_579704328 {rem_euclid158017644 as impl__i16__rem_euclid} + +include Core.Array.Rec_bundle_579704328 {rem_euclid881249982 as impl_2__rem_euclid} + +include Core.Array.Rec_bundle_579704328 {rem_euclid1057082210 as impl__i64__rem_euclid} + +include Core.Array.Rec_bundle_579704328 {rem_euclid254910751 as impl__i128__rem_euclid} + +include Core.Array.Rec_bundle_579704328 {rem_euclid828379367 as impl__isize__rem_euclid} + +include Core.Array.Rec_bundle_579704328 {count_zeros558337492 as impl_6__count_zeros} + +include Core.Array.Rec_bundle_579704328 {leading_ones55148479 as impl_6__leading_ones} + +include Core.Array.Rec_bundle_579704328 {trailing_ones359778731 as impl_6__trailing_ones} + +include Core.Array.Rec_bundle_579704328 {count_zeros199825317 as impl_7__count_zeros} + +include Core.Array.Rec_bundle_579704328 {leading_ones164277656 as impl_7__leading_ones} + +include Core.Array.Rec_bundle_579704328 {trailing_ones903944727 as impl_7__trailing_ones} + +include Core.Array.Rec_bundle_579704328 {count_zeros942566041 as impl_8__count_zeros} + +include Core.Array.Rec_bundle_579704328 {leading_ones766486760 as impl_8__leading_ones} + +include Core.Array.Rec_bundle_579704328 {trailing_ones223371510 as impl_8__trailing_ones} + +include Core.Array.Rec_bundle_579704328 {count_zeros60346158 as impl_9__count_zeros} + +include Core.Array.Rec_bundle_579704328 {leading_ones404666910 as impl_9__leading_ones} + +include Core.Array.Rec_bundle_579704328 {trailing_ones601201120 as impl_9__trailing_ones} + +include Core.Array.Rec_bundle_579704328 {count_zeros824862815 as impl_10__count_zeros} + +include Core.Array.Rec_bundle_579704328 {leading_ones475503572 as impl_10__leading_ones} + +include Core.Array.Rec_bundle_579704328 {trailing_ones705845381 as impl_10__trailing_ones} + +include Core.Array.Rec_bundle_579704328 {count_zeros73479642 as impl_11__count_zeros} + +include Core.Array.Rec_bundle_579704328 {leading_ones667660708 as impl_11__leading_ones} + +include Core.Array.Rec_bundle_579704328 {trailing_ones979548463 as impl_11__trailing_ones} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst b/proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst index 4267c3f35..f5cce5147 100644 --- a/proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst +++ b/proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst @@ -3,1184 +3,134 @@ module Core.Ops.Arith.Impls_for_prims open Core open FStar.Mul -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Ops.Arith.t_Neg Core.Primitive.t_i8 = - { - f_Output = Core.Primitive.t_i8; - f_neg_pre = (fun (self: Core.Primitive.t_i8) -> true); - f_neg_post = (fun (self: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true); - f_neg - = - fun (self: Core.Primitive.t_i8) -> - Core.Primitive.C_i8 - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self.Core.Primitive._0) - <: - Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Ops.Arith.t_Neg Core.Primitive.t_i16 = - { - f_Output = Core.Primitive.t_i16; - f_neg_pre = (fun (self: Core.Primitive.t_i16) -> true); - f_neg_post = (fun (self: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> true); - f_neg - = - fun (self: Core.Primitive.t_i16) -> - Core.Primitive.C_i16 - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Ops.Arith.t_Neg Core.Primitive.t_i32 = - { - f_Output = Core.Primitive.t_i32; - f_neg_pre = (fun (self: Core.Primitive.t_i32) -> true); - f_neg_post = (fun (self: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> true); - f_neg - = - fun (self: Core.Primitive.t_i32) -> - Core.Primitive.C_i32 - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Ops.Arith.t_Neg Core.Primitive.t_i64 = - { - f_Output = Core.Primitive.t_i64; - f_neg_pre = (fun (self: Core.Primitive.t_i64) -> true); - f_neg_post = (fun (self: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> true); - f_neg - = - fun (self: Core.Primitive.t_i64) -> - Core.Primitive.C_i64 - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Ops.Arith.t_Neg Core.Primitive.t_i128 = - { - f_Output = Core.Primitive.t_i128; - f_neg_pre = (fun (self: Core.Primitive.t_i128) -> true); - f_neg_post = (fun (self: Core.Primitive.t_i128) (out: Core.Primitive.t_i128) -> true); - f_neg - = - fun (self: Core.Primitive.t_i128) -> - Core.Primitive.C_i128 - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Ops.Arith.t_Neg Core.Primitive.t_isize = - { - f_Output = Core.Primitive.t_isize; - f_neg_pre = (fun (self: Core.Primitive.t_isize) -> true); - f_neg_post = (fun (self: Core.Primitive.t_isize) (out: Core.Primitive.t_isize) -> true); - f_neg - = - fun (self: Core.Primitive.t_isize) -> - Core.Primitive.C_isize - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Ops.Arith.t_Add Core.Primitive.t_i8 Core.Primitive.t_i8 = - { - f_Output = Core.Primitive.t_i8; - f_add_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); - f_add_post - = - (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true - ); - f_add - = - fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> - Core.Primitive.C_i8 (self.Core.Primitive._0 +! other.Core.Primitive._0) <: Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Ops.Arith.t_Add Core.Primitive.t_i16 Core.Primitive.t_i16 = - { - f_Output = Core.Primitive.t_i16; - f_add_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); - f_add_post - = - (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> - true); - f_add - = - fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> - Core.Primitive.C_i16 (self.Core.Primitive._0 +! other.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Ops.Arith.t_Add Core.Primitive.t_i32 Core.Primitive.t_i32 = - { - f_Output = Core.Primitive.t_i32; - f_add_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); - f_add_post - = - (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> - true); - f_add - = - fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> - Core.Primitive.C_i32 (self.Core.Primitive._0 +! other.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Ops.Arith.t_Add Core.Primitive.t_i64 Core.Primitive.t_i64 = - { - f_Output = Core.Primitive.t_i64; - f_add_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); - f_add_post - = - (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> - true); - f_add - = - fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> - Core.Primitive.C_i64 (self.Core.Primitive._0 +! other.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Ops.Arith.t_Add Core.Primitive.t_i128 Core.Primitive.t_i128 = - { - f_Output = Core.Primitive.t_i128; - f_add_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); - f_add_post - = - (fun - (self: Core.Primitive.t_i128) - (other: Core.Primitive.t_i128) - (out: Core.Primitive.t_i128) - -> - true); - f_add - = - fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> - Core.Primitive.C_i128 (self.Core.Primitive._0 +! other.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Ops.Arith.t_Add Core.Primitive.t_isize Core.Primitive.t_isize = - { - f_Output = Core.Primitive.t_isize; - f_add_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); - f_add_post - = - (fun - (self: Core.Primitive.t_isize) - (other: Core.Primitive.t_isize) - (out: Core.Primitive.t_isize) - -> - true); - f_add - = - fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> - Core.Primitive.C_isize (self.Core.Primitive._0 +! other.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Ops.Arith.t_Sub Core.Primitive.t_i8 Core.Primitive.t_i8 = - { - f_Output = Core.Primitive.t_i8; - f_sub_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); - f_sub_post - = - (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true - ); - f_sub - = - fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> - Core.Primitive.C_i8 (self.Core.Primitive._0 -! other.Core.Primitive._0) <: Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Ops.Arith.t_Sub Core.Primitive.t_i16 Core.Primitive.t_i16 = - { - f_Output = Core.Primitive.t_i16; - f_sub_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); - f_sub_post - = - (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> - true); - f_sub - = - fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> - Core.Primitive.C_i16 (self.Core.Primitive._0 -! other.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Ops.Arith.t_Sub Core.Primitive.t_i32 Core.Primitive.t_i32 = - { - f_Output = Core.Primitive.t_i32; - f_sub_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); - f_sub_post - = - (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> - true); - f_sub - = - fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> - Core.Primitive.C_i32 (self.Core.Primitive._0 -! other.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Ops.Arith.t_Sub Core.Primitive.t_i64 Core.Primitive.t_i64 = - { - f_Output = Core.Primitive.t_i64; - f_sub_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); - f_sub_post - = - (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> - true); - f_sub - = - fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> - Core.Primitive.C_i64 (self.Core.Primitive._0 -! other.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Ops.Arith.t_Sub Core.Primitive.t_i128 Core.Primitive.t_i128 = - { - f_Output = Core.Primitive.t_i128; - f_sub_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); - f_sub_post - = - (fun - (self: Core.Primitive.t_i128) - (other: Core.Primitive.t_i128) - (out: Core.Primitive.t_i128) - -> - true); - f_sub - = - fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> - Core.Primitive.C_i128 (self.Core.Primitive._0 -! other.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Ops.Arith.t_Sub Core.Primitive.t_isize Core.Primitive.t_isize = - { - f_Output = Core.Primitive.t_isize; - f_sub_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); - f_sub_post - = - (fun - (self: Core.Primitive.t_isize) - (other: Core.Primitive.t_isize) - (out: Core.Primitive.t_isize) - -> - true); - f_sub - = - fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> - Core.Primitive.C_isize (self.Core.Primitive._0 -! other.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Ops.Arith.t_Add Core.Primitive.t_u8 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u8; - f_add_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); - f_add_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true - ); - f_add - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 +! other.Core.Primitive._0) <: Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Ops.Arith.t_Add Core.Primitive.t_u16 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u16; - f_add_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); - f_add_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> - true); - f_add - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 +! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Ops.Arith.t_Add Core.Primitive.t_u32 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u32; - f_add_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); - f_add_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> - true); - f_add - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 +! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Ops.Arith.t_Add Core.Primitive.t_u64 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u64; - f_add_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); - f_add_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> - true); - f_add - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 +! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Ops.Arith.t_Add Core.Primitive.t_u128 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u128; - f_add_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); - f_add_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_u128) - -> - true); - f_add - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 +! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Ops.Arith.t_Add Core.Primitive.t_usize Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_usize; - f_add_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); - f_add_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_usize) - -> - true); - f_add - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_usize (self.Core.Primitive._0 +! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Ops.Arith.t_Mul Core.Primitive.t_u8 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u8; - f_mul_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); - f_mul_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true - ); - f_mul - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 *! other.Core.Primitive._0) <: Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Ops.Arith.t_Mul Core.Primitive.t_u16 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u16; - f_mul_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); - f_mul_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> - true); - f_mul - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 *! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Ops.Arith.t_Mul Core.Primitive.t_u32 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u32; - f_mul_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); - f_mul_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> - true); - f_mul - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 *! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Ops.Arith.t_Mul Core.Primitive.t_u64 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u64; - f_mul_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); - f_mul_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> - true); - f_mul - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 *! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Ops.Arith.t_Mul Core.Primitive.t_u128 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u128; - f_mul_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); - f_mul_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_u128) - -> - true); - f_mul - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 *! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Ops.Arith.t_Mul Core.Primitive.t_usize Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_usize; - f_mul_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); - f_mul_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_usize) - -> - true); - f_mul - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_usize (self.Core.Primitive._0 *! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Ops.Arith.t_Mul Core.Primitive.t_i8 Core.Primitive.t_i8 = - { - f_Output = Core.Primitive.t_i8; - f_mul_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); - f_mul_post - = - (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true - ); - f_mul - = - fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> - Core.Primitive.C_i8 (self.Core.Primitive._0 *! other.Core.Primitive._0) <: Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Ops.Arith.t_Mul Core.Primitive.t_i16 Core.Primitive.t_i16 = - { - f_Output = Core.Primitive.t_i16; - f_mul_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); - f_mul_post - = - (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> - true); - f_mul - = - fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> - Core.Primitive.C_i16 (self.Core.Primitive._0 *! other.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Ops.Arith.t_Mul Core.Primitive.t_i32 Core.Primitive.t_i32 = - { - f_Output = Core.Primitive.t_i32; - f_mul_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); - f_mul_post - = - (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> - true); - f_mul - = - fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> - Core.Primitive.C_i32 (self.Core.Primitive._0 *! other.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Ops.Arith.t_Mul Core.Primitive.t_i64 Core.Primitive.t_i64 = - { - f_Output = Core.Primitive.t_i64; - f_mul_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); - f_mul_post - = - (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> - true); - f_mul - = - fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> - Core.Primitive.C_i64 (self.Core.Primitive._0 *! other.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Ops.Arith.t_Mul Core.Primitive.t_i128 Core.Primitive.t_i128 = - { - f_Output = Core.Primitive.t_i128; - f_mul_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); - f_mul_post - = - (fun - (self: Core.Primitive.t_i128) - (other: Core.Primitive.t_i128) - (out: Core.Primitive.t_i128) - -> - true); - f_mul - = - fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> - Core.Primitive.C_i128 (self.Core.Primitive._0 *! other.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Ops.Arith.t_Mul Core.Primitive.t_isize Core.Primitive.t_isize = - { - f_Output = Core.Primitive.t_isize; - f_mul_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); - f_mul_post - = - (fun - (self: Core.Primitive.t_isize) - (other: Core.Primitive.t_isize) - (out: Core.Primitive.t_isize) - -> - true); - f_mul - = - fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> - Core.Primitive.C_isize (self.Core.Primitive._0 *! other.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_42: Core.Ops.Arith.t_Div Core.Primitive.t_u8 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u8; - f_div_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); - f_div_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true - ); - f_div - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 /! other.Core.Primitive._0) <: Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_43: Core.Ops.Arith.t_Div Core.Primitive.t_u16 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u16; - f_div_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); - f_div_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> - true); - f_div - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 /! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_44: Core.Ops.Arith.t_Div Core.Primitive.t_u32 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u32; - f_div_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); - f_div_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> - true); - f_div - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 /! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_45: Core.Ops.Arith.t_Div Core.Primitive.t_u64 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u64; - f_div_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); - f_div_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> - true); - f_div - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 /! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_46: Core.Ops.Arith.t_Div Core.Primitive.t_u128 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u128; - f_div_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); - f_div_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_u128) - -> - true); - f_div - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 /! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_47: Core.Ops.Arith.t_Div Core.Primitive.t_usize Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_usize; - f_div_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); - f_div_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_usize) - -> - true); - f_div - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_usize (self.Core.Primitive._0 /! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_54: Core.Ops.Arith.t_Rem Core.Primitive.t_u8 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u8; - f_rem_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); - f_rem_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true - ); - f_rem - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 %! other.Core.Primitive._0) <: Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_55: Core.Ops.Arith.t_Rem Core.Primitive.t_u16 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u16; - f_rem_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); - f_rem_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> - true); - f_rem - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 %! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_56: Core.Ops.Arith.t_Rem Core.Primitive.t_u32 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u32; - f_rem_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); - f_rem_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> - true); - f_rem - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 %! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_57: Core.Ops.Arith.t_Rem Core.Primitive.t_u64 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u64; - f_rem_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); - f_rem_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> - true); - f_rem - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 %! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_58: Core.Ops.Arith.t_Rem Core.Primitive.t_u128 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u128; - f_rem_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); - f_rem_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_u128) - -> - true); - f_rem - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 %! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_59: Core.Ops.Arith.t_Rem Core.Primitive.t_usize Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_usize; - f_rem_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); - f_rem_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_usize) - -> - true); - f_rem - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_usize (self.Core.Primitive._0 %! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Ops.Arith.t_Sub Core.Primitive.t_u8 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u8; - f_sub_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); - f_sub_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true - ); - f_sub - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 -! other.Core.Primitive._0) <: Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Ops.Arith.t_Sub Core.Primitive.t_u16 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u16; - f_sub_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); - f_sub_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> - true); - f_sub - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 -! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Ops.Arith.t_Sub Core.Primitive.t_u32 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u32; - f_sub_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); - f_sub_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> - true); - f_sub - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 -! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Ops.Arith.t_Sub Core.Primitive.t_u64 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u64; - f_sub_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); - f_sub_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> - true); - f_sub - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 -! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Ops.Arith.t_Sub Core.Primitive.t_u128 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u128; - f_sub_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); - f_sub_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_u128) - -> - true); - f_sub - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 -! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Ops.Arith.t_Sub Core.Primitive.t_usize Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_usize; - f_sub_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); - f_sub_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_usize) - -> - true); - f_sub - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_usize (self.Core.Primitive._0 -! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_48: Core.Ops.Arith.t_Div Core.Primitive.t_i8 Core.Primitive.t_i8 = - { - f_Output = Core.Primitive.t_i8; - f_div_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); - f_div_post - = - (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true - ); - f_div - = - fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> - Core.Primitive.C_i8 (self.Core.Primitive._0 /! other.Core.Primitive._0) <: Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_49: Core.Ops.Arith.t_Div Core.Primitive.t_i16 Core.Primitive.t_i16 = - { - f_Output = Core.Primitive.t_i16; - f_div_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); - f_div_post - = - (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> - true); - f_div - = - fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> - Core.Primitive.C_i16 (self.Core.Primitive._0 /! other.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_50: Core.Ops.Arith.t_Div Core.Primitive.t_i32 Core.Primitive.t_i32 = - { - f_Output = Core.Primitive.t_i32; - f_div_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); - f_div_post - = - (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> - true); - f_div - = - fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> - Core.Primitive.C_i32 (self.Core.Primitive._0 /! other.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_51: Core.Ops.Arith.t_Div Core.Primitive.t_i64 Core.Primitive.t_i64 = - { - f_Output = Core.Primitive.t_i64; - f_div_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); - f_div_post - = - (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> - true); - f_div - = - fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> - Core.Primitive.C_i64 (self.Core.Primitive._0 /! other.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_52: Core.Ops.Arith.t_Div Core.Primitive.t_i128 Core.Primitive.t_i128 = - { - f_Output = Core.Primitive.t_i128; - f_div_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); - f_div_post - = - (fun - (self: Core.Primitive.t_i128) - (other: Core.Primitive.t_i128) - (out: Core.Primitive.t_i128) - -> - true); - f_div - = - fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> - Core.Primitive.C_i128 (self.Core.Primitive._0 /! other.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_53: Core.Ops.Arith.t_Div Core.Primitive.t_isize Core.Primitive.t_isize = - { - f_Output = Core.Primitive.t_isize; - f_div_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); - f_div_post - = - (fun - (self: Core.Primitive.t_isize) - (other: Core.Primitive.t_isize) - (out: Core.Primitive.t_isize) - -> - true); - f_div - = - fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> - Core.Primitive.C_isize (self.Core.Primitive._0 /! other.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_60: Core.Ops.Arith.t_Rem Core.Primitive.t_i8 Core.Primitive.t_i8 = - { - f_Output = Core.Primitive.t_i8; - f_rem_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); - f_rem_post - = - (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true - ); - f_rem - = - fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> - Core.Primitive.C_i8 (self.Core.Primitive._0 %! other.Core.Primitive._0) <: Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_61: Core.Ops.Arith.t_Rem Core.Primitive.t_i16 Core.Primitive.t_i16 = - { - f_Output = Core.Primitive.t_i16; - f_rem_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); - f_rem_post - = - (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> - true); - f_rem - = - fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> - Core.Primitive.C_i16 (self.Core.Primitive._0 %! other.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_62: Core.Ops.Arith.t_Rem Core.Primitive.t_i32 Core.Primitive.t_i32 = - { - f_Output = Core.Primitive.t_i32; - f_rem_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); - f_rem_post - = - (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> - true); - f_rem - = - fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> - Core.Primitive.C_i32 (self.Core.Primitive._0 %! other.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_63: Core.Ops.Arith.t_Rem Core.Primitive.t_i64 Core.Primitive.t_i64 = - { - f_Output = Core.Primitive.t_i64; - f_rem_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); - f_rem_post - = - (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> - true); - f_rem - = - fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> - Core.Primitive.C_i64 (self.Core.Primitive._0 %! other.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_64: Core.Ops.Arith.t_Rem Core.Primitive.t_i128 Core.Primitive.t_i128 = - { - f_Output = Core.Primitive.t_i128; - f_rem_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); - f_rem_post - = - (fun - (self: Core.Primitive.t_i128) - (other: Core.Primitive.t_i128) - (out: Core.Primitive.t_i128) - -> - true); - f_rem - = - fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> - Core.Primitive.C_i128 (self.Core.Primitive._0 %! other.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_65: Core.Ops.Arith.t_Rem Core.Primitive.t_isize Core.Primitive.t_isize = - { - f_Output = Core.Primitive.t_isize; - f_rem_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); - f_rem_post - = - (fun - (self: Core.Primitive.t_isize) - (other: Core.Primitive.t_isize) - (out: Core.Primitive.t_isize) - -> - true); - f_rem - = - fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> - Core.Primitive.C_isize (self.Core.Primitive._0 %! other.Core.Primitive._0) - <: - Core.Primitive.t_isize - } +include Core.Array.Rec_bundle_579704328 {impl as impl} + +include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} + +include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} + +include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} + +include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} + +include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} + +include Core.Array.Rec_bundle_579704328 {impl_12 as impl_12} + +include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} + +include Core.Array.Rec_bundle_579704328 {impl_14 as impl_14} + +include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} + +include Core.Array.Rec_bundle_579704328 {impl_16 as impl_16} + +include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} + +include Core.Array.Rec_bundle_579704328 {impl_24 as impl_24} + +include Core.Array.Rec_bundle_579704328 {impl_25 as impl_25} + +include Core.Array.Rec_bundle_579704328 {impl_26 as impl_26} + +include Core.Array.Rec_bundle_579704328 {impl_27 as impl_27} + +include Core.Array.Rec_bundle_579704328 {impl_28 as impl_28} + +include Core.Array.Rec_bundle_579704328 {impl_29 as impl_29} + +include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} + +include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} + +include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} + +include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} + +include Core.Array.Rec_bundle_579704328 {impl_10 as impl_10} + +include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} + +include Core.Array.Rec_bundle_579704328 {impl_30 as impl_30} + +include Core.Array.Rec_bundle_579704328 {impl_31 as impl_31} + +include Core.Array.Rec_bundle_579704328 {impl_32 as impl_32} + +include Core.Array.Rec_bundle_579704328 {impl_33 as impl_33} + +include Core.Array.Rec_bundle_579704328 {impl_34 as impl_34} + +include Core.Array.Rec_bundle_579704328 {impl_35 as impl_35} + +include Core.Array.Rec_bundle_579704328 {impl_36 as impl_36} + +include Core.Array.Rec_bundle_579704328 {impl_37 as impl_37} + +include Core.Array.Rec_bundle_579704328 {impl_38 as impl_38} + +include Core.Array.Rec_bundle_579704328 {impl_39 as impl_39} + +include Core.Array.Rec_bundle_579704328 {impl_40 as impl_40} + +include Core.Array.Rec_bundle_579704328 {impl_41 as impl_41} + +include Core.Array.Rec_bundle_579704328 {impl_42 as impl_42} + +include Core.Array.Rec_bundle_579704328 {impl_43 as impl_43} + +include Core.Array.Rec_bundle_579704328 {impl_44 as impl_44} + +include Core.Array.Rec_bundle_579704328 {impl_45 as impl_45} + +include Core.Array.Rec_bundle_579704328 {impl_46 as impl_46} + +include Core.Array.Rec_bundle_579704328 {impl_47 as impl_47} + +include Core.Array.Rec_bundle_579704328 {impl_54 as impl_54} + +include Core.Array.Rec_bundle_579704328 {impl_55 as impl_55} + +include Core.Array.Rec_bundle_579704328 {impl_56 as impl_56} + +include Core.Array.Rec_bundle_579704328 {impl_57 as impl_57} + +include Core.Array.Rec_bundle_579704328 {impl_58 as impl_58} + +include Core.Array.Rec_bundle_579704328 {impl_59 as impl_59} + +include Core.Array.Rec_bundle_579704328 {impl_18 as impl_18} + +include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} + +include Core.Array.Rec_bundle_579704328 {impl_20 as impl_20} + +include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} + +include Core.Array.Rec_bundle_579704328 {impl_22 as impl_22} + +include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} + +include Core.Array.Rec_bundle_579704328 {impl_48 as impl_48} + +include Core.Array.Rec_bundle_579704328 {impl_49 as impl_49} + +include Core.Array.Rec_bundle_579704328 {impl_50 as impl_50} + +include Core.Array.Rec_bundle_579704328 {impl_51 as impl_51} + +include Core.Array.Rec_bundle_579704328 {impl_52 as impl_52} + +include Core.Array.Rec_bundle_579704328 {impl_53 as impl_53} + +include Core.Array.Rec_bundle_579704328 {impl_60 as impl_60} + +include Core.Array.Rec_bundle_579704328 {impl_61 as impl_61} + +include Core.Array.Rec_bundle_579704328 {impl_62 as impl_62} + +include Core.Array.Rec_bundle_579704328 {impl_63 as impl_63} + +include Core.Array.Rec_bundle_579704328 {impl_64 as impl_64} + +include Core.Array.Rec_bundle_579704328 {impl_65 as impl_65} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst b/proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst index e517afe1f..41e5c5480 100644 --- a/proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst +++ b/proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst @@ -3,1794 +3,206 @@ module Core.Ops.Bit.Impls_for_prims open Core open FStar.Mul -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_84: Core.Ops.Bit.t_BitOr Core.Primitive.t_i8 Core.Primitive.t_i8 = - { - f_Output = Core.Primitive.t_i8; - f_bitor_pre = (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> true); - f_bitor_post - = - (fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) (out: Core.Primitive.t_i8) -> true - ); - f_bitor - = - fun (self: Core.Primitive.t_i8) (other: Core.Primitive.t_i8) -> - Core.Primitive.C_i8 (self.Core.Primitive._0 |. other.Core.Primitive._0) <: Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_85: Core.Ops.Bit.t_BitOr Core.Primitive.t_i16 Core.Primitive.t_i16 = - { - f_Output = Core.Primitive.t_i16; - f_bitor_pre = (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> true); - f_bitor_post - = - (fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) (out: Core.Primitive.t_i16) -> - true); - f_bitor - = - fun (self: Core.Primitive.t_i16) (other: Core.Primitive.t_i16) -> - Core.Primitive.C_i16 (self.Core.Primitive._0 |. other.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_86: Core.Ops.Bit.t_BitOr Core.Primitive.t_i32 Core.Primitive.t_i32 = - { - f_Output = Core.Primitive.t_i32; - f_bitor_pre = (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> true); - f_bitor_post - = - (fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) (out: Core.Primitive.t_i32) -> - true); - f_bitor - = - fun (self: Core.Primitive.t_i32) (other: Core.Primitive.t_i32) -> - Core.Primitive.C_i32 (self.Core.Primitive._0 |. other.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_87: Core.Ops.Bit.t_BitOr Core.Primitive.t_i64 Core.Primitive.t_i64 = - { - f_Output = Core.Primitive.t_i64; - f_bitor_pre = (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> true); - f_bitor_post - = - (fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) (out: Core.Primitive.t_i64) -> - true); - f_bitor - = - fun (self: Core.Primitive.t_i64) (other: Core.Primitive.t_i64) -> - Core.Primitive.C_i64 (self.Core.Primitive._0 |. other.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_88: Core.Ops.Bit.t_BitOr Core.Primitive.t_i128 Core.Primitive.t_i128 = - { - f_Output = Core.Primitive.t_i128; - f_bitor_pre = (fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> true); - f_bitor_post - = - (fun - (self: Core.Primitive.t_i128) - (other: Core.Primitive.t_i128) - (out: Core.Primitive.t_i128) - -> - true); - f_bitor - = - fun (self: Core.Primitive.t_i128) (other: Core.Primitive.t_i128) -> - Core.Primitive.C_i128 (self.Core.Primitive._0 |. other.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_89: Core.Ops.Bit.t_BitOr Core.Primitive.t_isize Core.Primitive.t_isize = - { - f_Output = Core.Primitive.t_isize; - f_bitor_pre = (fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> true); - f_bitor_post - = - (fun - (self: Core.Primitive.t_isize) - (other: Core.Primitive.t_isize) - (out: Core.Primitive.t_isize) - -> - true); - f_bitor - = - fun (self: Core.Primitive.t_isize) (other: Core.Primitive.t_isize) -> - Core.Primitive.C_isize (self.Core.Primitive._0 |. other.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u8; - f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true - ); - f_shr - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u8; - f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u16) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u8) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u8; - f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u32) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u8) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u8; - f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u64) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u8) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u8; - f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u128) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u8) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Ops.Bit.t_Shr Core.Primitive.t_u8 Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_u8; - f_shr_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_usize) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u8) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u16; - f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u8) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u16) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u16; - f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u16; - f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u32) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u16) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u16; - f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u64) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u16) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u16; - f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u128) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u16) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Ops.Bit.t_Shr Core.Primitive.t_u16 Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_u16; - f_shr_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_usize) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u16) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u32; - f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u8) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u32) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u32; - f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u16) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u32) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u32; - f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u32; - f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u64) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u32) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u32; - f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u128) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u32) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Ops.Bit.t_Shr Core.Primitive.t_u32 Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_u32; - f_shr_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_usize) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u32) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u64; - f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u8) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u64) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u64; - f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u16) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u64) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u64; - f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u32) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u64) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u64; - f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u64; - f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u128) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u64) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Ops.Bit.t_Shr Core.Primitive.t_u64 Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_u64; - f_shr_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_usize) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u64) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u128; - f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u8) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u128) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u128; - f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u16) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u128) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u128; - f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u32) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u128) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u128; - f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u64) -> true); - f_shr_post - = - (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u128) -> - true); - f_shr - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u128; - f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); - f_shr_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_u128) - -> - true); - f_shr - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Ops.Bit.t_Shr Core.Primitive.t_u128 Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_u128; - f_shr_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_usize) -> true); - f_shr_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_u128) - -> - true); - f_shr - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_usize; - f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u8) -> true); - f_shr_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_u8) - (out: Core.Primitive.t_usize) - -> - true); - f_shr - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_usize; - f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u16) -> true); - f_shr_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_u16) - (out: Core.Primitive.t_usize) - -> - true); - f_shr - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_usize; - f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u32) -> true); - f_shr_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_u32) - (out: Core.Primitive.t_usize) - -> - true); - f_shr - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_usize; - f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u64) -> true); - f_shr_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_u64) - (out: Core.Primitive.t_usize) - -> - true); - f_shr - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_usize; - f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u128) -> true); - f_shr_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_usize) - -> - true); - f_shr - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Ops.Bit.t_Shr Core.Primitive.t_usize Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_usize; - f_shr_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); - f_shr_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_usize) - -> - true); - f_shr - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_usize (self.Core.Primitive._0 >>! other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_42: Core.Ops.Bit.t_Shl Core.Primitive.t_u8 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u8; - f_shl_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); - f_shl_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true - ); - f_shl - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u8) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u8) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u8) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u8) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u8) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u16) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u16) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u16) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u16) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u16) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u32) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u32) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u32) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u32) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u32) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u64) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u64) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u64) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u128) (out: Core.Primitive.t_u64) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_usize) (out: Core.Primitive.t_u64) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u128) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u128) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u128) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u128) -> - true); - f_shl - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_u128) - -> - true); - f_shl - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_u128) - -> - true); - f_shl - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 < true); - f_shl_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_u8) - (out: Core.Primitive.t_usize) - -> - true); - f_shl - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_usize (self.Core.Primitive._0 < true); - f_shl_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_u16) - (out: Core.Primitive.t_usize) - -> - true); - f_shl - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_usize (self.Core.Primitive._0 < true); - f_shl_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_u32) - (out: Core.Primitive.t_usize) - -> - true); - f_shl - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_usize (self.Core.Primitive._0 < true); - f_shl_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_u64) - (out: Core.Primitive.t_usize) - -> - true); - f_shl - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_usize (self.Core.Primitive._0 < true); - f_shl_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_usize) - -> - true); - f_shl - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_usize (self.Core.Primitive._0 < true); - f_shl_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_usize) - -> - true); - f_shl - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_usize (self.Core.Primitive._0 < true); - f_bitor_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true - ); - f_bitor - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 |. other.Core.Primitive._0) <: Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_79: Core.Ops.Bit.t_BitOr Core.Primitive.t_u16 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u16; - f_bitor_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); - f_bitor_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> - true); - f_bitor - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 |. other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_80: Core.Ops.Bit.t_BitOr Core.Primitive.t_u32 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u32; - f_bitor_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); - f_bitor_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> - true); - f_bitor - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 |. other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_81: Core.Ops.Bit.t_BitOr Core.Primitive.t_u64 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u64; - f_bitor_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); - f_bitor_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> - true); - f_bitor - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 |. other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_82: Core.Ops.Bit.t_BitOr Core.Primitive.t_u128 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u128; - f_bitor_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); - f_bitor_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_u128) - -> - true); - f_bitor - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 |. other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_83: Core.Ops.Bit.t_BitOr Core.Primitive.t_usize Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_usize; - f_bitor_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); - f_bitor_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_usize) - -> - true); - f_bitor - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_usize (self.Core.Primitive._0 |. other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_90: Core.Ops.Bit.t_BitXor Core.Primitive.t_u8 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u8; - f_bitxor_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); - f_bitxor_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true - ); - f_bitxor - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 ^. other.Core.Primitive._0) <: Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_91: Core.Ops.Bit.t_BitXor Core.Primitive.t_u16 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u16; - f_bitxor_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); - f_bitxor_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> - true); - f_bitxor - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 ^. other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_92: Core.Ops.Bit.t_BitXor Core.Primitive.t_u32 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u32; - f_bitxor_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); - f_bitxor_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> - true); - f_bitxor - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 ^. other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_93: Core.Ops.Bit.t_BitXor Core.Primitive.t_u64 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u64; - f_bitxor_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); - f_bitxor_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> - true); - f_bitxor - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 ^. other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_94: Core.Ops.Bit.t_BitXor Core.Primitive.t_u128 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u128; - f_bitxor_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); - f_bitxor_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_u128) - -> - true); - f_bitxor - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 ^. other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_95: Core.Ops.Bit.t_BitXor Core.Primitive.t_usize Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_usize; - f_bitxor_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); - f_bitxor_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_usize) - -> - true); - f_bitxor - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_usize (self.Core.Primitive._0 ^. other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_96: Core.Ops.Bit.t_BitAnd Core.Primitive.t_u8 Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u8; - f_bitand_pre = (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> true); - f_bitand_post - = - (fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true - ); - f_bitand - = - fun (self: Core.Primitive.t_u8) (other: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 (self.Core.Primitive._0 &. other.Core.Primitive._0) <: Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_97: Core.Ops.Bit.t_BitAnd Core.Primitive.t_u16 Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u16; - f_bitand_pre = (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> true); - f_bitand_post - = - (fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> - true); - f_bitand - = - fun (self: Core.Primitive.t_u16) (other: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 (self.Core.Primitive._0 &. other.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_98: Core.Ops.Bit.t_BitAnd Core.Primitive.t_u32 Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u32; - f_bitand_pre = (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> true); - f_bitand_post - = - (fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> - true); - f_bitand - = - fun (self: Core.Primitive.t_u32) (other: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 (self.Core.Primitive._0 &. other.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_99: Core.Ops.Bit.t_BitAnd Core.Primitive.t_u64 Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u64; - f_bitand_pre = (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> true); - f_bitand_post - = - (fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> - true); - f_bitand - = - fun (self: Core.Primitive.t_u64) (other: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 (self.Core.Primitive._0 &. other.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_100: Core.Ops.Bit.t_BitAnd Core.Primitive.t_u128 Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u128; - f_bitand_pre = (fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> true); - f_bitand_post - = - (fun - (self: Core.Primitive.t_u128) - (other: Core.Primitive.t_u128) - (out: Core.Primitive.t_u128) - -> - true); - f_bitand - = - fun (self: Core.Primitive.t_u128) (other: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 (self.Core.Primitive._0 &. other.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_101: Core.Ops.Bit.t_BitAnd Core.Primitive.t_usize Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_usize; - f_bitand_pre = (fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> true); - f_bitand_post - = - (fun - (self: Core.Primitive.t_usize) - (other: Core.Primitive.t_usize) - (out: Core.Primitive.t_usize) - -> - true); - f_bitand - = - fun (self: Core.Primitive.t_usize) (other: Core.Primitive.t_usize) -> - Core.Primitive.C_usize (self.Core.Primitive._0 &. other.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Ops.Bit.t_Not Core.Primitive.t_u8 = - { - f_Output = Core.Primitive.t_u8; - f_not_pre = (fun (self: Core.Primitive.t_u8) -> true); - f_not_post = (fun (self: Core.Primitive.t_u8) (out: Core.Primitive.t_u8) -> true); - f_not - = - fun (self: Core.Primitive.t_u8) -> - Core.Primitive.C_u8 ~.self.Core.Primitive._0 <: Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Ops.Bit.t_Not Core.Primitive.t_u16 = - { - f_Output = Core.Primitive.t_u16; - f_not_pre = (fun (self: Core.Primitive.t_u16) -> true); - f_not_post = (fun (self: Core.Primitive.t_u16) (out: Core.Primitive.t_u16) -> true); - f_not - = - fun (self: Core.Primitive.t_u16) -> - Core.Primitive.C_u16 ~.self.Core.Primitive._0 <: Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Ops.Bit.t_Not Core.Primitive.t_u32 = - { - f_Output = Core.Primitive.t_u32; - f_not_pre = (fun (self: Core.Primitive.t_u32) -> true); - f_not_post = (fun (self: Core.Primitive.t_u32) (out: Core.Primitive.t_u32) -> true); - f_not - = - fun (self: Core.Primitive.t_u32) -> - Core.Primitive.C_u32 ~.self.Core.Primitive._0 <: Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Ops.Bit.t_Not Core.Primitive.t_u64 = - { - f_Output = Core.Primitive.t_u64; - f_not_pre = (fun (self: Core.Primitive.t_u64) -> true); - f_not_post = (fun (self: Core.Primitive.t_u64) (out: Core.Primitive.t_u64) -> true); - f_not - = - fun (self: Core.Primitive.t_u64) -> - Core.Primitive.C_u64 ~.self.Core.Primitive._0 <: Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Ops.Bit.t_Not Core.Primitive.t_u128 = - { - f_Output = Core.Primitive.t_u128; - f_not_pre = (fun (self: Core.Primitive.t_u128) -> true); - f_not_post = (fun (self: Core.Primitive.t_u128) (out: Core.Primitive.t_u128) -> true); - f_not - = - fun (self: Core.Primitive.t_u128) -> - Core.Primitive.C_u128 ~.self.Core.Primitive._0 <: Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Ops.Bit.t_Not Core.Primitive.t_usize = - { - f_Output = Core.Primitive.t_usize; - f_not_pre = (fun (self: Core.Primitive.t_usize) -> true); - f_not_post = (fun (self: Core.Primitive.t_usize) (out: Core.Primitive.t_usize) -> true); - f_not - = - fun (self: Core.Primitive.t_usize) -> - Core.Primitive.C_usize ~.self.Core.Primitive._0 <: Core.Primitive.t_usize - } +include Core.Array.Rec_bundle_579704328 {impl_84 as impl_84} + +include Core.Array.Rec_bundle_579704328 {impl_85 as impl_85} + +include Core.Array.Rec_bundle_579704328 {impl_86 as impl_86} + +include Core.Array.Rec_bundle_579704328 {impl_87 as impl_87} + +include Core.Array.Rec_bundle_579704328 {impl_88 as impl_88} + +include Core.Array.Rec_bundle_579704328 {impl_89 as impl_89} + +include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} + +include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} + +include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} + +include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} + +include Core.Array.Rec_bundle_579704328 {impl_10 as impl_10} + +include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} + +include Core.Array.Rec_bundle_579704328 {impl_12 as impl_12} + +include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} + +include Core.Array.Rec_bundle_579704328 {impl_14 as impl_14} + +include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} + +include Core.Array.Rec_bundle_579704328 {impl_16 as impl_16} + +include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} + +include Core.Array.Rec_bundle_579704328 {impl_18 as impl_18} + +include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} + +include Core.Array.Rec_bundle_579704328 {impl_20 as impl_20} + +include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} + +include Core.Array.Rec_bundle_579704328 {impl_22 as impl_22} + +include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} + +include Core.Array.Rec_bundle_579704328 {impl_24 as impl_24} + +include Core.Array.Rec_bundle_579704328 {impl_25 as impl_25} + +include Core.Array.Rec_bundle_579704328 {impl_26 as impl_26} + +include Core.Array.Rec_bundle_579704328 {impl_27 as impl_27} + +include Core.Array.Rec_bundle_579704328 {impl_28 as impl_28} + +include Core.Array.Rec_bundle_579704328 {impl_29 as impl_29} + +include Core.Array.Rec_bundle_579704328 {impl_30 as impl_30} + +include Core.Array.Rec_bundle_579704328 {impl_31 as impl_31} + +include Core.Array.Rec_bundle_579704328 {impl_32 as impl_32} + +include Core.Array.Rec_bundle_579704328 {impl_33 as impl_33} + +include Core.Array.Rec_bundle_579704328 {impl_34 as impl_34} + +include Core.Array.Rec_bundle_579704328 {impl_35 as impl_35} + +include Core.Array.Rec_bundle_579704328 {impl_36 as impl_36} + +include Core.Array.Rec_bundle_579704328 {impl_37 as impl_37} + +include Core.Array.Rec_bundle_579704328 {impl_38 as impl_38} + +include Core.Array.Rec_bundle_579704328 {impl_39 as impl_39} + +include Core.Array.Rec_bundle_579704328 {impl_40 as impl_40} + +include Core.Array.Rec_bundle_579704328 {impl_41 as impl_41} + +include Core.Array.Rec_bundle_579704328 {impl_42 as impl_42} + +include Core.Array.Rec_bundle_579704328 {impl_43 as impl_43} + +include Core.Array.Rec_bundle_579704328 {impl_44 as impl_44} + +include Core.Array.Rec_bundle_579704328 {impl_45 as impl_45} + +include Core.Array.Rec_bundle_579704328 {impl_46 as impl_46} + +include Core.Array.Rec_bundle_579704328 {impl_47 as impl_47} + +include Core.Array.Rec_bundle_579704328 {impl_48 as impl_48} + +include Core.Array.Rec_bundle_579704328 {impl_49 as impl_49} + +include Core.Array.Rec_bundle_579704328 {impl_50 as impl_50} + +include Core.Array.Rec_bundle_579704328 {impl_51 as impl_51} + +include Core.Array.Rec_bundle_579704328 {impl_52 as impl_52} + +include Core.Array.Rec_bundle_579704328 {impl_53 as impl_53} + +include Core.Array.Rec_bundle_579704328 {impl_54 as impl_54} + +include Core.Array.Rec_bundle_579704328 {impl_55 as impl_55} + +include Core.Array.Rec_bundle_579704328 {impl_56 as impl_56} + +include Core.Array.Rec_bundle_579704328 {impl_57 as impl_57} + +include Core.Array.Rec_bundle_579704328 {impl_58 as impl_58} + +include Core.Array.Rec_bundle_579704328 {impl_59 as impl_59} + +include Core.Array.Rec_bundle_579704328 {impl_60 as impl_60} + +include Core.Array.Rec_bundle_579704328 {impl_61 as impl_61} + +include Core.Array.Rec_bundle_579704328 {impl_62 as impl_62} + +include Core.Array.Rec_bundle_579704328 {impl_63 as impl_63} + +include Core.Array.Rec_bundle_579704328 {impl_64 as impl_64} + +include Core.Array.Rec_bundle_579704328 {impl_65 as impl_65} + +include Core.Array.Rec_bundle_579704328 {impl_66 as impl_66} + +include Core.Array.Rec_bundle_579704328 {impl_67 as impl_67} + +include Core.Array.Rec_bundle_579704328 {impl_68 as impl_68} + +include Core.Array.Rec_bundle_579704328 {impl_69 as impl_69} + +include Core.Array.Rec_bundle_579704328 {impl_70 as impl_70} + +include Core.Array.Rec_bundle_579704328 {impl_71 as impl_71} + +include Core.Array.Rec_bundle_579704328 {impl_72 as impl_72} + +include Core.Array.Rec_bundle_579704328 {impl_73 as impl_73} + +include Core.Array.Rec_bundle_579704328 {impl_74 as impl_74} + +include Core.Array.Rec_bundle_579704328 {impl_75 as impl_75} + +include Core.Array.Rec_bundle_579704328 {impl_76 as impl_76} + +include Core.Array.Rec_bundle_579704328 {impl_77 as impl_77} + +include Core.Array.Rec_bundle_579704328 {impl_78 as impl_78} + +include Core.Array.Rec_bundle_579704328 {impl_79 as impl_79} + +include Core.Array.Rec_bundle_579704328 {impl_80 as impl_80} + +include Core.Array.Rec_bundle_579704328 {impl_81 as impl_81} + +include Core.Array.Rec_bundle_579704328 {impl_82 as impl_82} + +include Core.Array.Rec_bundle_579704328 {impl_83 as impl_83} + +include Core.Array.Rec_bundle_579704328 {impl_90 as impl_90} + +include Core.Array.Rec_bundle_579704328 {impl_91 as impl_91} + +include Core.Array.Rec_bundle_579704328 {impl_92 as impl_92} + +include Core.Array.Rec_bundle_579704328 {impl_93 as impl_93} + +include Core.Array.Rec_bundle_579704328 {impl_94 as impl_94} + +include Core.Array.Rec_bundle_579704328 {impl_95 as impl_95} + +include Core.Array.Rec_bundle_579704328 {impl_96 as impl_96} + +include Core.Array.Rec_bundle_579704328 {impl_97 as impl_97} + +include Core.Array.Rec_bundle_579704328 {impl_98 as impl_98} + +include Core.Array.Rec_bundle_579704328 {impl_99 as impl_99} + +include Core.Array.Rec_bundle_579704328 {impl_100 as impl_100} + +include Core.Array.Rec_bundle_579704328 {impl_101 as impl_101} + +include Core.Array.Rec_bundle_579704328 {impl as impl} + +include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} + +include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} + +include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} + +include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} + +include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Function.fst b/proof-libs/fstar/generated-core/Core.Ops.Function.fst index 8b82d90c3..326603935 100644 --- a/proof-libs/fstar/generated-core/Core.Ops.Function.fst +++ b/proof-libs/fstar/generated-core/Core.Ops.Function.fst @@ -16,11 +16,9 @@ class t_FnMut (v_Self: Type0) (v_Args: Type0) = { [@@@ FStar.Tactics.Typeclasses.no_method]_super_4383436188827019856:t_FnOnce v_Self v_Args; [@@@ FStar.Tactics.Typeclasses.no_method]_super_18093577594825678560:Core.Marker.t_Tuple v_Args; f_call_mut_pre:v_Self -> v_Args -> Type0; - f_call_mut_post:v_Self -> v_Args -> (v_Self & v_4383436188827019856.f_Output) -> Type0; + f_call_mut_post:v_Self -> v_Args -> (v_Self & _) -> Type0; f_call_mut:x0: v_Self -> x1: v_Args - -> Prims.Pure (v_Self & v_4383436188827019856.f_Output) - (f_call_mut_pre x0 x1) - (fun result -> f_call_mut_post x0 x1 result) + -> Prims.Pure (v_Self & _) (f_call_mut_pre x0 x1) (fun result -> f_call_mut_post x0 x1 result) } class t_Fn (v_Self: Type0) (v_Args: Type0) = { diff --git a/proof-libs/fstar/generated-core/Core.Ops.Index_range.fst b/proof-libs/fstar/generated-core/Core.Ops.Index_range.fst index 112599a67..d927e5697 100644 --- a/proof-libs/fstar/generated-core/Core.Ops.Index_range.fst +++ b/proof-libs/fstar/generated-core/Core.Ops.Index_range.fst @@ -8,8 +8,8 @@ type t_IndexRange = { f_end:usize } -let impl__IndexRange__len (self: t_IndexRange) : usize = - Rust_primitives.Usize.sub self.f_end self.f_start +let impl__IndexRange__zero_to (v_end: usize) : t_IndexRange = + { f_start = sz 0; f_end = v_end } <: t_IndexRange let impl__IndexRange__next_unchecked (self: t_IndexRange) : (t_IndexRange & usize) = let value:usize = self.f_start in @@ -19,8 +19,8 @@ let impl__IndexRange__next_unchecked (self: t_IndexRange) : (t_IndexRange & usiz let hax_temp_output:usize = value in self, hax_temp_output <: (t_IndexRange & usize) -let impl__IndexRange__zero_to (v_end: usize) : t_IndexRange = - { f_start = sz 0; f_end = v_end } <: t_IndexRange +let impl__IndexRange__len (self: t_IndexRange) : usize = + Rust_primitives.Usize.sub self.f_end self.f_start [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_1: Core.Iter.Traits.Iterator.t_Iterator t_IndexRange = diff --git a/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst b/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst index 539a925ce..c619bcf92 100644 --- a/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst +++ b/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst @@ -3,731 +3,86 @@ module Core.Primitive.Number_conversion open Core open FStar.Mul -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Convert.t_From Core.Primitive.t_u128 u128 = - { - f_from_pre = (fun (x: u128) -> true); - f_from_post = (fun (x: u128) (out: Core.Primitive.t_u128) -> true); - f_from - = - fun (x: u128) -> - Core.Primitive.C_u128 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #u128 - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - x - } - <: - Core.Base_interface.Int.t_U128) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Convert.t_From u128 Core.Primitive.t_u128 = - { - f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); - f_from_post = (fun (x: Core.Primitive.t_u128) (out: u128) -> true); - f_from - = - fun (x: Core.Primitive.t_u128) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #u128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Convert.t_From Core.Primitive.t_u16 u16 = - { - f_from_pre = (fun (x: u16) -> true); - f_from_post = (fun (x: u16) (out: Core.Primitive.t_u16) -> true); - f_from - = - fun (x: u16) -> - Core.Primitive.C_u16 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #u16 - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - x - } - <: - Core.Base_interface.Int.t_U16) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Convert.t_From u16 Core.Primitive.t_u16 = - { - f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); - f_from_post = (fun (x: Core.Primitive.t_u16) (out: u16) -> true); - f_from - = - fun (x: Core.Primitive.t_u16) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #u16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Convert.t_From Core.Primitive.t_u32 u32 = - { - f_from_pre = (fun (x: u32) -> true); - f_from_post = (fun (x: u32) (out: Core.Primitive.t_u32) -> true); - f_from - = - fun (x: u32) -> - Core.Primitive.C_u32 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #u32 - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - x - } - <: - Core.Base_interface.Int.t_U32) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Convert.t_From u32 Core.Primitive.t_u32 = - { - f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); - f_from_post = (fun (x: Core.Primitive.t_u32) (out: u32) -> true); - f_from - = - fun (x: Core.Primitive.t_u32) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #u32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Convert.t_From Core.Primitive.t_u64 u64 = - { - f_from_pre = (fun (x: u64) -> true); - f_from_post = (fun (x: u64) (out: Core.Primitive.t_u64) -> true); - f_from - = - fun (x: u64) -> - Core.Primitive.C_u64 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #u64 - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - x - } - <: - Core.Base_interface.Int.t_U64) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Convert.t_From u64 Core.Primitive.t_u64 = - { - f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); - f_from_post = (fun (x: Core.Primitive.t_u64) (out: u64) -> true); - f_from - = - fun (x: Core.Primitive.t_u64) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #u64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Convert.t_From Core.Primitive.t_u8 u8 = - { - f_from_pre = (fun (x: u8) -> true); - f_from_post = (fun (x: u8) (out: Core.Primitive.t_u8) -> true); - f_from - = - fun (x: u8) -> - Core.Primitive.C_u8 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #u8 #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_U8) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Convert.t_From u8 Core.Primitive.t_u8 = - { - f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); - f_from_post = (fun (x: Core.Primitive.t_u8) (out: u8) -> true); - f_from - = - fun (x: Core.Primitive.t_u8) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #u8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Convert.t_From Core.Primitive.t_usize usize = - { - f_from_pre = (fun (x: usize) -> true); - f_from_post = (fun (x: usize) (out: Core.Primitive.t_usize) -> true); - f_from - = - fun (x: usize) -> - Core.Primitive.C_usize - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #usize - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - x - } - <: - Core.Base_interface.Int.t_U64) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Convert.t_From usize Core.Primitive.t_usize = - { - f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); - f_from_post = (fun (x: Core.Primitive.t_usize) (out: usize) -> true); - f_from - = - fun (x: Core.Primitive.t_usize) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #usize - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Convert.t_From Core.Primitive.t_usize Core.Primitive.t_u64 = - { - f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); - f_from_post = (fun (x: Core.Primitive.t_u64) (out: Core.Primitive.t_usize) -> true); - f_from - = - fun (x: Core.Primitive.t_u64) -> - Core.Primitive.C_usize - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Convert.t_From Core.Primitive.t_u64 Core.Primitive.t_usize = - { - f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); - f_from_post = (fun (x: Core.Primitive.t_usize) (out: Core.Primitive.t_u64) -> true); - f_from - = - fun (x: Core.Primitive.t_usize) -> - Core.Primitive.C_u64 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Convert.t_From Core.Primitive.t_u16 Core.Primitive.t_u8 = - { - f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); - f_from_post = (fun (x: Core.Primitive.t_u8) (out: Core.Primitive.t_u16) -> true); - f_from - = - fun (x: Core.Primitive.t_u8) -> - Core.Primitive.C_u16 - (Core.Convert.f_into #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Convert.t_From Core.Primitive.t_u32 Core.Primitive.t_u8 = - { - f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); - f_from_post = (fun (x: Core.Primitive.t_u8) (out: Core.Primitive.t_u32) -> true); - f_from - = - fun (x: Core.Primitive.t_u8) -> - Core.Primitive.C_u32 - (Core.Convert.f_into #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Convert.t_From Core.Primitive.t_u64 Core.Primitive.t_u8 = - { - f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); - f_from_post = (fun (x: Core.Primitive.t_u8) (out: Core.Primitive.t_u64) -> true); - f_from - = - fun (x: Core.Primitive.t_u8) -> - Core.Primitive.C_u64 - (Core.Convert.f_into #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Convert.t_From Core.Primitive.t_u128 Core.Primitive.t_u8 = - { - f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); - f_from_post = (fun (x: Core.Primitive.t_u8) (out: Core.Primitive.t_u128) -> true); - f_from - = - fun (x: Core.Primitive.t_u8) -> - Core.Primitive.C_u128 - (Core.Convert.f_into #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Convert.t_From Core.Primitive.t_usize Core.Primitive.t_u8 = - { - f_from_pre = (fun (x: Core.Primitive.t_u8) -> true); - f_from_post = (fun (x: Core.Primitive.t_u8) (out: Core.Primitive.t_usize) -> true); - f_from - = - fun (x: Core.Primitive.t_u8) -> - Core.Primitive.C_usize - (Core.Convert.f_into #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Convert.t_From Core.Primitive.t_u8 Core.Primitive.t_u16 = - { - f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); - f_from_post = (fun (x: Core.Primitive.t_u16) (out: Core.Primitive.t_u8) -> true); - f_from - = - fun (x: Core.Primitive.t_u16) -> - Core.Primitive.C_u8 - (Core.Convert.f_into #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Convert.t_From Core.Primitive.t_u32 Core.Primitive.t_u16 = - { - f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); - f_from_post = (fun (x: Core.Primitive.t_u16) (out: Core.Primitive.t_u32) -> true); - f_from - = - fun (x: Core.Primitive.t_u16) -> - Core.Primitive.C_u32 - (Core.Convert.f_into #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Convert.t_From Core.Primitive.t_u64 Core.Primitive.t_u16 = - { - f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); - f_from_post = (fun (x: Core.Primitive.t_u16) (out: Core.Primitive.t_u64) -> true); - f_from - = - fun (x: Core.Primitive.t_u16) -> - Core.Primitive.C_u64 - (Core.Convert.f_into #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Convert.t_From Core.Primitive.t_u128 Core.Primitive.t_u16 = - { - f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); - f_from_post = (fun (x: Core.Primitive.t_u16) (out: Core.Primitive.t_u128) -> true); - f_from - = - fun (x: Core.Primitive.t_u16) -> - Core.Primitive.C_u128 - (Core.Convert.f_into #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Convert.t_From Core.Primitive.t_usize Core.Primitive.t_u16 = - { - f_from_pre = (fun (x: Core.Primitive.t_u16) -> true); - f_from_post = (fun (x: Core.Primitive.t_u16) (out: Core.Primitive.t_usize) -> true); - f_from - = - fun (x: Core.Primitive.t_u16) -> - Core.Primitive.C_usize - (Core.Convert.f_into #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Convert.t_From Core.Primitive.t_u8 Core.Primitive.t_u32 = - { - f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); - f_from_post = (fun (x: Core.Primitive.t_u32) (out: Core.Primitive.t_u8) -> true); - f_from - = - fun (x: Core.Primitive.t_u32) -> - Core.Primitive.C_u8 - (Core.Convert.f_into #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Convert.t_From Core.Primitive.t_u16 Core.Primitive.t_u32 = - { - f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); - f_from_post = (fun (x: Core.Primitive.t_u32) (out: Core.Primitive.t_u16) -> true); - f_from - = - fun (x: Core.Primitive.t_u32) -> - Core.Primitive.C_u16 - (Core.Convert.f_into #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Convert.t_From Core.Primitive.t_u64 Core.Primitive.t_u32 = - { - f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); - f_from_post = (fun (x: Core.Primitive.t_u32) (out: Core.Primitive.t_u64) -> true); - f_from - = - fun (x: Core.Primitive.t_u32) -> - Core.Primitive.C_u64 - (Core.Convert.f_into #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Convert.t_From Core.Primitive.t_u128 Core.Primitive.t_u32 = - { - f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); - f_from_post = (fun (x: Core.Primitive.t_u32) (out: Core.Primitive.t_u128) -> true); - f_from - = - fun (x: Core.Primitive.t_u32) -> - Core.Primitive.C_u128 - (Core.Convert.f_into #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Convert.t_From Core.Primitive.t_usize Core.Primitive.t_u32 = - { - f_from_pre = (fun (x: Core.Primitive.t_u32) -> true); - f_from_post = (fun (x: Core.Primitive.t_u32) (out: Core.Primitive.t_usize) -> true); - f_from - = - fun (x: Core.Primitive.t_u32) -> - Core.Primitive.C_usize - (Core.Convert.f_into #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Convert.t_From Core.Primitive.t_u8 Core.Primitive.t_u64 = - { - f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); - f_from_post = (fun (x: Core.Primitive.t_u64) (out: Core.Primitive.t_u8) -> true); - f_from - = - fun (x: Core.Primitive.t_u64) -> - Core.Primitive.C_u8 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Convert.t_From Core.Primitive.t_u16 Core.Primitive.t_u64 = - { - f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); - f_from_post = (fun (x: Core.Primitive.t_u64) (out: Core.Primitive.t_u16) -> true); - f_from - = - fun (x: Core.Primitive.t_u64) -> - Core.Primitive.C_u16 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Convert.t_From Core.Primitive.t_u32 Core.Primitive.t_u64 = - { - f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); - f_from_post = (fun (x: Core.Primitive.t_u64) (out: Core.Primitive.t_u32) -> true); - f_from - = - fun (x: Core.Primitive.t_u64) -> - Core.Primitive.C_u32 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Convert.t_From Core.Primitive.t_u128 Core.Primitive.t_u64 = - { - f_from_pre = (fun (x: Core.Primitive.t_u64) -> true); - f_from_post = (fun (x: Core.Primitive.t_u64) (out: Core.Primitive.t_u128) -> true); - f_from - = - fun (x: Core.Primitive.t_u64) -> - Core.Primitive.C_u128 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Convert.t_From Core.Primitive.t_u8 Core.Primitive.t_u128 = - { - f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); - f_from_post = (fun (x: Core.Primitive.t_u128) (out: Core.Primitive.t_u8) -> true); - f_from - = - fun (x: Core.Primitive.t_u128) -> - Core.Primitive.C_u8 - (Core.Convert.f_into #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Convert.t_From Core.Primitive.t_u16 Core.Primitive.t_u128 = - { - f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); - f_from_post = (fun (x: Core.Primitive.t_u128) (out: Core.Primitive.t_u16) -> true); - f_from - = - fun (x: Core.Primitive.t_u128) -> - Core.Primitive.C_u16 - (Core.Convert.f_into #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Convert.t_From Core.Primitive.t_u32 Core.Primitive.t_u128 = - { - f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); - f_from_post = (fun (x: Core.Primitive.t_u128) (out: Core.Primitive.t_u32) -> true); - f_from - = - fun (x: Core.Primitive.t_u128) -> - Core.Primitive.C_u32 - (Core.Convert.f_into #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Convert.t_From Core.Primitive.t_u64 Core.Primitive.t_u128 = - { - f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); - f_from_post = (fun (x: Core.Primitive.t_u128) (out: Core.Primitive.t_u64) -> true); - f_from - = - fun (x: Core.Primitive.t_u128) -> - Core.Primitive.C_u64 - (Core.Convert.f_into #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Convert.t_From Core.Primitive.t_usize Core.Primitive.t_u128 = - { - f_from_pre = (fun (x: Core.Primitive.t_u128) -> true); - f_from_post = (fun (x: Core.Primitive.t_u128) (out: Core.Primitive.t_usize) -> true); - f_from - = - fun (x: Core.Primitive.t_u128) -> - Core.Primitive.C_usize - (Core.Convert.f_into #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Convert.t_From Core.Primitive.t_u8 Core.Primitive.t_usize = - { - f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); - f_from_post = (fun (x: Core.Primitive.t_usize) (out: Core.Primitive.t_u8) -> true); - f_from - = - fun (x: Core.Primitive.t_usize) -> - Core.Primitive.C_u8 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Convert.t_From Core.Primitive.t_u16 Core.Primitive.t_usize = - { - f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); - f_from_post = (fun (x: Core.Primitive.t_usize) (out: Core.Primitive.t_u16) -> true); - f_from - = - fun (x: Core.Primitive.t_usize) -> - Core.Primitive.C_u16 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Convert.t_From Core.Primitive.t_u32 Core.Primitive.t_usize = - { - f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); - f_from_post = (fun (x: Core.Primitive.t_usize) (out: Core.Primitive.t_u32) -> true); - f_from - = - fun (x: Core.Primitive.t_usize) -> - Core.Primitive.C_u32 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Convert.t_From Core.Primitive.t_u128 Core.Primitive.t_usize = - { - f_from_pre = (fun (x: Core.Primitive.t_usize) -> true); - f_from_post = (fun (x: Core.Primitive.t_usize) (out: Core.Primitive.t_u128) -> true); - f_from - = - fun (x: Core.Primitive.t_usize) -> - Core.Primitive.C_u128 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_u128 - } +include Core.Array.Rec_bundle_579704328 {impl_31 as impl_31} + +include Core.Array.Rec_bundle_579704328 {impl_40 as impl_40} + +include Core.Array.Rec_bundle_579704328 {impl as impl} + +include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} + +include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} + +include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} + +include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} + +include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} + +include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} + +include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} + +include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} + +include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} + +include Core.Array.Rec_bundle_579704328 {impl_10 as impl_10} + +include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} + +include Core.Array.Rec_bundle_579704328 {impl_12 as impl_12} + +include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} + +include Core.Array.Rec_bundle_579704328 {impl_14 as impl_14} + +include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} + +include Core.Array.Rec_bundle_579704328 {impl_16 as impl_16} + +include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} + +include Core.Array.Rec_bundle_579704328 {impl_18 as impl_18} + +include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} + +include Core.Array.Rec_bundle_579704328 {impl_20 as impl_20} + +include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} + +include Core.Array.Rec_bundle_579704328 {impl_22 as impl_22} + +include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} + +include Core.Array.Rec_bundle_579704328 {impl_24 as impl_24} + +include Core.Array.Rec_bundle_579704328 {impl_25 as impl_25} + +include Core.Array.Rec_bundle_579704328 {impl_26 as impl_26} + +include Core.Array.Rec_bundle_579704328 {impl_27 as impl_27} + +include Core.Array.Rec_bundle_579704328 {impl_28 as impl_28} + +include Core.Array.Rec_bundle_579704328 {impl_29 as impl_29} + +include Core.Array.Rec_bundle_579704328 {impl_30 as impl_30} + +include Core.Array.Rec_bundle_579704328 {impl_32 as impl_32} + +include Core.Array.Rec_bundle_579704328 {impl_33 as impl_33} + +include Core.Array.Rec_bundle_579704328 {impl_34 as impl_34} + +include Core.Array.Rec_bundle_579704328 {impl_35 as impl_35} + +include Core.Array.Rec_bundle_579704328 {impl_36 as impl_36} + +include Core.Array.Rec_bundle_579704328 {impl_37 as impl_37} + +include Core.Array.Rec_bundle_579704328 {impl_38 as impl_38} + +include Core.Array.Rec_bundle_579704328 {impl_39 as impl_39} + +include Core.Array.Rec_bundle_579704328 {impl_41 as impl_41} diff --git a/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst b/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst index e4008fbb6..da845bfda 100644 --- a/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst +++ b/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst @@ -3,716 +3,86 @@ module Core.Primitive.Number_conversion_i open Core open FStar.Mul -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Convert.t_From Core.Primitive.t_i8 i8 = - { - f_from_pre = (fun (x: i8) -> true); - f_from_post = (fun (x: i8) (out: Core.Primitive.t_i8) -> true); - f_from - = - fun (x: i8) -> - Core.Primitive.C_i8 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #i8 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I8) - <: - Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Convert.t_From i8 Core.Primitive.t_i8 = - { - f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); - f_from_post = (fun (x: Core.Primitive.t_i8) (out: i8) -> true); - f_from - = - fun (x: Core.Primitive.t_i8) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #i8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Convert.t_From Core.Primitive.t_i16 i16 = - { - f_from_pre = (fun (x: i16) -> true); - f_from_post = (fun (x: i16) (out: Core.Primitive.t_i16) -> true); - f_from - = - fun (x: i16) -> - Core.Primitive.C_i16 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #i16 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I16) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Convert.t_From i16 Core.Primitive.t_i16 = - { - f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); - f_from_post = (fun (x: Core.Primitive.t_i16) (out: i16) -> true); - f_from - = - fun (x: Core.Primitive.t_i16) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #i16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Convert.t_From Core.Primitive.t_i32 i32 = - { - f_from_pre = (fun (x: i32) -> true); - f_from_post = (fun (x: i32) (out: Core.Primitive.t_i32) -> true); - f_from - = - fun (x: i32) -> - Core.Primitive.C_i32 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #i32 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I32) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Convert.t_From i32 Core.Primitive.t_i32 = - { - f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); - f_from_post = (fun (x: Core.Primitive.t_i32) (out: i32) -> true); - f_from - = - fun (x: Core.Primitive.t_i32) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #i32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Convert.t_From Core.Primitive.t_i64 i64 = - { - f_from_pre = (fun (x: i64) -> true); - f_from_post = (fun (x: i64) (out: Core.Primitive.t_i64) -> true); - f_from - = - fun (x: i64) -> - Core.Primitive.C_i64 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #i64 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I64) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Convert.t_From i64 Core.Primitive.t_i64 = - { - f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); - f_from_post = (fun (x: Core.Primitive.t_i64) (out: i64) -> true); - f_from - = - fun (x: Core.Primitive.t_i64) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #i64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Convert.t_From Core.Primitive.t_i128 i128 = - { - f_from_pre = (fun (x: i128) -> true); - f_from_post = (fun (x: i128) (out: Core.Primitive.t_i128) -> true); - f_from - = - fun (x: i128) -> - Core.Primitive.C_i128 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #i128 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I128) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Convert.t_From i128 Core.Primitive.t_i128 = - { - f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); - f_from_post = (fun (x: Core.Primitive.t_i128) (out: i128) -> true); - f_from - = - fun (x: Core.Primitive.t_i128) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #i128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Convert.t_From Core.Primitive.t_isize isize = - { - f_from_pre = (fun (x: isize) -> true); - f_from_post = (fun (x: isize) (out: Core.Primitive.t_isize) -> true); - f_from - = - fun (x: isize) -> - Core.Primitive.C_isize - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #isize #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I64) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Convert.t_From isize Core.Primitive.t_isize = - { - f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); - f_from_post = (fun (x: Core.Primitive.t_isize) (out: isize) -> true); - f_from - = - fun (x: Core.Primitive.t_isize) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #isize - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Convert.t_From Core.Primitive.t_i16 Core.Primitive.t_i8 = - { - f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); - f_from_post = (fun (x: Core.Primitive.t_i8) (out: Core.Primitive.t_i16) -> true); - f_from - = - fun (x: Core.Primitive.t_i8) -> - Core.Primitive.C_i16 - (Core.Convert.f_into #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Convert.t_From Core.Primitive.t_i32 Core.Primitive.t_i8 = - { - f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); - f_from_post = (fun (x: Core.Primitive.t_i8) (out: Core.Primitive.t_i32) -> true); - f_from - = - fun (x: Core.Primitive.t_i8) -> - Core.Primitive.C_i32 - (Core.Convert.f_into #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Convert.t_From Core.Primitive.t_i64 Core.Primitive.t_i8 = - { - f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); - f_from_post = (fun (x: Core.Primitive.t_i8) (out: Core.Primitive.t_i64) -> true); - f_from - = - fun (x: Core.Primitive.t_i8) -> - Core.Primitive.C_i64 - (Core.Convert.f_into #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Convert.t_From Core.Primitive.t_i128 Core.Primitive.t_i8 = - { - f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); - f_from_post = (fun (x: Core.Primitive.t_i8) (out: Core.Primitive.t_i128) -> true); - f_from - = - fun (x: Core.Primitive.t_i8) -> - Core.Primitive.C_i128 - (Core.Convert.f_into #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Convert.t_From Core.Primitive.t_isize Core.Primitive.t_i8 = - { - f_from_pre = (fun (x: Core.Primitive.t_i8) -> true); - f_from_post = (fun (x: Core.Primitive.t_i8) (out: Core.Primitive.t_isize) -> true); - f_from - = - fun (x: Core.Primitive.t_i8) -> - Core.Primitive.C_isize - (Core.Convert.f_into #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Convert.t_From Core.Primitive.t_i8 Core.Primitive.t_i16 = - { - f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); - f_from_post = (fun (x: Core.Primitive.t_i16) (out: Core.Primitive.t_i8) -> true); - f_from - = - fun (x: Core.Primitive.t_i16) -> - Core.Primitive.C_i8 - (Core.Convert.f_into #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Convert.t_From Core.Primitive.t_i32 Core.Primitive.t_i16 = - { - f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); - f_from_post = (fun (x: Core.Primitive.t_i16) (out: Core.Primitive.t_i32) -> true); - f_from - = - fun (x: Core.Primitive.t_i16) -> - Core.Primitive.C_i32 - (Core.Convert.f_into #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Convert.t_From Core.Primitive.t_i64 Core.Primitive.t_i16 = - { - f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); - f_from_post = (fun (x: Core.Primitive.t_i16) (out: Core.Primitive.t_i64) -> true); - f_from - = - fun (x: Core.Primitive.t_i16) -> - Core.Primitive.C_i64 - (Core.Convert.f_into #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Convert.t_From Core.Primitive.t_i128 Core.Primitive.t_i16 = - { - f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); - f_from_post = (fun (x: Core.Primitive.t_i16) (out: Core.Primitive.t_i128) -> true); - f_from - = - fun (x: Core.Primitive.t_i16) -> - Core.Primitive.C_i128 - (Core.Convert.f_into #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Convert.t_From Core.Primitive.t_isize Core.Primitive.t_i16 = - { - f_from_pre = (fun (x: Core.Primitive.t_i16) -> true); - f_from_post = (fun (x: Core.Primitive.t_i16) (out: Core.Primitive.t_isize) -> true); - f_from - = - fun (x: Core.Primitive.t_i16) -> - Core.Primitive.C_isize - (Core.Convert.f_into #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Convert.t_From Core.Primitive.t_i8 Core.Primitive.t_i32 = - { - f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); - f_from_post = (fun (x: Core.Primitive.t_i32) (out: Core.Primitive.t_i8) -> true); - f_from - = - fun (x: Core.Primitive.t_i32) -> - Core.Primitive.C_i8 - (Core.Convert.f_into #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Convert.t_From Core.Primitive.t_i16 Core.Primitive.t_i32 = - { - f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); - f_from_post = (fun (x: Core.Primitive.t_i32) (out: Core.Primitive.t_i16) -> true); - f_from - = - fun (x: Core.Primitive.t_i32) -> - Core.Primitive.C_i16 - (Core.Convert.f_into #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Convert.t_From Core.Primitive.t_i64 Core.Primitive.t_i32 = - { - f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); - f_from_post = (fun (x: Core.Primitive.t_i32) (out: Core.Primitive.t_i64) -> true); - f_from - = - fun (x: Core.Primitive.t_i32) -> - Core.Primitive.C_i64 - (Core.Convert.f_into #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Convert.t_From Core.Primitive.t_i128 Core.Primitive.t_i32 = - { - f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); - f_from_post = (fun (x: Core.Primitive.t_i32) (out: Core.Primitive.t_i128) -> true); - f_from - = - fun (x: Core.Primitive.t_i32) -> - Core.Primitive.C_i128 - (Core.Convert.f_into #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Convert.t_From Core.Primitive.t_isize Core.Primitive.t_i32 = - { - f_from_pre = (fun (x: Core.Primitive.t_i32) -> true); - f_from_post = (fun (x: Core.Primitive.t_i32) (out: Core.Primitive.t_isize) -> true); - f_from - = - fun (x: Core.Primitive.t_i32) -> - Core.Primitive.C_isize - (Core.Convert.f_into #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Convert.t_From Core.Primitive.t_i8 Core.Primitive.t_i64 = - { - f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); - f_from_post = (fun (x: Core.Primitive.t_i64) (out: Core.Primitive.t_i8) -> true); - f_from - = - fun (x: Core.Primitive.t_i64) -> - Core.Primitive.C_i8 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Convert.t_From Core.Primitive.t_i16 Core.Primitive.t_i64 = - { - f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); - f_from_post = (fun (x: Core.Primitive.t_i64) (out: Core.Primitive.t_i16) -> true); - f_from - = - fun (x: Core.Primitive.t_i64) -> - Core.Primitive.C_i16 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Convert.t_From Core.Primitive.t_i32 Core.Primitive.t_i64 = - { - f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); - f_from_post = (fun (x: Core.Primitive.t_i64) (out: Core.Primitive.t_i32) -> true); - f_from - = - fun (x: Core.Primitive.t_i64) -> - Core.Primitive.C_i32 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Convert.t_From Core.Primitive.t_i128 Core.Primitive.t_i64 = - { - f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); - f_from_post = (fun (x: Core.Primitive.t_i64) (out: Core.Primitive.t_i128) -> true); - f_from - = - fun (x: Core.Primitive.t_i64) -> - Core.Primitive.C_i128 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Convert.t_From Core.Primitive.t_isize Core.Primitive.t_i64 = - { - f_from_pre = (fun (x: Core.Primitive.t_i64) -> true); - f_from_post = (fun (x: Core.Primitive.t_i64) (out: Core.Primitive.t_isize) -> true); - f_from - = - fun (x: Core.Primitive.t_i64) -> - Core.Primitive.C_isize - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Convert.t_From Core.Primitive.t_i8 Core.Primitive.t_i128 = - { - f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); - f_from_post = (fun (x: Core.Primitive.t_i128) (out: Core.Primitive.t_i8) -> true); - f_from - = - fun (x: Core.Primitive.t_i128) -> - Core.Primitive.C_i8 - (Core.Convert.f_into #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Convert.t_From Core.Primitive.t_i16 Core.Primitive.t_i128 = - { - f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); - f_from_post = (fun (x: Core.Primitive.t_i128) (out: Core.Primitive.t_i16) -> true); - f_from - = - fun (x: Core.Primitive.t_i128) -> - Core.Primitive.C_i16 - (Core.Convert.f_into #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Convert.t_From Core.Primitive.t_i32 Core.Primitive.t_i128 = - { - f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); - f_from_post = (fun (x: Core.Primitive.t_i128) (out: Core.Primitive.t_i32) -> true); - f_from - = - fun (x: Core.Primitive.t_i128) -> - Core.Primitive.C_i32 - (Core.Convert.f_into #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Convert.t_From Core.Primitive.t_i64 Core.Primitive.t_i128 = - { - f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); - f_from_post = (fun (x: Core.Primitive.t_i128) (out: Core.Primitive.t_i64) -> true); - f_from - = - fun (x: Core.Primitive.t_i128) -> - Core.Primitive.C_i64 - (Core.Convert.f_into #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Convert.t_From Core.Primitive.t_isize Core.Primitive.t_i128 = - { - f_from_pre = (fun (x: Core.Primitive.t_i128) -> true); - f_from_post = (fun (x: Core.Primitive.t_i128) (out: Core.Primitive.t_isize) -> true); - f_from - = - fun (x: Core.Primitive.t_i128) -> - Core.Primitive.C_isize - (Core.Convert.f_into #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Convert.t_From Core.Primitive.t_i8 Core.Primitive.t_isize = - { - f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); - f_from_post = (fun (x: Core.Primitive.t_isize) (out: Core.Primitive.t_i8) -> true); - f_from - = - fun (x: Core.Primitive.t_isize) -> - Core.Primitive.C_i8 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Convert.t_From Core.Primitive.t_i16 Core.Primitive.t_isize = - { - f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); - f_from_post = (fun (x: Core.Primitive.t_isize) (out: Core.Primitive.t_i16) -> true); - f_from - = - fun (x: Core.Primitive.t_isize) -> - Core.Primitive.C_i16 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Convert.t_From Core.Primitive.t_i32 Core.Primitive.t_isize = - { - f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); - f_from_post = (fun (x: Core.Primitive.t_isize) (out: Core.Primitive.t_i32) -> true); - f_from - = - fun (x: Core.Primitive.t_isize) -> - Core.Primitive.C_i32 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Convert.t_From Core.Primitive.t_i64 Core.Primitive.t_isize = - { - f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); - f_from_post = (fun (x: Core.Primitive.t_isize) (out: Core.Primitive.t_i64) -> true); - f_from - = - fun (x: Core.Primitive.t_isize) -> - Core.Primitive.C_i64 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Convert.t_From Core.Primitive.t_i128 Core.Primitive.t_isize = - { - f_from_pre = (fun (x: Core.Primitive.t_isize) -> true); - f_from_post = (fun (x: Core.Primitive.t_isize) (out: Core.Primitive.t_i128) -> true); - f_from - = - fun (x: Core.Primitive.t_isize) -> - Core.Primitive.C_i128 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x.Core.Primitive._0) - <: - Core.Primitive.t_i128 - } +include Core.Array.Rec_bundle_579704328 {impl_31 as impl_31} + +include Core.Array.Rec_bundle_579704328 {impl_40 as impl_40} + +include Core.Array.Rec_bundle_579704328 {impl as impl} + +include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} + +include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} + +include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} + +include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} + +include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} + +include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} + +include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} + +include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} + +include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} + +include Core.Array.Rec_bundle_579704328 {impl_10 as impl_10} + +include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} + +include Core.Array.Rec_bundle_579704328 {impl_12 as impl_12} + +include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} + +include Core.Array.Rec_bundle_579704328 {impl_14 as impl_14} + +include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} + +include Core.Array.Rec_bundle_579704328 {impl_16 as impl_16} + +include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} + +include Core.Array.Rec_bundle_579704328 {impl_18 as impl_18} + +include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} + +include Core.Array.Rec_bundle_579704328 {impl_20 as impl_20} + +include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} + +include Core.Array.Rec_bundle_579704328 {impl_22 as impl_22} + +include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} + +include Core.Array.Rec_bundle_579704328 {impl_24 as impl_24} + +include Core.Array.Rec_bundle_579704328 {impl_25 as impl_25} + +include Core.Array.Rec_bundle_579704328 {impl_26 as impl_26} + +include Core.Array.Rec_bundle_579704328 {impl_27 as impl_27} + +include Core.Array.Rec_bundle_579704328 {impl_28 as impl_28} + +include Core.Array.Rec_bundle_579704328 {impl_29 as impl_29} + +include Core.Array.Rec_bundle_579704328 {impl_30 as impl_30} + +include Core.Array.Rec_bundle_579704328 {impl_32 as impl_32} + +include Core.Array.Rec_bundle_579704328 {impl_33 as impl_33} + +include Core.Array.Rec_bundle_579704328 {impl_34 as impl_34} + +include Core.Array.Rec_bundle_579704328 {impl_35 as impl_35} + +include Core.Array.Rec_bundle_579704328 {impl_36 as impl_36} + +include Core.Array.Rec_bundle_579704328 {impl_37 as impl_37} + +include Core.Array.Rec_bundle_579704328 {impl_38 as impl_38} + +include Core.Array.Rec_bundle_579704328 {impl_39 as impl_39} + +include Core.Array.Rec_bundle_579704328 {impl_41 as impl_41} diff --git a/proof-libs/fstar/generated-core/Core.Primitive.fst b/proof-libs/fstar/generated-core/Core.Primitive.fst index 75d2ad274..1f0a3d5c4 100644 --- a/proof-libs/fstar/generated-core/Core.Primitive.fst +++ b/proof-libs/fstar/generated-core/Core.Primitive.fst @@ -3,1332 +3,138 @@ module Core.Primitive open Core open FStar.Mul -type t_Slice (v_T: Type0) = { f_v:Core.Base.Spec.Seq.t_Seq v_T } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2 (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Convert.t_From (t_Slice v_T) (t_Slice v_T) = - { - f_from_pre = (fun (x: t_Slice v_T) -> true); - f_from_post = (fun (x: t_Slice v_T) (out: t_Slice v_T) -> true); - f_from - = - fun (x: t_Slice v_T) -> - { - f_v - = - { Core.Base.Spec.Seq.f_v = Alloc.Slice.impl__to_vec #v_T x } <: Core.Base.Spec.Seq.t_Seq v_T - } - <: - t_Slice v_T - } - -type t_Array (v_T: Type0) (v_N: usize) = { f_v:t_Slice v_T } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl - (#v_T: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Convert.t_From (t_Array v_T v_N) (t_Array v_T v_N) = - { - f_from_pre = (fun (x: t_Array v_T v_N) -> true); - f_from_post = (fun (x: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); - f_from - = - fun (x: t_Array v_T v_N) -> - { - f_v - = - { - f_v - = - { - Core.Base.Spec.Seq.f_v - = - Alloc.Slice.impl__to_vec #v_T - (x.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] <: t_Slice v_T) - } - <: - Core.Base.Spec.Seq.t_Seq v_T - } - <: - t_Slice v_T - } - <: - t_Array v_T v_N - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1 - (#v_T: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Convert.t_From (t_Array v_T v_N) (t_Array v_T v_N) = - { - f_from_pre = (fun (x: t_Array v_T v_N) -> true); - f_from_post = (fun (x: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); - f_from - = - fun (x: t_Array v_T v_N) -> - match - Core.Convert.f_try_into #(Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global) - #(t_Array v_T v_N) - #FStar.Tactics.Typeclasses.solve - x.f_v.f_v.Core.Base.Spec.Seq.f_v - with - | Core.Result.Result_Ok x -> x - | _ -> - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_const (sz 1 - ) - (let list = ["some error?"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - } - -let impl_3__cast - (#v_T: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (self: t_Array v_T v_N) - : t_Slice v_T = self.f_v - -type t_u128 = | C_u128 : Core.Base_interface.Int.t_U128 -> t_u128 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Clone.t_Clone t_u128 = - { - f_clone_pre = (fun (self: t_u128) -> true); - f_clone_post = (fun (self: t_u128) (out: t_u128) -> true); - f_clone - = - fun (self: t_u128) -> - C_u128 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Cmp.t_PartialEq t_u128 t_u128 = - { - f_eq_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_eq_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_eq = (fun (self: t_u128) (rhs: t_u128) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_ne_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_ne = fun (self: t_u128) (rhs: t_u128) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Cmp.t_PartialOrd t_u128 t_u128 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_partial_cmp_post - = - (fun (self: t_u128) (rhs: t_u128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_u128) (rhs: t_u128) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_lt_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_lt - = - (fun (self: t_u128) (rhs: t_u128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_le_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_le - = - (fun (self: t_u128) (rhs: t_u128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_gt_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_gt - = - (fun (self: t_u128) (rhs: t_u128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_ge_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_ge - = - fun (self: t_u128) (rhs: t_u128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_u16 = | C_u16 : Core.Base_interface.Int.t_U16 -> t_u16 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Clone.t_Clone t_u16 = - { - f_clone_pre = (fun (self: t_u16) -> true); - f_clone_post = (fun (self: t_u16) (out: t_u16) -> true); - f_clone - = - fun (self: t_u16) -> - C_u16 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Cmp.t_PartialEq t_u16 t_u16 = - { - f_eq_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_eq_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_eq = (fun (self: t_u16) (rhs: t_u16) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_ne_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_ne = fun (self: t_u16) (rhs: t_u16) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Cmp.t_PartialOrd t_u16 t_u16 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_partial_cmp_post - = - (fun (self: t_u16) (rhs: t_u16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_u16) (rhs: t_u16) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_lt_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_lt - = - (fun (self: t_u16) (rhs: t_u16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_le_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_le - = - (fun (self: t_u16) (rhs: t_u16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_gt_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_gt - = - (fun (self: t_u16) (rhs: t_u16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_ge_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_ge - = - fun (self: t_u16) (rhs: t_u16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_u32 = | C_u32 : Core.Base_interface.Int.t_U32 -> t_u32 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Clone.t_Clone t_u32 = - { - f_clone_pre = (fun (self: t_u32) -> true); - f_clone_post = (fun (self: t_u32) (out: t_u32) -> true); - f_clone - = - fun (self: t_u32) -> - C_u32 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Cmp.t_PartialEq t_u32 t_u32 = - { - f_eq_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_eq_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_eq = (fun (self: t_u32) (rhs: t_u32) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_ne_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_ne = fun (self: t_u32) (rhs: t_u32) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Cmp.t_PartialOrd t_u32 t_u32 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_partial_cmp_post - = - (fun (self: t_u32) (rhs: t_u32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_u32) (rhs: t_u32) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_lt_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_lt - = - (fun (self: t_u32) (rhs: t_u32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_le_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_le - = - (fun (self: t_u32) (rhs: t_u32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_gt_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_gt - = - (fun (self: t_u32) (rhs: t_u32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_ge_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_ge - = - fun (self: t_u32) (rhs: t_u32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_u64 = | C_u64 : Core.Base_interface.Int.t_U64 -> t_u64 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Clone.t_Clone t_u64 = - { - f_clone_pre = (fun (self: t_u64) -> true); - f_clone_post = (fun (self: t_u64) (out: t_u64) -> true); - f_clone - = - fun (self: t_u64) -> - C_u64 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Cmp.t_PartialEq t_u64 t_u64 = - { - f_eq_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_eq_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_eq = (fun (self: t_u64) (rhs: t_u64) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_ne_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_ne = fun (self: t_u64) (rhs: t_u64) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Cmp.t_PartialOrd t_u64 t_u64 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_partial_cmp_post - = - (fun (self: t_u64) (rhs: t_u64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_u64) (rhs: t_u64) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_lt_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_lt - = - (fun (self: t_u64) (rhs: t_u64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_le_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_le - = - (fun (self: t_u64) (rhs: t_u64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_gt_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_gt - = - (fun (self: t_u64) (rhs: t_u64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_ge_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_ge - = - fun (self: t_u64) (rhs: t_u64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_u8 = | C_u8 : Core.Base_interface.Int.t_U8 -> t_u8 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Clone.t_Clone t_u8 = - { - f_clone_pre = (fun (self: t_u8) -> true); - f_clone_post = (fun (self: t_u8) (out: t_u8) -> true); - f_clone - = - fun (self: t_u8) -> - C_u8 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Cmp.t_PartialEq t_u8 t_u8 = - { - f_eq_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_eq_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_eq = (fun (self: t_u8) (rhs: t_u8) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_ne_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_ne = fun (self: t_u8) (rhs: t_u8) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Cmp.t_PartialOrd t_u8 t_u8 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_partial_cmp_post - = - (fun (self: t_u8) (rhs: t_u8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_u8) (rhs: t_u8) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_lt_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_lt - = - (fun (self: t_u8) (rhs: t_u8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_le_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_le - = - (fun (self: t_u8) (rhs: t_u8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_gt_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_gt - = - (fun (self: t_u8) (rhs: t_u8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_ge_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_ge - = - fun (self: t_u8) (rhs: t_u8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_usize = | C_usize : Core.Base_interface.Int.t_U64 -> t_usize - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Clone.t_Clone t_usize = - { - f_clone_pre = (fun (self: t_usize) -> true); - f_clone_post = (fun (self: t_usize) (out: t_usize) -> true); - f_clone - = - fun (self: t_usize) -> - C_usize - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Cmp.t_PartialEq t_usize t_usize = - { - f_eq_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_eq_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_eq = (fun (self: t_usize) (rhs: t_usize) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_ne_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_ne = fun (self: t_usize) (rhs: t_usize) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Cmp.t_PartialOrd t_usize t_usize = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_partial_cmp_post - = - (fun (self: t_usize) (rhs: t_usize) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_usize) (rhs: t_usize) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_lt_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_lt - = - (fun (self: t_usize) (rhs: t_usize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_le_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_le - = - (fun (self: t_usize) (rhs: t_usize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_gt_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_gt - = - (fun (self: t_usize) (rhs: t_usize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_ge_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_ge - = - fun (self: t_usize) (rhs: t_usize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_i128 = | C_i128 : Core.Base_interface.Int.t_I128 -> t_i128 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Clone.t_Clone t_i128 = - { - f_clone_pre = (fun (self: t_i128) -> true); - f_clone_post = (fun (self: t_i128) (out: t_i128) -> true); - f_clone - = - fun (self: t_i128) -> - C_i128 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I128 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_49: Core.Cmp.t_PartialEq t_i128 t_i128 = - { - f_eq_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_eq_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_eq = (fun (self: t_i128) (rhs: t_i128) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_ne_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_ne = fun (self: t_i128) (rhs: t_i128) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_50: Core.Cmp.t_PartialOrd t_i128 t_i128 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_partial_cmp_post - = - (fun (self: t_i128) (rhs: t_i128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_i128) (rhs: t_i128) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_lt_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_lt - = - (fun (self: t_i128) (rhs: t_i128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_le_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_le - = - (fun (self: t_i128) (rhs: t_i128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_gt_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_gt - = - (fun (self: t_i128) (rhs: t_i128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_ge_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_ge - = - fun (self: t_i128) (rhs: t_i128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_i16 = | C_i16 : Core.Base_interface.Int.t_I16 -> t_i16 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Clone.t_Clone t_i16 = - { - f_clone_pre = (fun (self: t_i16) -> true); - f_clone_post = (fun (self: t_i16) (out: t_i16) -> true); - f_clone - = - fun (self: t_i16) -> - C_i16 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I16 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_43: Core.Cmp.t_PartialEq t_i16 t_i16 = - { - f_eq_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_eq_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_eq = (fun (self: t_i16) (rhs: t_i16) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_ne_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_ne = fun (self: t_i16) (rhs: t_i16) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_44: Core.Cmp.t_PartialOrd t_i16 t_i16 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_partial_cmp_post - = - (fun (self: t_i16) (rhs: t_i16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_i16) (rhs: t_i16) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_lt_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_lt - = - (fun (self: t_i16) (rhs: t_i16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_le_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_le - = - (fun (self: t_i16) (rhs: t_i16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_gt_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_gt - = - (fun (self: t_i16) (rhs: t_i16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_ge_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_ge - = - fun (self: t_i16) (rhs: t_i16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_i32 = | C_i32 : Core.Base_interface.Int.t_I32 -> t_i32 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Clone.t_Clone t_i32 = - { - f_clone_pre = (fun (self: t_i32) -> true); - f_clone_post = (fun (self: t_i32) (out: t_i32) -> true); - f_clone - = - fun (self: t_i32) -> - C_i32 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I32 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_45: Core.Cmp.t_PartialEq t_i32 t_i32 = - { - f_eq_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_eq_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_eq = (fun (self: t_i32) (rhs: t_i32) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_ne_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_ne = fun (self: t_i32) (rhs: t_i32) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_46: Core.Cmp.t_PartialOrd t_i32 t_i32 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_partial_cmp_post - = - (fun (self: t_i32) (rhs: t_i32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_i32) (rhs: t_i32) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_lt_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_lt - = - (fun (self: t_i32) (rhs: t_i32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_le_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_le - = - (fun (self: t_i32) (rhs: t_i32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_gt_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_gt - = - (fun (self: t_i32) (rhs: t_i32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_ge_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_ge - = - fun (self: t_i32) (rhs: t_i32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_i64 = | C_i64 : Core.Base_interface.Int.t_I64 -> t_i64 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Clone.t_Clone t_i64 = - { - f_clone_pre = (fun (self: t_i64) -> true); - f_clone_post = (fun (self: t_i64) (out: t_i64) -> true); - f_clone - = - fun (self: t_i64) -> - C_i64 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_47: Core.Cmp.t_PartialEq t_i64 t_i64 = - { - f_eq_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_eq_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_eq = (fun (self: t_i64) (rhs: t_i64) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_ne_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_ne = fun (self: t_i64) (rhs: t_i64) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_48: Core.Cmp.t_PartialOrd t_i64 t_i64 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_partial_cmp_post - = - (fun (self: t_i64) (rhs: t_i64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_i64) (rhs: t_i64) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_lt_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_lt - = - (fun (self: t_i64) (rhs: t_i64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_le_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_le - = - (fun (self: t_i64) (rhs: t_i64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_gt_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_gt - = - (fun (self: t_i64) (rhs: t_i64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_ge_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_ge - = - fun (self: t_i64) (rhs: t_i64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_i8 = | C_i8 : Core.Base_interface.Int.t_I8 -> t_i8 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Clone.t_Clone t_i8 = - { - f_clone_pre = (fun (self: t_i8) -> true); - f_clone_post = (fun (self: t_i8) (out: t_i8) -> true); - f_clone - = - fun (self: t_i8) -> - C_i8 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Cmp.t_PartialEq t_i8 t_i8 = - { - f_eq_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_eq_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_eq = (fun (self: t_i8) (rhs: t_i8) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_ne_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_ne = fun (self: t_i8) (rhs: t_i8) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_42: Core.Cmp.t_PartialOrd t_i8 t_i8 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_partial_cmp_post - = - (fun (self: t_i8) (rhs: t_i8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_i8) (rhs: t_i8) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_lt_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_lt - = - (fun (self: t_i8) (rhs: t_i8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_le_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_le - = - (fun (self: t_i8) (rhs: t_i8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_gt_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_gt - = - (fun (self: t_i8) (rhs: t_i8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_ge_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_ge - = - fun (self: t_i8) (rhs: t_i8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -type t_isize = | C_isize : Core.Base_interface.Int.t_I64 -> t_isize - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Clone.t_Clone t_isize = - { - f_clone_pre = (fun (self: t_isize) -> true); - f_clone_post = (fun (self: t_isize) (out: t_isize) -> true); - f_clone - = - fun (self: t_isize) -> - C_isize - (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_51: Core.Cmp.t_PartialEq t_isize t_isize = - { - f_eq_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_eq_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_eq = (fun (self: t_isize) (rhs: t_isize) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_ne_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_ne = fun (self: t_isize) (rhs: t_isize) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_52: Core.Cmp.t_PartialOrd t_isize t_isize = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_partial_cmp_post - = - (fun (self: t_isize) (rhs: t_isize) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_isize) (rhs: t_isize) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_lt_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_lt - = - (fun (self: t_isize) (rhs: t_isize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_le_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_le - = - (fun (self: t_isize) (rhs: t_isize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_gt_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_gt - = - (fun (self: t_isize) (rhs: t_isize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_ge_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_ge - = - fun (self: t_isize) (rhs: t_isize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } +include Core.Array.Rec_bundle_579704328 {t_Slice as t_Slice} + +include Core.Array.Rec_bundle_579704328 {f_v as f_v} + +include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} + +include Core.Array.Rec_bundle_579704328 {t_Array as t_Array} + +include Core.Array.Rec_bundle_579704328 {f_v as f_v} + +include Core.Array.Rec_bundle_579704328 {cast as impl_3__cast} + +include Core.Array.Rec_bundle_579704328 {t_i128 as t_i128} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {impl_25 as impl_25} + +include Core.Array.Rec_bundle_579704328 {t_i16 as t_i16} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} + +include Core.Array.Rec_bundle_579704328 {t_i32 as t_i32} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} + +include Core.Array.Rec_bundle_579704328 {t_i64 as t_i64} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} + +include Core.Array.Rec_bundle_579704328 {t_i8 as t_i8} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} + +include Core.Array.Rec_bundle_579704328 {t_isize as t_isize} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {impl_27 as impl_27} + +include Core.Array.Rec_bundle_579704328 {t_u128 as t_u128} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {t_u16 as t_u16} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {t_u32 as t_u32} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {t_u64 as t_u64} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {t_u8 as t_u8} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {t_usize as t_usize} + +include Core.Array.Rec_bundle_579704328 {_0 as _0} + +include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} + +include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} + +include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} + +include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} + +include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} + +include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} + +include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} + +include Core.Array.Rec_bundle_579704328 {impl as impl} + +include Core.Array.Rec_bundle_579704328 {impl_29 as impl_29} + +include Core.Array.Rec_bundle_579704328 {impl_30 as impl_30} + +include Core.Array.Rec_bundle_579704328 {impl_31 as impl_31} + +include Core.Array.Rec_bundle_579704328 {impl_32 as impl_32} + +include Core.Array.Rec_bundle_579704328 {impl_33 as impl_33} + +include Core.Array.Rec_bundle_579704328 {impl_34 as impl_34} + +include Core.Array.Rec_bundle_579704328 {impl_35 as impl_35} + +include Core.Array.Rec_bundle_579704328 {impl_36 as impl_36} + +include Core.Array.Rec_bundle_579704328 {impl_37 as impl_37} + +include Core.Array.Rec_bundle_579704328 {impl_38 as impl_38} + +include Core.Array.Rec_bundle_579704328 {impl_39 as impl_39} + +include Core.Array.Rec_bundle_579704328 {impl_40 as impl_40} + +include Core.Array.Rec_bundle_579704328 {impl_41 as impl_41} + +include Core.Array.Rec_bundle_579704328 {impl_42 as impl_42} + +include Core.Array.Rec_bundle_579704328 {impl_43 as impl_43} + +include Core.Array.Rec_bundle_579704328 {impl_44 as impl_44} + +include Core.Array.Rec_bundle_579704328 {impl_45 as impl_45} + +include Core.Array.Rec_bundle_579704328 {impl_46 as impl_46} + +include Core.Array.Rec_bundle_579704328 {impl_47 as impl_47} + +include Core.Array.Rec_bundle_579704328 {impl_48 as impl_48} + +include Core.Array.Rec_bundle_579704328 {impl_49 as impl_49} + +include Core.Array.Rec_bundle_579704328 {impl_50 as impl_50} + +include Core.Array.Rec_bundle_579704328 {impl_51 as impl_51} + +include Core.Array.Rec_bundle_579704328 {impl_52 as impl_52} diff --git a/proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst b/proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst index 168a29f28..bd7714e81 100644 --- a/proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst +++ b/proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst @@ -3,32 +3,22 @@ module Core.Slice.Index.Private_slice_index open Core open FStar.Mul -class t_Sealed (v_Self: Type0) = { __marker_trait_t_Sealed:Prims.unit } +include Core.Array.Rec_bundle_579704328 {v_Sealed as v_Sealed} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: t_Sealed (Core.Ops.Range.t_RangeTo usize) = { __marker_trait = () } +include Core.Array.Rec_bundle_579704328 {impl as impl} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: t_Sealed (Core.Ops.Range.t_RangeFrom usize) = { __marker_trait = () } +include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: t_Sealed Core.Ops.Range.t_RangeFull = { __marker_trait = () } +include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: t_Sealed (Core.Ops.Range.t_RangeInclusive usize) = { __marker_trait = () } +include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: t_Sealed (Core.Ops.Range.t_RangeToInclusive usize) = { __marker_trait = () } +include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: t_Sealed (Core.Ops.Range.t_Bound usize & Core.Ops.Range.t_Bound usize) = - { __marker_trait = () } +include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: t_Sealed (Core.Ops.Range.t_Range usize) = { __marker_trait = () } +include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: t_Sealed Core.Ops.Index_range.t_IndexRange = { __marker_trait = () } +include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: t_Sealed Core.Primitive.t_usize = { __marker_trait = () } +include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} diff --git a/proof-libs/fstar/generated-core/Core.Slice.Index.fst b/proof-libs/fstar/generated-core/Core.Slice.Index.fst index cdd0e1ce5..04ada15ad 100644 --- a/proof-libs/fstar/generated-core/Core.Slice.Index.fst +++ b/proof-libs/fstar/generated-core/Core.Slice.Index.fst @@ -3,69 +3,10 @@ module Core.Slice.Index open Core open FStar.Mul -class t_SliceIndex (v_Self: Type0) (v_T: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_9346575357466912174:Core.Slice.Index.Private_slice_index.t_Sealed - v_Self; - f_Output:Type0; - f_index_pre:v_Self -> v_T -> Type0; - f_index_post:v_Self -> v_T -> f_Output -> Type0; - f_index:x0: v_Self -> x1: v_T - -> Prims.Pure f_Output (f_index_pre x0 x1) (fun result -> f_index_post x0 x1 result) -} +include Core.Array.Rec_bundle_579704328 {v_SliceIndex as v_SliceIndex} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl - (#v_T #v_I: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: t_SliceIndex v_I (Core.Primitive.t_Slice v_T)) - : Core.Ops.Index.t_Index (Core.Primitive.t_Slice v_T) v_I = - { - f_Output = i2.f_Output; - f_index_pre = (fun (self: Core.Primitive.t_Slice v_T) (index: v_I) -> true); - f_index_post = (fun (self: Core.Primitive.t_Slice v_T) (index: v_I) (out: i2.f_Output) -> true); - f_index - = - fun (self: Core.Primitive.t_Slice v_T) (index: v_I) -> - f_index #v_I #(Core.Primitive.t_Slice v_T) #FStar.Tactics.Typeclasses.solve index self - } +include Core.Array.Rec_bundle_579704328 {impl as impl} -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2 (#v_T: Type0) : t_SliceIndex Core.Ops.Range.t_RangeFull (Core.Primitive.t_Slice v_T) = - { - _super_9346575357466912174 = FStar.Tactics.Typeclasses.solve; - f_Output = Core.Primitive.t_Slice v_T; - f_index_pre - = - (fun (self: Core.Ops.Range.t_RangeFull) (slice: Core.Primitive.t_Slice v_T) -> true); - f_index_post - = - (fun - (self: Core.Ops.Range.t_RangeFull) - (slice: Core.Primitive.t_Slice v_T) - (out: Core.Primitive.t_Slice v_T) - -> - true); - f_index = fun (self: Core.Ops.Range.t_RangeFull) (slice: Core.Primitive.t_Slice v_T) -> slice - } +include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} -/// The methods `index` and `index_mut` panic if the index is out of bounds. -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1 (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : t_SliceIndex Core.Primitive.t_usize (Core.Primitive.t_Slice v_T) = - { - _super_9346575357466912174 = FStar.Tactics.Typeclasses.solve; - f_Output = v_T; - f_index_pre = (fun (self: Core.Primitive.t_usize) (slice: Core.Primitive.t_Slice v_T) -> true); - f_index_post - = - (fun (self: Core.Primitive.t_usize) (slice: Core.Primitive.t_Slice v_T) (out: v_T) -> true); - f_index - = - fun (self: Core.Primitive.t_usize) (slice: Core.Primitive.t_Slice v_T) -> - let (x: usize):usize = - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #usize - #FStar.Tactics.Typeclasses.solve - self.Core.Primitive._0.Core.Base_interface.Int.f_v - in - slice.Core.Primitive.f_v.Core.Base.Spec.Seq.f_v.[ x ] - } +include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} diff --git a/proof-libs/fstar/generated-core/Core.Slice.fst b/proof-libs/fstar/generated-core/Core.Slice.fst index 2d0e00be5..282374444 100644 --- a/proof-libs/fstar/generated-core/Core.Slice.fst +++ b/proof-libs/fstar/generated-core/Core.Slice.fst @@ -3,6 +3,12 @@ module Core.Slice open Core open FStar.Mul +let impl__iter + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) + (self: Core.Primitive.t_Slice v_T) + : Core.Slice.Iter.t_Iter v_T = Core.Slice.Iter.impl__new #v_T self + let impl__len (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) @@ -25,9 +31,3 @@ let impl__is_empty (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) (self: Core.Primitive.t_Slice v_T) : bool = Rust_primitives.Usize.eq (impl__len #v_T self <: usize) (sz 0) - -let impl__iter - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: Core.Primitive.t_Slice v_T) - : Core.Slice.Iter.t_Iter v_T = Core.Slice.Iter.impl__new #v_T self From 59ca00cccf881552fc520958caa02e0831204c49 Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Mon, 25 Nov 2024 14:16:15 +0100 Subject: [PATCH 24/59] Very close to full working annotated core for coq --- proof-libs/coq/coq/generated-core/_CoqProject | 146 +- .../phase_library/ControlFlow.v | 45 + .../coq/generated-core/spec/Core_Base_Spec.v | 43 + .../spec/Core_Base_Spec_Binary.v | 23 + .../spec/Core_Base_Spec_Binary_Pos.v | 25 + .../spec/Core_Base_Spec_Binary_Positive.v | 36 + .../spec/Core_Base_Spec_Constants.v | 40 + .../spec/Core_Base_Spec_Haxint.v | 24 + .../generated-core/spec/Core_Base_Spec_Seq.v | 24 + .../spec/Core_Base_Spec_Unary.v | 31 + .../generated-core/spec/Core_Base_Spec_Z.v | 24 + .../src/Core_Array_Rec_bundle_579704328.v | 4076 ++++++++--------- .../coq/coq/generated-core/src/Core_Base.v | 68 +- .../coq/generated-core/src/Core_Base_Binary.v | 84 +- .../src/Core_Base_Number_conversion.v | 44 - .../coq/generated-core/src/Core_Base_Pos.v | 140 +- .../coq/generated-core/src/Core_Base_Seq.v | 249 +- .../coq/generated-core/src/Core_Base_Spec.v | 92 - .../src/Core_Base_Spec_Binary.v | 67 - .../src/Core_Base_Spec_Binary_Pos.v | 77 - .../src/Core_Base_Spec_Binary_Positive.v | 121 - .../src/Core_Base_Spec_Constants.v | 111 - .../src/Core_Base_Spec_Haxint.v | 87 - .../generated-core/src/Core_Base_Spec_Seq.v | 75 - .../generated-core/src/Core_Base_Spec_Unary.v | 102 - .../coq/generated-core/src/Core_Base_Spec_Z.v | 74 - .../coq/coq/generated-core/src/Core_Base_Z.v | 51 +- .../generated-core/src/Core_Base_interface.v | 52 +- .../src/Core_Base_interface_Coerce.v | 45 +- .../src/Core_Base_interface_Int.v | 1813 ++++---- .../coq/coq/generated-core/src/Core_Clone.v | 46 +- .../coq/coq/generated-core/src/Core_Cmp.v | 60 +- .../coq/coq/generated-core/src/Core_Convert.v | 51 +- .../coq/coq/generated-core/src/Core_Marker.v | 47 +- .../coq/coq/generated-core/src/Core_Num.v | 44 - .../generated-core/src/Core_Num_Uint_macros.v | 44 - .../coq/coq/generated-core/src/Core_Ops.v | 152 +- .../coq/generated-core/src/Core_Ops_Arith.v | 44 - .../coq/coq/generated-core/src/Core_Ops_Bit.v | 44 - .../coq/generated-core/src/Core_Ops_Index.v | 44 - .../generated-core/src/Core_Ops_Index_range.v | 48 +- .../coq/generated-core/src/Core_Ops_Range.v | 45 +- .../coq/coq/generated-core/src/Core_Option.v | 107 +- .../coq/generated-core/src/Core_Panicking.v | 91 +- .../coq/generated-core/src/Core_Primitive.v | 117 +- .../coq/coq/generated-core/src/Core_Result.v | 45 +- 46 files changed, 3718 insertions(+), 5200 deletions(-) create mode 100644 proof-libs/coq/coq/generated-core/phase_library/ControlFlow.v create mode 100644 proof-libs/coq/coq/generated-core/spec/Core_Base_Spec.v create mode 100644 proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary.v create mode 100644 proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary_Pos.v create mode 100644 proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary_Positive.v create mode 100644 proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Constants.v create mode 100644 proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Haxint.v create mode 100644 proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Seq.v create mode 100644 proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Unary.v create mode 100644 proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Z.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v delete mode 100644 proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v diff --git a/proof-libs/coq/coq/generated-core/_CoqProject b/proof-libs/coq/coq/generated-core/_CoqProject index 3bbb2fdda..d597276c5 100644 --- a/proof-libs/coq/coq/generated-core/_CoqProject +++ b/proof-libs/coq/coq/generated-core/_CoqProject @@ -1,71 +1,139 @@ -R src/ Core +-R spec/ Core +-R phase_library/ Core -arg -w -arg all ./src/Core_Clone.v - ./src/Core_Marker.v ./src/Core_Panicking.v - -./src/Core_Ops_Arith.v -./src/Core_Ops_Bit.v -./src/Core_Ops_Index.v -./src/Core_Ops_Function.v - ./src/Core_Option.v ./src/Core_Cmp.v -./src/Core_Result.v +./spec/Core_Base_Spec_Haxint.v +./spec/Core_Base_Spec_Unary.v -./src/Core_Base_Int.v -./src/Core_Base_Int_Base_src.v -# ./src/Core_Base_Int_Base_impl.v +./spec/Core_Base_Spec_Binary_Positive.v +./spec/Core_Base_Spec_Binary_Pos.v -# ./src/Core_Coerce.v -# ./src/Core_Convert.v +./spec/Core_Base_Spec_Binary.v -# ./src/Core_Int.v +./spec/Core_Base_Spec_Z.v -# ./src/Core_Base_Seq.v -# ./src/Core_Base_Seq_Base_src.v +./spec/Core_Base_Spec_Seq.v -# ./src/Core_Base_Seq_Base_impl.v +./spec/Core_Base_Spec_Constants.v -# ./src/Core_Primitive.v +./spec/Core_Base_Spec.v -# ./src/Core_Base_Int_Number_conversion.v +./src/Core_Base_Binary.v +./src/Core_Base_Pos.v +./src/Core_Base_Z.v -# ./src/Core_Iter_Traits_Iterator.v -# ./src/Core_Iter_Traits_Collect.v -# ./src/Core_Iter_Traits_Exact_size.v +./src/Core_Base_Seq.v -# ./src/Core_Ops_Index_range.v -# ./src/Core_Ops.v +./src/Core_Base.v -# ./src/Core_Array_Iter.v -# ./src/Core_Array.v +./src/Core_Convert.v -# ./src/Core_Intrinsics.v +./src/Core_Ops_Index.v -# ./src/Core_Ops_Range.v +./src/Core_Ops_Bit.v +./src/Core_Ops_Arith.v -# ./src/Core_Iter_Range.v -# ./src/Core_Range.v +./src/Core_Ops_Range.v -# ./src/Core_Iter.v -# ./src/Core_Range_Legacy.v +./src/Core_Ops.v -# ./src/Core_Range_Iter.v +./src/Core_Base_interface_Coerce.v -# ./src/Core_Slice.v -# ./src/Core_Slice_Index_Private_slice_index.v -# ./src/Core_Slice_Index.v +./src/Core_Base_interface_Int.v -# ./src/Core_Num.v +./src/Core_Base_interface.v -# # Extra +./src/Core_Num_Uint_macros.v # Empty +./src/Core_Num_Int_macros.v # Empty + +./src/Core_Result.v + +./phase_library/ControlFlow.v + +# ./src/Core_Primitive.v + +./src/Core_Array_Rec_bundle_579704328.v + +# ./src/Core_Num.v # Broken? -# ./src/Core.v +# # Extra + +# Core_Slice_Iter_Macros.v +# Core_Slice_Iter.v +# Core_Slice_Index_Private_slice_index.v +# Core_Slice_Index.v +# Core_Slice.v +# Core_Result.v +# Core_Primitive_Number_conversion_i.v +# Core_Primitive_Number_conversion.v +# Core_Primitive.v +# ----- Core_Panicking.v +# ----- Core_Option.v +# ----- Core_Ops_Range.v +# Core_Ops_Index_range.v +# ----- Core_Ops_Index.v +# Core_Ops_Function.v +# Core_Ops_Bit_Impls_for_prims.v +# ----- Core_Ops_Bit.v +# Core_Ops_Arith_Impls_for_prims.v +# ----- Core_Ops_Arith.v +# ----- Core_Ops.v +# Core_Num_Uint_macros.v +# Core_Num_Int_macros.v +# Core_Num.v +# ----- Core_Marker.v +# Core_Iter_Traits_Marker.v +# Core_Iter_Traits_Iterator.v +# Core_Iter_Traits_Exact_size.v +# Core_Iter_Traits_Collect.v +# Core_Iter_Traits.v +# Core_Iter_Range.v +# Core_Iter.v +# Core_Intrinsics.v +# Core_Fmt.v +# ----- Core_Convert.v +# ----- Core_Cmp.v +# ----- Core_Clone.v +# Core_Base_interface_Int_U8_proofs.v +# Core_Base_interface_Int_U64_proofs.v +# Core_Base_interface_Int_U32_proofs.v +# Core_Base_interface_Int_U16_proofs.v +# Core_Base_interface_Int_U128_proofs.v +# Core_Base_interface_Int_I8_proofs.v +# Core_Base_interface_Int_I64_proofs.v +# Core_Base_interface_Int_I32_proofs.v +# Core_Base_interface_Int_I16_proofs.v +# Core_Base_interface_Int_I128_proofs.v +# ----- Core_Base_interface_Int.v +# ----- Core_Base_interface_Coerce.v +# Core_Base_interface.v +# ----- Core_Base_Z.v +# ----- Core_Base_Spec_Z.v +# ----- Core_Base_Spec_Unary.v +# ----- Core_Base_Spec_Seq.v +# ----- Core_Base_Spec_Haxint.v +# ----- Core_Base_Spec_Constants.v +# ----- Core_Base_Spec_Binary_Positive.v +# ----- Core_Base_Spec_Binary_Pos.v +# ----- Core_Base_Spec_Binary.v +# ----- Core_Base_Spec.v +# ----- Core_Base_Seq.v +# ----- Core_Base_Pos.v +# Core_Base_Number_conversion.v +# ----- Core_Base_Binary.v +# ----- Core_Base.v +# Core_Array_Rec_bundle_579704328.v +# Core_Array_Iter.v +# Core_Array.v +# Core.v \ No newline at end of file diff --git a/proof-libs/coq/coq/generated-core/phase_library/ControlFlow.v b/proof-libs/coq/coq/generated-core/phase_library/ControlFlow.v new file mode 100644 index 000000000..895944f89 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/phase_library/ControlFlow.v @@ -0,0 +1,45 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +From Core Require Import Core_Marker. + +From Core Require Import Core_Convert. + +From Core Require Import Core_Base_interface_Int. + +From Core Require Import Core_Result. + +Inductive t_ControlFlow a b := +| ControlFlow_Continue : a -> t_ControlFlow a b +| ControlFlow_Break : b -> t_ControlFlow a b. +Arguments ControlFlow_Continue {a} {b}. +Arguments ControlFlow_Break {a} {b}. + +(* Run exception *) +Definition run {a} (x : t_ControlFlow a a) : a := + match x with + | ControlFlow_Continue x => x + | ControlFlow_Break x => x + end. + +Definition bind_exception {a c} + (x : t_ControlFlow a c) + (f : forall (k : a) `{x = ControlFlow_Continue k}, t_ControlFlow a c) : t_ControlFlow a c := + match x as k return x = k -> _ with + | ControlFlow_Continue o => fun k => f (H := k) o + | ControlFlow_Break o => fun _ => ControlFlow_Break o + end eq_refl. + +Notation "'letb' p ':=' e 'in' rhs" := + (bind_exception e (fun p _ => rhs)) (at level 100). diff --git a/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec.v b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec.v new file mode 100644 index 000000000..a84f87927 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec.v @@ -0,0 +1,43 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +From Core Require Import Core_Base_Spec_Haxint. +Export Core_Base_Spec_Haxint. + +From Core Require Import Core_Base_Spec_Unary. +Export Core_Base_Spec_Unary. + +From Core Require Import Core_Base_Spec_Binary. +Export Core_Base_Spec_Binary. + +From Core Require Import Core_Base_Spec_Z. +Export Core_Base_Spec_Z. + +From Core Require Import Core_Base_Spec_Seq. +Export Core_Base_Spec_Seq. + +From Core Require Import Core_Base_Spec_Constants. +Export Core_Base_Spec_Constants. + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary.v b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary.v new file mode 100644 index 000000000..34f3bc7c4 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary.v @@ -0,0 +1,23 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +From Core Require Import Core_Base_Spec_Binary_Pos. +Export Core_Base_Spec_Binary_Pos. + +From Core Require Import Core_Base_Spec_Binary_Positive. +Export Core_Base_Spec_Binary_Positive. + +(* NotImplementedYet *) + +(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary_Pos.v b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary_Pos.v new file mode 100644 index 000000000..14df02f75 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary_Pos.v @@ -0,0 +1,25 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +From Core Require Import Core_Base_Spec_Haxint. +Export Core_Base_Spec_Haxint. + +From Core Require Import Core_Base_Spec_Binary_Positive. +Export Core_Base_Spec_Binary_Positive. + +Notation "'t_POS'" := N. +Notation "'POS_ZERO'" := N0. +Notation "'POS_POS'" := Npos. + +Definition match_pos (s : t_HaxInt) : t_POS := s. diff --git a/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary_Positive.v b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary_Positive.v new file mode 100644 index 000000000..717f41626 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Binary_Positive.v @@ -0,0 +1,36 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +From Core Require Import Core_Base_Spec_Haxint. +Export Core_Base_Spec_Haxint. + +From Core Require Import Core_Clone. +Export Core_Clone. + +Notation "'t_Positive'" := positive. +Notation "'t_POSITIVE'" := positive. +Notation "'POSITIVE_XH'" := xH. +Notation "'POSITIVE_XO'" := xO. +Notation "'POSITIVE_XI'" := xI. + +Definition positive_from_int (x : t_HaxInt) `{Hpos : x <> N0} : t_Positive := + match x return x <> N0 -> _ with | N0 => fun Hpos => False_rect _ (Hpos eq_refl) | Npos p => fun _ => p end Hpos. + +Definition positive_to_int (s : t_Positive) : t_HaxInt := Npos s. + +Definition xH : t_Positive := xH. +Definition xI (s : t_Positive) : t_Positive := xI s. +Definition xO (s : t_Positive) : t_Positive := xO s. + +Definition match_positive (s : t_Positive) : t_POSITIVE := s. diff --git a/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Constants.v b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Constants.v new file mode 100644 index 000000000..fe496b4da --- /dev/null +++ b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Constants.v @@ -0,0 +1,40 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +From Core Require Import Core_Base_Spec_Haxint. +Export Core_Base_Spec_Haxint. + +Definition v_BITS_128_ : t_HaxInt := 128. +Definition v_BITS_16_ : t_HaxInt := 16. +Definition v_BITS_32_ : t_HaxInt := 32. +Definition v_BITS_64_ : t_HaxInt := 64. +Definition v_BITS_8_ : t_HaxInt := 8. + +Definition v_WORDSIZE_128_ : t_HaxInt := N.pow 2 128. +Definition v_WORDSIZE_128_SUB_1_ : t_HaxInt := N.pow 2 128 - 1. + +Definition v_WORDSIZE_16_ : t_HaxInt := N.pow 2 16. +Definition v_WORDSIZE_16_SUB_1_ : t_HaxInt := N.pow 2 16. + +Definition v_WORDSIZE_32_ : t_HaxInt := N.pow 2 32. +Definition v_WORDSIZE_32_SUB_1_ : t_HaxInt := N.pow 2 32 - 1. + +Definition v_WORDSIZE_4_ : t_HaxInt := N.pow 2 4. +Definition v_WORDSIZE_4_SUB_1_ : t_HaxInt := N.pow 2 4 - 1. + +Definition v_WORDSIZE_64_ : t_HaxInt := N.pow 2 64. +Definition v_WORDSIZE_64_SUB_1_ : t_HaxInt := N.pow 2 64 - 1. + +Definition v_WORDSIZE_8_ : t_HaxInt := N.pow 2 8. +Definition v_WORDSIZE_8_SUB_1_ : t_HaxInt := N.pow 2 8 - 1. diff --git a/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Haxint.v b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Haxint.v new file mode 100644 index 000000000..f8a6f8f1d --- /dev/null +++ b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Haxint.v @@ -0,0 +1,24 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +Notation "'t_HaxInt'" := N. + +Definition v_HaxInt_ONE : t_HaxInt := 1. +Definition v_HaxInt_TWO : t_HaxInt := 2. +Definition v_HaxInt_ZERO : t_HaxInt := 0. + +Definition div2 (s : t_HaxInt) : t_HaxInt := s / 2. + +Definition is_zero (s : t_HaxInt) : bool := match s with | N0 => true | _ => false end. + diff --git a/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Seq.v b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Seq.v new file mode 100644 index 000000000..949c1ed96 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Seq.v @@ -0,0 +1,24 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +Notation "'t_Seq'" := list. + +Notation "'t_LIST'" := list. +Notation "'LIST_NIL'" := nil. +Notation "'LIST_CONS'" := cons. + +Notation "'nil'" := nil. +Notation "'cons'" := (fun x y => cons y x). + +Definition match_list {T} (x : t_Seq T) : t_LIST T := x. diff --git a/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Unary.v b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Unary.v new file mode 100644 index 000000000..cb2b64daf --- /dev/null +++ b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Unary.v @@ -0,0 +1,31 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +From Core Require Import Core_Base_Spec_Haxint. +Export Core_Base_Spec_Haxint. + +Notation "'t_Unary'" := nat. + +Notation "'t_UNARY'" := nat. +Notation "'UNARY_ZERO'" := O. +Notation "'UNARY_SUCC'" := S. + +Definition unary_from_int (x : t_HaxInt) : t_Unary := N.to_nat x. +Definition unary_to_int (s : t_Unary) : t_HaxInt := N.of_nat s. + +Definition pred (x : t_Unary) : t_Unary := Nat.pred x. + +Definition match_unary (s : t_Unary) : t_UNARY := s. + +Definition succ (x : t_Unary) : t_Unary := S x. diff --git a/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Z.v b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Z.v new file mode 100644 index 000000000..ee42b1435 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/spec/Core_Base_Spec_Z.v @@ -0,0 +1,24 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +(* From Core Require Import Core. *) + +From Core Require Import Core_Base_Spec_Binary. +Export Core_Base_Spec_Binary. + +Notation "'t_Z'" := Z. +Notation "'Z_NEG'" := Zneg. +Notation "'Z_ZERO'" := Z0. +Notation "'Z_POS'" := Zpos. + +Definition v_Z_ONE : t_Z := 1%Z. +Definition v_Z_TWO : t_Z := 2%Z. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v b/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v index fc396b5d8..245ee6f39 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v @@ -12,116 +12,13 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Marker. -Record t_TryFromSliceError : Type := - { - TryFromSliceError_0 : unit; - }. -Arguments Build_t_TryFromSliceError. -Arguments TryFromSliceError_0. -#[export] Instance settable_t_TryFromSliceError : Settable _ := - settable! (Build_t_TryFromSliceError) . -Notation "'TryFromSliceError'" := Build_t_TryFromSliceError. - -Record t_Seq (v_T : Type) `{t_Sized (v_T)} : Type := - { - Seq_f_v : t_Vec ((v_T)) ((t_Global)); - }. -Arguments Build_t_Seq (_) {_}. -Arguments Seq_f_v {_} {_}. -#[export] Instance settable_t_Seq `{v_T : Type} `{t_Sized (v_T)} : Settable _ := - settable! (Build_t_Seq v_T) . - -Instance t_Clone_640571940 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Seq ((v_T)))) := - { - Clone_impl_f_clone := fun (self : t_Seq ((v_T)))=> - t_Seq (Clone_f_clone (Seq_f_v self)); - }. - -Inductive t_LIST (v_T : Type) `{t_Sized (v_T)} : Type := -| LIST_NIL -| LIST_CONS : v_T -> t_Seq ((v_T)) -> _. -Arguments LIST_NIL {_} {_}. -Arguments LIST_CONS {_} {_}. - -Definition nil `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} '(_ : unit) : t_Seq ((v_T)) := - t_Seq (impl__new (tt)). - -Record t_Slice (v_T : Type) `{t_Sized (v_T)} : Type := - { - Slice_f_v : t_Seq ((v_T)); - }. -Arguments Build_t_Slice (_) {_}. -Arguments Slice_f_v {_} {_}. -#[export] Instance settable_t_Slice `{v_T : Type} `{t_Sized (v_T)} : Settable _ := - settable! (Build_t_Slice v_T) . +From Core Require Import Core_Convert. -Instance t_From_692299963 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_From ((t_Slice ((v_T)))) ((t_Slice v_T)) := - { - From_impl_2_f_from := fun (x : t_Slice v_T)=> - t_Slice (t_Seq (impl__to_vec (x))); - }. +From Core Require Import Core_Base_interface_Int. -Record t_Array (v_T : Type) (v_N : t_usize) `{t_Sized (v_T)} : Type := - { - Array_f_v : t_Slice ((v_T)); - }. -Arguments Build_t_Array (_) (_) {_}. -Arguments Array_f_v {_} {_} {_}. -#[export] Instance settable_t_Array `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} : Settable _ := - settable! (Build_t_Array v_T v_N) . - -Instance t_Clone_962303223 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Array ((v_T)) (v_N))) := - { - Clone_impl_2_f_clone := fun (self : t_Array ((v_T)) (v_N))=> - t_Array (Clone_f_clone (Array_f_v self)); - }. - -Definition cast `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} (self : t_Array ((v_T)) (v_N)) : t_Slice ((v_T)) := - Array_f_v self. +From Core Require Import ControlFlow. Record t_i128 : Type := { @@ -135,8 +32,7 @@ Notation "'i128'" := Build_t_i128. Instance t_Clone_173398349 : t_Clone ((t_i128)) := { - Clone_impl_25_f_clone := fun (self : t_i128)=> - t_i128 (Clone_f_clone (i128_0 self)); + Clone_f_clone := fun (self : t_i128)=> self; }. Record t_i16 : Type := @@ -151,8 +47,8 @@ Notation "'i16'" := Build_t_i16. Instance t_Clone_192670426 : t_Clone ((t_i16)) := { - Clone_impl_19_f_clone := fun (self : t_i16)=> - t_i16 (Clone_f_clone (i16_0 self)); + Clone_f_clone := fun (self : t_i16)=> + Build_t_i16 (Clone_f_clone (i16_0 self)); }. Record t_i32 : Type := @@ -167,8 +63,8 @@ Notation "'i32'" := Build_t_i32. Instance t_Clone_502683757 : t_Clone ((t_i32)) := { - Clone_impl_21_f_clone := fun (self : t_i32)=> - t_i32 (Clone_f_clone (i32_0 self)); + Clone_f_clone := fun (self : t_i32)=> + Build_t_i32 (Clone_f_clone (i32_0 self)); }. Record t_i64 : Type := @@ -183,8 +79,8 @@ Notation "'i64'" := Build_t_i64. Instance t_Clone_208076318 : t_Clone ((t_i64)) := { - Clone_impl_23_f_clone := fun (self : t_i64)=> - t_i64 (Clone_f_clone (i64_0 self)); + Clone_f_clone := fun (self : t_i64)=> + Build_t_i64 (Clone_f_clone (i64_0 self)); }. Record t_i8 : Type := @@ -199,8 +95,8 @@ Notation "'i8'" := Build_t_i8. Instance t_Clone_654126073 : t_Clone ((t_i8)) := { - Clone_impl_17_f_clone := fun (self : t_i8)=> - t_i8 (Clone_f_clone (i8_0 self)); + Clone_f_clone := fun (self : t_i8)=> + Build_t_i8 (Clone_f_clone (i8_0 self)); }. Record t_isize : Type := @@ -215,20 +111,20 @@ Notation "'isize'" := Build_t_isize. Instance t_Clone_36465747 : t_Clone ((t_isize)) := { - Clone_impl_27_f_clone := fun (self : t_isize)=> - t_isize (Clone_f_clone (isize_0 self)); + Clone_f_clone := fun (self : t_isize)=> + Build_t_isize (Clone_f_clone (isize_0 self)); }. Instance t_From_200584765 : t_From ((t_isize)) ((t_i64)) := { - From_impl_31_f_from := fun (x : t_i64)=> - t_isize (Into_f_into (i64_0 x)); + From_f_from := fun (x : t_i64)=> + Build_t_isize (Into_f_into (i64_0 x)); }. Instance t_From_705632684 : t_From ((t_i64)) ((t_isize)) := { - From_impl_40_f_from := fun (x : t_isize)=> - t_i64 (Into_f_into (isize_0 x)); + From_f_from := fun (x : t_isize)=> + Build_t_i64 (Into_f_into (isize_0 x)); }. Record t_u128 : Type := @@ -329,14 +225,14 @@ Definition to_le946822077 (self : t_usize) : t_usize := Instance t_From_1035345737 : t_From ((t_usize)) ((t_u64)) := { - From_impl_31_f_from := fun (x : t_u64)=> - t_usize (Into_f_into (u64_0 x)); + From_f_from := fun (x : t_u64)=> + Build_t_usize (Into_f_into (u64_0 x)); }. Instance t_From_478985084 : t_From ((t_u64)) ((t_usize)) := { - From_impl_40_f_from := fun (x : t_usize)=> - t_u64 (Into_f_into (usize_0 x)); + From_f_from := fun (x : t_usize)=> + Build_t_u64 (Into_f_into (usize_0 x)); }. Class v_Sealed (v_Self : Type) : Type := @@ -352,194 +248,176 @@ Instance v_Sealed_740757788 : v_Sealed ((t_Range ((t_usize)))) := { }. -Instance v_Sealed_1056036517 : v_Sealed ((t_RangeTo ((t_usize)))) := - { - }. +(* Instance v_Sealed_1056036517 : v_Sealed ((t_RangeTo ((t_usize)))) := *) +(* { *) +(* }. *) -Instance v_Sealed_277245654 : v_Sealed ((t_RangeFrom ((t_usize)))) := - { - }. +(* Instance v_Sealed_277245654 : v_Sealed ((t_RangeFrom ((t_usize)))) := *) +(* { *) +(* }. *) -Instance v_Sealed_1032594188 : v_Sealed ((t_RangeFull)) := - { - }. +(* Instance v_Sealed_1032594188 : v_Sealed ((t_RangeFull)) := *) +(* { *) +(* }. *) -Instance v_Sealed_135080564 : v_Sealed ((t_RangeInclusive ((t_usize)))) := - { - }. +(* Instance v_Sealed_135080564 : v_Sealed ((t_RangeInclusive ((t_usize)))) := *) +(* { *) +(* }. *) -Instance v_Sealed_919294089 : v_Sealed ((t_RangeToInclusive ((t_usize)))) := - { - }. +(* Instance v_Sealed_919294089 : v_Sealed ((t_RangeToInclusive ((t_usize)))) := *) +(* { *) +(* }. *) -Instance v_Sealed_254412259 : v_Sealed (((t_Bound ((t_usize))*t_Bound ((t_usize))))) := - { - }. +(* Instance v_Sealed_254412259 : v_Sealed (((t_Bound ((t_usize))*t_Bound ((t_usize))))) := *) +(* { *) +(* }. *) -Instance v_Sealed_463870686 : v_Sealed ((t_IndexRange)) := - { - }. +(* Instance v_Sealed_463870686 : v_Sealed ((t_IndexRange)) := *) +(* { *) +(* }. *) Definition v_BITS80497669 : t_u32 := - t_u32 (impl_97__BITS). + Build_t_u32 (impl_97__BITS). Definition v_MAX626626007 : t_i8 := - t_i8 (Constants_f_MAX). + Build_t_i8 (Constants_f_MAX). Definition v_MIN19747349 : t_i8 := - t_i8 (Constants_f_MIN). + Build_t_i8 (Constants_f_MIN). Definition v_BITS421056295 : t_u32 := - t_u32 (impl_83__BITS). + Build_t_u32 (impl_83__BITS). Definition v_MAX474501300 : t_i16 := - t_i16 (Constants_f_MAX). + Build_t_i16 (Constants_f_MAX). Definition v_MIN776391606 : t_i16 := - t_i16 (Constants_f_MIN). + Build_t_i16 (Constants_f_MIN). Definition v_BITS465526498 : t_u32 := - t_u32 (impl_69__BITS). + Build_t_u32 (impl_69__BITS). Definition v_MAX106630818 : t_i32 := - t_i32 (Constants_f_MAX). + Build_t_i32 (Constants_f_MAX). Definition v_MIN682967538 : t_i32 := - t_i32 (Constants_f_MIN). + Build_t_i32 (Constants_f_MIN). Definition v_BITS419886578 : t_u32 := - t_u32 (impl_55__BITS). + Build_t_u32 (impl_55__BITS). Definition v_MAX527043787 : t_i64 := - t_i64 (Constants_f_MAX). + Build_t_i64 (Constants_f_MAX). Definition v_MIN654206259 : t_i64 := - t_i64 (Constants_f_MIN). + Build_t_i64 (Constants_f_MIN). Definition v_BITS992667165 : t_u32 := - t_u32 (impl_41__BITS). + Build_t_u32 (impl_41__BITS). Definition v_MAX375377319 : t_i128 := - t_i128 (Constants_f_MAX). + Build_t_i128 (Constants_f_MAX). Definition v_MIN79612531 : t_i128 := - t_i128 (Constants_f_MIN). + Build_t_i128 (Constants_f_MIN). Definition v_BITS211584016 : t_u32 := - t_u32 (impl_55__BITS). + Build_t_u32 (impl_55__BITS). Definition v_MAX937003029 : t_isize := - t_isize (Constants_f_MAX). + Build_t_isize (Constants_f_MAX). Definition v_MIN1017039533 : t_isize := - t_isize (Constants_f_MIN). + Build_t_isize (Constants_f_MIN). Definition v_BITS690311813 : t_u32 := - t_u32 (impl_219__BITS). + Build_t_u32 (impl_219__BITS). Definition v_MAX310118176 : t_u8 := - t_u8 (Constants_f_MAX). + Build_t_u8 (Constants_f_MAX). Definition v_MIN41851434 : t_u8 := - t_u8 (Constants_f_MIN). + Build_t_u8 (Constants_f_MIN). Definition v_BITS277333551 : t_u32 := - t_u32 (impl_192__BITS). + Build_t_u32 (impl_192__BITS). Definition v_MAX487295910 : t_u16 := - t_u16 (Constants_f_MAX). + Build_t_u16 (Constants_f_MAX). Definition v_MIN592300287 : t_u16 := - t_u16 (Constants_f_MIN). + Build_t_u16 (Constants_f_MIN). Definition v_BITS473478051 : t_u32 := - t_u32 (impl_165__BITS). + Build_t_u32 (impl_165__BITS). Definition v_MAX826434525 : t_u32 := - t_u32 (Constants_f_MAX). + Build_t_u32 (Constants_f_MAX). Definition v_MIN932777089 : t_u32 := - t_u32 (Constants_f_MIN). + Build_t_u32 (Constants_f_MIN). Definition v_BITS177666292 : t_u32 := - t_u32 (impl_138__BITS). + Build_t_u32 (impl_138__BITS). Definition v_MAX815180633 : t_u64 := - t_u64 (Constants_f_MAX). + Build_t_u64 (Constants_f_MAX). Definition v_MIN631333594 : t_u64 := - t_u64 (Constants_f_MIN). + Build_t_u64 (Constants_f_MIN). Definition v_BITS136999051 : t_u32 := - t_u32 (impl_111__BITS). + Build_t_u32 (impl_111__BITS). Definition v_MAX404543799 : t_u128 := - t_u128 (Constants_f_MAX). + Build_t_u128 (Constants_f_MAX). Definition v_MIN668621698 : t_u128 := - t_u128 (Constants_f_MIN). + Build_t_u128 (Constants_f_MIN). Definition v_BITS229952196 : t_u32 := - t_u32 (impl_138__BITS). + Build_t_u32 (impl_138__BITS). Definition v_MAX750570916 : t_usize := - t_usize (Constants_f_MAX). + Build_t_usize (Constants_f_MAX). Definition v_MIN861571008 : t_usize := - t_usize (Constants_f_MIN). - -Instance t_Index_927562605 `{v_T : Type} `{v_I : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Sized (v_I)} `{t_Clone (v_T)} `{t_Index (t_Slice ((v_T))) (v_I)} : t_Index ((t_Array ((v_T)) (v_N))) ((v_I)) := - { - Index_impl_1_f_Output := Index_f_Output; - Index_impl_1_f_index := fun (self : t_Array ((v_T)) (v_N)) (index : v_I)=> - Index_f_index (cast (self)) (index); - }. - -Instance t_From_684363179 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_From ((t_Array (v_T) (v_N))) ((t_Array ((v_T)) (v_N))) := - { - From_impl_1_f_from := fun (x : t_Array ((v_T)) (v_N))=> - match TryInto_f_try_into (Seq_f_v Slice_f_v Array_f_v x) with - | Result_Ok (x) => - x - | _ => - never_to_any (panic_fmt (impl_2__new_const (["some error?"%string]))) - end; - }. + Build_t_usize (Constants_f_MIN). Instance t_Clone_832469823 : t_Clone ((t_u8)) := { - Clone_impl_5_f_clone := fun (self : t_u8)=> - t_u8 (Clone_f_clone (u8_0 self)); + Clone_f_clone := fun (self : t_u8)=> + Build_t_u8 (Clone_f_clone (u8_0 self)); }. Instance t_Clone_562622454 : t_Clone ((t_u16)) := { - Clone_impl_7_f_clone := fun (self : t_u16)=> - t_u16 (Clone_f_clone (u16_0 self)); + Clone_f_clone := fun (self : t_u16)=> + Build_t_u16 (Clone_f_clone (u16_0 self)); }. Instance t_Clone_1034302141 : t_Clone ((t_u32)) := { - Clone_impl_9_f_clone := fun (self : t_u32)=> - t_u32 (Clone_f_clone (u32_0 self)); + Clone_f_clone := fun (self : t_u32)=> + Build_t_u32 (Clone_f_clone (u32_0 self)); }. Instance t_Clone_189576787 : t_Clone ((t_u64)) := { - Clone_impl_11_f_clone := fun (self : t_u64)=> - t_u64 (Clone_f_clone (u64_0 self)); + Clone_f_clone := fun (self : t_u64)=> + Build_t_u64 (Clone_f_clone (u64_0 self)); }. Instance t_Clone_296673181 : t_Clone ((t_u128)) := { - Clone_impl_13_f_clone := fun (self : t_u128)=> - t_u128 (Clone_f_clone (u128_0 self)); + Clone_f_clone := fun (self : t_u128)=> + Build_t_u128 (Clone_f_clone (u128_0 self)); }. Instance t_Clone_466142540 : t_Clone ((t_usize)) := { - Clone_impl_15_f_clone := fun (self : t_usize)=> - t_usize (Clone_f_clone (usize_0 self)); + Clone_f_clone := fun (self : t_usize)=> + Build_t_usize (Clone_f_clone (usize_0 self)); }. Class v_SliceIndex (v_Self : Type) (v_T : Type) `{v_Sealed (v_Self)} : Type := @@ -549,489 +427,26 @@ Class v_SliceIndex (v_Self : Type) (v_T : Type) `{v_Sealed (v_Self)} : Type := }. Arguments v_SliceIndex (_) (_) {_}. -Instance t_Index_324031838 `{v_T : Type} `{v_I : Type} `{t_Sized (v_T)} `{t_Sized (v_I)} `{v_SliceIndex (v_I) (t_Slice ((v_T)))} : t_Index ((t_Slice ((v_T)))) ((v_I)) := - { - Index_impl_f_Output := SliceIndex_f_Output; - Index_impl_f_index := fun (self : t_Slice ((v_T))) (index : v_I)=> - SliceIndex_f_index (index) (self); - }. - -Definition cons `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) (t : v_T) : t_Seq ((v_T)) := - t_Seq (impl__concat (unsize ([Index_f_index ([t]) (Build_t_RangeFull); Index_f_index (Seq_f_v s) (Build_t_RangeFull)]))). - -Instance t_From_1005673342 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_From ((t_Array ((v_T)) (v_N))) ((t_Array (v_T) (v_N))) := - { - From_impl_f_from := fun (x : t_Array (v_T) (v_N))=> - t_Array (t_Slice (t_Seq (impl__to_vec (Index_f_index (x) (Build_t_RangeFull))))); - }. - -Instance v_SliceIndex_1030023794 `{v_T : Type} `{t_Sized (v_T)} : v_SliceIndex ((t_RangeFull)) ((t_Slice ((v_T)))) := - { - SliceIndex_impl_2_f_Output := t_Slice ((v_T)); - SliceIndex_impl_2_f_index := fun (self : t_RangeFull) (slice : t_Slice ((v_T)))=> - slice; - }. - -Instance t_AsRef_175264108 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_AsRef ((t_Array ((v_T)) (v_N))) ((t_Slice ((v_T)))) := - { - AsRef_impl_f_as_ref := fun (self : t_Array ((v_T)) (v_N))=> - Index_f_index (self) (Build_t_RangeFull); - }. - -Definition match_list `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : t_LIST ((v_T)) := - if - t_PartialEq_f_eq (impl_1__len (Seq_f_v s)) (0) - then - LIST_NIL - else - LIST_CONS (Clone_f_clone (Index_f_index (Seq_f_v s) (0))) (t_Seq (impl__concat (unsize ([Index_f_index (Seq_f_v s) (Build_t_RangeFrom (1))])))). - -Fixpoint from_u128_binary (x : t_u128) `{ne (x) (0) = true} : t_Positive := - if - t_PartialEq_f_eq (x) (1) - then - xH - else - if - t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) - then - xO (from_u128_binary (t_Div_f_div (x) (2))) - else - xI (from_u128_binary (t_Div_f_div (x) (2))). - -Instance t_From_383682059 : t_From ((t_HaxInt)) ((t_u128)) := - { - From_impl_8_f_from := fun (x : t_u128)=> - if - t_PartialEq_f_eq (x) (0) - then - v_HaxInt_ZERO - else - positive_to_int (from_u128_binary (x)); - }. - -Instance t_From_394907254 : t_From ((t_Z)) ((t_i128)) := - { - From_impl_20_f_from := fun (x : t_i128)=> - match Ord_f_cmp (x) (0) with - | Ordering_Equal => - Z_ZERO - | Ordering_Less => - Z_NEG (from_u128_binary (impl__i128__unsigned_abs (x))) - | Ordering_Greater => - Z_POS (from_u128_binary (impl__i128__unsigned_abs (x))) - end; - }. - -Fixpoint from_u16_binary (x : t_u16) `{ne (x) (0) = true} : t_Positive := - if - t_PartialEq_f_eq (x) (1) - then - xH - else - if - t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) - then - xO (from_u16_binary (t_Div_f_div (x) (2))) - else - xI (from_u16_binary (t_Div_f_div (x) (2))). - -Instance t_From_283547720 : t_From ((t_HaxInt)) ((t_u16)) := - { - From_impl_2_f_from := fun (x : t_u16)=> - if - t_PartialEq_f_eq (x) (0) - then - v_HaxInt_ZERO - else - positive_to_int (from_u16_binary (x)); - }. - -Instance t_From_960274744 : t_From ((t_Z)) ((t_i16)) := - { - From_impl_14_f_from := fun (x : t_i16)=> - match Ord_f_cmp (x) (0) with - | Ordering_Equal => - Z_ZERO - | Ordering_Less => - Z_NEG (from_u16_binary (impl__i16__unsigned_abs (x))) - | Ordering_Greater => - Z_POS (from_u16_binary (impl__i16__unsigned_abs (x))) - end; - }. - -Fixpoint from_u32_binary (x : t_u32) `{ne (x) (0) = true} : t_Positive := - if - t_PartialEq_f_eq (x) (1) - then - xH - else - if - t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) - then - xO (from_u32_binary (t_Div_f_div (x) (2))) - else - xI (from_u32_binary (t_Div_f_div (x) (2))). - -Instance t_From_247317262 : t_From ((t_HaxInt)) ((t_u32)) := - { - From_impl_4_f_from := fun (x : t_u32)=> - if - t_PartialEq_f_eq (x) (0) - then - v_HaxInt_ZERO - else - positive_to_int (from_u32_binary (x)); - }. - -Instance t_From_1033810922 : t_From ((t_Z)) ((t_i32)) := - { - From_impl_16_f_from := fun (x : t_i32)=> - match Ord_f_cmp (x) (0) with - | Ordering_Equal => - Z_ZERO - | Ordering_Less => - Z_NEG (from_u32_binary (impl__i32__unsigned_abs (x))) - | Ordering_Greater => - Z_POS (from_u32_binary (impl__i32__unsigned_abs (x))) - end; - }. - -Fixpoint from_u64_binary (x : t_u64) `{ne (x) (0) = true} : t_Positive := - if - t_PartialEq_f_eq (x) (1) - then - xH - else - if - t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) - then - xO (from_u64_binary (t_Div_f_div (x) (2))) - else - xI (from_u64_binary (t_Div_f_div (x) (2))). - -Instance t_From_703205527 : t_From ((t_HaxInt)) ((t_u64)) := - { - From_impl_6_f_from := fun (x : t_u64)=> - if - t_PartialEq_f_eq (x) (0) - then - v_HaxInt_ZERO - else - positive_to_int (from_u64_binary (x)); - }. - -Instance t_From_494553464 : t_From ((t_Z)) ((t_i64)) := - { - From_impl_18_f_from := fun (x : t_i64)=> - match Ord_f_cmp (x) (0) with - | Ordering_Equal => - Z_ZERO - | Ordering_Less => - Z_NEG (from_u64_binary (impl__i64__unsigned_abs (x))) - | Ordering_Greater => - Z_POS (from_u64_binary (impl__i64__unsigned_abs (x))) - end; - }. - -Fixpoint from_u8_binary (x : t_u8) `{ne (x) (0) = true} : t_Positive := - if - t_PartialEq_f_eq (x) (1) - then - xH - else - if - t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) - then - xO (from_u8_binary (t_Div_f_div (x) (2))) - else - xI (from_u8_binary (t_Div_f_div (x) (2))). - -Instance t_From_421078324 : t_From ((t_HaxInt)) ((t_u8)) := - { - From_impl_f_from := fun (x : t_u8)=> - if - t_PartialEq_f_eq (x) (0) - then - v_HaxInt_ZERO - else - positive_to_int (from_u8_binary (x)); - }. - -Instance t_From_976104611 : t_From ((t_Z)) ((t_i8)) := - { - From_impl_12_f_from := fun (x : t_i8)=> - match Ord_f_cmp (x) (0) with - | Ordering_Equal => - Z_ZERO - | Ordering_Less => - Z_NEG (from_u8_binary (impl__unsigned_abs (x))) - | Ordering_Greater => - Z_POS (from_u8_binary (impl__unsigned_abs (x))) - end; - }. - -Fixpoint from_usize_binary (x : t_usize) `{ne (x) (0) = true} : t_Positive := - if - t_PartialEq_f_eq (x) (1) - then - xH - else - if - t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) - then - xO (from_usize_binary (t_Div_f_div (x) (2))) - else - xI (from_usize_binary (t_Div_f_div (x) (2))). - -Instance t_From_226738852 : t_From ((t_HaxInt)) ((t_usize)) := - { - From_impl_10_f_from := fun (x : t_usize)=> - if - t_PartialEq_f_eq (x) (0) - then - v_HaxInt_ZERO - else - positive_to_int (from_usize_binary (x)); - }. - -Instance t_From_235021044 : t_From ((t_Z)) ((t_isize)) := - { - From_impl_22_f_from := fun (x : t_isize)=> - match Ord_f_cmp (x) (0) with - | Ordering_Equal => - Z_ZERO - | Ordering_Less => - Z_NEG (from_usize_binary (impl__isize__unsigned_abs (x))) - | Ordering_Greater => - Z_POS (from_usize_binary (impl__isize__unsigned_abs (x))) - end; - }. - -Fixpoint to_u128_binary (self : t_Positive) : t_u128 := - match match_positive (self) with - | POSITIVE_XH => - 1 - | POSITIVE_XO (p) => - t_Mul_f_mul (to_u128_binary (p)) (2) - | POSITIVE_XI (p) => - t_Add_f_add (t_Mul_f_mul (to_u128_binary (p)) (2)) (1) - end. - -Instance t_From_312029210 : t_From ((t_u128)) ((t_HaxInt)) := - { - From_impl_9_f_from := fun (x : t_HaxInt)=> - match match_pos (x) with - | POS_ZERO => - 0 - | POS_POS (p) => - to_u128_binary (p) - end; - }. - -Instance t_From_166626519 : t_From ((t_i128)) ((t_Z)) := - { - From_impl_21_f_from := fun (x : t_Z)=> - match x with - | Z_NEG (x) => - sub (neg (cast (sub (to_u128_binary (x)) (1)))) (1) - | Z_ZERO => - 0 - | Z_POS (x) => - cast (to_u128_binary (x)) - end; - }. - -Fixpoint to_u16_binary (self : t_Positive) : t_u16 := - match match_positive (self) with - | POSITIVE_XH => - 1 - | POSITIVE_XO (p) => - t_Mul_f_mul (to_u16_binary (p)) (2) - | POSITIVE_XI (p) => - t_Add_f_add (t_Mul_f_mul (to_u16_binary (p)) (2)) (1) - end. - -Instance t_From_863803022 : t_From ((t_u16)) ((t_HaxInt)) := - { - From_impl_3_f_from := fun (x : t_HaxInt)=> - match match_pos (x) with - | POS_ZERO => - 0 - | POS_POS (p) => - to_u16_binary (p) - end; - }. - -Instance t_From_217241508 : t_From ((t_i16)) ((t_Z)) := - { - From_impl_15_f_from := fun (x : t_Z)=> - match x with - | Z_NEG (x) => - sub (neg (cast (sub (to_u16_binary (x)) (1)))) (1) - | Z_ZERO => - 0 - | Z_POS (x) => - cast (to_u16_binary (x)) - end; - }. - -Fixpoint to_u32_binary (self : t_Positive) : t_u32 := - match match_positive (self) with - | POSITIVE_XH => - 1 - | POSITIVE_XO (p) => - t_Mul_f_mul (to_u32_binary (p)) (2) - | POSITIVE_XI (p) => - t_Add_f_add (t_Mul_f_mul (to_u32_binary (p)) (2)) (1) - end. - -Instance t_From_38549956 : t_From ((t_u32)) ((t_HaxInt)) := - { - From_impl_5_f_from := fun (x : t_HaxInt)=> - match match_pos (x) with - | POS_ZERO => - 0 - | POS_POS (p) => - to_u32_binary (p) - end; - }. - -Instance t_From_567539816 : t_From ((t_i32)) ((t_Z)) := - { - From_impl_17_f_from := fun (x : t_Z)=> - match x with - | Z_NEG (x) => - sub (neg (cast (sub (to_u32_binary (x)) (1)))) (1) - | Z_ZERO => - 0 - | Z_POS (x) => - cast (to_u32_binary (x)) - end; - }. - -Fixpoint to_u64_binary (self : t_Positive) : t_u64 := - match match_positive (self) with - | POSITIVE_XH => - 1 - | POSITIVE_XO (p) => - t_Mul_f_mul (to_u64_binary (p)) (2) - | POSITIVE_XI (p) => - t_Add_f_add (t_Mul_f_mul (to_u64_binary (p)) (2)) (1) - end. - -Instance t_From_100316698 : t_From ((t_u64)) ((t_HaxInt)) := - { - From_impl_7_f_from := fun (x : t_HaxInt)=> - match match_pos (x) with - | POS_ZERO => - 0 - | POS_POS (p) => - to_u64_binary (p) - end; - }. - -Instance t_From_99611562 : t_From ((t_i64)) ((t_Z)) := - { - From_impl_19_f_from := fun (x : t_Z)=> - match x with - | Z_NEG (x) => - sub (neg (cast (sub (to_u64_binary (x)) (1)))) (1) - | Z_ZERO => - 0 - | Z_POS (x) => - cast (to_u64_binary (x)) - end; - }. - -Fixpoint to_u8_binary (self : t_Positive) : t_u8 := - match match_positive (self) with - | POSITIVE_XH => - 1 - | POSITIVE_XO (p) => - t_Mul_f_mul (to_u8_binary (p)) (2) - | POSITIVE_XI (p) => - t_Add_f_add (t_Mul_f_mul (to_u8_binary (p)) (2)) (1) - end. - -Instance t_From_360336196 : t_From ((t_u8)) ((t_HaxInt)) := - { - From_impl_1_f_from := fun (x : t_HaxInt)=> - match match_pos (x) with - | POS_ZERO => - 0 - | POS_POS (p) => - to_u8_binary (p) - end; - }. - -Instance t_From_168893964 : t_From ((t_i8)) ((t_Z)) := - { - From_impl_13_f_from := fun (x : t_Z)=> - match x with - | Z_NEG (x) => - sub (neg (cast (sub (to_u8_binary (x)) (1)))) (1) - | Z_ZERO => - 0 - | Z_POS (x) => - cast (to_u8_binary (x)) - end; - }. - -Fixpoint to_usize_binary (self : t_Positive) : t_usize := - match match_positive (self) with - | POSITIVE_XH => - 1 - | POSITIVE_XO (p) => - t_Mul_f_mul (to_usize_binary (p)) (2) - | POSITIVE_XI (p) => - t_Add_f_add (t_Mul_f_mul (to_usize_binary (p)) (2)) (1) - end. - -Instance t_From_545039540 : t_From ((t_usize)) ((t_HaxInt)) := - { - From_impl_11_f_from := fun (x : t_HaxInt)=> - match match_pos (x) with - | POS_ZERO => - 0 - | POS_POS (p) => - to_usize_binary (p) - end; - }. - -Instance t_From_931346405 : t_From ((t_isize)) ((t_Z)) := - { - From_impl_23_f_from := fun (x : t_Z)=> - match x with - | Z_NEG (x) => - sub (neg (cast (sub (to_usize_binary (x)) (1)))) (1) - | Z_ZERO => - 0 - | Z_POS (x) => - cast (to_usize_binary (x)) - end; - }. - Instance t_PartialEq_234431236 : t_PartialEq ((t_u8)) ((t_u8)) := { - PartialEq_impl_29_f_eq := fun (self : t_u8) (rhs : t_u8)=> + PartialEq_f_eq := fun (self : t_u8) (rhs : t_u8)=> PartialEq_f_eq (u8_0 self) (u8_0 rhs); - PartialEq_impl_29_f_ne := fun (self : t_u8) (rhs : t_u8)=> + PartialEq_f_ne := fun (self : t_u8) (rhs : t_u8)=> negb (PartialEq_f_eq (u8_0 self) (u8_0 rhs)); }. Instance t_PartialOrd_835131600 : t_PartialOrd ((t_u8)) ((t_u8)) := { - PartialOrd_impl_30_f_partial_cmp := fun (self : t_u8) (rhs : t_u8)=> + PartialOrd_f_partial_cmp := fun (self : t_u8) (rhs : t_u8)=> PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs); - PartialOrd_impl_30_f_lt := fun (self : t_u8) (rhs : t_u8)=> + PartialOrd_f_lt := fun (self : t_u8) (rhs : t_u8)=> match PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_30_f_le := fun (self : t_u8) (rhs : t_u8)=> + PartialOrd_f_le := fun (self : t_u8) (rhs : t_u8)=> match PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1039,14 +454,14 @@ Instance t_PartialOrd_835131600 : t_PartialOrd ((t_u8)) ((t_u8)) := | _ => false end; - PartialOrd_impl_30_f_gt := fun (self : t_u8) (rhs : t_u8)=> + PartialOrd_f_gt := fun (self : t_u8) (rhs : t_u8)=> match PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_30_f_ge := fun (self : t_u8) (rhs : t_u8)=> + PartialOrd_f_ge := fun (self : t_u8) (rhs : t_u8)=> match PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1058,24 +473,24 @@ Instance t_PartialOrd_835131600 : t_PartialOrd ((t_u8)) ((t_u8)) := Instance t_PartialEq_965259828 : t_PartialEq ((t_u16)) ((t_u16)) := { - PartialEq_impl_31_f_eq := fun (self : t_u16) (rhs : t_u16)=> + PartialEq_f_eq := fun (self : t_u16) (rhs : t_u16)=> PartialEq_f_eq (u16_0 self) (u16_0 rhs); - PartialEq_impl_31_f_ne := fun (self : t_u16) (rhs : t_u16)=> + PartialEq_f_ne := fun (self : t_u16) (rhs : t_u16)=> negb (PartialEq_f_eq (u16_0 self) (u16_0 rhs)); }. Instance t_PartialOrd_116974173 : t_PartialOrd ((t_u16)) ((t_u16)) := { - PartialOrd_impl_32_f_partial_cmp := fun (self : t_u16) (rhs : t_u16)=> + PartialOrd_f_partial_cmp := fun (self : t_u16) (rhs : t_u16)=> PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs); - PartialOrd_impl_32_f_lt := fun (self : t_u16) (rhs : t_u16)=> + PartialOrd_f_lt := fun (self : t_u16) (rhs : t_u16)=> match PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_32_f_le := fun (self : t_u16) (rhs : t_u16)=> + PartialOrd_f_le := fun (self : t_u16) (rhs : t_u16)=> match PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1083,14 +498,14 @@ Instance t_PartialOrd_116974173 : t_PartialOrd ((t_u16)) ((t_u16)) := | _ => false end; - PartialOrd_impl_32_f_gt := fun (self : t_u16) (rhs : t_u16)=> + PartialOrd_f_gt := fun (self : t_u16) (rhs : t_u16)=> match PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_32_f_ge := fun (self : t_u16) (rhs : t_u16)=> + PartialOrd_f_ge := fun (self : t_u16) (rhs : t_u16)=> match PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1102,24 +517,24 @@ Instance t_PartialOrd_116974173 : t_PartialOrd ((t_u16)) ((t_u16)) := Instance t_PartialEq_739399974 : t_PartialEq ((t_u32)) ((t_u32)) := { - PartialEq_impl_33_f_eq := fun (self : t_u32) (rhs : t_u32)=> + PartialEq_f_eq := fun (self : t_u32) (rhs : t_u32)=> PartialEq_f_eq (u32_0 self) (u32_0 rhs); - PartialEq_impl_33_f_ne := fun (self : t_u32) (rhs : t_u32)=> + PartialEq_f_ne := fun (self : t_u32) (rhs : t_u32)=> negb (PartialEq_f_eq (u32_0 self) (u32_0 rhs)); }. Instance t_PartialOrd_553141371 : t_PartialOrd ((t_u32)) ((t_u32)) := { - PartialOrd_impl_34_f_partial_cmp := fun (self : t_u32) (rhs : t_u32)=> + PartialOrd_f_partial_cmp := fun (self : t_u32) (rhs : t_u32)=> PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs); - PartialOrd_impl_34_f_lt := fun (self : t_u32) (rhs : t_u32)=> + PartialOrd_f_lt := fun (self : t_u32) (rhs : t_u32)=> match PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_34_f_le := fun (self : t_u32) (rhs : t_u32)=> + PartialOrd_f_le := fun (self : t_u32) (rhs : t_u32)=> match PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1127,14 +542,14 @@ Instance t_PartialOrd_553141371 : t_PartialOrd ((t_u32)) ((t_u32)) := | _ => false end; - PartialOrd_impl_34_f_gt := fun (self : t_u32) (rhs : t_u32)=> + PartialOrd_f_gt := fun (self : t_u32) (rhs : t_u32)=> match PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_34_f_ge := fun (self : t_u32) (rhs : t_u32)=> + PartialOrd_f_ge := fun (self : t_u32) (rhs : t_u32)=> match PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1146,24 +561,24 @@ Instance t_PartialOrd_553141371 : t_PartialOrd ((t_u32)) ((t_u32)) := Instance t_PartialEq_464367537 : t_PartialEq ((t_u64)) ((t_u64)) := { - PartialEq_impl_35_f_eq := fun (self : t_u64) (rhs : t_u64)=> + PartialEq_f_eq := fun (self : t_u64) (rhs : t_u64)=> PartialEq_f_eq (u64_0 self) (u64_0 rhs); - PartialEq_impl_35_f_ne := fun (self : t_u64) (rhs : t_u64)=> + PartialEq_f_ne := fun (self : t_u64) (rhs : t_u64)=> negb (PartialEq_f_eq (u64_0 self) (u64_0 rhs)); }. Instance t_PartialOrd_207997255 : t_PartialOrd ((t_u64)) ((t_u64)) := { - PartialOrd_impl_36_f_partial_cmp := fun (self : t_u64) (rhs : t_u64)=> + PartialOrd_f_partial_cmp := fun (self : t_u64) (rhs : t_u64)=> PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs); - PartialOrd_impl_36_f_lt := fun (self : t_u64) (rhs : t_u64)=> + PartialOrd_f_lt := fun (self : t_u64) (rhs : t_u64)=> match PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_36_f_le := fun (self : t_u64) (rhs : t_u64)=> + PartialOrd_f_le := fun (self : t_u64) (rhs : t_u64)=> match PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1171,14 +586,14 @@ Instance t_PartialOrd_207997255 : t_PartialOrd ((t_u64)) ((t_u64)) := | _ => false end; - PartialOrd_impl_36_f_gt := fun (self : t_u64) (rhs : t_u64)=> + PartialOrd_f_gt := fun (self : t_u64) (rhs : t_u64)=> match PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_36_f_ge := fun (self : t_u64) (rhs : t_u64)=> + PartialOrd_f_ge := fun (self : t_u64) (rhs : t_u64)=> match PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1190,24 +605,24 @@ Instance t_PartialOrd_207997255 : t_PartialOrd ((t_u64)) ((t_u64)) := Instance t_PartialEq_876938738 : t_PartialEq ((t_u128)) ((t_u128)) := { - PartialEq_impl_37_f_eq := fun (self : t_u128) (rhs : t_u128)=> + PartialEq_f_eq := fun (self : t_u128) (rhs : t_u128)=> PartialEq_f_eq (u128_0 self) (u128_0 rhs); - PartialEq_impl_37_f_ne := fun (self : t_u128) (rhs : t_u128)=> + PartialEq_f_ne := fun (self : t_u128) (rhs : t_u128)=> negb (PartialEq_f_eq (u128_0 self) (u128_0 rhs)); }. Instance t_PartialOrd_566729496 : t_PartialOrd ((t_u128)) ((t_u128)) := { - PartialOrd_impl_38_f_partial_cmp := fun (self : t_u128) (rhs : t_u128)=> + PartialOrd_f_partial_cmp := fun (self : t_u128) (rhs : t_u128)=> PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs); - PartialOrd_impl_38_f_lt := fun (self : t_u128) (rhs : t_u128)=> + PartialOrd_f_lt := fun (self : t_u128) (rhs : t_u128)=> match PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_38_f_le := fun (self : t_u128) (rhs : t_u128)=> + PartialOrd_f_le := fun (self : t_u128) (rhs : t_u128)=> match PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1215,14 +630,14 @@ Instance t_PartialOrd_566729496 : t_PartialOrd ((t_u128)) ((t_u128)) := | _ => false end; - PartialOrd_impl_38_f_gt := fun (self : t_u128) (rhs : t_u128)=> + PartialOrd_f_gt := fun (self : t_u128) (rhs : t_u128)=> match PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_38_f_ge := fun (self : t_u128) (rhs : t_u128)=> + PartialOrd_f_ge := fun (self : t_u128) (rhs : t_u128)=> match PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1234,24 +649,24 @@ Instance t_PartialOrd_566729496 : t_PartialOrd ((t_u128)) ((t_u128)) := Instance t_PartialEq_1011013145 : t_PartialEq ((t_usize)) ((t_usize)) := { - PartialEq_impl_39_f_eq := fun (self : t_usize) (rhs : t_usize)=> + PartialEq_f_eq := fun (self : t_usize) (rhs : t_usize)=> PartialEq_f_eq (usize_0 self) (usize_0 rhs); - PartialEq_impl_39_f_ne := fun (self : t_usize) (rhs : t_usize)=> + PartialEq_f_ne := fun (self : t_usize) (rhs : t_usize)=> negb (PartialEq_f_eq (usize_0 self) (usize_0 rhs)); }. Instance t_PartialOrd_917114071 : t_PartialOrd ((t_usize)) ((t_usize)) := { - PartialOrd_impl_40_f_partial_cmp := fun (self : t_usize) (rhs : t_usize)=> + PartialOrd_f_partial_cmp := fun (self : t_usize) (rhs : t_usize)=> PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs); - PartialOrd_impl_40_f_lt := fun (self : t_usize) (rhs : t_usize)=> + PartialOrd_f_lt := fun (self : t_usize) (rhs : t_usize)=> match PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_40_f_le := fun (self : t_usize) (rhs : t_usize)=> + PartialOrd_f_le := fun (self : t_usize) (rhs : t_usize)=> match PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1259,14 +674,14 @@ Instance t_PartialOrd_917114071 : t_PartialOrd ((t_usize)) ((t_usize)) := | _ => false end; - PartialOrd_impl_40_f_gt := fun (self : t_usize) (rhs : t_usize)=> + PartialOrd_f_gt := fun (self : t_usize) (rhs : t_usize)=> match PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_40_f_ge := fun (self : t_usize) (rhs : t_usize)=> + PartialOrd_f_ge := fun (self : t_usize) (rhs : t_usize)=> match PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1278,24 +693,24 @@ Instance t_PartialOrd_917114071 : t_PartialOrd ((t_usize)) ((t_usize)) := Instance t_PartialEq_515285814 : t_PartialEq ((t_i8)) ((t_i8)) := { - PartialEq_impl_41_f_eq := fun (self : t_i8) (rhs : t_i8)=> + PartialEq_f_eq := fun (self : t_i8) (rhs : t_i8)=> PartialEq_f_eq (i8_0 self) (i8_0 rhs); - PartialEq_impl_41_f_ne := fun (self : t_i8) (rhs : t_i8)=> + PartialEq_f_ne := fun (self : t_i8) (rhs : t_i8)=> negb (PartialEq_f_eq (i8_0 self) (i8_0 rhs)); }. Instance t_PartialOrd_610141491 : t_PartialOrd ((t_i8)) ((t_i8)) := { - PartialOrd_impl_42_f_partial_cmp := fun (self : t_i8) (rhs : t_i8)=> + PartialOrd_f_partial_cmp := fun (self : t_i8) (rhs : t_i8)=> PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs); - PartialOrd_impl_42_f_lt := fun (self : t_i8) (rhs : t_i8)=> + PartialOrd_f_lt := fun (self : t_i8) (rhs : t_i8)=> match PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_42_f_le := fun (self : t_i8) (rhs : t_i8)=> + PartialOrd_f_le := fun (self : t_i8) (rhs : t_i8)=> match PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1303,14 +718,14 @@ Instance t_PartialOrd_610141491 : t_PartialOrd ((t_i8)) ((t_i8)) := | _ => false end; - PartialOrd_impl_42_f_gt := fun (self : t_i8) (rhs : t_i8)=> + PartialOrd_f_gt := fun (self : t_i8) (rhs : t_i8)=> match PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_42_f_ge := fun (self : t_i8) (rhs : t_i8)=> + PartialOrd_f_ge := fun (self : t_i8) (rhs : t_i8)=> match PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1322,24 +737,24 @@ Instance t_PartialOrd_610141491 : t_PartialOrd ((t_i8)) ((t_i8)) := Instance t_PartialEq_341364762 : t_PartialEq ((t_i16)) ((t_i16)) := { - PartialEq_impl_43_f_eq := fun (self : t_i16) (rhs : t_i16)=> + PartialEq_f_eq := fun (self : t_i16) (rhs : t_i16)=> PartialEq_f_eq (i16_0 self) (i16_0 rhs); - PartialEq_impl_43_f_ne := fun (self : t_i16) (rhs : t_i16)=> + PartialEq_f_ne := fun (self : t_i16) (rhs : t_i16)=> negb (PartialEq_f_eq (i16_0 self) (i16_0 rhs)); }. Instance t_PartialOrd_685280672 : t_PartialOrd ((t_i16)) ((t_i16)) := { - PartialOrd_impl_44_f_partial_cmp := fun (self : t_i16) (rhs : t_i16)=> + PartialOrd_f_partial_cmp := fun (self : t_i16) (rhs : t_i16)=> PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs); - PartialOrd_impl_44_f_lt := fun (self : t_i16) (rhs : t_i16)=> + PartialOrd_f_lt := fun (self : t_i16) (rhs : t_i16)=> match PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_44_f_le := fun (self : t_i16) (rhs : t_i16)=> + PartialOrd_f_le := fun (self : t_i16) (rhs : t_i16)=> match PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1347,14 +762,14 @@ Instance t_PartialOrd_685280672 : t_PartialOrd ((t_i16)) ((t_i16)) := | _ => false end; - PartialOrd_impl_44_f_gt := fun (self : t_i16) (rhs : t_i16)=> + PartialOrd_f_gt := fun (self : t_i16) (rhs : t_i16)=> match PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_44_f_ge := fun (self : t_i16) (rhs : t_i16)=> + PartialOrd_f_ge := fun (self : t_i16) (rhs : t_i16)=> match PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1366,24 +781,24 @@ Instance t_PartialOrd_685280672 : t_PartialOrd ((t_i16)) ((t_i16)) := Instance t_PartialEq_335582486 : t_PartialEq ((t_i32)) ((t_i32)) := { - PartialEq_impl_45_f_eq := fun (self : t_i32) (rhs : t_i32)=> + PartialEq_f_eq := fun (self : t_i32) (rhs : t_i32)=> PartialEq_f_eq (i32_0 self) (i32_0 rhs); - PartialEq_impl_45_f_ne := fun (self : t_i32) (rhs : t_i32)=> + PartialEq_f_ne := fun (self : t_i32) (rhs : t_i32)=> negb (PartialEq_f_eq (i32_0 self) (i32_0 rhs)); }. Instance t_PartialOrd_776800970 : t_PartialOrd ((t_i32)) ((t_i32)) := { - PartialOrd_impl_46_f_partial_cmp := fun (self : t_i32) (rhs : t_i32)=> + PartialOrd_f_partial_cmp := fun (self : t_i32) (rhs : t_i32)=> PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs); - PartialOrd_impl_46_f_lt := fun (self : t_i32) (rhs : t_i32)=> + PartialOrd_f_lt := fun (self : t_i32) (rhs : t_i32)=> match PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_46_f_le := fun (self : t_i32) (rhs : t_i32)=> + PartialOrd_f_le := fun (self : t_i32) (rhs : t_i32)=> match PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1391,14 +806,14 @@ Instance t_PartialOrd_776800970 : t_PartialOrd ((t_i32)) ((t_i32)) := | _ => false end; - PartialOrd_impl_46_f_gt := fun (self : t_i32) (rhs : t_i32)=> + PartialOrd_f_gt := fun (self : t_i32) (rhs : t_i32)=> match PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_46_f_ge := fun (self : t_i32) (rhs : t_i32)=> + PartialOrd_f_ge := fun (self : t_i32) (rhs : t_i32)=> match PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1410,24 +825,24 @@ Instance t_PartialOrd_776800970 : t_PartialOrd ((t_i32)) ((t_i32)) := Instance t_PartialEq_1019995697 : t_PartialEq ((t_i64)) ((t_i64)) := { - PartialEq_impl_47_f_eq := fun (self : t_i64) (rhs : t_i64)=> + PartialEq_f_eq := fun (self : t_i64) (rhs : t_i64)=> PartialEq_f_eq (i64_0 self) (i64_0 rhs); - PartialEq_impl_47_f_ne := fun (self : t_i64) (rhs : t_i64)=> + PartialEq_f_ne := fun (self : t_i64) (rhs : t_i64)=> negb (PartialEq_f_eq (i64_0 self) (i64_0 rhs)); }. Instance t_PartialOrd_354028907 : t_PartialOrd ((t_i64)) ((t_i64)) := { - PartialOrd_impl_48_f_partial_cmp := fun (self : t_i64) (rhs : t_i64)=> + PartialOrd_f_partial_cmp := fun (self : t_i64) (rhs : t_i64)=> PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs); - PartialOrd_impl_48_f_lt := fun (self : t_i64) (rhs : t_i64)=> + PartialOrd_f_lt := fun (self : t_i64) (rhs : t_i64)=> match PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_48_f_le := fun (self : t_i64) (rhs : t_i64)=> + PartialOrd_f_le := fun (self : t_i64) (rhs : t_i64)=> match PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1435,14 +850,14 @@ Instance t_PartialOrd_354028907 : t_PartialOrd ((t_i64)) ((t_i64)) := | _ => false end; - PartialOrd_impl_48_f_gt := fun (self : t_i64) (rhs : t_i64)=> + PartialOrd_f_gt := fun (self : t_i64) (rhs : t_i64)=> match PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_48_f_ge := fun (self : t_i64) (rhs : t_i64)=> + PartialOrd_f_ge := fun (self : t_i64) (rhs : t_i64)=> match PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1454,24 +869,24 @@ Instance t_PartialOrd_354028907 : t_PartialOrd ((t_i64)) ((t_i64)) := Instance t_PartialEq_476424898 : t_PartialEq ((t_i128)) ((t_i128)) := { - PartialEq_impl_49_f_eq := fun (self : t_i128) (rhs : t_i128)=> + PartialEq_f_eq := fun (self : t_i128) (rhs : t_i128)=> PartialEq_f_eq (i128_0 self) (i128_0 rhs); - PartialEq_impl_49_f_ne := fun (self : t_i128) (rhs : t_i128)=> + PartialEq_f_ne := fun (self : t_i128) (rhs : t_i128)=> negb (PartialEq_f_eq (i128_0 self) (i128_0 rhs)); }. Instance t_PartialOrd_532073533 : t_PartialOrd ((t_i128)) ((t_i128)) := { - PartialOrd_impl_50_f_partial_cmp := fun (self : t_i128) (rhs : t_i128)=> + PartialOrd_f_partial_cmp := fun (self : t_i128) (rhs : t_i128)=> PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs); - PartialOrd_impl_50_f_lt := fun (self : t_i128) (rhs : t_i128)=> + PartialOrd_f_lt := fun (self : t_i128) (rhs : t_i128)=> match PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_50_f_le := fun (self : t_i128) (rhs : t_i128)=> + PartialOrd_f_le := fun (self : t_i128) (rhs : t_i128)=> match PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1479,14 +894,14 @@ Instance t_PartialOrd_532073533 : t_PartialOrd ((t_i128)) ((t_i128)) := | _ => false end; - PartialOrd_impl_50_f_gt := fun (self : t_i128) (rhs : t_i128)=> + PartialOrd_f_gt := fun (self : t_i128) (rhs : t_i128)=> match PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_50_f_ge := fun (self : t_i128) (rhs : t_i128)=> + PartialOrd_f_ge := fun (self : t_i128) (rhs : t_i128)=> match PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1498,24 +913,24 @@ Instance t_PartialOrd_532073533 : t_PartialOrd ((t_i128)) ((t_i128)) := Instance t_PartialEq_675022234 : t_PartialEq ((t_isize)) ((t_isize)) := { - PartialEq_impl_51_f_eq := fun (self : t_isize) (rhs : t_isize)=> + PartialEq_f_eq := fun (self : t_isize) (rhs : t_isize)=> PartialEq_f_eq (isize_0 self) (isize_0 rhs); - PartialEq_impl_51_f_ne := fun (self : t_isize) (rhs : t_isize)=> + PartialEq_f_ne := fun (self : t_isize) (rhs : t_isize)=> negb (PartialEq_f_eq (isize_0 self) (isize_0 rhs)); }. Instance t_PartialOrd_661215608 : t_PartialOrd ((t_isize)) ((t_isize)) := { - PartialOrd_impl_52_f_partial_cmp := fun (self : t_isize) (rhs : t_isize)=> + PartialOrd_f_partial_cmp := fun (self : t_isize) (rhs : t_isize)=> PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs); - PartialOrd_impl_52_f_lt := fun (self : t_isize) (rhs : t_isize)=> + PartialOrd_f_lt := fun (self : t_isize) (rhs : t_isize)=> match PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs) with | Option_Some (Ordering_Less) => true | _ => false end; - PartialOrd_impl_52_f_le := fun (self : t_isize) (rhs : t_isize)=> + PartialOrd_f_le := fun (self : t_isize) (rhs : t_isize)=> match PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs) with | Option_Some (Ordering_Less | Ordering_Equal) => @@ -1523,14 +938,14 @@ Instance t_PartialOrd_661215608 : t_PartialOrd ((t_isize)) ((t_isize)) := | _ => false end; - PartialOrd_impl_52_f_gt := fun (self : t_isize) (rhs : t_isize)=> + PartialOrd_f_gt := fun (self : t_isize) (rhs : t_isize)=> match PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs) with | Option_Some (Ordering_Greater) => true | _ => false end; - PartialOrd_impl_52_f_ge := fun (self : t_isize) (rhs : t_isize)=> + PartialOrd_f_ge := fun (self : t_isize) (rhs : t_isize)=> match PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs) with | Option_Some (Ordering_Greater | Ordering_Equal) => @@ -1540,82 +955,64 @@ Instance t_PartialOrd_661215608 : t_PartialOrd ((t_isize)) ((t_isize)) := end; }. -Instance t_From_236264222 : t_From ((t_u8)) ((t_u8)) := - { - From_impl_f_from := fun (x : t_u8)=> - t_u8 (Build_t_U8 (Into_f_into (x))); - }. - -Instance t_From_806913416 : t_From ((t_u8)) ((t_u8)) := +#[global] Instance t_From_number_i8 : t_From t_i8 Z := { - From_impl_1_f_from := fun (x : t_u8)=> - Into_f_into (U8_f_v u8_0 x); + From_f_from (x : Z) := Build_t_i8 (Build_t_I8 x) }. -Instance t_From_778759708 : t_From ((t_u16)) ((t_u16)) := +#[global] Instance t_From_number_i16 : t_From t_i16 Z := { - From_impl_2_f_from := fun (x : t_u16)=> - t_u16 (Build_t_U16 (Into_f_into (x))); + From_f_from (x : Z) := Build_t_i16 (Build_t_I16 x) }. -Instance t_From_481302543 : t_From ((t_u16)) ((t_u16)) := +#[global] Instance t_From_number_i32 : t_From t_i32 Z := { - From_impl_3_f_from := fun (x : t_u16)=> - Into_f_into (U16_f_v u16_0 x); + From_f_from (x : Z) := Build_t_i32 (Build_t_I32 x) }. -Instance t_From_278604088 : t_From ((t_u32)) ((t_u32)) := +#[global] Instance t_From_number_i64 : t_From t_i64 Z := { - From_impl_4_f_from := fun (x : t_u32)=> - t_u32 (Build_t_U32 (Into_f_into (x))); + From_f_from (x : Z) := Build_t_i64 (Build_t_I64 x) }. -Instance t_From_285996296 : t_From ((t_u32)) ((t_u32)) := +#[global] Instance t_From_number_i128 : t_From t_i128 Z := { - From_impl_5_f_from := fun (x : t_u32)=> - Into_f_into (U32_f_v u32_0 x); + From_f_from (x : Z) := Build_t_i128 (Build_t_I128 x) }. -Instance t_From_194556640 : t_From ((t_u64)) ((t_u64)) := +#[global] Instance t_From_number_isize : t_From t_isize Z := { - From_impl_6_f_from := fun (x : t_u64)=> - t_u64 (Build_t_U64 (Into_f_into (x))); + From_f_from (x : Z) := Build_t_isize (Build_t_I64 x) }. -Instance t_From_155181094 : t_From ((t_u64)) ((t_u64)) := +#[global] Instance t_From_number_Zi8 : t_From Z t_i8 := { - From_impl_7_f_from := fun (x : t_u64)=> - Into_f_into (U64_f_v u64_0 x); + From_f_from (x : t_i8) := I8_f_v (i8_0 x) }. -Instance t_From_159264478 : t_From ((t_u128)) ((t_u128)) := +#[global] Instance t_From_number_Zi16 : t_From Z t_i16 := { - From_impl_8_f_from := fun (x : t_u128)=> - t_u128 (Build_t_U128 (Into_f_into (x))); + From_f_from (x : t_i16) := I16_f_v (i16_0 x) }. -Instance t_From_878174661 : t_From ((t_u128)) ((t_u128)) := +#[global] Instance t_From_number_Zi32 : t_From Z t_i32 := { - From_impl_9_f_from := fun (x : t_u128)=> - Into_f_into (U128_f_v u128_0 x); + From_f_from (x : t_i32) := I32_f_v (i32_0 x) }. -Instance t_From_127325347 : t_From ((t_usize)) ((t_usize)) := +#[global] Instance t_From_number_Zi64 : t_From Z t_i64 := { - From_impl_10_f_from := fun (x : t_usize)=> - t_usize (Build_t_U64 (Into_f_into (x))); + From_f_from (x : t_i64) := I64_f_v (i64_0 x) }. -Instance t_From_12689378 : t_From ((t_usize)) ((t_usize)) := +#[global] Instance t_From_number_Zi128 : t_From Z t_i128 := { - From_impl_11_f_from := fun (x : t_usize)=> - Into_f_into (U64_f_v usize_0 x); + From_f_from (x : t_i128) := I128_f_v (i128_0 x) }. -Instance t_From_663475667 : t_From ((t_i8)) ((t_i8)) := +#[global] Instance t_From_number_Zisize : t_From Z t_isize := { - From_impl_f_from := fun (x : t_i8)=> - t_i8 (Build_t_I8 (Into_f_into (x))); + From_f_from (x : t_isize) := I64_f_v (isize_0 x) }. Definition is_negative350273175 (self : t_i8) : bool := @@ -1639,14 +1036,14 @@ Definition signum721334203 (self : t_i8) : t_i8 := Instance t_From_687588567 : t_From ((t_i8)) ((t_i8)) := { - From_impl_1_f_from := fun (x : t_i8)=> - Into_f_into (I8_f_v i8_0 x); + From_f_from := fun (x : t_i8)=> + Into_f_into (I8_f_v (i8_0 x)); }. Instance t_From_257005484 : t_From ((t_i16)) ((t_i16)) := { - From_impl_2_f_from := fun (x : t_i16)=> - t_i16 (Build_t_I16 (Into_f_into (x))); + From_f_from := fun (x : t_i16)=> + Build_t_i16 (Build_t_I16 (Into_f_into (x))); }. Definition is_negative477067241 (self : t_i16) : bool := @@ -1668,17 +1065,17 @@ Definition signum243706004 (self : t_i16) : t_i16 := else Into_f_into (1). -Instance t_From_560870163 : t_From ((t_i16)) ((t_i16)) := - { - From_impl_3_f_from := fun (x : t_i16)=> - Into_f_into (I16_f_v i16_0 x); - }. +(* Instance t_From_560870163 : t_From ((t_i16)) ((t_i16)) := *) +(* { *) +(* From_f_from := fun (x : t_i16)=> *) +(* Into_f_into (I16_f_v (i16_0 x)); *) +(* }. *) -Instance t_From_17641682 : t_From ((t_i32)) ((t_i32)) := - { - From_impl_4_f_from := fun (x : t_i32)=> - t_i32 (Build_t_I32 (Into_f_into (x))); - }. +(* Instance t_From_17641682 : t_From ((t_i32)) ((t_i32)) := *) +(* { *) +(* From_f_from := fun (x : t_i32)=> *) +(* t_i32 (Build_t_I32 (Into_f_into (x))); *) +(* }. *) Definition is_negative1035644813 (self : t_i32) : bool := PartialOrd_f_lt (self) (Into_f_into (0)). @@ -1699,17 +1096,17 @@ Definition signum323641039 (self : t_i32) : t_i32 := else Into_f_into (1). -Instance t_From_865467252 : t_From ((t_i32)) ((t_i32)) := - { - From_impl_5_f_from := fun (x : t_i32)=> - Into_f_into (I32_f_v i32_0 x); - }. +(* Instance t_From_865467252 : t_From ((t_i32)) ((t_i32)) := *) +(* { *) +(* From_f_from := fun (x : t_i32)=> *) +(* Into_f_into (I32_f_v (i32_0 x)); *) +(* }. *) -Instance t_From_881024429 : t_From ((t_i64)) ((t_i64)) := - { - From_impl_6_f_from := fun (x : t_i64)=> - t_i64 (Build_t_I64 (Into_f_into (x))); - }. +(* Instance t_From_881024429 : t_From ((t_i64)) ((t_i64)) := *) +(* { *) +(* From_f_from := fun (x : t_i64)=> *) +(* t_i64 (Build_t_I64 (Into_f_into (x))); *) +(* }. *) Definition is_negative1066124578 (self : t_i64) : bool := PartialOrd_f_lt (self) (Into_f_into (0)). @@ -1730,17 +1127,17 @@ Definition signum582963664 (self : t_i64) : t_i64 := else Into_f_into (1). -Instance t_From_101582575 : t_From ((t_i64)) ((t_i64)) := - { - From_impl_7_f_from := fun (x : t_i64)=> - Into_f_into (I64_f_v i64_0 x); - }. +(* Instance t_From_101582575 : t_From ((t_i64)) ((t_i64)) := *) +(* { *) +(* From_f_from := fun (x : t_i64)=> *) +(* Into_f_into (I64_f_v i64_0 x); *) +(* }. *) -Instance t_From_954204920 : t_From ((t_i128)) ((t_i128)) := - { - From_impl_8_f_from := fun (x : t_i128)=> - t_i128 (Build_t_I128 (Into_f_into (x))); - }. +(* Instance t_From_954204920 : t_From ((t_i128)) ((t_i128)) := *) +(* { *) +(* From_f_from := fun (x : t_i128)=> *) +(* t_i128 (Build_t_I128 (Into_f_into (x))); *) +(* }. *) Definition is_negative221698470 (self : t_i128) : bool := PartialOrd_f_lt (self) (Into_f_into (0)). @@ -1761,17 +1158,17 @@ Definition signum408800799 (self : t_i128) : t_i128 := else Into_f_into (1). -Instance t_From_515435087 : t_From ((t_i128)) ((t_i128)) := - { - From_impl_9_f_from := fun (x : t_i128)=> - Into_f_into (I128_f_v i128_0 x); - }. +(* Instance t_From_515435087 : t_From ((t_i128)) ((t_i128)) := *) +(* { *) +(* From_f_from := fun (x : t_i128)=> *) +(* Into_f_into (I128_f_v i128_0 x); *) +(* }. *) -Instance t_From_1044036214 : t_From ((t_isize)) ((t_isize)) := - { - From_impl_10_f_from := fun (x : t_isize)=> - t_isize (Build_t_I64 (Into_f_into (x))); - }. +(* Instance t_From_1044036214 : t_From ((t_isize)) ((t_isize)) := *) +(* { *) +(* From_f_from := fun (x : t_isize)=> *) +(* t_isize (Build_t_I64 (Into_f_into (x))); *) +(* }. *) Definition is_negative693446369 (self : t_isize) : bool := PartialOrd_f_lt (self) (Into_f_into (0)). @@ -1794,251 +1191,243 @@ Definition signum91486536 (self : t_isize) : t_isize := Instance t_From_202441647 : t_From ((t_isize)) ((t_isize)) := { - From_impl_11_f_from := fun (x : t_isize)=> - Into_f_into (I64_f_v isize_0 x); + From_f_from := fun (x : t_isize)=> + Into_f_into (I64_f_v (isize_0 x)); }. Instance t_From_100016775 : t_From ((t_i16)) ((t_i8)) := { - From_impl_12_f_from := fun (x : t_i8)=> - t_i16 (Into_f_into (i8_0 x)); + From_f_from := fun (x : t_i8)=> + Build_t_i16 (Into_f_into (i8_0 x)); }. Instance t_From_964712142 : t_From ((t_i32)) ((t_i8)) := { - From_impl_13_f_from := fun (x : t_i8)=> - t_i32 (Into_f_into (i8_0 x)); + From_f_from := fun (x : t_i8)=> + Build_t_i32 (Into_f_into (i8_0 x)); }. Instance t_From_512166668 : t_From ((t_i64)) ((t_i8)) := { - From_impl_14_f_from := fun (x : t_i8)=> - t_i64 (Into_f_into (i8_0 x)); + From_f_from := fun (x : t_i8)=> + Build_t_i64 (Into_f_into (i8_0 x)); }. Instance t_From_95828634 : t_From ((t_i128)) ((t_i8)) := { - From_impl_15_f_from := fun (x : t_i8)=> - t_i128 (Into_f_into (i8_0 x)); + From_f_from := fun (x : t_i8)=> + Build_t_i128 (Into_f_into (i8_0 x)); }. Instance t_From_48986939 : t_From ((t_isize)) ((t_i8)) := { - From_impl_16_f_from := fun (x : t_i8)=> - t_isize (Into_f_into (i8_0 x)); + From_f_from := fun (x : t_i8)=> + Build_t_isize (Into_f_into (i8_0 x)); }. Instance t_From_325010041 : t_From ((t_i8)) ((t_i16)) := { - From_impl_17_f_from := fun (x : t_i16)=> - t_i8 (Into_f_into (i16_0 x)); + From_f_from := fun (x : t_i16)=> + Build_t_i8 (Into_f_into (i16_0 x)); }. Instance t_From_64357194 : t_From ((t_i32)) ((t_i16)) := { - From_impl_18_f_from := fun (x : t_i16)=> - t_i32 (Into_f_into (i16_0 x)); + From_f_from := fun (x : t_i16)=> + Build_t_i32 (Into_f_into (i16_0 x)); }. Instance t_From_840335964 : t_From ((t_i64)) ((t_i16)) := { - From_impl_19_f_from := fun (x : t_i16)=> - t_i64 (Into_f_into (i16_0 x)); + From_f_from := fun (x : t_i16)=> + Build_t_i64 (Into_f_into (i16_0 x)); }. Instance t_From_601385454 : t_From ((t_i128)) ((t_i16)) := { - From_impl_20_f_from := fun (x : t_i16)=> - t_i128 (Into_f_into (i16_0 x)); + From_f_from := fun (x : t_i16)=> + Build_t_i128 (Into_f_into (i16_0 x)); }. Instance t_From_755383497 : t_From ((t_isize)) ((t_i16)) := { - From_impl_21_f_from := fun (x : t_i16)=> - t_isize (Into_f_into (i16_0 x)); + From_f_from := fun (x : t_i16)=> + Build_t_isize (Into_f_into (i16_0 x)); }. Instance t_From_926112880 : t_From ((t_i8)) ((t_i32)) := { - From_impl_22_f_from := fun (x : t_i32)=> - t_i8 (Into_f_into (i32_0 x)); + From_f_from := fun (x : t_i32)=> + Build_t_i8 (Into_f_into (i32_0 x)); }. Instance t_From_81353160 : t_From ((t_i16)) ((t_i32)) := { - From_impl_23_f_from := fun (x : t_i32)=> - t_i16 (Into_f_into (i32_0 x)); + From_f_from := fun (x : t_i32)=> + Build_t_i16 (Into_f_into (i32_0 x)); }. Instance t_From_549703007 : t_From ((t_i64)) ((t_i32)) := { - From_impl_24_f_from := fun (x : t_i32)=> - t_i64 (Into_f_into (i32_0 x)); + From_f_from := fun (x : t_i32)=> + Build_t_i64 (Into_f_into (i32_0 x)); }. Instance t_From_1001458175 : t_From ((t_i128)) ((t_i32)) := { - From_impl_25_f_from := fun (x : t_i32)=> - t_i128 (Into_f_into (i32_0 x)); + From_f_from := fun (x : t_i32)=> + Build_t_i128 (Into_f_into (i32_0 x)); }. Instance t_From_329934859 : t_From ((t_isize)) ((t_i32)) := { - From_impl_26_f_from := fun (x : t_i32)=> - t_isize (Into_f_into (i32_0 x)); + From_f_from := fun (x : t_i32)=> + Build_t_isize (Into_f_into (i32_0 x)); }. Instance t_From_381441019 : t_From ((t_i8)) ((t_i64)) := { - From_impl_27_f_from := fun (x : t_i64)=> - t_i8 (Into_f_into (i64_0 x)); + From_f_from := fun (x : t_i64)=> + Build_t_i8 (Into_f_into (i64_0 x)); }. Instance t_From_728811179 : t_From ((t_i16)) ((t_i64)) := { - From_impl_28_f_from := fun (x : t_i64)=> - t_i16 (Into_f_into (i64_0 x)); + From_f_from := fun (x : t_i64)=> + Build_t_i16 (Into_f_into (i64_0 x)); }. Instance t_From_1003839356 : t_From ((t_i32)) ((t_i64)) := { - From_impl_29_f_from := fun (x : t_i64)=> - t_i32 (Into_f_into (i64_0 x)); + From_f_from := fun (x : t_i64)=> + Build_t_i32 (Into_f_into (i64_0 x)); }. Instance t_From_625109732 : t_From ((t_i128)) ((t_i64)) := { - From_impl_30_f_from := fun (x : t_i64)=> - t_i128 (Into_f_into (i64_0 x)); + From_f_from := fun (x : t_i64)=> + Build_t_i128 (Into_f_into (i64_0 x)); }. Instance t_From_34424521 : t_From ((t_i8)) ((t_i128)) := { - From_impl_32_f_from := fun (x : t_i128)=> - t_i8 (Into_f_into (i128_0 x)); + From_f_from := fun (x : t_i128)=> + Build_t_i8 (Into_f_into (i128_0 x)); }. Instance t_From_603602239 : t_From ((t_i16)) ((t_i128)) := { - From_impl_33_f_from := fun (x : t_i128)=> - t_i16 (Into_f_into (i128_0 x)); + From_f_from := fun (x : t_i128)=> + Build_t_i16 (Into_f_into (i128_0 x)); }. Instance t_From_479038908 : t_From ((t_i32)) ((t_i128)) := { - From_impl_34_f_from := fun (x : t_i128)=> - t_i32 (Into_f_into (i128_0 x)); + From_f_from := fun (x : t_i128)=> + Build_t_i32 (Into_f_into (i128_0 x)); }. Instance t_From_299745195 : t_From ((t_i64)) ((t_i128)) := { - From_impl_35_f_from := fun (x : t_i128)=> - t_i64 (Into_f_into (i128_0 x)); + From_f_from := fun (x : t_i128)=> + Build_t_i64 (Into_f_into (i128_0 x)); }. Instance t_From_615821455 : t_From ((t_isize)) ((t_i128)) := { - From_impl_36_f_from := fun (x : t_i128)=> - t_isize (Into_f_into (i128_0 x)); + From_f_from := fun (x : t_i128)=> + Build_t_isize (Into_f_into (i128_0 x)); }. Instance t_From_376191918 : t_From ((t_i8)) ((t_isize)) := { - From_impl_37_f_from := fun (x : t_isize)=> - t_i8 (Into_f_into (isize_0 x)); + From_f_from := fun (x : t_isize)=> + Build_t_i8 (Into_f_into (isize_0 x)); }. Instance t_From_649927535 : t_From ((t_i16)) ((t_isize)) := { - From_impl_38_f_from := fun (x : t_isize)=> - t_i16 (Into_f_into (isize_0 x)); + From_f_from := fun (x : t_isize)=> + Build_t_i16 (Into_f_into (isize_0 x)); }. Instance t_From_395262437 : t_From ((t_i32)) ((t_isize)) := { - From_impl_39_f_from := fun (x : t_isize)=> - t_i32 (Into_f_into (isize_0 x)); + From_f_from := fun (x : t_isize)=> + Build_t_i32 (Into_f_into (isize_0 x)); }. Instance t_From_218237752 : t_From ((t_i128)) ((t_isize)) := { - From_impl_41_f_from := fun (x : t_isize)=> - t_i128 (Into_f_into (isize_0 x)); - }. - -Instance v_SliceIndex_622480125 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : v_SliceIndex ((t_usize)) ((t_Slice ((v_T)))) := - { - SliceIndex_impl_1_f_Output := v_T; - SliceIndex_impl_1_f_index := fun (self : t_usize) (slice : t_Slice ((v_T)))=> - let x : t_usize := Into_f_into (U64_f_v usize_0 self) in - Index_f_index (Seq_f_v Slice_f_v slice) (x); + From_f_from := fun (x : t_isize)=> + Build_t_i128 (Into_f_into (isize_0 x)); }. Definition add_with_overflow_i128 (x : t_i128) (y : t_i128) : (t_i128*bool) := let overflow := z_add (Abstraction_f_lift (i128_0 x)) (Abstraction_f_lift (i128_0 y)) in let res : t_I128 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_i128 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_i128 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). Definition add_with_overflow_i16 (x : t_i16) (y : t_i16) : (t_i16*bool) := let overflow := z_add (Abstraction_f_lift (i16_0 x)) (Abstraction_f_lift (i16_0 y)) in let res : t_I16 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_i16 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_i16 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). Definition add_with_overflow_i32 (x : t_i32) (y : t_i32) : (t_i32*bool) := let overflow := z_add (Abstraction_f_lift (i32_0 x)) (Abstraction_f_lift (i32_0 y)) in let res : t_I32 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_i32 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_i32 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). Definition add_with_overflow_i64 (x : t_i64) (y : t_i64) : (t_i64*bool) := let overflow := z_add (Abstraction_f_lift (i64_0 x)) (Abstraction_f_lift (i64_0 y)) in let res : t_I64 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_i64 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_i64 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). Definition add_with_overflow_i8 (x : t_i8) (y : t_i8) : (t_i8*bool) := let overflow := z_add (Abstraction_f_lift (i8_0 x)) (Abstraction_f_lift (i8_0 y)) in let res : t_I8 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_i8 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_i8 (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). Definition add_with_overflow_isize (x : t_isize) (y : t_isize) : (t_isize*bool) := let overflow := z_add (Abstraction_f_lift (isize_0 x)) (Abstraction_f_lift (isize_0 y)) in let res : t_I64 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_isize (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_isize (Clone_f_clone (res)),z_lt (Abstraction_f_lift (res)) (overflow)). Definition unchecked_add_i128 (x : t_i128) (y : t_i128) : t_i128 := - t_i128 (Build_t_I128 (z_add (Abstraction_f_lift (i128_0 x)) (Abstraction_f_lift (i128_0 y)))). + Build_t_i128 (Build_t_I128 (z_add (Abstraction_f_lift (i128_0 x)) (Abstraction_f_lift (i128_0 y)))). Definition unchecked_add_i16 (x : t_i16) (y : t_i16) : t_i16 := - t_i16 (Build_t_I16 (z_add (Abstraction_f_lift (i16_0 x)) (Abstraction_f_lift (i16_0 y)))). + Build_t_i16 (Build_t_I16 (z_add (Abstraction_f_lift (i16_0 x)) (Abstraction_f_lift (i16_0 y)))). Definition unchecked_add_i32 (x : t_i32) (y : t_i32) : t_i32 := - t_i32 (Build_t_I32 (z_add (Abstraction_f_lift (i32_0 x)) (Abstraction_f_lift (i32_0 y)))). + Build_t_i32 (Build_t_I32 (z_add (Abstraction_f_lift (i32_0 x)) (Abstraction_f_lift (i32_0 y)))). Definition unchecked_add_i64 (x : t_i64) (y : t_i64) : t_i64 := - t_i64 (Build_t_I64 (z_add (Abstraction_f_lift (i64_0 x)) (Abstraction_f_lift (i64_0 y)))). + Build_t_i64 (Build_t_I64 (z_add (Abstraction_f_lift (i64_0 x)) (Abstraction_f_lift (i64_0 y)))). Definition unchecked_add_i8 (x : t_i8) (y : t_i8) : t_i8 := - t_i8 (Build_t_I8 (z_add (Abstraction_f_lift (i8_0 x)) (Abstraction_f_lift (i8_0 y)))). + Build_t_i8 (Build_t_I8 (z_add (Abstraction_f_lift (i8_0 x)) (Abstraction_f_lift (i8_0 y)))). Definition unchecked_add_isize (x : t_isize) (y : t_isize) : t_isize := - t_isize (Build_t_I64 (z_add (Abstraction_f_lift (isize_0 x)) (Abstraction_f_lift (isize_0 y)))). + Build_t_isize (Build_t_I64 (z_add (Abstraction_f_lift (isize_0 x)) (Abstraction_f_lift (isize_0 y)))). Definition unchecked_add_u128 (x : t_u128) (y : t_u128) : t_u128 := - t_u128 (Build_t_U128 (haxint_add (Abstraction_f_lift (u128_0 x)) (Abstraction_f_lift (u128_0 y)))). + Build_t_u128 (Build_t_U128 (haxint_add (Abstraction_f_lift (u128_0 x)) (Abstraction_f_lift (u128_0 y)))). Definition unchecked_add_u16 (x : t_u16) (y : t_u16) : t_u16 := - t_u16 (Build_t_U16 (haxint_add (Abstraction_f_lift (u16_0 x)) (Abstraction_f_lift (u16_0 y)))). + Build_t_u16 (Build_t_U16 (haxint_add (Abstraction_f_lift (u16_0 x)) (Abstraction_f_lift (u16_0 y)))). Definition unchecked_add_u32 (x : t_u32) (y : t_u32) : t_u32 := - t_u32 (Build_t_U32 (haxint_add (Abstraction_f_lift (u32_0 x)) (Abstraction_f_lift (u32_0 y)))). + Build_t_u32 (Build_t_U32 (haxint_add (Abstraction_f_lift (u32_0 x)) (Abstraction_f_lift (u32_0 y)))). Definition unchecked_add_u64 (x : t_u64) (y : t_u64) : t_u64 := - t_u64 (Build_t_U64 (haxint_add (Abstraction_f_lift (u64_0 x)) (Abstraction_f_lift (u64_0 y)))). + Build_t_u64 (Build_t_U64 (haxint_add (Abstraction_f_lift (u64_0 x)) (Abstraction_f_lift (u64_0 y)))). Definition unchecked_add_u8 (x : t_u8) (y : t_u8) : t_u8 := - t_u8 (Build_t_U8 (haxint_add (Abstraction_f_lift (u8_0 x)) (Abstraction_f_lift (u8_0 y)))). + Build_t_u8 (Build_t_U8 (haxint_add (Abstraction_f_lift (u8_0 x)) (Abstraction_f_lift (u8_0 y)))). Definition unchecked_add_usize (x : t_usize) (y : t_usize) : t_usize := - t_usize (Build_t_U64 (haxint_add (Abstraction_f_lift (usize_0 x)) (Abstraction_f_lift (usize_0 y)))). + Build_t_usize (Build_t_U64 (haxint_add (Abstraction_f_lift (usize_0 x)) (Abstraction_f_lift (usize_0 y)))). Definition checked_add268751055 (self : t_u8) (rhs : t_u8) : t_Option ((t_u8)) := Option_Some (unchecked_add_u8 (self) (rhs)). @@ -2061,86 +1450,86 @@ Definition checked_add984013567 (self : t_usize) (rhs : t_usize) : t_Option ((t_ Definition add_with_overflow_u128 (x : t_u128) (y : t_u128) : (t_u128*bool) := let overflow := haxint_add (Abstraction_f_lift (u128_0 x)) (Abstraction_f_lift (u128_0 y)) in let res : t_U128 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_u128 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_u128 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). Definition add_with_overflow_u16 (x : t_u16) (y : t_u16) : (t_u16*bool) := let overflow := haxint_add (Abstraction_f_lift (u16_0 x)) (Abstraction_f_lift (u16_0 y)) in let res : t_U16 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_u16 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_u16 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). Definition add_with_overflow_u32 (x : t_u32) (y : t_u32) : (t_u32*bool) := let overflow := haxint_add (Abstraction_f_lift (u32_0 x)) (Abstraction_f_lift (u32_0 y)) in let res : t_U32 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_u32 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_u32 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). Definition add_with_overflow_u64 (x : t_u64) (y : t_u64) : (t_u64*bool) := let overflow := haxint_add (Abstraction_f_lift (u64_0 x)) (Abstraction_f_lift (u64_0 y)) in let res : t_U64 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_u64 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_u64 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). Definition add_with_overflow_u8 (x : t_u8) (y : t_u8) : (t_u8*bool) := let overflow := haxint_add (Abstraction_f_lift (u8_0 x)) (Abstraction_f_lift (u8_0 y)) in let res : t_U8 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_u8 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_u8 (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). Definition add_with_overflow_usize (x : t_usize) (y : t_usize) : (t_usize*bool) := let overflow := haxint_add (Abstraction_f_lift (usize_0 x)) (Abstraction_f_lift (usize_0 y)) in let res : t_U64 := Concretization_f_concretize (Clone_f_clone (overflow)) in - (t_usize (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). + (Build_t_usize (Clone_f_clone (res)),haxint_lt (Abstraction_f_lift (res)) (overflow)). Definition unchecked_div_u128 (x : t_u128) (y : t_u128) : t_u128 := - t_u128 (Build_t_U128 (haxint_div (Abstraction_f_lift (u128_0 x)) (Abstraction_f_lift (u128_0 y)))). + Build_t_u128 (Build_t_U128 (haxint_div (Abstraction_f_lift (u128_0 x)) (Abstraction_f_lift (u128_0 y)))). Definition unchecked_div_u16 (x : t_u16) (y : t_u16) : t_u16 := - t_u16 (Build_t_U16 (haxint_div (Abstraction_f_lift (u16_0 x)) (Abstraction_f_lift (u16_0 y)))). + Build_t_u16 (Build_t_U16 (haxint_div (Abstraction_f_lift (u16_0 x)) (Abstraction_f_lift (u16_0 y)))). Definition unchecked_div_u32 (x : t_u32) (y : t_u32) : t_u32 := - t_u32 (Build_t_U32 (haxint_div (Abstraction_f_lift (u32_0 x)) (Abstraction_f_lift (u32_0 y)))). + Build_t_u32 (Build_t_U32 (haxint_div (Abstraction_f_lift (u32_0 x)) (Abstraction_f_lift (u32_0 y)))). Definition unchecked_div_u64 (x : t_u64) (y : t_u64) : t_u64 := - t_u64 (Build_t_U64 (haxint_div (Abstraction_f_lift (u64_0 x)) (Abstraction_f_lift (u64_0 y)))). + Build_t_u64 (Build_t_U64 (haxint_div (Abstraction_f_lift (u64_0 x)) (Abstraction_f_lift (u64_0 y)))). Definition unchecked_div_u8 (x : t_u8) (y : t_u8) : t_u8 := - t_u8 (Build_t_U8 (haxint_div (Abstraction_f_lift (u8_0 x)) (Abstraction_f_lift (u8_0 y)))). + Build_t_u8 (Build_t_U8 (haxint_div (Abstraction_f_lift (u8_0 x)) (Abstraction_f_lift (u8_0 y)))). Definition unchecked_div_usize (x : t_usize) (y : t_usize) : t_usize := - t_usize (Build_t_U64 (haxint_div (Abstraction_f_lift (usize_0 x)) (Abstraction_f_lift (usize_0 y)))). + Build_t_usize (Build_t_U64 (haxint_div (Abstraction_f_lift (usize_0 x)) (Abstraction_f_lift (usize_0 y)))). Definition wrapping_add_i128 (a : t_i128) (b : t_i128) : t_i128 := - t_i128 (Add_f_add (i128_0 a) (i128_0 b)). + Build_t_i128 (Add_f_add (i128_0 a) (i128_0 b)). Definition wrapping_add_i16 (a : t_i16) (b : t_i16) : t_i16 := - t_i16 (Add_f_add (i16_0 a) (i16_0 b)). + Build_t_i16 (Add_f_add (i16_0 a) (i16_0 b)). Definition wrapping_add_i32 (a : t_i32) (b : t_i32) : t_i32 := - t_i32 (Add_f_add (i32_0 a) (i32_0 b)). + Build_t_i32 (Add_f_add (i32_0 a) (i32_0 b)). Definition wrapping_add_i64 (a : t_i64) (b : t_i64) : t_i64 := - t_i64 (Add_f_add (i64_0 a) (i64_0 b)). + Build_t_i64 (Add_f_add (i64_0 a) (i64_0 b)). Definition wrapping_add_i8 (a : t_i8) (b : t_i8) : t_i8 := - t_i8 (Add_f_add (i8_0 a) (i8_0 b)). + Build_t_i8 (Add_f_add (i8_0 a) (i8_0 b)). Definition wrapping_add_isize (a : t_isize) (b : t_isize) : t_isize := - t_isize (Add_f_add (isize_0 a) (isize_0 b)). + Build_t_isize (Add_f_add (isize_0 a) (isize_0 b)). Definition wrapping_sub_i128 (a : t_i128) (b : t_i128) : t_i128 := - t_i128 (Sub_f_sub (i128_0 a) (i128_0 b)). + Build_t_i128 (Sub_f_sub (i128_0 a) (i128_0 b)). Definition wrapping_sub_i16 (a : t_i16) (b : t_i16) : t_i16 := - t_i16 (Sub_f_sub (i16_0 a) (i16_0 b)). + Build_t_i16 (Sub_f_sub (i16_0 a) (i16_0 b)). Definition wrapping_sub_i32 (a : t_i32) (b : t_i32) : t_i32 := - t_i32 (Sub_f_sub (i32_0 a) (i32_0 b)). + Build_t_i32 (Sub_f_sub (i32_0 a) (i32_0 b)). Definition wrapping_sub_i64 (a : t_i64) (b : t_i64) : t_i64 := - t_i64 (Sub_f_sub (i64_0 a) (i64_0 b)). + Build_t_i64 (Sub_f_sub (i64_0 a) (i64_0 b)). Definition wrapping_sub_i8 (a : t_i8) (b : t_i8) : t_i8 := - t_i8 (Sub_f_sub (i8_0 a) (i8_0 b)). + Build_t_i8 (Sub_f_sub (i8_0 a) (i8_0 b)). Definition wrapping_sub_isize (a : t_isize) (b : t_isize) : t_isize := - t_isize (Sub_f_sub (isize_0 a) (isize_0 b)). + Build_t_isize (Sub_f_sub (isize_0 a) (isize_0 b)). Definition wrapping_add634491935 (self : t_i8) (rhs : t_i8) : t_i8 := wrapping_add_i8 (self) (rhs). @@ -2244,9 +1633,39 @@ Definition wrapping_abs347300819 (self : t_isize) : t_isize := else self. +Instance f_into_t_u8 : t_From t_u8 N := + { + From_f_from (x : N) := Build_t_u8 (Build_t_U8 x) + }. + +Instance f_into_t_u16 : t_From t_u16 N := + { + From_f_from (x : N) := Build_t_u16 (Build_t_U16 x) + }. + +Instance f_into_t_u32 : t_From t_u32 N := + { + From_f_from (x : N) := Build_t_u32 (Build_t_U32 x) + }. + +Instance f_into_t_u64 : t_From t_u64 N := + { + From_f_from (x : N) := Build_t_u64 (Build_t_U64 x) + }. + +Instance f_into_t_u128 : t_From t_u128 N := + { + From_f_from (x : N) := Build_t_u128 (Build_t_U128 x) + }. + +Instance f_into_t_usize : t_From t_usize N := + { + From_f_from (x : N) := Build_t_usize (Build_t_U64 x) + }. + Definition checked_div508301931 (self : t_u8) (rhs : t_u8) : t_Option ((t_u8)) := if - PartialEq_f_eq (rhs) (Into_f_into (0)) + PartialEq_f_eq (rhs) (Into_f_into 0%N) then Option_None else @@ -2257,7 +1676,7 @@ Definition overflowing_add708890057 (self : t_u8) (rhs : t_u8) : (t_u8*bool) := Definition checked_div614920780 (self : t_u16) (rhs : t_u16) : t_Option ((t_u16)) := if - PartialEq_f_eq (rhs) (Into_f_into (0)) + PartialEq_f_eq (rhs) (Into_f_into (0%N)) then Option_None else @@ -2268,7 +1687,7 @@ Definition overflowing_add1023344178 (self : t_u16) (rhs : t_u16) : (t_u16*bool) Definition checked_div979383477 (self : t_u32) (rhs : t_u32) : t_Option ((t_u32)) := if - PartialEq_f_eq (rhs) (Into_f_into (0)) + PartialEq_f_eq (rhs) (Into_f_into (0%N)) then Option_None else @@ -2279,7 +1698,7 @@ Definition overflowing_add905744292 (self : t_u32) (rhs : t_u32) : (t_u32*bool) Definition checked_div988689127 (self : t_u64) (rhs : t_u64) : t_Option ((t_u64)) := if - PartialEq_f_eq (rhs) (Into_f_into (0)) + PartialEq_f_eq (rhs) (Into_f_into (0%N)) then Option_None else @@ -2290,7 +1709,7 @@ Definition overflowing_add581983607 (self : t_u64) (rhs : t_u64) : (t_u64*bool) Definition checked_div344106746 (self : t_u128) (rhs : t_u128) : t_Option ((t_u128)) := if - PartialEq_f_eq (rhs) (Into_f_into (0)) + PartialEq_f_eq (rhs) (Into_f_into (0%N)) then Option_None else @@ -2301,7 +1720,7 @@ Definition overflowing_add458293681 (self : t_u128) (rhs : t_u128) : (t_u128*boo Definition checked_div80223906 (self : t_usize) (rhs : t_usize) : t_Option ((t_usize)) := if - PartialEq_f_eq (rhs) (Into_f_into (0)) + PartialEq_f_eq (rhs) (Into_f_into (0%N)) then Option_None else @@ -2310,11 +1729,12 @@ Definition checked_div80223906 (self : t_usize) (rhs : t_usize) : t_Option ((t_u Definition overflowing_add682280407 (self : t_usize) (rhs : t_usize) : (t_usize*bool) := add_with_overflow_usize (self) (rhs). +Check t_Neg. Instance t_Neg_125588538 : t_Neg ((t_i8)) := { - Neg_impl_f_Output := t_i8; - Neg_impl_f_neg := fun (self : t_i8)=> - t_i8 (Neg_f_neg (i8_0 self)); + Neg_f_Output := t_i8; + Neg_f_neg := fun (self : t_i8)=> + Build_t_i8 (Neg_f_neg (i8_0 self)); }. Definition abs945505614 (self : t_i8) : t_i8 := @@ -2327,9 +1747,9 @@ Definition abs945505614 (self : t_i8) : t_i8 := Instance t_Neg_977573626 : t_Neg ((t_i16)) := { - Neg_impl_1_f_Output := t_i16; - Neg_impl_1_f_neg := fun (self : t_i16)=> - t_i16 (Neg_f_neg (i16_0 self)); + Neg_f_Output := t_i16; + Neg_f_neg := fun (self : t_i16)=> + Build_t_i16 (Neg_f_neg (i16_0 self)); }. Definition abs581170970 (self : t_i16) : t_i16 := @@ -2342,9 +1762,9 @@ Definition abs581170970 (self : t_i16) : t_i16 := Instance t_Neg_289824503 : t_Neg ((t_i32)) := { - Neg_impl_2_f_Output := t_i32; - Neg_impl_2_f_neg := fun (self : t_i32)=> - t_i32 (Neg_f_neg (i32_0 self)); + Neg_f_Output := t_i32; + Neg_f_neg := fun (self : t_i32)=> + Build_t_i32 (Neg_f_neg (i32_0 self)); }. Definition abs590464694 (self : t_i32) : t_i32 := @@ -2357,9 +1777,9 @@ Definition abs590464694 (self : t_i32) : t_i32 := Instance t_Neg_895800448 : t_Neg ((t_i64)) := { - Neg_impl_3_f_Output := t_i64; - Neg_impl_3_f_neg := fun (self : t_i64)=> - t_i64 (Neg_f_neg (i64_0 self)); + Neg_f_Output := t_i64; + Neg_f_neg := fun (self : t_i64)=> + Build_t_i64 (Neg_f_neg (i64_0 self)); }. Definition abs654781043 (self : t_i64) : t_i64 := @@ -2372,9 +1792,9 @@ Definition abs654781043 (self : t_i64) : t_i64 := Instance t_Neg_830237431 : t_Neg ((t_i128)) := { - Neg_impl_4_f_Output := t_i128; - Neg_impl_4_f_neg := fun (self : t_i128)=> - t_i128 (Neg_f_neg (i128_0 self)); + Neg_f_Output := t_i128; + Neg_f_neg := fun (self : t_i128)=> + Build_t_i128 (Neg_f_neg (i128_0 self)); }. Definition abs204417539 (self : t_i128) : t_i128 := @@ -2387,9 +1807,9 @@ Definition abs204417539 (self : t_i128) : t_i128 := Instance t_Neg_693499423 : t_Neg ((t_isize)) := { - Neg_impl_5_f_Output := t_isize; - Neg_impl_5_f_neg := fun (self : t_isize)=> - t_isize (Neg_f_neg (isize_0 self)); + Neg_f_Output := t_isize; + Neg_f_neg := fun (self : t_isize)=> + Build_t_isize (Neg_f_neg (isize_0 self)); }. Definition abs220926056 (self : t_isize) : t_isize := @@ -2402,285 +1822,285 @@ Definition abs220926056 (self : t_isize) : t_isize := Instance t_BitOr_174929276 : t_BitOr ((t_i8)) ((t_i8)) := { - BitOr_impl_84_f_Output := t_i8; - BitOr_impl_84_f_bitor := fun (self : t_i8) (other : t_i8)=> - t_i8 (BitOr_f_bitor (i8_0 self) (i8_0 other)); + BitOr_f_Output := t_i8; + BitOr_f_bitor := fun (self : t_i8) (other : t_i8)=> + Build_t_i8 (BitOr_f_bitor (i8_0 self) (i8_0 other)); }. Instance t_BitOr_162600380 : t_BitOr ((t_i16)) ((t_i16)) := { - BitOr_impl_85_f_Output := t_i16; - BitOr_impl_85_f_bitor := fun (self : t_i16) (other : t_i16)=> - t_i16 (BitOr_f_bitor (i16_0 self) (i16_0 other)); + BitOr_f_Output := t_i16; + BitOr_f_bitor := fun (self : t_i16) (other : t_i16)=> + Build_t_i16 (BitOr_f_bitor (i16_0 self) (i16_0 other)); }. Instance t_BitOr_64689421 : t_BitOr ((t_i32)) ((t_i32)) := { - BitOr_impl_86_f_Output := t_i32; - BitOr_impl_86_f_bitor := fun (self : t_i32) (other : t_i32)=> - t_i32 (BitOr_f_bitor (i32_0 self) (i32_0 other)); + BitOr_f_Output := t_i32; + BitOr_f_bitor := fun (self : t_i32) (other : t_i32)=> + Build_t_i32 (BitOr_f_bitor (i32_0 self) (i32_0 other)); }. Instance t_BitOr_348780956 : t_BitOr ((t_i64)) ((t_i64)) := { - BitOr_impl_87_f_Output := t_i64; - BitOr_impl_87_f_bitor := fun (self : t_i64) (other : t_i64)=> - t_i64 (BitOr_f_bitor (i64_0 self) (i64_0 other)); + BitOr_f_Output := t_i64; + BitOr_f_bitor := fun (self : t_i64) (other : t_i64)=> + Build_t_i64 (BitOr_f_bitor (i64_0 self) (i64_0 other)); }. Instance t_BitOr_643690063 : t_BitOr ((t_i128)) ((t_i128)) := { - BitOr_impl_88_f_Output := t_i128; - BitOr_impl_88_f_bitor := fun (self : t_i128) (other : t_i128)=> - t_i128 (BitOr_f_bitor (i128_0 self) (i128_0 other)); + BitOr_f_Output := t_i128; + BitOr_f_bitor := fun (self : t_i128) (other : t_i128)=> + Build_t_i128 (BitOr_f_bitor (i128_0 self) (i128_0 other)); }. Instance t_BitOr_1027404433 : t_BitOr ((t_isize)) ((t_isize)) := { - BitOr_impl_89_f_Output := t_isize; - BitOr_impl_89_f_bitor := fun (self : t_isize) (other : t_isize)=> - t_isize (BitOr_f_bitor (isize_0 self) (isize_0 other)); + BitOr_f_Output := t_isize; + BitOr_f_bitor := fun (self : t_isize) (other : t_isize)=> + Build_t_isize (BitOr_f_bitor (isize_0 self) (isize_0 other)); }. Instance t_From_124503227 : t_From ((t_u16)) ((t_u8)) := { - From_impl_12_f_from := fun (x : t_u8)=> - t_u16 (Into_f_into (u8_0 x)); + From_f_from := fun (x : t_u8)=> + Build_t_u16 (Into_f_into (u8_0 x)); }. Instance t_From_499390246 : t_From ((t_u32)) ((t_u8)) := { - From_impl_13_f_from := fun (x : t_u8)=> - t_u32 (Into_f_into (u8_0 x)); + From_f_from := fun (x : t_u8)=> + Build_t_u32 (Into_f_into (u8_0 x)); }. Instance t_From_1040523499 : t_From ((t_u64)) ((t_u8)) := { - From_impl_14_f_from := fun (x : t_u8)=> - t_u64 (Into_f_into (u8_0 x)); + From_f_from := fun (x : t_u8)=> + Build_t_u64 (Into_f_into (u8_0 x)); }. Instance t_From_827336555 : t_From ((t_u128)) ((t_u8)) := { - From_impl_15_f_from := fun (x : t_u8)=> - t_u128 (Into_f_into (u8_0 x)); + From_f_from := fun (x : t_u8)=> + Build_t_u128 (Into_f_into (u8_0 x)); }. Instance t_From_1002852925 : t_From ((t_usize)) ((t_u8)) := { - From_impl_16_f_from := fun (x : t_u8)=> - t_usize (Into_f_into (u8_0 x)); + From_f_from := fun (x : t_u8)=> + Build_t_usize (Into_f_into (u8_0 x)); }. Instance t_From_476851440 : t_From ((t_u8)) ((t_u16)) := { - From_impl_17_f_from := fun (x : t_u16)=> - t_u8 (Into_f_into (u16_0 x)); + From_f_from := fun (x : t_u16)=> + Build_t_u8 (Into_f_into (u16_0 x)); }. Instance t_From_590504350 : t_From ((t_u32)) ((t_u16)) := { - From_impl_18_f_from := fun (x : t_u16)=> - t_u32 (Into_f_into (u16_0 x)); + From_f_from := fun (x : t_u16)=> + Build_t_u32 (Into_f_into (u16_0 x)); }. Instance t_From_786143320 : t_From ((t_u64)) ((t_u16)) := { - From_impl_19_f_from := fun (x : t_u16)=> - t_u64 (Into_f_into (u16_0 x)); + From_f_from := fun (x : t_u16)=> + Build_t_u64 (Into_f_into (u16_0 x)); }. Instance t_From_98507156 : t_From ((t_u128)) ((t_u16)) := { - From_impl_20_f_from := fun (x : t_u16)=> - t_u128 (Into_f_into (u16_0 x)); + From_f_from := fun (x : t_u16)=> + Build_t_u128 (Into_f_into (u16_0 x)); }. Instance t_From_427149512 : t_From ((t_usize)) ((t_u16)) := { - From_impl_21_f_from := fun (x : t_u16)=> - t_usize (Into_f_into (u16_0 x)); + From_f_from := fun (x : t_u16)=> + Build_t_usize (Into_f_into (u16_0 x)); }. Instance t_From_306676060 : t_From ((t_u8)) ((t_u32)) := { - From_impl_22_f_from := fun (x : t_u32)=> - t_u8 (Into_f_into (u32_0 x)); + From_f_from := fun (x : t_u32)=> + Build_t_u8 (Into_f_into (u32_0 x)); }. Instance t_From_55624543 : t_From ((t_u16)) ((t_u32)) := { - From_impl_23_f_from := fun (x : t_u32)=> - t_u16 (Into_f_into (u32_0 x)); + From_f_from := fun (x : t_u32)=> + Build_t_u16 (Into_f_into (u32_0 x)); }. Instance t_From_863285405 : t_From ((t_u64)) ((t_u32)) := { - From_impl_24_f_from := fun (x : t_u32)=> - t_u64 (Into_f_into (u32_0 x)); + From_f_from := fun (x : t_u32)=> + Build_t_u64 (Into_f_into (u32_0 x)); }. Instance t_From_675130423 : t_From ((t_u128)) ((t_u32)) := { - From_impl_25_f_from := fun (x : t_u32)=> - t_u128 (Into_f_into (u32_0 x)); + From_f_from := fun (x : t_u32)=> + Build_t_u128 (Into_f_into (u32_0 x)); }. Instance t_From_295642421 : t_From ((t_usize)) ((t_u32)) := { - From_impl_26_f_from := fun (x : t_u32)=> - t_usize (Into_f_into (u32_0 x)); + From_f_from := fun (x : t_u32)=> + Build_t_usize (Into_f_into (u32_0 x)); }. Instance t_From_690942554 : t_From ((t_u8)) ((t_u64)) := { - From_impl_27_f_from := fun (x : t_u64)=> - t_u8 (Into_f_into (u64_0 x)); + From_f_from := fun (x : t_u64)=> + Build_t_u8 (Into_f_into (u64_0 x)); }. Instance t_From_956877210 : t_From ((t_u16)) ((t_u64)) := { - From_impl_28_f_from := fun (x : t_u64)=> - t_u16 (Into_f_into (u64_0 x)); + From_f_from := fun (x : t_u64)=> + Build_t_u16 (Into_f_into (u64_0 x)); }. Instance t_From_124072492 : t_From ((t_u32)) ((t_u64)) := { - From_impl_29_f_from := fun (x : t_u64)=> - t_u32 (Into_f_into (u64_0 x)); + From_f_from := fun (x : t_u64)=> + Build_t_u32 (Into_f_into (u64_0 x)); }. Instance t_From_882228220 : t_From ((t_u128)) ((t_u64)) := { - From_impl_30_f_from := fun (x : t_u64)=> - t_u128 (Into_f_into (u64_0 x)); + From_f_from := fun (x : t_u64)=> + Build_t_u128 (Into_f_into (u64_0 x)); }. Instance t_From_1060762174 : t_From ((t_u8)) ((t_u128)) := { - From_impl_32_f_from := fun (x : t_u128)=> - t_u8 (Into_f_into (u128_0 x)); + From_f_from := fun (x : t_u128)=> + Build_t_u8 (Into_f_into (u128_0 x)); }. Instance t_From_437123664 : t_From ((t_u16)) ((t_u128)) := { - From_impl_33_f_from := fun (x : t_u128)=> - t_u16 (Into_f_into (u128_0 x)); + From_f_from := fun (x : t_u128)=> + Build_t_u16 (Into_f_into (u128_0 x)); }. Instance t_From_685712174 : t_From ((t_u32)) ((t_u128)) := { - From_impl_34_f_from := fun (x : t_u128)=> - t_u32 (Into_f_into (u128_0 x)); + From_f_from := fun (x : t_u128)=> + Build_t_u32 (Into_f_into (u128_0 x)); }. Instance t_From_239215567 : t_From ((t_u64)) ((t_u128)) := { - From_impl_35_f_from := fun (x : t_u128)=> - t_u64 (Into_f_into (u128_0 x)); + From_f_from := fun (x : t_u128)=> + Build_t_u64 (Into_f_into (u128_0 x)); }. Instance t_From_583993496 : t_From ((t_usize)) ((t_u128)) := { - From_impl_36_f_from := fun (x : t_u128)=> - t_usize (Into_f_into (u128_0 x)); + From_f_from := fun (x : t_u128)=> + Build_t_usize (Into_f_into (u128_0 x)); }. Instance t_From_1069835847 : t_From ((t_u8)) ((t_usize)) := { - From_impl_37_f_from := fun (x : t_usize)=> - t_u8 (Into_f_into (usize_0 x)); + From_f_from := fun (x : t_usize)=> + Build_t_u8 (Into_f_into (usize_0 x)); }. Instance t_From_976343396 : t_From ((t_u16)) ((t_usize)) := { - From_impl_38_f_from := fun (x : t_usize)=> - t_u16 (Into_f_into (usize_0 x)); + From_f_from := fun (x : t_usize)=> + Build_t_u16 (Into_f_into (usize_0 x)); }. Instance t_From_448121712 : t_From ((t_u32)) ((t_usize)) := { - From_impl_39_f_from := fun (x : t_usize)=> - t_u32 (Into_f_into (usize_0 x)); + From_f_from := fun (x : t_usize)=> + Build_t_u32 (Into_f_into (usize_0 x)); }. Instance t_From_448032498 : t_From ((t_u128)) ((t_usize)) := { - From_impl_41_f_from := fun (x : t_usize)=> - t_u128 (Into_f_into (usize_0 x)); + From_f_from := fun (x : t_usize)=> + Build_t_u128 (Into_f_into (usize_0 x)); }. Definition unchecked_div_i128 (x : t_i128) (y : t_i128) : t_i128 := - t_i128 (Build_t_I128 (z_div (Abstraction_f_lift (i128_0 x)) (Abstraction_f_lift (i128_0 y)))). + Build_t_i128 (Build_t_I128 (z_div (Abstraction_f_lift (i128_0 x)) (Abstraction_f_lift (i128_0 y)))). Definition unchecked_div_i16 (x : t_i16) (y : t_i16) : t_i16 := - t_i16 (Build_t_I16 (z_div (Abstraction_f_lift (i16_0 x)) (Abstraction_f_lift (i16_0 y)))). + Build_t_i16 (Build_t_I16 (z_div (Abstraction_f_lift (i16_0 x)) (Abstraction_f_lift (i16_0 y)))). Definition unchecked_div_i32 (x : t_i32) (y : t_i32) : t_i32 := - t_i32 (Build_t_I32 (z_div (Abstraction_f_lift (i32_0 x)) (Abstraction_f_lift (i32_0 y)))). + Build_t_i32 (Build_t_I32 (z_div (Abstraction_f_lift (i32_0 x)) (Abstraction_f_lift (i32_0 y)))). Definition unchecked_div_i64 (x : t_i64) (y : t_i64) : t_i64 := - t_i64 (Build_t_I64 (z_div (Abstraction_f_lift (i64_0 x)) (Abstraction_f_lift (i64_0 y)))). + Build_t_i64 (Build_t_I64 (z_div (Abstraction_f_lift (i64_0 x)) (Abstraction_f_lift (i64_0 y)))). Definition unchecked_div_i8 (x : t_i8) (y : t_i8) : t_i8 := - t_i8 (Build_t_I8 (z_div (Abstraction_f_lift (i8_0 x)) (Abstraction_f_lift (i8_0 y)))). + Build_t_i8 (Build_t_I8 (z_div (Abstraction_f_lift (i8_0 x)) (Abstraction_f_lift (i8_0 y)))). Definition unchecked_div_isize (x : t_isize) (y : t_isize) : t_isize := - t_isize (Build_t_I64 (z_div (Abstraction_f_lift (isize_0 x)) (Abstraction_f_lift (isize_0 y)))). + Build_t_isize (Build_t_I64 (z_div (Abstraction_f_lift (isize_0 x)) (Abstraction_f_lift (isize_0 y)))). Definition wrapping_add_u128 (a : t_u128) (b : t_u128) : t_u128 := - t_u128 (Add_f_add (u128_0 a) (u128_0 b)). + Build_t_u128 (Add_f_add (u128_0 a) (u128_0 b)). Definition wrapping_add_u16 (a : t_u16) (b : t_u16) : t_u16 := - t_u16 (Add_f_add (u16_0 a) (u16_0 b)). + Build_t_u16 (Add_f_add (u16_0 a) (u16_0 b)). Definition wrapping_add_u32 (a : t_u32) (b : t_u32) : t_u32 := - t_u32 (Add_f_add (u32_0 a) (u32_0 b)). + Build_t_u32 (Add_f_add (u32_0 a) (u32_0 b)). Definition wrapping_add_u64 (a : t_u64) (b : t_u64) : t_u64 := - t_u64 (Add_f_add (u64_0 a) (u64_0 b)). + Build_t_u64 (Add_f_add (u64_0 a) (u64_0 b)). Definition wrapping_add_u8 (a : t_u8) (b : t_u8) : t_u8 := - t_u8 (Add_f_add (u8_0 a) (u8_0 b)). + Build_t_u8 (Add_f_add (u8_0 a) (u8_0 b)). Definition wrapping_add_usize (a : t_usize) (b : t_usize) : t_usize := - t_usize (Add_f_add (usize_0 a) (usize_0 b)). + Build_t_usize (Add_f_add (usize_0 a) (usize_0 b)). Definition wrapping_mul_i128 (a : t_i128) (b : t_i128) : t_i128 := - t_i128 (Mul_f_mul (i128_0 a) (i128_0 b)). + Build_t_i128 (Mul_f_mul (i128_0 a) (i128_0 b)). Definition wrapping_mul_i16 (a : t_i16) (b : t_i16) : t_i16 := - t_i16 (Mul_f_mul (i16_0 a) (i16_0 b)). + Build_t_i16 (Mul_f_mul (i16_0 a) (i16_0 b)). Definition wrapping_mul_i32 (a : t_i32) (b : t_i32) : t_i32 := - t_i32 (Mul_f_mul (i32_0 a) (i32_0 b)). + Build_t_i32 (Mul_f_mul (i32_0 a) (i32_0 b)). Definition wrapping_mul_i64 (a : t_i64) (b : t_i64) : t_i64 := - t_i64 (Mul_f_mul (i64_0 a) (i64_0 b)). + Build_t_i64 (Mul_f_mul (i64_0 a) (i64_0 b)). Definition wrapping_mul_i8 (a : t_i8) (b : t_i8) : t_i8 := - t_i8 (Mul_f_mul (i8_0 a) (i8_0 b)). + Build_t_i8 (Mul_f_mul (i8_0 a) (i8_0 b)). Definition wrapping_mul_isize (a : t_isize) (b : t_isize) : t_isize := - t_isize (Mul_f_mul (isize_0 a) (isize_0 b)). + Build_t_isize (Mul_f_mul (isize_0 a) (isize_0 b)). Definition wrapping_mul_u128 (a : t_u128) (b : t_u128) : t_u128 := - t_u128 (Mul_f_mul (u128_0 a) (u128_0 b)). + Build_t_u128 (Mul_f_mul (u128_0 a) (u128_0 b)). Definition wrapping_mul_u16 (a : t_u16) (b : t_u16) : t_u16 := - t_u16 (Mul_f_mul (u16_0 a) (u16_0 b)). + Build_t_u16 (Mul_f_mul (u16_0 a) (u16_0 b)). Definition wrapping_mul_u32 (a : t_u32) (b : t_u32) : t_u32 := - t_u32 (Mul_f_mul (u32_0 a) (u32_0 b)). + Build_t_u32 (Mul_f_mul (u32_0 a) (u32_0 b)). Definition wrapping_mul_u64 (a : t_u64) (b : t_u64) : t_u64 := - t_u64 (Mul_f_mul (u64_0 a) (u64_0 b)). + Build_t_u64 (Mul_f_mul (u64_0 a) (u64_0 b)). Definition wrapping_mul_u8 (a : t_u8) (b : t_u8) : t_u8 := - t_u8 (Mul_f_mul (u8_0 a) (u8_0 b)). + Build_t_u8 (Mul_f_mul (u8_0 a) (u8_0 b)). Definition wrapping_mul_usize (a : t_usize) (b : t_usize) : t_usize := - t_usize (Mul_f_mul (usize_0 a) (usize_0 b)). + Build_t_usize (Mul_f_mul (usize_0 a) (usize_0 b)). Definition wrapping_add480603777 (self : t_u8) (rhs : t_u8) : t_u8 := wrapping_add_u8 (self) (rhs). @@ -2720,273 +2140,273 @@ Definition wrapping_mul680896953 (self : t_usize) (rhs : t_usize) : t_usize := Instance t_Add_695878175 : t_Add ((t_i8)) ((t_i8)) := { - Add_impl_12_f_Output := t_i8; - Add_impl_12_f_add := fun (self : t_i8) (other : t_i8)=> - t_i8 (Add_f_add (i8_0 self) (i8_0 other)); + Add_f_Output := t_i8; + Add_f_add := fun (self : t_i8) (other : t_i8)=> + Build_t_i8 (Add_f_add (i8_0 self) (i8_0 other)); }. Instance t_Add_877139857 : t_Add ((t_i16)) ((t_i16)) := { - Add_impl_13_f_Output := t_i16; - Add_impl_13_f_add := fun (self : t_i16) (other : t_i16)=> - t_i16 (Add_f_add (i16_0 self) (i16_0 other)); + Add_f_Output := t_i16; + Add_f_add := fun (self : t_i16) (other : t_i16)=> + Build_t_i16 (Add_f_add (i16_0 self) (i16_0 other)); }. Instance t_Add_426581780 : t_Add ((t_i32)) ((t_i32)) := { - Add_impl_14_f_Output := t_i32; - Add_impl_14_f_add := fun (self : t_i32) (other : t_i32)=> - t_i32 (Add_f_add (i32_0 self) (i32_0 other)); + Add_f_Output := t_i32; + Add_f_add := fun (self : t_i32) (other : t_i32)=> + Build_t_i32 (Add_f_add (i32_0 self) (i32_0 other)); }. Instance t_Add_113633409 : t_Add ((t_i64)) ((t_i64)) := { - Add_impl_15_f_Output := t_i64; - Add_impl_15_f_add := fun (self : t_i64) (other : t_i64)=> - t_i64 (Add_f_add (i64_0 self) (i64_0 other)); + Add_f_Output := t_i64; + Add_f_add := fun (self : t_i64) (other : t_i64)=> + Build_t_i64 (Add_f_add (i64_0 self) (i64_0 other)); }. Instance t_Add_788236527 : t_Add ((t_i128)) ((t_i128)) := { - Add_impl_16_f_Output := t_i128; - Add_impl_16_f_add := fun (self : t_i128) (other : t_i128)=> - t_i128 (Add_f_add (i128_0 self) (i128_0 other)); + Add_f_Output := t_i128; + Add_f_add := fun (self : t_i128) (other : t_i128)=> + Build_t_i128 (Add_f_add (i128_0 self) (i128_0 other)); }. Instance t_Add_247333017 : t_Add ((t_isize)) ((t_isize)) := { - Add_impl_17_f_Output := t_isize; - Add_impl_17_f_add := fun (self : t_isize) (other : t_isize)=> - t_isize (Add_f_add (isize_0 self) (isize_0 other)); + Add_f_Output := t_isize; + Add_f_add := fun (self : t_isize) (other : t_isize)=> + Build_t_isize (Add_f_add (isize_0 self) (isize_0 other)); }. Instance t_Sub_756206062 : t_Sub ((t_i8)) ((t_i8)) := { - Sub_impl_24_f_Output := t_i8; - Sub_impl_24_f_sub := fun (self : t_i8) (other : t_i8)=> - t_i8 (Sub_f_sub (i8_0 self) (i8_0 other)); + Sub_f_Output := t_i8; + Sub_f_sub := fun (self : t_i8) (other : t_i8)=> + Build_t_i8 (Sub_f_sub (i8_0 self) (i8_0 other)); }. Instance t_Sub_618838212 : t_Sub ((t_i16)) ((t_i16)) := { - Sub_impl_25_f_Output := t_i16; - Sub_impl_25_f_sub := fun (self : t_i16) (other : t_i16)=> - t_i16 (Sub_f_sub (i16_0 self) (i16_0 other)); + Sub_f_Output := t_i16; + Sub_f_sub := fun (self : t_i16) (other : t_i16)=> + Build_t_i16 (Sub_f_sub (i16_0 self) (i16_0 other)); }. Instance t_Sub_44574118 : t_Sub ((t_i32)) ((t_i32)) := { - Sub_impl_26_f_Output := t_i32; - Sub_impl_26_f_sub := fun (self : t_i32) (other : t_i32)=> - t_i32 (Sub_f_sub (i32_0 self) (i32_0 other)); + Sub_f_Output := t_i32; + Sub_f_sub := fun (self : t_i32) (other : t_i32)=> + Build_t_i32 (Sub_f_sub (i32_0 self) (i32_0 other)); }. Instance t_Sub_287793174 : t_Sub ((t_i64)) ((t_i64)) := { - Sub_impl_27_f_Output := t_i64; - Sub_impl_27_f_sub := fun (self : t_i64) (other : t_i64)=> - t_i64 (Sub_f_sub (i64_0 self) (i64_0 other)); + Sub_f_Output := t_i64; + Sub_f_sub := fun (self : t_i64) (other : t_i64)=> + Build_t_i64 (Sub_f_sub (i64_0 self) (i64_0 other)); }. Instance t_Sub_837338145 : t_Sub ((t_i128)) ((t_i128)) := { - Sub_impl_28_f_Output := t_i128; - Sub_impl_28_f_sub := fun (self : t_i128) (other : t_i128)=> - t_i128 (Sub_f_sub (i128_0 self) (i128_0 other)); + Sub_f_Output := t_i128; + Sub_f_sub := fun (self : t_i128) (other : t_i128)=> + Build_t_i128 (Sub_f_sub (i128_0 self) (i128_0 other)); }. Instance t_Sub_22961567 : t_Sub ((t_isize)) ((t_isize)) := { - Sub_impl_29_f_Output := t_isize; - Sub_impl_29_f_sub := fun (self : t_isize) (other : t_isize)=> - t_isize (Sub_f_sub (isize_0 self) (isize_0 other)); + Sub_f_Output := t_isize; + Sub_f_sub := fun (self : t_isize) (other : t_isize)=> + Build_t_isize (Sub_f_sub (isize_0 self) (isize_0 other)); }. Definition wrapping_sub_u128 (a : t_u128) (b : t_u128) : t_u128 := - t_u128 (Sub_f_sub (u128_0 a) (u128_0 b)). + Build_t_u128 (Sub_f_sub (u128_0 a) (u128_0 b)). Definition wrapping_sub_u16 (a : t_u16) (b : t_u16) : t_u16 := - t_u16 (Sub_f_sub (u16_0 a) (u16_0 b)). + Build_t_u16 (Sub_f_sub (u16_0 a) (u16_0 b)). Definition wrapping_sub_u32 (a : t_u32) (b : t_u32) : t_u32 := - t_u32 (Sub_f_sub (u32_0 a) (u32_0 b)). + Build_t_u32 (Sub_f_sub (u32_0 a) (u32_0 b)). Definition wrapping_sub_u64 (a : t_u64) (b : t_u64) : t_u64 := - t_u64 (Sub_f_sub (u64_0 a) (u64_0 b)). + Build_t_u64 (Sub_f_sub (u64_0 a) (u64_0 b)). Definition wrapping_sub_u8 (a : t_u8) (b : t_u8) : t_u8 := - t_u8 (Sub_f_sub (u8_0 a) (u8_0 b)). + Build_t_u8 (Sub_f_sub (u8_0 a) (u8_0 b)). Definition wrapping_sub_usize (a : t_usize) (b : t_usize) : t_usize := - t_usize (Sub_f_sub (usize_0 a) (usize_0 b)). + Build_t_usize (Sub_f_sub (usize_0 a) (usize_0 b)). Definition wrapping_sub403906422 (self : t_u8) (rhs : t_u8) : t_u8 := wrapping_sub_u8 (self) (rhs). Definition wrapping_neg123212788 (self : t_u8) : t_u8 := - wrapping_sub403906422 (t_u8 (Constants_f_ZERO)) (self). + wrapping_sub403906422 (Build_t_u8 (Constants_f_ZERO)) (self). Definition wrapping_sub811251034 (self : t_u16) (rhs : t_u16) : t_u16 := wrapping_sub_u16 (self) (rhs). Definition wrapping_neg128555595 (self : t_u16) : t_u16 := - wrapping_sub811251034 (t_u16 (Constants_f_ZERO)) (self). + wrapping_sub811251034 (Build_t_u16 (Constants_f_ZERO)) (self). Definition wrapping_sub708953500 (self : t_u32) (rhs : t_u32) : t_u32 := wrapping_sub_u32 (self) (rhs). Definition wrapping_neg328220773 (self : t_u32) : t_u32 := - wrapping_sub708953500 (t_u32 (Constants_f_ZERO)) (self). + wrapping_sub708953500 (Build_t_u32 (Constants_f_ZERO)) (self). Definition wrapping_sub762520851 (self : t_u64) (rhs : t_u64) : t_u64 := wrapping_sub_u64 (self) (rhs). Definition wrapping_neg617136337 (self : t_u64) : t_u64 := - wrapping_sub762520851 (t_u64 (Constants_f_ZERO)) (self). + wrapping_sub762520851 (Build_t_u64 (Constants_f_ZERO)) (self). Definition wrapping_sub409310259 (self : t_u128) (rhs : t_u128) : t_u128 := wrapping_sub_u128 (self) (rhs). Definition wrapping_neg729451428 (self : t_u128) : t_u128 := - wrapping_sub409310259 (t_u128 (Constants_f_ZERO)) (self). + wrapping_sub409310259 (Build_t_u128 (Constants_f_ZERO)) (self). Definition wrapping_sub813101882 (self : t_usize) (rhs : t_usize) : t_usize := wrapping_sub_usize (self) (rhs). Definition wrapping_neg342773446 (self : t_usize) : t_usize := - wrapping_sub813101882 (t_usize (Constants_f_ZERO)) (self). + wrapping_sub813101882 (Build_t_usize (Constants_f_ZERO)) (self). Instance t_Add_63222257 : t_Add ((t_u8)) ((t_u8)) := { - Add_impl_6_f_Output := t_u8; - Add_impl_6_f_add := fun (self : t_u8) (other : t_u8)=> - t_u8 (Add_f_add (u8_0 self) (u8_0 other)); + Add_f_Output := t_u8; + Add_f_add := fun (self : t_u8) (other : t_u8)=> + Build_t_u8 (Add_f_add (u8_0 self) (u8_0 other)); }. Instance t_Add_568595401 : t_Add ((t_u16)) ((t_u16)) := { - Add_impl_7_f_Output := t_u16; - Add_impl_7_f_add := fun (self : t_u16) (other : t_u16)=> - t_u16 (Add_f_add (u16_0 self) (u16_0 other)); + Add_f_Output := t_u16; + Add_f_add := fun (self : t_u16) (other : t_u16)=> + Build_t_u16 (Add_f_add (u16_0 self) (u16_0 other)); }. Instance t_Add_99427071 : t_Add ((t_u32)) ((t_u32)) := { - Add_impl_8_f_Output := t_u32; - Add_impl_8_f_add := fun (self : t_u32) (other : t_u32)=> - t_u32 (Add_f_add (u32_0 self) (u32_0 other)); + Add_f_Output := t_u32; + Add_f_add := fun (self : t_u32) (other : t_u32)=> + Build_t_u32 (Add_f_add (u32_0 self) (u32_0 other)); }. Instance t_Add_963057404 : t_Add ((t_u64)) ((t_u64)) := { - Add_impl_9_f_Output := t_u64; - Add_impl_9_f_add := fun (self : t_u64) (other : t_u64)=> - t_u64 (Add_f_add (u64_0 self) (u64_0 other)); + Add_f_Output := t_u64; + Add_f_add := fun (self : t_u64) (other : t_u64)=> + Build_t_u64 (Add_f_add (u64_0 self) (u64_0 other)); }. Instance t_Add_258013445 : t_Add ((t_u128)) ((t_u128)) := { - Add_impl_10_f_Output := t_u128; - Add_impl_10_f_add := fun (self : t_u128) (other : t_u128)=> - t_u128 (Add_f_add (u128_0 self) (u128_0 other)); + Add_f_Output := t_u128; + Add_f_add := fun (self : t_u128) (other : t_u128)=> + Build_t_u128 (Add_f_add (u128_0 self) (u128_0 other)); }. Instance t_Add_192585125 : t_Add ((t_usize)) ((t_usize)) := { - Add_impl_11_f_Output := t_usize; - Add_impl_11_f_add := fun (self : t_usize) (other : t_usize)=> - t_usize (Add_f_add (usize_0 self) (usize_0 other)); + Add_f_Output := t_usize; + Add_f_add := fun (self : t_usize) (other : t_usize)=> + Build_t_usize (Add_f_add (usize_0 self) (usize_0 other)); }. Instance t_Mul_307943337 : t_Mul ((t_u8)) ((t_u8)) := { - Mul_impl_30_f_Output := t_u8; - Mul_impl_30_f_mul := fun (self : t_u8) (other : t_u8)=> - t_u8 (Mul_f_mul (u8_0 self) (u8_0 other)); + Mul_f_Output := t_u8; + Mul_f_mul := fun (self : t_u8) (other : t_u8)=> + Build_t_u8 (Mul_f_mul (u8_0 self) (u8_0 other)); }. Instance t_Mul_579880302 : t_Mul ((t_u16)) ((t_u16)) := { - Mul_impl_31_f_Output := t_u16; - Mul_impl_31_f_mul := fun (self : t_u16) (other : t_u16)=> - t_u16 (Mul_f_mul (u16_0 self) (u16_0 other)); + Mul_f_Output := t_u16; + Mul_f_mul := fun (self : t_u16) (other : t_u16)=> + Build_t_u16 (Mul_f_mul (u16_0 self) (u16_0 other)); }. Instance t_Mul_969448321 : t_Mul ((t_u32)) ((t_u32)) := { - Mul_impl_32_f_Output := t_u32; - Mul_impl_32_f_mul := fun (self : t_u32) (other : t_u32)=> - t_u32 (Mul_f_mul (u32_0 self) (u32_0 other)); + Mul_f_Output := t_u32; + Mul_f_mul := fun (self : t_u32) (other : t_u32)=> + Build_t_u32 (Mul_f_mul (u32_0 self) (u32_0 other)); }. Instance t_Mul_572333733 : t_Mul ((t_u64)) ((t_u64)) := { - Mul_impl_33_f_Output := t_u64; - Mul_impl_33_f_mul := fun (self : t_u64) (other : t_u64)=> - t_u64 (Mul_f_mul (u64_0 self) (u64_0 other)); + Mul_f_Output := t_u64; + Mul_f_mul := fun (self : t_u64) (other : t_u64)=> + Build_t_u64 (Mul_f_mul (u64_0 self) (u64_0 other)); }. Instance t_Mul_904691459 : t_Mul ((t_u128)) ((t_u128)) := { - Mul_impl_34_f_Output := t_u128; - Mul_impl_34_f_mul := fun (self : t_u128) (other : t_u128)=> - t_u128 (Mul_f_mul (u128_0 self) (u128_0 other)); + Mul_f_Output := t_u128; + Mul_f_mul := fun (self : t_u128) (other : t_u128)=> + Build_t_u128 (Mul_f_mul (u128_0 self) (u128_0 other)); }. Instance t_Mul_490480124 : t_Mul ((t_usize)) ((t_usize)) := { - Mul_impl_35_f_Output := t_usize; - Mul_impl_35_f_mul := fun (self : t_usize) (other : t_usize)=> - t_usize (Mul_f_mul (usize_0 self) (usize_0 other)); + Mul_f_Output := t_usize; + Mul_f_mul := fun (self : t_usize) (other : t_usize)=> + Build_t_usize (Mul_f_mul (usize_0 self) (usize_0 other)); }. Instance t_Mul_542253756 : t_Mul ((t_i8)) ((t_i8)) := { - Mul_impl_36_f_Output := t_i8; - Mul_impl_36_f_mul := fun (self : t_i8) (other : t_i8)=> - t_i8 (Mul_f_mul (i8_0 self) (i8_0 other)); + Mul_f_Output := t_i8; + Mul_f_mul := fun (self : t_i8) (other : t_i8)=> + Build_t_i8 (Mul_f_mul (i8_0 self) (i8_0 other)); }. Instance t_Mul_586956420 : t_Mul ((t_i16)) ((t_i16)) := { - Mul_impl_37_f_Output := t_i16; - Mul_impl_37_f_mul := fun (self : t_i16) (other : t_i16)=> - t_i16 (Mul_f_mul (i16_0 self) (i16_0 other)); + Mul_f_Output := t_i16; + Mul_f_mul := fun (self : t_i16) (other : t_i16)=> + Build_t_i16 (Mul_f_mul (i16_0 self) (i16_0 other)); }. Instance t_Mul_622712365 : t_Mul ((t_i32)) ((t_i32)) := { - Mul_impl_38_f_Output := t_i32; - Mul_impl_38_f_mul := fun (self : t_i32) (other : t_i32)=> - t_i32 (Mul_f_mul (i32_0 self) (i32_0 other)); + Mul_f_Output := t_i32; + Mul_f_mul := fun (self : t_i32) (other : t_i32)=> + Build_t_i32 (Mul_f_mul (i32_0 self) (i32_0 other)); }. Instance t_Mul_167399285 : t_Mul ((t_i64)) ((t_i64)) := { - Mul_impl_39_f_Output := t_i64; - Mul_impl_39_f_mul := fun (self : t_i64) (other : t_i64)=> - t_i64 (Mul_f_mul (i64_0 self) (i64_0 other)); + Mul_f_Output := t_i64; + Mul_f_mul := fun (self : t_i64) (other : t_i64)=> + Build_t_i64 (Mul_f_mul (i64_0 self) (i64_0 other)); }. Instance t_Mul_264435207 : t_Mul ((t_i128)) ((t_i128)) := { - Mul_impl_40_f_Output := t_i128; - Mul_impl_40_f_mul := fun (self : t_i128) (other : t_i128)=> - t_i128 (Mul_f_mul (i128_0 self) (i128_0 other)); + Mul_f_Output := t_i128; + Mul_f_mul := fun (self : t_i128) (other : t_i128)=> + Build_t_i128 (Mul_f_mul (i128_0 self) (i128_0 other)); }. Instance t_Mul_9915144 : t_Mul ((t_isize)) ((t_isize)) := { - Mul_impl_41_f_Output := t_isize; - Mul_impl_41_f_mul := fun (self : t_isize) (other : t_isize)=> - t_isize (Mul_f_mul (isize_0 self) (isize_0 other)); + Mul_f_Output := t_isize; + Mul_f_mul := fun (self : t_isize) (other : t_isize)=> + Build_t_isize (Mul_f_mul (isize_0 self) (isize_0 other)); }. Instance t_Div_23426959 : t_Div ((t_u8)) ((t_u8)) := { - Div_impl_42_f_Output := t_u8; - Div_impl_42_f_div := fun (self : t_u8) (other : t_u8)=> - t_u8 (Div_f_div (u8_0 self) (u8_0 other)); + Div_f_Output := t_u8; + Div_f_div := fun (self : t_u8) (other : t_u8)=> + Build_t_u8 (Div_f_div (u8_0 self) (u8_0 other)); }. Definition wrapping_div660080892 (self : t_u8) (rhs : t_u8) : t_u8 := @@ -2997,9 +2417,9 @@ Definition wrapping_div_euclid481233436 (self : t_u8) (rhs : t_u8) : t_u8 := Instance t_Div_469212879 : t_Div ((t_u16)) ((t_u16)) := { - Div_impl_43_f_Output := t_u16; - Div_impl_43_f_div := fun (self : t_u16) (other : t_u16)=> - t_u16 (Div_f_div (u16_0 self) (u16_0 other)); + Div_f_Output := t_u16; + Div_f_div := fun (self : t_u16) (other : t_u16)=> + Build_t_u16 (Div_f_div (u16_0 self) (u16_0 other)); }. Definition wrapping_div366977334 (self : t_u16) (rhs : t_u16) : t_u16 := @@ -3010,9 +2430,9 @@ Definition wrapping_div_euclid22267888 (self : t_u16) (rhs : t_u16) : t_u16 := Instance t_Div_248596974 : t_Div ((t_u32)) ((t_u32)) := { - Div_impl_44_f_Output := t_u32; - Div_impl_44_f_div := fun (self : t_u32) (other : t_u32)=> - t_u32 (Div_f_div (u32_0 self) (u32_0 other)); + Div_f_Output := t_u32; + Div_f_div := fun (self : t_u32) (other : t_u32)=> + Build_t_u32 (Div_f_div (u32_0 self) (u32_0 other)); }. Definition wrapping_div931150450 (self : t_u32) (rhs : t_u32) : t_u32 := @@ -3023,9 +2443,9 @@ Definition wrapping_div_euclid606291997 (self : t_u32) (rhs : t_u32) : t_u32 := Instance t_Div_901268642 : t_Div ((t_u64)) ((t_u64)) := { - Div_impl_45_f_Output := t_u64; - Div_impl_45_f_div := fun (self : t_u64) (other : t_u64)=> - t_u64 (Div_f_div (u64_0 self) (u64_0 other)); + Div_f_Output := t_u64; + Div_f_div := fun (self : t_u64) (other : t_u64)=> + Build_t_u64 (Div_f_div (u64_0 self) (u64_0 other)); }. Definition wrapping_div168427046 (self : t_u64) (rhs : t_u64) : t_u64 := @@ -3036,9 +2456,9 @@ Definition wrapping_div_euclid321252086 (self : t_u64) (rhs : t_u64) : t_u64 := Instance t_Div_868602092 : t_Div ((t_u128)) ((t_u128)) := { - Div_impl_46_f_Output := t_u128; - Div_impl_46_f_div := fun (self : t_u128) (other : t_u128)=> - t_u128 (Div_f_div (u128_0 self) (u128_0 other)); + Div_f_Output := t_u128; + Div_f_div := fun (self : t_u128) (other : t_u128)=> + Build_t_u128 (Div_f_div (u128_0 self) (u128_0 other)); }. Definition wrapping_div692427683 (self : t_u128) (rhs : t_u128) : t_u128 := @@ -3049,9 +2469,9 @@ Definition wrapping_div_euclid926334515 (self : t_u128) (rhs : t_u128) : t_u128 Instance t_Div_740920454 : t_Div ((t_usize)) ((t_usize)) := { - Div_impl_47_f_Output := t_usize; - Div_impl_47_f_div := fun (self : t_usize) (other : t_usize)=> - t_usize (Div_f_div (usize_0 self) (usize_0 other)); + Div_f_Output := t_usize; + Div_f_div := fun (self : t_usize) (other : t_usize)=> + Build_t_usize (Div_f_div (usize_0 self) (usize_0 other)); }. Definition wrapping_div905768546 (self : t_usize) (rhs : t_usize) : t_usize := @@ -3062,9 +2482,9 @@ Definition wrapping_div_euclid90317722 (self : t_usize) (rhs : t_usize) : t_usiz Instance t_Rem_485335443 : t_Rem ((t_u8)) ((t_u8)) := { - Rem_impl_54_f_Output := t_u8; - Rem_impl_54_f_rem := fun (self : t_u8) (other : t_u8)=> - t_u8 (Rem_f_rem (u8_0 self) (u8_0 other)); + Rem_f_Output := t_u8; + Rem_f_rem := fun (self : t_u8) (other : t_u8)=> + Build_t_u8 (Rem_f_rem (u8_0 self) (u8_0 other)); }. Definition wrapping_rem984569721 (self : t_u8) (rhs : t_u8) : t_u8 := @@ -3075,9 +2495,9 @@ Definition wrapping_rem_euclid946579345 (self : t_u8) (rhs : t_u8) : t_u8 := Instance t_Rem_780488465 : t_Rem ((t_u16)) ((t_u16)) := { - Rem_impl_55_f_Output := t_u16; - Rem_impl_55_f_rem := fun (self : t_u16) (other : t_u16)=> - t_u16 (Rem_f_rem (u16_0 self) (u16_0 other)); + Rem_f_Output := t_u16; + Rem_f_rem := fun (self : t_u16) (other : t_u16)=> + Build_t_u16 (Rem_f_rem (u16_0 self) (u16_0 other)); }. Definition wrapping_rem378598035 (self : t_u16) (rhs : t_u16) : t_u16 := @@ -3088,9 +2508,9 @@ Definition wrapping_rem_euclid602402638 (self : t_u16) (rhs : t_u16) : t_u16 := Instance t_Rem_734014529 : t_Rem ((t_u32)) ((t_u32)) := { - Rem_impl_56_f_Output := t_u32; - Rem_impl_56_f_rem := fun (self : t_u32) (other : t_u32)=> - t_u32 (Rem_f_rem (u32_0 self) (u32_0 other)); + Rem_f_Output := t_u32; + Rem_f_rem := fun (self : t_u32) (other : t_u32)=> + Build_t_u32 (Rem_f_rem (u32_0 self) (u32_0 other)); }. Definition wrapping_rem292009099 (self : t_u32) (rhs : t_u32) : t_u32 := @@ -3101,9 +2521,9 @@ Definition wrapping_rem_euclid1020271291 (self : t_u32) (rhs : t_u32) : t_u32 := Instance t_Rem_455480749 : t_Rem ((t_u64)) ((t_u64)) := { - Rem_impl_57_f_Output := t_u64; - Rem_impl_57_f_rem := fun (self : t_u64) (other : t_u64)=> - t_u64 (Rem_f_rem (u64_0 self) (u64_0 other)); + Rem_f_Output := t_u64; + Rem_f_rem := fun (self : t_u64) (other : t_u64)=> + Build_t_u64 (Rem_f_rem (u64_0 self) (u64_0 other)); }. Definition wrapping_rem390602260 (self : t_u64) (rhs : t_u64) : t_u64 := @@ -3114,9 +2534,9 @@ Definition wrapping_rem_euclid839264546 (self : t_u64) (rhs : t_u64) : t_u64 := Instance t_Rem_412060686 : t_Rem ((t_u128)) ((t_u128)) := { - Rem_impl_58_f_Output := t_u128; - Rem_impl_58_f_rem := fun (self : t_u128) (other : t_u128)=> - t_u128 (Rem_f_rem (u128_0 self) (u128_0 other)); + Rem_f_Output := t_u128; + Rem_f_rem := fun (self : t_u128) (other : t_u128)=> + Build_t_u128 (Rem_f_rem (u128_0 self) (u128_0 other)); }. Definition wrapping_rem332379920 (self : t_u128) (rhs : t_u128) : t_u128 := @@ -3127,9 +2547,9 @@ Definition wrapping_rem_euclid646122423 (self : t_u128) (rhs : t_u128) : t_u128 Instance t_Rem_796467486 : t_Rem ((t_usize)) ((t_usize)) := { - Rem_impl_59_f_Output := t_usize; - Rem_impl_59_f_rem := fun (self : t_usize) (other : t_usize)=> - t_usize (Rem_f_rem (usize_0 self) (usize_0 other)); + Rem_f_Output := t_usize; + Rem_f_rem := fun (self : t_usize) (other : t_usize)=> + Build_t_usize (Rem_f_rem (usize_0 self) (usize_0 other)); }. Definition wrapping_rem333089373 (self : t_usize) (rhs : t_usize) : t_usize := @@ -3140,1257 +2560,1269 @@ Definition wrapping_rem_euclid769656504 (self : t_usize) (rhs : t_usize) : t_usi Instance t_Shr_1061808511 : t_Shr ((t_u8)) ((t_u8)) := { - Shr_impl_6_f_Output := t_u8; - Shr_impl_6_f_shr := fun (self : t_u8) (other : t_u8)=> - t_u8 (Shr_f_shr (u8_0 self) (u8_0 other)); + Shr_f_Output := t_u8; + Shr_f_shr := fun (self : t_u8) (other : t_u8)=> + Build_t_u8 (Shr_f_shr (u8_0 self) (u8_0 other)); }. Instance t_Shr_590944100 : t_Shr ((t_u8)) ((t_u16)) := { - Shr_impl_7_f_Output := t_u8; - Shr_impl_7_f_shr := fun (self : t_u8) (other : t_u16)=> - t_u8 (Shr_f_shr (u8_0 self) (u16_0 other)); + Shr_f_Output := t_u8; + Shr_f_shr := fun (self : t_u8) (other : t_u16)=> + Build_t_u8 (Shr_f_shr (u8_0 self) (u16_0 other)); }. Instance t_Shr_267395304 : t_Shr ((t_u8)) ((t_u32)) := { - Shr_impl_8_f_Output := t_u8; - Shr_impl_8_f_shr := fun (self : t_u8) (other : t_u32)=> - t_u8 (Shr_f_shr (u8_0 self) (u32_0 other)); + Shr_f_Output := t_u8; + Shr_f_shr := fun (self : t_u8) (other : t_u32)=> + Build_t_u8 (Shr_f_shr (u8_0 self) (u32_0 other)); }. Instance t_Shr_922719969 : t_Shr ((t_u8)) ((t_u64)) := { - Shr_impl_9_f_Output := t_u8; - Shr_impl_9_f_shr := fun (self : t_u8) (other : t_u64)=> - t_u8 (Shr_f_shr (u8_0 self) (u64_0 other)); + Shr_f_Output := t_u8; + Shr_f_shr := fun (self : t_u8) (other : t_u64)=> + Build_t_u8 (Shr_f_shr (u8_0 self) (u64_0 other)); }. Instance t_Shr_138723873 : t_Shr ((t_u8)) ((t_u128)) := { - Shr_impl_10_f_Output := t_u8; - Shr_impl_10_f_shr := fun (self : t_u8) (other : t_u128)=> - t_u8 (Shr_f_shr (u8_0 self) (u128_0 other)); + Shr_f_Output := t_u8; + Shr_f_shr := fun (self : t_u8) (other : t_u128)=> + Build_t_u8 (Shr_f_shr (u8_0 self) (u128_0 other)); }. Instance t_Shr_558887005 : t_Shr ((t_u8)) ((t_usize)) := { - Shr_impl_11_f_Output := t_u8; - Shr_impl_11_f_shr := fun (self : t_u8) (other : t_usize)=> - t_u8 (Shr_f_shr (u8_0 self) (usize_0 other)); + Shr_f_Output := t_u8; + Shr_f_shr := fun (self : t_u8) (other : t_usize)=> + Build_t_u8 (Shr_f_shr (u8_0 self) (usize_0 other)); }. Instance t_Shr_170693446 : t_Shr ((t_u16)) ((t_u8)) := { - Shr_impl_12_f_Output := t_u16; - Shr_impl_12_f_shr := fun (self : t_u16) (other : t_u8)=> - t_u16 (Shr_f_shr (u16_0 self) (u8_0 other)); + Shr_f_Output := t_u16; + Shr_f_shr := fun (self : t_u16) (other : t_u8)=> + Build_t_u16 (Shr_f_shr (u16_0 self) (u8_0 other)); }. Instance t_Shr_899863737 : t_Shr ((t_u16)) ((t_u16)) := { - Shr_impl_13_f_Output := t_u16; - Shr_impl_13_f_shr := fun (self : t_u16) (other : t_u16)=> - t_u16 (Shr_f_shr (u16_0 self) (u16_0 other)); + Shr_f_Output := t_u16; + Shr_f_shr := fun (self : t_u16) (other : t_u16)=> + Build_t_u16 (Shr_f_shr (u16_0 self) (u16_0 other)); }. Instance t_Shr_290867596 : t_Shr ((t_u16)) ((t_u32)) := { - Shr_impl_14_f_Output := t_u16; - Shr_impl_14_f_shr := fun (self : t_u16) (other : t_u32)=> - t_u16 (Shr_f_shr (u16_0 self) (u32_0 other)); + Shr_f_Output := t_u16; + Shr_f_shr := fun (self : t_u16) (other : t_u32)=> + Build_t_u16 (Shr_f_shr (u16_0 self) (u32_0 other)); }. Instance t_Shr_630800316 : t_Shr ((t_u16)) ((t_u64)) := { - Shr_impl_15_f_Output := t_u16; - Shr_impl_15_f_shr := fun (self : t_u16) (other : t_u64)=> - t_u16 (Shr_f_shr (u16_0 self) (u64_0 other)); + Shr_f_Output := t_u16; + Shr_f_shr := fun (self : t_u16) (other : t_u64)=> + Build_t_u16 (Shr_f_shr (u16_0 self) (u64_0 other)); }. Instance t_Shr_51138976 : t_Shr ((t_u16)) ((t_u128)) := { - Shr_impl_16_f_Output := t_u16; - Shr_impl_16_f_shr := fun (self : t_u16) (other : t_u128)=> - t_u16 (Shr_f_shr (u16_0 self) (u128_0 other)); + Shr_f_Output := t_u16; + Shr_f_shr := fun (self : t_u16) (other : t_u128)=> + Build_t_u16 (Shr_f_shr (u16_0 self) (u128_0 other)); }. Instance t_Shr_82567397 : t_Shr ((t_u16)) ((t_usize)) := { - Shr_impl_17_f_Output := t_u16; - Shr_impl_17_f_shr := fun (self : t_u16) (other : t_usize)=> - t_u16 (Shr_f_shr (u16_0 self) (usize_0 other)); + Shr_f_Output := t_u16; + Shr_f_shr := fun (self : t_u16) (other : t_usize)=> + Build_t_u16 (Shr_f_shr (u16_0 self) (usize_0 other)); }. Instance t_Shr_430948219 : t_Shr ((t_u32)) ((t_u8)) := { - Shr_impl_18_f_Output := t_u32; - Shr_impl_18_f_shr := fun (self : t_u32) (other : t_u8)=> - t_u32 (Shr_f_shr (u32_0 self) (u8_0 other)); + Shr_f_Output := t_u32; + Shr_f_shr := fun (self : t_u32) (other : t_u8)=> + Build_t_u32 (Shr_f_shr (u32_0 self) (u8_0 other)); }. Instance t_Shr_157675832 : t_Shr ((t_u32)) ((t_u16)) := { - Shr_impl_19_f_Output := t_u32; - Shr_impl_19_f_shr := fun (self : t_u32) (other : t_u16)=> - t_u32 (Shr_f_shr (u32_0 self) (u16_0 other)); + Shr_f_Output := t_u32; + Shr_f_shr := fun (self : t_u32) (other : t_u16)=> + Build_t_u32 (Shr_f_shr (u32_0 self) (u16_0 other)); }. Instance t_Shr_708845947 : t_Shr ((t_u32)) ((t_u32)) := { - Shr_impl_20_f_Output := t_u32; - Shr_impl_20_f_shr := fun (self : t_u32) (other : t_u32)=> - t_u32 (Shr_f_shr (u32_0 self) (u32_0 other)); + Shr_f_Output := t_u32; + Shr_f_shr := fun (self : t_u32) (other : t_u32)=> + Build_t_u32 (Shr_f_shr (u32_0 self) (u32_0 other)); }. Instance t_Shr_1060262347 : t_Shr ((t_u32)) ((t_u64)) := { - Shr_impl_21_f_Output := t_u32; - Shr_impl_21_f_shr := fun (self : t_u32) (other : t_u64)=> - t_u32 (Shr_f_shr (u32_0 self) (u64_0 other)); + Shr_f_Output := t_u32; + Shr_f_shr := fun (self : t_u32) (other : t_u64)=> + Build_t_u32 (Shr_f_shr (u32_0 self) (u64_0 other)); }. Instance t_Shr_372764217 : t_Shr ((t_u32)) ((t_u128)) := { - Shr_impl_22_f_Output := t_u32; - Shr_impl_22_f_shr := fun (self : t_u32) (other : t_u128)=> - t_u32 (Shr_f_shr (u32_0 self) (u128_0 other)); + Shr_f_Output := t_u32; + Shr_f_shr := fun (self : t_u32) (other : t_u128)=> + Build_t_u32 (Shr_f_shr (u32_0 self) (u128_0 other)); }. Instance t_Shr_534962338 : t_Shr ((t_u32)) ((t_usize)) := { - Shr_impl_23_f_Output := t_u32; - Shr_impl_23_f_shr := fun (self : t_u32) (other : t_usize)=> - t_u32 (Shr_f_shr (u32_0 self) (usize_0 other)); + Shr_f_Output := t_u32; + Shr_f_shr := fun (self : t_u32) (other : t_usize)=> + Build_t_u32 (Shr_f_shr (u32_0 self) (usize_0 other)); }. Instance t_Shr_45695168 : t_Shr ((t_u64)) ((t_u8)) := { - Shr_impl_24_f_Output := t_u64; - Shr_impl_24_f_shr := fun (self : t_u64) (other : t_u8)=> - t_u64 (Shr_f_shr (u64_0 self) (u8_0 other)); + Shr_f_Output := t_u64; + Shr_f_shr := fun (self : t_u64) (other : t_u8)=> + Build_t_u64 (Shr_f_shr (u64_0 self) (u8_0 other)); }. Instance t_Shr_1027310629 : t_Shr ((t_u64)) ((t_u16)) := { - Shr_impl_25_f_Output := t_u64; - Shr_impl_25_f_shr := fun (self : t_u64) (other : t_u16)=> - t_u64 (Shr_f_shr (u64_0 self) (u16_0 other)); + Shr_f_Output := t_u64; + Shr_f_shr := fun (self : t_u64) (other : t_u16)=> + Build_t_u64 (Shr_f_shr (u64_0 self) (u16_0 other)); }. Instance t_Shr_357793917 : t_Shr ((t_u64)) ((t_u32)) := { - Shr_impl_26_f_Output := t_u64; - Shr_impl_26_f_shr := fun (self : t_u64) (other : t_u32)=> - t_u64 (Shr_f_shr (u64_0 self) (u32_0 other)); + Shr_f_Output := t_u64; + Shr_f_shr := fun (self : t_u64) (other : t_u32)=> + Build_t_u64 (Shr_f_shr (u64_0 self) (u32_0 other)); }. Instance t_Shr_1038705817 : t_Shr ((t_u64)) ((t_u64)) := { - Shr_impl_27_f_Output := t_u64; - Shr_impl_27_f_shr := fun (self : t_u64) (other : t_u64)=> - t_u64 (Shr_f_shr (u64_0 self) (u64_0 other)); + Shr_f_Output := t_u64; + Shr_f_shr := fun (self : t_u64) (other : t_u64)=> + Build_t_u64 (Shr_f_shr (u64_0 self) (u64_0 other)); }. Instance t_Shr_567649567 : t_Shr ((t_u64)) ((t_u128)) := { - Shr_impl_28_f_Output := t_u64; - Shr_impl_28_f_shr := fun (self : t_u64) (other : t_u128)=> - t_u64 (Shr_f_shr (u64_0 self) (u128_0 other)); + Shr_f_Output := t_u64; + Shr_f_shr := fun (self : t_u64) (other : t_u128)=> + Build_t_u64 (Shr_f_shr (u64_0 self) (u128_0 other)); }. Instance t_Shr_380280894 : t_Shr ((t_u64)) ((t_usize)) := { - Shr_impl_29_f_Output := t_u64; - Shr_impl_29_f_shr := fun (self : t_u64) (other : t_usize)=> - t_u64 (Shr_f_shr (u64_0 self) (usize_0 other)); + Shr_f_Output := t_u64; + Shr_f_shr := fun (self : t_u64) (other : t_usize)=> + Build_t_u64 (Shr_f_shr (u64_0 self) (usize_0 other)); }. Instance t_Shr_555027554 : t_Shr ((t_u128)) ((t_u8)) := { - Shr_impl_30_f_Output := t_u128; - Shr_impl_30_f_shr := fun (self : t_u128) (other : t_u8)=> - t_u128 (Shr_f_shr (u128_0 self) (u8_0 other)); + Shr_f_Output := t_u128; + Shr_f_shr := fun (self : t_u128) (other : t_u8)=> + Build_t_u128 (Shr_f_shr (u128_0 self) (u8_0 other)); }. Instance t_Shr_225523666 : t_Shr ((t_u128)) ((t_u16)) := { - Shr_impl_31_f_Output := t_u128; - Shr_impl_31_f_shr := fun (self : t_u128) (other : t_u16)=> - t_u128 (Shr_f_shr (u128_0 self) (u16_0 other)); + Shr_f_Output := t_u128; + Shr_f_shr := fun (self : t_u128) (other : t_u16)=> + Build_t_u128 (Shr_f_shr (u128_0 self) (u16_0 other)); }. Instance t_Shr_910916464 : t_Shr ((t_u128)) ((t_u32)) := { - Shr_impl_32_f_Output := t_u128; - Shr_impl_32_f_shr := fun (self : t_u128) (other : t_u32)=> - t_u128 (Shr_f_shr (u128_0 self) (u32_0 other)); + Shr_f_Output := t_u128; + Shr_f_shr := fun (self : t_u128) (other : t_u32)=> + Build_t_u128 (Shr_f_shr (u128_0 self) (u32_0 other)); }. Instance t_Shr_137291592 : t_Shr ((t_u128)) ((t_u64)) := { - Shr_impl_33_f_Output := t_u128; - Shr_impl_33_f_shr := fun (self : t_u128) (other : t_u64)=> - t_u128 (Shr_f_shr (u128_0 self) (u64_0 other)); + Shr_f_Output := t_u128; + Shr_f_shr := fun (self : t_u128) (other : t_u64)=> + Build_t_u128 (Shr_f_shr (u128_0 self) (u64_0 other)); }. Instance t_Shr_1070013296 : t_Shr ((t_u128)) ((t_u128)) := { - Shr_impl_34_f_Output := t_u128; - Shr_impl_34_f_shr := fun (self : t_u128) (other : t_u128)=> - t_u128 (Shr_f_shr (u128_0 self) (u128_0 other)); + Shr_f_Output := t_u128; + Shr_f_shr := fun (self : t_u128) (other : t_u128)=> + Build_t_u128 (Shr_f_shr (u128_0 self) (u128_0 other)); }. Instance t_Shr_1009428374 : t_Shr ((t_u128)) ((t_usize)) := { - Shr_impl_35_f_Output := t_u128; - Shr_impl_35_f_shr := fun (self : t_u128) (other : t_usize)=> - t_u128 (Shr_f_shr (u128_0 self) (usize_0 other)); + Shr_f_Output := t_u128; + Shr_f_shr := fun (self : t_u128) (other : t_usize)=> + Build_t_u128 (Shr_f_shr (u128_0 self) (usize_0 other)); }. Instance t_Shr_94723353 : t_Shr ((t_usize)) ((t_u8)) := { - Shr_impl_36_f_Output := t_usize; - Shr_impl_36_f_shr := fun (self : t_usize) (other : t_u8)=> - t_usize (Shr_f_shr (usize_0 self) (u8_0 other)); + Shr_f_Output := t_usize; + Shr_f_shr := fun (self : t_usize) (other : t_u8)=> + Build_t_usize (Shr_f_shr (usize_0 self) (u8_0 other)); }. Instance t_Shr_18219058 : t_Shr ((t_usize)) ((t_u16)) := { - Shr_impl_37_f_Output := t_usize; - Shr_impl_37_f_shr := fun (self : t_usize) (other : t_u16)=> - t_usize (Shr_f_shr (usize_0 self) (u16_0 other)); + Shr_f_Output := t_usize; + Shr_f_shr := fun (self : t_usize) (other : t_u16)=> + Build_t_usize (Shr_f_shr (usize_0 self) (u16_0 other)); }. Instance t_Shr_14441839 : t_Shr ((t_usize)) ((t_u32)) := { - Shr_impl_38_f_Output := t_usize; - Shr_impl_38_f_shr := fun (self : t_usize) (other : t_u32)=> - t_usize (Shr_f_shr (usize_0 self) (u32_0 other)); + Shr_f_Output := t_usize; + Shr_f_shr := fun (self : t_usize) (other : t_u32)=> + Build_t_usize (Shr_f_shr (usize_0 self) (u32_0 other)); }. Instance t_Shr_642676920 : t_Shr ((t_usize)) ((t_u64)) := { - Shr_impl_39_f_Output := t_usize; - Shr_impl_39_f_shr := fun (self : t_usize) (other : t_u64)=> - t_usize (Shr_f_shr (usize_0 self) (u64_0 other)); + Shr_f_Output := t_usize; + Shr_f_shr := fun (self : t_usize) (other : t_u64)=> + Build_t_usize (Shr_f_shr (usize_0 self) (u64_0 other)); }. Instance t_Shr_65876869 : t_Shr ((t_usize)) ((t_u128)) := { - Shr_impl_40_f_Output := t_usize; - Shr_impl_40_f_shr := fun (self : t_usize) (other : t_u128)=> - t_usize (Shr_f_shr (usize_0 self) (u128_0 other)); + Shr_f_Output := t_usize; + Shr_f_shr := fun (self : t_usize) (other : t_u128)=> + Build_t_usize (Shr_f_shr (usize_0 self) (u128_0 other)); }. Instance t_Shr_833436714 : t_Shr ((t_usize)) ((t_usize)) := { - Shr_impl_41_f_Output := t_usize; - Shr_impl_41_f_shr := fun (self : t_usize) (other : t_usize)=> - t_usize (Shr_f_shr (usize_0 self) (usize_0 other)); + Shr_f_Output := t_usize; + Shr_f_shr := fun (self : t_usize) (other : t_usize)=> + Build_t_usize (Shr_f_shr (usize_0 self) (usize_0 other)); }. Instance t_Shl_161455974 : t_Shl ((t_u8)) ((t_u8)) := { - Shl_impl_42_f_Output := t_u8; - Shl_impl_42_f_shl := fun (self : t_u8) (other : t_u8)=> - t_u8 (Shl_f_shl (u8_0 self) (u8_0 other)); + Shl_f_Output := t_u8; + Shl_f_shl := fun (self : t_u8) (other : t_u8)=> + Build_t_u8 (Shl_f_shl (u8_0 self) (u8_0 other)); }. Instance t_Shl_861055562 : t_Shl ((t_u8)) ((t_u16)) := { - Shl_impl_43_f_Output := t_u8; - Shl_impl_43_f_shl := fun (self : t_u8) (other : t_u16)=> - t_u8 (Shl_f_shl (u8_0 self) (u16_0 other)); + Shl_f_Output := t_u8; + Shl_f_shl := fun (self : t_u8) (other : t_u16)=> + Build_t_u8 (Shl_f_shl (u8_0 self) (u16_0 other)); }. Instance t_Shl_479938796 : t_Shl ((t_u8)) ((t_u32)) := { - Shl_impl_44_f_Output := t_u8; - Shl_impl_44_f_shl := fun (self : t_u8) (other : t_u32)=> - t_u8 (Shl_f_shl (u8_0 self) (u32_0 other)); + Shl_f_Output := t_u8; + Shl_f_shl := fun (self : t_u8) (other : t_u32)=> + Build_t_u8 (Shl_f_shl (u8_0 self) (u32_0 other)); }. Instance t_Shl_373462431 : t_Shl ((t_u8)) ((t_u64)) := { - Shl_impl_45_f_Output := t_u8; - Shl_impl_45_f_shl := fun (self : t_u8) (other : t_u64)=> - t_u8 (Shl_f_shl (u8_0 self) (u64_0 other)); + Shl_f_Output := t_u8; + Shl_f_shl := fun (self : t_u8) (other : t_u64)=> + Build_t_u8 (Shl_f_shl (u8_0 self) (u64_0 other)); }. Instance t_Shl_356733585 : t_Shl ((t_u8)) ((t_u128)) := { - Shl_impl_46_f_Output := t_u8; - Shl_impl_46_f_shl := fun (self : t_u8) (other : t_u128)=> - t_u8 (Shl_f_shl (u8_0 self) (u128_0 other)); + Shl_f_Output := t_u8; + Shl_f_shl := fun (self : t_u8) (other : t_u128)=> + Build_t_u8 (Shl_f_shl (u8_0 self) (u128_0 other)); }. Instance t_Shl_138823384 : t_Shl ((t_u8)) ((t_usize)) := { - Shl_impl_47_f_Output := t_u8; - Shl_impl_47_f_shl := fun (self : t_u8) (other : t_usize)=> - t_u8 (Shl_f_shl (u8_0 self) (usize_0 other)); + Shl_f_Output := t_u8; + Shl_f_shl := fun (self : t_u8) (other : t_usize)=> + Build_t_u8 (Shl_f_shl (u8_0 self) (usize_0 other)); }. Instance t_Shl_492599436 : t_Shl ((t_u16)) ((t_u8)) := { - Shl_impl_48_f_Output := t_u16; - Shl_impl_48_f_shl := fun (self : t_u16) (other : t_u8)=> - t_u16 (Shl_f_shl (u16_0 self) (u8_0 other)); + Shl_f_Output := t_u16; + Shl_f_shl := fun (self : t_u16) (other : t_u8)=> + Build_t_u16 (Shl_f_shl (u16_0 self) (u8_0 other)); }. Instance t_Shl_254997522 : t_Shl ((t_u16)) ((t_u16)) := { - Shl_impl_49_f_Output := t_u16; - Shl_impl_49_f_shl := fun (self : t_u16) (other : t_u16)=> - t_u16 (Shl_f_shl (u16_0 self) (u16_0 other)); + Shl_f_Output := t_u16; + Shl_f_shl := fun (self : t_u16) (other : t_u16)=> + Build_t_u16 (Shl_f_shl (u16_0 self) (u16_0 other)); }. Instance t_Shl_840888059 : t_Shl ((t_u16)) ((t_u32)) := { - Shl_impl_50_f_Output := t_u16; - Shl_impl_50_f_shl := fun (self : t_u16) (other : t_u32)=> - t_u16 (Shl_f_shl (u16_0 self) (u32_0 other)); + Shl_f_Output := t_u16; + Shl_f_shl := fun (self : t_u16) (other : t_u32)=> + Build_t_u16 (Shl_f_shl (u16_0 self) (u32_0 other)); }. Instance t_Shl_1017206779 : t_Shl ((t_u16)) ((t_u64)) := { - Shl_impl_51_f_Output := t_u16; - Shl_impl_51_f_shl := fun (self : t_u16) (other : t_u64)=> - t_u16 (Shl_f_shl (u16_0 self) (u64_0 other)); + Shl_f_Output := t_u16; + Shl_f_shl := fun (self : t_u16) (other : t_u64)=> + Build_t_u16 (Shl_f_shl (u16_0 self) (u64_0 other)); }. Instance t_Shl_751151164 : t_Shl ((t_u16)) ((t_u128)) := { - Shl_impl_52_f_Output := t_u16; - Shl_impl_52_f_shl := fun (self : t_u16) (other : t_u128)=> - t_u16 (Shl_f_shl (u16_0 self) (u128_0 other)); + Shl_f_Output := t_u16; + Shl_f_shl := fun (self : t_u16) (other : t_u128)=> + Build_t_u16 (Shl_f_shl (u16_0 self) (u128_0 other)); }. Instance t_Shl_303578486 : t_Shl ((t_u16)) ((t_usize)) := { - Shl_impl_53_f_Output := t_u16; - Shl_impl_53_f_shl := fun (self : t_u16) (other : t_usize)=> - t_u16 (Shl_f_shl (u16_0 self) (usize_0 other)); + Shl_f_Output := t_u16; + Shl_f_shl := fun (self : t_u16) (other : t_usize)=> + Build_t_u16 (Shl_f_shl (u16_0 self) (usize_0 other)); }. Instance t_Shl_186069032 : t_Shl ((t_u32)) ((t_u8)) := { - Shl_impl_54_f_Output := t_u32; - Shl_impl_54_f_shl := fun (self : t_u32) (other : t_u8)=> - t_u32 (Shl_f_shl (u32_0 self) (u8_0 other)); + Shl_f_Output := t_u32; + Shl_f_shl := fun (self : t_u32) (other : t_u8)=> + Build_t_u32 (Shl_f_shl (u32_0 self) (u8_0 other)); }. Instance t_Shl_320616735 : t_Shl ((t_u32)) ((t_u16)) := { - Shl_impl_55_f_Output := t_u32; - Shl_impl_55_f_shl := fun (self : t_u32) (other : t_u16)=> - t_u32 (Shl_f_shl (u32_0 self) (u16_0 other)); + Shl_f_Output := t_u32; + Shl_f_shl := fun (self : t_u32) (other : t_u16)=> + Build_t_u32 (Shl_f_shl (u32_0 self) (u16_0 other)); }. Instance t_Shl_325940784 : t_Shl ((t_u32)) ((t_u32)) := { - Shl_impl_56_f_Output := t_u32; - Shl_impl_56_f_shl := fun (self : t_u32) (other : t_u32)=> - t_u32 (Shl_f_shl (u32_0 self) (u32_0 other)); + Shl_f_Output := t_u32; + Shl_f_shl := fun (self : t_u32) (other : t_u32)=> + Build_t_u32 (Shl_f_shl (u32_0 self) (u32_0 other)); }. Instance t_Shl_398883535 : t_Shl ((t_u32)) ((t_u64)) := { - Shl_impl_57_f_Output := t_u32; - Shl_impl_57_f_shl := fun (self : t_u32) (other : t_u64)=> - t_u32 (Shl_f_shl (u32_0 self) (u64_0 other)); + Shl_f_Output := t_u32; + Shl_f_shl := fun (self : t_u32) (other : t_u64)=> + Build_t_u32 (Shl_f_shl (u32_0 self) (u64_0 other)); }. Instance t_Shl_700909976 : t_Shl ((t_u32)) ((t_u128)) := { - Shl_impl_58_f_Output := t_u32; - Shl_impl_58_f_shl := fun (self : t_u32) (other : t_u128)=> - t_u32 (Shl_f_shl (u32_0 self) (u128_0 other)); + Shl_f_Output := t_u32; + Shl_f_shl := fun (self : t_u32) (other : t_u128)=> + Build_t_u32 (Shl_f_shl (u32_0 self) (u128_0 other)); }. Instance t_Shl_475027367 : t_Shl ((t_u32)) ((t_usize)) := { - Shl_impl_59_f_Output := t_u32; - Shl_impl_59_f_shl := fun (self : t_u32) (other : t_usize)=> - t_u32 (Shl_f_shl (u32_0 self) (usize_0 other)); + Shl_f_Output := t_u32; + Shl_f_shl := fun (self : t_u32) (other : t_usize)=> + Build_t_u32 (Shl_f_shl (u32_0 self) (usize_0 other)); }. Instance t_Shl_620046856 : t_Shl ((t_u64)) ((t_u8)) := { - Shl_impl_60_f_Output := t_u64; - Shl_impl_60_f_shl := fun (self : t_u64) (other : t_u8)=> - t_u64 (Shl_f_shl (u64_0 self) (u8_0 other)); + Shl_f_Output := t_u64; + Shl_f_shl := fun (self : t_u64) (other : t_u8)=> + Build_t_u64 (Shl_f_shl (u64_0 self) (u8_0 other)); }. Instance t_Shl_158077515 : t_Shl ((t_u64)) ((t_u16)) := { - Shl_impl_61_f_Output := t_u64; - Shl_impl_61_f_shl := fun (self : t_u64) (other : t_u16)=> - t_u64 (Shl_f_shl (u64_0 self) (u16_0 other)); + Shl_f_Output := t_u64; + Shl_f_shl := fun (self : t_u64) (other : t_u16)=> + Build_t_u64 (Shl_f_shl (u64_0 self) (u16_0 other)); }. Instance t_Shl_1071441050 : t_Shl ((t_u64)) ((t_u32)) := { - Shl_impl_62_f_Output := t_u64; - Shl_impl_62_f_shl := fun (self : t_u64) (other : t_u32)=> - t_u64 (Shl_f_shl (u64_0 self) (u32_0 other)); + Shl_f_Output := t_u64; + Shl_f_shl := fun (self : t_u64) (other : t_u32)=> + Build_t_u64 (Shl_f_shl (u64_0 self) (u32_0 other)); }. Instance t_Shl_581241894 : t_Shl ((t_u64)) ((t_u64)) := { - Shl_impl_63_f_Output := t_u64; - Shl_impl_63_f_shl := fun (self : t_u64) (other : t_u64)=> - t_u64 (Shl_f_shl (u64_0 self) (u64_0 other)); + Shl_f_Output := t_u64; + Shl_f_shl := fun (self : t_u64) (other : t_u64)=> + Build_t_u64 (Shl_f_shl (u64_0 self) (u64_0 other)); }. Instance t_Shl_916302310 : t_Shl ((t_u64)) ((t_u128)) := { - Shl_impl_64_f_Output := t_u64; - Shl_impl_64_f_shl := fun (self : t_u64) (other : t_u128)=> - t_u64 (Shl_f_shl (u64_0 self) (u128_0 other)); + Shl_f_Output := t_u64; + Shl_f_shl := fun (self : t_u64) (other : t_u128)=> + Build_t_u64 (Shl_f_shl (u64_0 self) (u128_0 other)); }. Instance t_Shl_59609547 : t_Shl ((t_u64)) ((t_usize)) := { - Shl_impl_65_f_Output := t_u64; - Shl_impl_65_f_shl := fun (self : t_u64) (other : t_usize)=> - t_u64 (Shl_f_shl (u64_0 self) (usize_0 other)); + Shl_f_Output := t_u64; + Shl_f_shl := fun (self : t_u64) (other : t_usize)=> + Build_t_u64 (Shl_f_shl (u64_0 self) (usize_0 other)); }. Instance t_Shl_308574333 : t_Shl ((t_u128)) ((t_u8)) := { - Shl_impl_66_f_Output := t_u128; - Shl_impl_66_f_shl := fun (self : t_u128) (other : t_u8)=> - t_u128 (Shl_f_shl (u128_0 self) (u8_0 other)); + Shl_f_Output := t_u128; + Shl_f_shl := fun (self : t_u128) (other : t_u8)=> + Build_t_u128 (Shl_f_shl (u128_0 self) (u8_0 other)); }. Instance t_Shl_966677877 : t_Shl ((t_u128)) ((t_u16)) := { - Shl_impl_67_f_Output := t_u128; - Shl_impl_67_f_shl := fun (self : t_u128) (other : t_u16)=> - t_u128 (Shl_f_shl (u128_0 self) (u16_0 other)); + Shl_f_Output := t_u128; + Shl_f_shl := fun (self : t_u128) (other : t_u16)=> + Build_t_u128 (Shl_f_shl (u128_0 self) (u16_0 other)); }. Instance t_Shl_38932717 : t_Shl ((t_u128)) ((t_u32)) := { - Shl_impl_68_f_Output := t_u128; - Shl_impl_68_f_shl := fun (self : t_u128) (other : t_u32)=> - t_u128 (Shl_f_shl (u128_0 self) (u32_0 other)); + Shl_f_Output := t_u128; + Shl_f_shl := fun (self : t_u128) (other : t_u32)=> + Build_t_u128 (Shl_f_shl (u128_0 self) (u32_0 other)); }. Instance t_Shl_108085956 : t_Shl ((t_u128)) ((t_u64)) := { - Shl_impl_69_f_Output := t_u128; - Shl_impl_69_f_shl := fun (self : t_u128) (other : t_u64)=> - t_u128 (Shl_f_shl (u128_0 self) (u64_0 other)); + Shl_f_Output := t_u128; + Shl_f_shl := fun (self : t_u128) (other : t_u64)=> + Build_t_u128 (Shl_f_shl (u128_0 self) (u64_0 other)); }. Instance t_Shl_489587677 : t_Shl ((t_u128)) ((t_u128)) := { - Shl_impl_70_f_Output := t_u128; - Shl_impl_70_f_shl := fun (self : t_u128) (other : t_u128)=> - t_u128 (Shl_f_shl (u128_0 self) (u128_0 other)); + Shl_f_Output := t_u128; + Shl_f_shl := fun (self : t_u128) (other : t_u128)=> + Build_t_u128 (Shl_f_shl (u128_0 self) (u128_0 other)); }. Instance t_Shl_837150634 : t_Shl ((t_u128)) ((t_usize)) := { - Shl_impl_71_f_Output := t_u128; - Shl_impl_71_f_shl := fun (self : t_u128) (other : t_usize)=> - t_u128 (Shl_f_shl (u128_0 self) (usize_0 other)); + Shl_f_Output := t_u128; + Shl_f_shl := fun (self : t_u128) (other : t_usize)=> + Build_t_u128 (Shl_f_shl (u128_0 self) (usize_0 other)); }. Instance t_Shl_736165651 : t_Shl ((t_usize)) ((t_u8)) := { - Shl_impl_72_f_Output := t_usize; - Shl_impl_72_f_shl := fun (self : t_usize) (other : t_u8)=> - t_usize (Shl_f_shl (usize_0 self) (u8_0 other)); + Shl_f_Output := t_usize; + Shl_f_shl := fun (self : t_usize) (other : t_u8)=> + Build_t_usize (Shl_f_shl (usize_0 self) (u8_0 other)); }. Instance t_Shl_740886741 : t_Shl ((t_usize)) ((t_u16)) := { - Shl_impl_73_f_Output := t_usize; - Shl_impl_73_f_shl := fun (self : t_usize) (other : t_u16)=> - t_usize (Shl_f_shl (usize_0 self) (u16_0 other)); + Shl_f_Output := t_usize; + Shl_f_shl := fun (self : t_usize) (other : t_u16)=> + Build_t_usize (Shl_f_shl (usize_0 self) (u16_0 other)); }. Instance t_Shl_683246358 : t_Shl ((t_usize)) ((t_u32)) := { - Shl_impl_74_f_Output := t_usize; - Shl_impl_74_f_shl := fun (self : t_usize) (other : t_u32)=> - t_usize (Shl_f_shl (usize_0 self) (u32_0 other)); + Shl_f_Output := t_usize; + Shl_f_shl := fun (self : t_usize) (other : t_u32)=> + Build_t_usize (Shl_f_shl (usize_0 self) (u32_0 other)); }. Instance t_Shl_436746920 : t_Shl ((t_usize)) ((t_u64)) := { - Shl_impl_75_f_Output := t_usize; - Shl_impl_75_f_shl := fun (self : t_usize) (other : t_u64)=> - t_usize (Shl_f_shl (usize_0 self) (u64_0 other)); + Shl_f_Output := t_usize; + Shl_f_shl := fun (self : t_usize) (other : t_u64)=> + Build_t_usize (Shl_f_shl (usize_0 self) (u64_0 other)); }. Instance t_Shl_527409353 : t_Shl ((t_usize)) ((t_u128)) := { - Shl_impl_76_f_Output := t_usize; - Shl_impl_76_f_shl := fun (self : t_usize) (other : t_u128)=> - t_usize (Shl_f_shl (usize_0 self) (u128_0 other)); + Shl_f_Output := t_usize; + Shl_f_shl := fun (self : t_usize) (other : t_u128)=> + Build_t_usize (Shl_f_shl (usize_0 self) (u128_0 other)); }. Instance t_Shl_982380013 : t_Shl ((t_usize)) ((t_usize)) := { - Shl_impl_77_f_Output := t_usize; - Shl_impl_77_f_shl := fun (self : t_usize) (other : t_usize)=> - t_usize (Shl_f_shl (usize_0 self) (usize_0 other)); + Shl_f_Output := t_usize; + Shl_f_shl := fun (self : t_usize) (other : t_usize)=> + Build_t_usize (Shl_f_shl (usize_0 self) (usize_0 other)); }. Instance t_BitOr_669654947 : t_BitOr ((t_u8)) ((t_u8)) := { - BitOr_impl_78_f_Output := t_u8; - BitOr_impl_78_f_bitor := fun (self : t_u8) (other : t_u8)=> - t_u8 (BitOr_f_bitor (u8_0 self) (u8_0 other)); + BitOr_f_Output := t_u8; + BitOr_f_bitor := fun (self : t_u8) (other : t_u8)=> + Build_t_u8 (BitOr_f_bitor (u8_0 self) (u8_0 other)); }. Instance t_BitOr_892941557 : t_BitOr ((t_u16)) ((t_u16)) := { - BitOr_impl_79_f_Output := t_u16; - BitOr_impl_79_f_bitor := fun (self : t_u16) (other : t_u16)=> - t_u16 (BitOr_f_bitor (u16_0 self) (u16_0 other)); + BitOr_f_Output := t_u16; + BitOr_f_bitor := fun (self : t_u16) (other : t_u16)=> + Build_t_u16 (BitOr_f_bitor (u16_0 self) (u16_0 other)); }. Instance t_BitOr_991330847 : t_BitOr ((t_u32)) ((t_u32)) := { - BitOr_impl_80_f_Output := t_u32; - BitOr_impl_80_f_bitor := fun (self : t_u32) (other : t_u32)=> - t_u32 (BitOr_f_bitor (u32_0 self) (u32_0 other)); + BitOr_f_Output := t_u32; + BitOr_f_bitor := fun (self : t_u32) (other : t_u32)=> + Build_t_u32 (BitOr_f_bitor (u32_0 self) (u32_0 other)); }. Instance t_BitOr_692971983 : t_BitOr ((t_u64)) ((t_u64)) := { - BitOr_impl_81_f_Output := t_u64; - BitOr_impl_81_f_bitor := fun (self : t_u64) (other : t_u64)=> - t_u64 (BitOr_f_bitor (u64_0 self) (u64_0 other)); + BitOr_f_Output := t_u64; + BitOr_f_bitor := fun (self : t_u64) (other : t_u64)=> + Build_t_u64 (BitOr_f_bitor (u64_0 self) (u64_0 other)); }. Instance t_BitOr_227319538 : t_BitOr ((t_u128)) ((t_u128)) := { - BitOr_impl_82_f_Output := t_u128; - BitOr_impl_82_f_bitor := fun (self : t_u128) (other : t_u128)=> - t_u128 (BitOr_f_bitor (u128_0 self) (u128_0 other)); + BitOr_f_Output := t_u128; + BitOr_f_bitor := fun (self : t_u128) (other : t_u128)=> + Build_t_u128 (BitOr_f_bitor (u128_0 self) (u128_0 other)); }. Instance t_BitOr_669787696 : t_BitOr ((t_usize)) ((t_usize)) := { - BitOr_impl_83_f_Output := t_usize; - BitOr_impl_83_f_bitor := fun (self : t_usize) (other : t_usize)=> - t_usize (BitOr_f_bitor (usize_0 self) (usize_0 other)); + BitOr_f_Output := t_usize; + BitOr_f_bitor := fun (self : t_usize) (other : t_usize)=> + Build_t_usize (BitOr_f_bitor (usize_0 self) (usize_0 other)); }. Instance t_BitXor_327788827 : t_BitXor ((t_u8)) ((t_u8)) := { - BitXor_impl_90_f_Output := t_u8; - BitXor_impl_90_f_bitxor := fun (self : t_u8) (other : t_u8)=> - t_u8 (BitXor_f_bitxor (u8_0 self) (u8_0 other)); + BitXor_f_Output := t_u8; + BitXor_f_bitxor := fun (self : t_u8) (other : t_u8)=> + Build_t_u8 (BitXor_f_bitxor (u8_0 self) (u8_0 other)); }. Instance t_BitXor_661040931 : t_BitXor ((t_u16)) ((t_u16)) := { - BitXor_impl_91_f_Output := t_u16; - BitXor_impl_91_f_bitxor := fun (self : t_u16) (other : t_u16)=> - t_u16 (BitXor_f_bitxor (u16_0 self) (u16_0 other)); + BitXor_f_Output := t_u16; + BitXor_f_bitxor := fun (self : t_u16) (other : t_u16)=> + Build_t_u16 (BitXor_f_bitxor (u16_0 self) (u16_0 other)); }. Instance t_BitXor_222957020 : t_BitXor ((t_u32)) ((t_u32)) := { - BitXor_impl_92_f_Output := t_u32; - BitXor_impl_92_f_bitxor := fun (self : t_u32) (other : t_u32)=> - t_u32 (BitXor_f_bitxor (u32_0 self) (u32_0 other)); + BitXor_f_Output := t_u32; + BitXor_f_bitxor := fun (self : t_u32) (other : t_u32)=> + Build_t_u32 (BitXor_f_bitxor (u32_0 self) (u32_0 other)); }. Instance t_BitXor_530545977 : t_BitXor ((t_u64)) ((t_u64)) := { - BitXor_impl_93_f_Output := t_u64; - BitXor_impl_93_f_bitxor := fun (self : t_u64) (other : t_u64)=> - t_u64 (BitXor_f_bitxor (u64_0 self) (u64_0 other)); + BitXor_f_Output := t_u64; + BitXor_f_bitxor := fun (self : t_u64) (other : t_u64)=> + Build_t_u64 (BitXor_f_bitxor (u64_0 self) (u64_0 other)); }. Instance t_BitXor_112780081 : t_BitXor ((t_u128)) ((t_u128)) := { - BitXor_impl_94_f_Output := t_u128; - BitXor_impl_94_f_bitxor := fun (self : t_u128) (other : t_u128)=> - t_u128 (BitXor_f_bitxor (u128_0 self) (u128_0 other)); + BitXor_f_Output := t_u128; + BitXor_f_bitxor := fun (self : t_u128) (other : t_u128)=> + Build_t_u128 (BitXor_f_bitxor (u128_0 self) (u128_0 other)); }. Instance t_BitXor_969810999 : t_BitXor ((t_usize)) ((t_usize)) := { - BitXor_impl_95_f_Output := t_usize; - BitXor_impl_95_f_bitxor := fun (self : t_usize) (other : t_usize)=> - t_usize (BitXor_f_bitxor (usize_0 self) (usize_0 other)); + BitXor_f_Output := t_usize; + BitXor_f_bitxor := fun (self : t_usize) (other : t_usize)=> + Build_t_usize (BitXor_f_bitxor (usize_0 self) (usize_0 other)); }. Instance t_BitAnd_126469303 : t_BitAnd ((t_u8)) ((t_u8)) := { - BitAnd_impl_96_f_Output := t_u8; - BitAnd_impl_96_f_bitand := fun (self : t_u8) (other : t_u8)=> - t_u8 (BitAnd_f_bitand (u8_0 self) (u8_0 other)); + BitAnd_f_Output := t_u8; + BitAnd_f_bitand := fun (self : t_u8) (other : t_u8)=> + Build_t_u8 (BitAnd_f_bitand (u8_0 self) (u8_0 other)); }. Instance t_BitAnd_531525101 : t_BitAnd ((t_u16)) ((t_u16)) := { - BitAnd_impl_97_f_Output := t_u16; - BitAnd_impl_97_f_bitand := fun (self : t_u16) (other : t_u16)=> - t_u16 (BitAnd_f_bitand (u16_0 self) (u16_0 other)); + BitAnd_f_Output := t_u16; + BitAnd_f_bitand := fun (self : t_u16) (other : t_u16)=> + Build_t_u16 (BitAnd_f_bitand (u16_0 self) (u16_0 other)); }. Instance t_BitAnd_24728760 : t_BitAnd ((t_u32)) ((t_u32)) := { - BitAnd_impl_98_f_Output := t_u32; - BitAnd_impl_98_f_bitand := fun (self : t_u32) (other : t_u32)=> - t_u32 (BitAnd_f_bitand (u32_0 self) (u32_0 other)); + BitAnd_f_Output := t_u32; + BitAnd_f_bitand := fun (self : t_u32) (other : t_u32)=> + Build_t_u32 (BitAnd_f_bitand (u32_0 self) (u32_0 other)); }. Instance t_BitAnd_35845574 : t_BitAnd ((t_u64)) ((t_u64)) := { - BitAnd_impl_99_f_Output := t_u64; - BitAnd_impl_99_f_bitand := fun (self : t_u64) (other : t_u64)=> - t_u64 (BitAnd_f_bitand (u64_0 self) (u64_0 other)); + BitAnd_f_Output := t_u64; + BitAnd_f_bitand := fun (self : t_u64) (other : t_u64)=> + Build_t_u64 (BitAnd_f_bitand (u64_0 self) (u64_0 other)); }. Instance t_BitAnd_396424214 : t_BitAnd ((t_u128)) ((t_u128)) := { - BitAnd_impl_100_f_Output := t_u128; - BitAnd_impl_100_f_bitand := fun (self : t_u128) (other : t_u128)=> - t_u128 (BitAnd_f_bitand (u128_0 self) (u128_0 other)); + BitAnd_f_Output := t_u128; + BitAnd_f_bitand := fun (self : t_u128) (other : t_u128)=> + Build_t_u128 (BitAnd_f_bitand (u128_0 self) (u128_0 other)); }. Instance t_BitAnd_652458180 : t_BitAnd ((t_usize)) ((t_usize)) := { - BitAnd_impl_101_f_Output := t_usize; - BitAnd_impl_101_f_bitand := fun (self : t_usize) (other : t_usize)=> - t_usize (BitAnd_f_bitand (usize_0 self) (usize_0 other)); + BitAnd_f_Output := t_usize; + BitAnd_f_bitand := fun (self : t_usize) (other : t_usize)=> + Build_t_usize (BitAnd_f_bitand (usize_0 self) (usize_0 other)); }. Instance t_Sub_81344668 : t_Sub ((t_u8)) ((t_u8)) := { - Sub_impl_18_f_Output := t_u8; - Sub_impl_18_f_sub := fun (self : t_u8) (other : t_u8)=> - t_u8 (Sub_f_sub (u8_0 self) (u8_0 other)); + Sub_f_Output := t_u8; + Sub_f_sub := fun (self : t_u8) (other : t_u8)=> + Build_t_u8 (Sub_f_sub (u8_0 self) (u8_0 other)); }. Instance t_Sub_1011801854 : t_Sub ((t_u16)) ((t_u16)) := { - Sub_impl_19_f_Output := t_u16; - Sub_impl_19_f_sub := fun (self : t_u16) (other : t_u16)=> - t_u16 (Sub_f_sub (u16_0 self) (u16_0 other)); + Sub_f_Output := t_u16; + Sub_f_sub := fun (self : t_u16) (other : t_u16)=> + Build_t_u16 (Sub_f_sub (u16_0 self) (u16_0 other)); }. Instance t_Sub_1070652436 : t_Sub ((t_u32)) ((t_u32)) := { - Sub_impl_20_f_Output := t_u32; - Sub_impl_20_f_sub := fun (self : t_u32) (other : t_u32)=> - t_u32 (Sub_f_sub (u32_0 self) (u32_0 other)); + Sub_f_Output := t_u32; + Sub_f_sub := fun (self : t_u32) (other : t_u32)=> + Build_t_u32 (Sub_f_sub (u32_0 self) (u32_0 other)); }. Definition rotate_left_u128 (x : t_u128) (shift : t_u32) : t_u128 := let shift : t_u32 := Rem_f_rem (shift) (v_BITS136999051) in let left : t_u128 := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_u128 := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS136999051) (Clone_f_clone (shift))) in + let right : t_u128 := Shr_f_shr (t_Shr := _ : t_Shr _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS136999051) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_left_u16 (x : t_u16) (shift : t_u32) : t_u16 := let shift : t_u32 := Rem_f_rem (shift) (v_BITS277333551) in let left : t_u16 := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_u16 := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS277333551) (Clone_f_clone (shift))) in + let right : t_u16 := Shr_f_shr (t_Shr := _ : t_Shr _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS277333551) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_left_u32 (x : t_u32) (shift : t_u32) : t_u32 := let shift : t_u32 := Rem_f_rem (shift) (v_BITS473478051) in let left : t_u32 := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_u32 := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS473478051) (Clone_f_clone (shift))) in + let right : t_u32 := Shr_f_shr (t_Shr := _ : t_Shr _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS473478051) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_left_u64 (x : t_u64) (shift : t_u32) : t_u64 := let shift : t_u32 := Rem_f_rem (shift) (v_BITS177666292) in let left : t_u64 := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_u64 := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS177666292) (Clone_f_clone (shift))) in + let right : t_u64 := Shr_f_shr (t_Shr := _ : t_Shr _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS177666292) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_left_u8 (x : t_u8) (shift : t_u32) : t_u8 := let shift : t_u32 := Rem_f_rem (shift) (v_BITS690311813) in let left : t_u8 := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_u8 := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS690311813) (Clone_f_clone (shift))) in + let right : t_u8 := Shr_f_shr (t_Shr := _ : t_Shr _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS690311813) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_left_usize (x : t_usize) (shift : t_u32) : t_usize := let shift : t_u32 := Rem_f_rem (shift) (v_BITS229952196) in let left : t_usize := Shl_f_shl (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_usize := Shr_f_shr (Clone_f_clone (x)) (Sub_f_sub (v_BITS229952196) (Clone_f_clone (shift))) in + let right : t_usize := Shr_f_shr (t_Shr := _ : t_Shr _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS229952196) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_right_u128 (x : t_u128) (shift : t_u32) : t_u128 := let shift : t_u32 := Rem_f_rem (shift) (v_BITS136999051) in let left : t_u128 := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_u128 := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS136999051) (Clone_f_clone (shift))) in + let right : t_u128 := Shl_f_shl (t_Shl := _ : t_Shl _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS136999051) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_right_u16 (x : t_u16) (shift : t_u32) : t_u16 := let shift : t_u32 := Rem_f_rem (shift) (v_BITS277333551) in let left : t_u16 := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_u16 := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS277333551) (Clone_f_clone (shift))) in + let right : t_u16 := Shl_f_shl (t_Shl := _ : t_Shl _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS277333551) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_right_u32 (x : t_u32) (shift : t_u32) : t_u32 := let shift : t_u32 := Rem_f_rem (shift) (v_BITS473478051) in let left : t_u32 := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_u32 := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS473478051) (Clone_f_clone (shift))) in + let right : t_u32 := Shl_f_shl (t_Shl := _ : t_Shl _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS473478051) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_right_u64 (x : t_u64) (shift : t_u32) : t_u64 := let shift : t_u32 := Rem_f_rem (shift) (v_BITS177666292) in let left : t_u64 := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_u64 := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS177666292) (Clone_f_clone (shift))) in + let right : t_u64 := Shl_f_shl (t_Shl := _ : t_Shl _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS177666292) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_right_u8 (x : t_u8) (shift : t_u32) : t_u8 := let shift : t_u32 := Rem_f_rem (shift) (v_BITS690311813) in let left : t_u8 := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_u8 := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS690311813) (Clone_f_clone (shift))) in + let right : t_u8 := Shl_f_shl (t_Shl := _ : t_Shl _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS690311813) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). Definition rotate_right_usize (x : t_usize) (shift : t_u32) : t_usize := let shift : t_u32 := Rem_f_rem (shift) (v_BITS229952196) in let left : t_usize := Shr_f_shr (Clone_f_clone (x)) (Clone_f_clone (shift)) in - let right : t_usize := Shl_f_shl (Clone_f_clone (x)) (Sub_f_sub (v_BITS229952196) (Clone_f_clone (shift))) in + let right : t_usize := Shl_f_shl (t_Shl := _ : t_Shl _ t_u32) (Clone_f_clone (x)) (Sub_f_sub (v_BITS229952196) (Clone_f_clone (shift))) in BitOr_f_bitor (left) (right). -Definition rotate_left792925914 (self : t_u8) (n : t_u32) : t_u8 := - run (let hoist1 := ControlFlow_Break (rotate_left_u8 (self) (n)) in - ControlFlow_Continue (never_to_any (hoist1))). - -Definition rotate_right166090082 (self : t_u8) (n : t_u32) : t_u8 := - run (let hoist2 := ControlFlow_Break (rotate_right_u8 (self) (n)) in - ControlFlow_Continue (never_to_any (hoist2))). - -Definition rotate_left297034175 (self : t_u16) (n : t_u32) : t_u16 := - run (let hoist3 := ControlFlow_Break (rotate_left_u16 (self) (n)) in - ControlFlow_Continue (never_to_any (hoist3))). - -Definition rotate_right138522246 (self : t_u16) (n : t_u32) : t_u16 := - run (let hoist4 := ControlFlow_Break (rotate_right_u16 (self) (n)) in - ControlFlow_Continue (never_to_any (hoist4))). - -Definition rotate_left823573251 (self : t_u32) (n : t_u32) : t_u32 := - run (let hoist5 := ControlFlow_Break (rotate_left_u32 (self) (n)) in - ControlFlow_Continue (never_to_any (hoist5))). - -Definition rotate_right869195717 (self : t_u32) (n : t_u32) : t_u32 := - run (let hoist6 := ControlFlow_Break (rotate_right_u32 (self) (n)) in - ControlFlow_Continue (never_to_any (hoist6))). - -Definition rotate_left618936072 (self : t_u64) (n : t_u32) : t_u64 := - run (let hoist7 := ControlFlow_Break (rotate_left_u64 (self) (n)) in - ControlFlow_Continue (never_to_any (hoist7))). - -Definition rotate_right1041614027 (self : t_u64) (n : t_u32) : t_u64 := - run (let hoist8 := ControlFlow_Break (rotate_right_u64 (self) (n)) in - ControlFlow_Continue (never_to_any (hoist8))). - -Definition rotate_left1065866885 (self : t_u128) (n : t_u32) : t_u128 := - run (let hoist9 := ControlFlow_Break (rotate_left_u128 (self) (n)) in - ControlFlow_Continue (never_to_any (hoist9))). - -Definition rotate_right591112338 (self : t_u128) (n : t_u32) : t_u128 := - run (let hoist10 := ControlFlow_Break (rotate_right_u128 (self) (n)) in - ControlFlow_Continue (never_to_any (hoist10))). - -Definition rotate_left996672710 (self : t_usize) (n : t_u32) : t_usize := - run (let hoist11 := ControlFlow_Break (rotate_left_usize (self) (n)) in - ControlFlow_Continue (never_to_any (hoist11))). - -Definition rotate_right442734174 (self : t_usize) (n : t_u32) : t_usize := - run (let hoist12 := ControlFlow_Break (rotate_right_usize (self) (n)) in - ControlFlow_Continue (never_to_any (hoist12))). +Program Definition rotate_left792925914 (self : t_u8) (n : t_u32) : t_u8 := + run (letb hoist1 := ControlFlow_Break (rotate_left_u8 (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist1 *)))). +Fail Next Obligation. + +Program Definition rotate_right166090082 (self : t_u8) (n : t_u32) : t_u8 := + run (letb hoist2 := ControlFlow_Break (rotate_right_u8 (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist2 *)))). +Fail Next Obligation. + +Program Definition rotate_left297034175 (self : t_u16) (n : t_u32) : t_u16 := + run (letb hoist3 := ControlFlow_Break (rotate_left_u16 (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist3 *)))). +Fail Next Obligation. + +Program Definition rotate_right138522246 (self : t_u16) (n : t_u32) : t_u16 := + run (letb hoist4 := ControlFlow_Break (rotate_right_u16 (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist4 *)))). +Fail Next Obligation. + +Program Definition rotate_left823573251 (self : t_u32) (n : t_u32) : t_u32 := + run (letb hoist5 := ControlFlow_Break (rotate_left_u32 (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist5 *)))). +Fail Next Obligation. + +Program Definition rotate_right869195717 (self : t_u32) (n : t_u32) : t_u32 := + run (letb hoist6 := ControlFlow_Break (rotate_right_u32 (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist6 *)))). +Fail Next Obligation. + +Program Definition rotate_left618936072 (self : t_u64) (n : t_u32) : t_u64 := + run (letb hoist7 := ControlFlow_Break (rotate_left_u64 (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist7 *)))). +Fail Next Obligation. + +Program Definition rotate_right1041614027 (self : t_u64) (n : t_u32) : t_u64 := + run (letb hoist8 := ControlFlow_Break (rotate_right_u64 (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist8 *)))). +Fail Next Obligation. + +Program Definition rotate_left1065866885 (self : t_u128) (n : t_u32) : t_u128 := + run (letb hoist9 := ControlFlow_Break (rotate_left_u128 (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist9 *)))). +Fail Next Obligation. + +Program Definition rotate_right591112338 (self : t_u128) (n : t_u32) : t_u128 := + run (letb hoist10 := ControlFlow_Break (rotate_right_u128 (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist10 *)))). +Fail Next Obligation. + +Program Definition rotate_left996672710 (self : t_usize) (n : t_u32) : t_usize := + run (letb hoist11 := ControlFlow_Break (rotate_left_usize (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist11 *)))). +Fail Next Obligation. + +Program Definition rotate_right442734174 (self : t_usize) (n : t_u32) : t_usize := + run (letb hoist12 := ControlFlow_Break (rotate_right_usize (self) (n)) in + ControlFlow_Continue (never_to_any (_ (* hoist12 *)))). +Fail Next Obligation. Instance t_Sub_788323603 : t_Sub ((t_u64)) ((t_u64)) := { - Sub_impl_21_f_Output := t_u64; - Sub_impl_21_f_sub := fun (self : t_u64) (other : t_u64)=> - t_u64 (Sub_f_sub (u64_0 self) (u64_0 other)); + Sub_f_Output := t_u64; + Sub_f_sub := fun (self : t_u64) (other : t_u64)=> + Build_t_u64 (Sub_f_sub (u64_0 self) (u64_0 other)); }. Instance t_Sub_1046324685 : t_Sub ((t_u128)) ((t_u128)) := { - Sub_impl_22_f_Output := t_u128; - Sub_impl_22_f_sub := fun (self : t_u128) (other : t_u128)=> - t_u128 (Sub_f_sub (u128_0 self) (u128_0 other)); + Sub_f_Output := t_u128; + Sub_f_sub := fun (self : t_u128) (other : t_u128)=> + Build_t_u128 (Sub_f_sub (u128_0 self) (u128_0 other)); }. Instance t_Sub_1064369889 : t_Sub ((t_usize)) ((t_usize)) := { - Sub_impl_23_f_Output := t_usize; - Sub_impl_23_f_sub := fun (self : t_usize) (other : t_usize)=> - t_usize (Sub_f_sub (usize_0 self) (usize_0 other)); - }. - -Definition bswap_u128 (x : t_u128) : t_u128 := - let count : t_u128 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS136999051)) (fun count _ => - true) (count) (fun count i => - let low_bit : t_u128 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in - count) in - count. - -Definition bswap_u16 (x : t_u16) : t_u16 := - let count : t_u16 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS277333551)) (fun count _ => - true) (count) (fun count i => - let low_bit : t_u16 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in - count) in - count. - -Definition bswap_u32 (x : t_u32) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS473478051)) (fun count _ => - true) (count) (fun count i => - let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in - count) in - count. - -Definition bswap_u64 (x : t_u64) : t_u64 := - let count : t_u64 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS177666292)) (fun count _ => - true) (count) (fun count i => - let low_bit : t_u64 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in - count) in - count. - -Definition bswap_u8 (x : t_u8) : t_u8 := - let count : t_u8 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS690311813)) (fun count _ => - true) (count) (fun count i => - let low_bit : t_u8 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in - count) in - count. - -Definition bswap_usize (x : t_usize) : t_usize := - let count : t_usize := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS229952196)) (fun count _ => - true) (count) (fun count i => - let low_bit : t_usize := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in - count) in - count. - -Definition ctlz_u128 (x : t_u128) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS136999051)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS136999051) (Into_f_into (1))))) in - if - orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition ctlz_u16 (x : t_u16) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS277333551)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS277333551) (Into_f_into (1))))) in - if - orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition ctlz_u32 (x : t_u32) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS473478051)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS473478051) (Into_f_into (1))))) in - if - orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition ctlz_u64 (x : t_u64) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS177666292)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS177666292) (Into_f_into (1))))) in - if - orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition ctlz_u8 (x : t_u8) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS690311813)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS690311813) (Into_f_into (1))))) in - if - orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition ctlz_usize (x : t_usize) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS229952196)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS229952196) (Into_f_into (1))))) in - if - orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition ctpop_u128 (x : t_u128) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS136999051)) (fun count _ => - true) (count) (fun count i => - Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in - count. - -Definition ctpop_u16 (x : t_u16) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS277333551)) (fun count _ => - true) (count) (fun count i => - Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in - count. - -Definition ctpop_u32 (x : t_u32) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS473478051)) (fun count _ => - true) (count) (fun count i => - Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in - count. - -Definition ctpop_u64 (x : t_u64) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS177666292)) (fun count _ => - true) (count) (fun count i => - Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in - count. - -Definition ctpop_u8 (x : t_u8) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS690311813)) (fun count _ => - true) (count) (fun count i => - Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in - count. - -Definition ctpop_usize (x : t_usize) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let count := fold_range (0) (Into_f_into (v_BITS229952196)) (fun count _ => - true) (count) (fun count i => - Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in - count. - -Definition cttz_u128 (x : t_u128) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS136999051)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - if - orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition cttz_u16 (x : t_u16) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS277333551)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - if - orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition cttz_u32 (x : t_u32) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS473478051)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - if - orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition cttz_u64 (x : t_u64) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS177666292)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - if - orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition cttz_u8 (x : t_u8) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS690311813)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - if - orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition cttz_usize (x : t_usize) : t_u32 := - let count : t_u32 := Into_f_into (0) in - let done := false in - let (count,done) := fold_range (0) (Into_f_into (v_BITS229952196)) (fun (count,done) _ => - true) ((count,done)) (fun (count,done) i => - let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in - if - orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) - then - let done := true in - (count,done) - else - let count := Add_f_add (count) (Into_f_into (1)) in - (count,done)) in - count. - -Definition count_ones202509899 (self : t_u8) : t_u32 := - run (let hoist13 := ControlFlow_Break (ctpop_u8 (self)) in - ControlFlow_Continue (never_to_any (hoist13))). - -Definition leading_zeros75047366 (self : t_u8) : t_u32 := - run (let hoist14 := ControlFlow_Break (ctlz_u8 (self)) in - ControlFlow_Continue (never_to_any (hoist14))). + Sub_f_Output := t_usize; + Sub_f_sub := fun (self : t_usize) (other : t_usize)=> + Build_t_usize (Sub_f_sub (usize_0 self) (usize_0 other)); + }. + +(* Definition bswap_u128 (x : t_u128) : t_u128 := *) +(* let count : t_u128 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS136999051)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* let low_bit : t_u128 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in *) +(* count) in *) +(* count. *) + +(* Definition bswap_u16 (x : t_u16) : t_u16 := *) +(* let count : t_u16 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS277333551)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* let low_bit : t_u16 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in *) +(* count) in *) +(* count. *) + +(* Definition bswap_u32 (x : t_u32) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS473478051)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in *) +(* count) in *) +(* count. *) + +(* Definition bswap_u64 (x : t_u64) : t_u64 := *) +(* let count : t_u64 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS177666292)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* let low_bit : t_u64 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in *) +(* count) in *) +(* count. *) + +(* Definition bswap_u8 (x : t_u8) : t_u8 := *) +(* let count : t_u8 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS690311813)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* let low_bit : t_u8 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in *) +(* count) in *) +(* count. *) + +(* Definition bswap_usize (x : t_usize) : t_usize := *) +(* let count : t_usize := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS229952196)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* let low_bit : t_usize := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in *) +(* count) in *) +(* count. *) + +(* Definition ctlz_u128 (x : t_u128) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS136999051)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS136999051) (Into_f_into (1))))) in *) +(* if *) +(* orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition ctlz_u16 (x : t_u16) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS277333551)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS277333551) (Into_f_into (1))))) in *) +(* if *) +(* orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition ctlz_u32 (x : t_u32) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS473478051)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS473478051) (Into_f_into (1))))) in *) +(* if *) +(* orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition ctlz_u64 (x : t_u64) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS177666292)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS177666292) (Into_f_into (1))))) in *) +(* if *) +(* orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition ctlz_u8 (x : t_u8) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS690311813)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS690311813) (Into_f_into (1))))) in *) +(* if *) +(* orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition ctlz_usize (x : t_usize) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS229952196)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let high_bit : t_u32 := Into_f_into (Shr_f_shr (Shl_f_shl (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (Sub_f_sub (v_BITS229952196) (Into_f_into (1))))) in *) +(* if *) +(* orb (PartialEq_f_eq (high_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition ctpop_u128 (x : t_u128) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS136999051)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in *) +(* count. *) + +(* Definition ctpop_u16 (x : t_u16) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS277333551)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in *) +(* count. *) + +(* Definition ctpop_u32 (x : t_u32) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS473478051)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in *) +(* count. *) + +(* Definition ctpop_u64 (x : t_u64) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS177666292)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in *) +(* count. *) + +(* Definition ctpop_u8 (x : t_u8) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS690311813)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in *) +(* count. *) + +(* Definition ctpop_usize (x : t_usize) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let count := fold_range (0) (Into_f_into (v_BITS229952196)) (fun count _ => *) +(* true) (count) (fun count i => *) +(* Add_f_add (count) (Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))))) in *) +(* count. *) + +(* Definition cttz_u128 (x : t_u128) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS136999051)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* if *) +(* orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition cttz_u16 (x : t_u16) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS277333551)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* if *) +(* orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition cttz_u32 (x : t_u32) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS473478051)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* if *) +(* orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition cttz_u64 (x : t_u64) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS177666292)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* if *) +(* orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition cttz_u8 (x : t_u8) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS690311813)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* if *) +(* orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition cttz_usize (x : t_usize) : t_u32 := *) +(* let count : t_u32 := Into_f_into (0) in *) +(* let done := false in *) +(* let (count,done) := fold_range (0) (Into_f_into (v_BITS229952196)) (fun (count,done) _ => *) +(* true) ((count,done)) (fun (count,done) i => *) +(* let low_bit : t_u32 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) +(* if *) +(* orb (PartialEq_f_eq (low_bit) (Into_f_into (1))) (done) *) +(* then *) +(* let done := true in *) +(* (count,done) *) +(* else *) +(* let count := Add_f_add (count) (Into_f_into (1)) in *) +(* (count,done)) in *) +(* count. *) + +(* Definition count_ones202509899 (self : t_u8) : t_u32 := *) +(* run (let hoist13 := ControlFlow_Break (ctpop_u8 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist13))). *) + +(* Definition leading_zeros75047366 (self : t_u8) : t_u32 := *) +(* run (let hoist14 := ControlFlow_Break (ctlz_u8 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist14))). *) + +(* Definition swap_bytes657156997 (self : t_u8) : t_u8 := *) +(* Into_f_into (bswap_u8 (self)). *) + +(* Definition from_be746282521 (x : t_u8) : t_u8 := *) +(* swap_bytes657156997 (x). *) + +(* Definition to_be972448780 (self : t_u8) : t_u8 := *) +(* swap_bytes657156997 (self). *) + +(* Definition trailing_zeros572929871 (self : t_u8) : t_u32 := *) +(* run (let hoist15 := ControlFlow_Break (cttz_u8 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist15))). *) + +(* Definition count_ones91875752 (self : t_u16) : t_u32 := *) +(* run (let hoist16 := ControlFlow_Break (ctpop_u16 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist16))). *) + +(* Definition leading_zeros462412478 (self : t_u16) : t_u32 := *) +(* run (let hoist17 := ControlFlow_Break (ctlz_u16 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist17))). *) + +(* Definition swap_bytes926722059 (self : t_u16) : t_u16 := *) +(* Into_f_into (bswap_u16 (self)). *) + +(* Definition from_be510959665 (x : t_u16) : t_u16 := *) +(* swap_bytes926722059 (x). *) + +(* Definition to_be551590602 (self : t_u16) : t_u16 := *) +(* swap_bytes926722059 (self). *) + +(* Definition trailing_zeros421474733 (self : t_u16) : t_u32 := *) +(* run (let hoist18 := ControlFlow_Break (cttz_u16 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist18))). *) + +(* Definition count_ones776185738 (self : t_u32) : t_u32 := *) +(* run (let hoist19 := ControlFlow_Break (ctpop_u32 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist19))). *) + +(* Definition leading_zeros698221972 (self : t_u32) : t_u32 := *) +(* run (let hoist20 := ControlFlow_Break (ctlz_u32 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist20))). *) + +(* Definition swap_bytes320480126 (self : t_u32) : t_u32 := *) +(* Into_f_into (bswap_u32 (self)). *) + +(* Definition from_be664756649 (x : t_u32) : t_u32 := *) +(* swap_bytes320480126 (x). *) + +(* Definition to_be82825962 (self : t_u32) : t_u32 := *) +(* swap_bytes320480126 (self). *) + +(* Definition trailing_zeros1061560720 (self : t_u32) : t_u32 := *) +(* run (let hoist21 := ControlFlow_Break (cttz_u32 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist21))). *) + +(* Definition count_ones235885653 (self : t_u64) : t_u32 := *) +(* run (let hoist22 := ControlFlow_Break (ctpop_u64 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist22))). *) + +(* Definition leading_zeros338302110 (self : t_u64) : t_u32 := *) +(* run (let hoist23 := ControlFlow_Break (ctlz_u64 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist23))). *) + +(* Definition swap_bytes722254271 (self : t_u64) : t_u64 := *) +(* Into_f_into (bswap_u64 (self)). *) -Definition swap_bytes657156997 (self : t_u8) : t_u8 := - Into_f_into (bswap_u8 (self)). +(* Definition from_be16013635 (x : t_u64) : t_u64 := *) +(* swap_bytes722254271 (x). *) -Definition from_be746282521 (x : t_u8) : t_u8 := - swap_bytes657156997 (x). +(* Definition to_be376714729 (self : t_u64) : t_u64 := *) +(* swap_bytes722254271 (self). *) -Definition to_be972448780 (self : t_u8) : t_u8 := - swap_bytes657156997 (self). +(* Definition trailing_zeros188346231 (self : t_u64) : t_u32 := *) +(* run (let hoist24 := ControlFlow_Break (cttz_u64 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist24))). *) -Definition trailing_zeros572929871 (self : t_u8) : t_u32 := - run (let hoist15 := ControlFlow_Break (cttz_u8 (self)) in - ControlFlow_Continue (never_to_any (hoist15))). +(* Definition count_ones926736261 (self : t_u128) : t_u32 := *) +(* run (let hoist25 := ControlFlow_Break (ctpop_u128 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist25))). *) -Definition count_ones91875752 (self : t_u16) : t_u32 := - run (let hoist16 := ControlFlow_Break (ctpop_u16 (self)) in - ControlFlow_Continue (never_to_any (hoist16))). +(* Definition leading_zeros19644612 (self : t_u128) : t_u32 := *) +(* run (let hoist26 := ControlFlow_Break (ctlz_u128 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist26))). *) -Definition leading_zeros462412478 (self : t_u16) : t_u32 := - run (let hoist17 := ControlFlow_Break (ctlz_u16 (self)) in - ControlFlow_Continue (never_to_any (hoist17))). +(* Definition swap_bytes420879368 (self : t_u128) : t_u128 := *) +(* Into_f_into (bswap_u128 (self)). *) -Definition swap_bytes926722059 (self : t_u16) : t_u16 := - Into_f_into (bswap_u16 (self)). +(* Definition from_be191085771 (x : t_u128) : t_u128 := *) +(* swap_bytes420879368 (x). *) -Definition from_be510959665 (x : t_u16) : t_u16 := - swap_bytes926722059 (x). +(* Definition to_be555075987 (self : t_u128) : t_u128 := *) +(* swap_bytes420879368 (self). *) -Definition to_be551590602 (self : t_u16) : t_u16 := - swap_bytes926722059 (self). +(* Definition trailing_zeros821715250 (self : t_u128) : t_u32 := *) +(* run (let hoist27 := ControlFlow_Break (cttz_u128 (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist27))). *) -Definition trailing_zeros421474733 (self : t_u16) : t_u32 := - run (let hoist18 := ControlFlow_Break (cttz_u16 (self)) in - ControlFlow_Continue (never_to_any (hoist18))). +(* Definition count_ones441645762 (self : t_usize) : t_u32 := *) +(* run (let hoist28 := ControlFlow_Break (ctpop_usize (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist28))). *) -Definition count_ones776185738 (self : t_u32) : t_u32 := - run (let hoist19 := ControlFlow_Break (ctpop_u32 (self)) in - ControlFlow_Continue (never_to_any (hoist19))). +(* Definition leading_zeros905233489 (self : t_usize) : t_u32 := *) +(* run (let hoist29 := ControlFlow_Break (ctlz_usize (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist29))). *) -Definition leading_zeros698221972 (self : t_u32) : t_u32 := - run (let hoist20 := ControlFlow_Break (ctlz_u32 (self)) in - ControlFlow_Continue (never_to_any (hoist20))). +(* Definition swap_bytes268673424 (self : t_usize) : t_usize := *) +(* Into_f_into (bswap_usize (self)). *) -Definition swap_bytes320480126 (self : t_u32) : t_u32 := - Into_f_into (bswap_u32 (self)). +(* Definition from_be607978059 (x : t_usize) : t_usize := *) +(* swap_bytes268673424 (x). *) -Definition from_be664756649 (x : t_u32) : t_u32 := - swap_bytes320480126 (x). +(* Definition to_be561847134 (self : t_usize) : t_usize := *) +(* swap_bytes268673424 (self). *) -Definition to_be82825962 (self : t_u32) : t_u32 := - swap_bytes320480126 (self). - -Definition trailing_zeros1061560720 (self : t_u32) : t_u32 := - run (let hoist21 := ControlFlow_Break (cttz_u32 (self)) in - ControlFlow_Continue (never_to_any (hoist21))). - -Definition count_ones235885653 (self : t_u64) : t_u32 := - run (let hoist22 := ControlFlow_Break (ctpop_u64 (self)) in - ControlFlow_Continue (never_to_any (hoist22))). - -Definition leading_zeros338302110 (self : t_u64) : t_u32 := - run (let hoist23 := ControlFlow_Break (ctlz_u64 (self)) in - ControlFlow_Continue (never_to_any (hoist23))). - -Definition swap_bytes722254271 (self : t_u64) : t_u64 := - Into_f_into (bswap_u64 (self)). - -Definition from_be16013635 (x : t_u64) : t_u64 := - swap_bytes722254271 (x). - -Definition to_be376714729 (self : t_u64) : t_u64 := - swap_bytes722254271 (self). - -Definition trailing_zeros188346231 (self : t_u64) : t_u32 := - run (let hoist24 := ControlFlow_Break (cttz_u64 (self)) in - ControlFlow_Continue (never_to_any (hoist24))). - -Definition count_ones926736261 (self : t_u128) : t_u32 := - run (let hoist25 := ControlFlow_Break (ctpop_u128 (self)) in - ControlFlow_Continue (never_to_any (hoist25))). - -Definition leading_zeros19644612 (self : t_u128) : t_u32 := - run (let hoist26 := ControlFlow_Break (ctlz_u128 (self)) in - ControlFlow_Continue (never_to_any (hoist26))). - -Definition swap_bytes420879368 (self : t_u128) : t_u128 := - Into_f_into (bswap_u128 (self)). - -Definition from_be191085771 (x : t_u128) : t_u128 := - swap_bytes420879368 (x). - -Definition to_be555075987 (self : t_u128) : t_u128 := - swap_bytes420879368 (self). - -Definition trailing_zeros821715250 (self : t_u128) : t_u32 := - run (let hoist27 := ControlFlow_Break (cttz_u128 (self)) in - ControlFlow_Continue (never_to_any (hoist27))). - -Definition count_ones441645762 (self : t_usize) : t_u32 := - run (let hoist28 := ControlFlow_Break (ctpop_usize (self)) in - ControlFlow_Continue (never_to_any (hoist28))). - -Definition leading_zeros905233489 (self : t_usize) : t_u32 := - run (let hoist29 := ControlFlow_Break (ctlz_usize (self)) in - ControlFlow_Continue (never_to_any (hoist29))). - -Definition swap_bytes268673424 (self : t_usize) : t_usize := - Into_f_into (bswap_usize (self)). - -Definition from_be607978059 (x : t_usize) : t_usize := - swap_bytes268673424 (x). - -Definition to_be561847134 (self : t_usize) : t_usize := - swap_bytes268673424 (self). - -Definition trailing_zeros42066260 (self : t_usize) : t_u32 := - run (let hoist30 := ControlFlow_Break (cttz_usize (self)) in - ControlFlow_Continue (never_to_any (hoist30))). +(* Definition trailing_zeros42066260 (self : t_usize) : t_u32 := *) +(* run (let hoist30 := ControlFlow_Break (cttz_usize (self)) in *) +(* ControlFlow_Continue (never_to_any (hoist30))). *) Instance t_Div_345870802 : t_Div ((t_i8)) ((t_i8)) := { - Div_impl_48_f_Output := t_i8; - Div_impl_48_f_div := fun (self : t_i8) (other : t_i8)=> - t_i8 (Div_f_div (i8_0 self) (i8_0 other)); + Div_f_Output := t_i8; + Div_f_div := fun (self : t_i8) (other : t_i8)=> + Build_t_i8 (Div_f_div (i8_0 self) (i8_0 other)); }. Instance t_Div_69196905 : t_Div ((t_i16)) ((t_i16)) := { - Div_impl_49_f_Output := t_i16; - Div_impl_49_f_div := fun (self : t_i16) (other : t_i16)=> - t_i16 (Div_f_div (i16_0 self) (i16_0 other)); + Div_f_Output := t_i16; + Div_f_div := fun (self : t_i16) (other : t_i16)=> + Build_t_i16 (Div_f_div (i16_0 self) (i16_0 other)); }. Instance t_Div_222178666 : t_Div ((t_i32)) ((t_i32)) := { - Div_impl_50_f_Output := t_i32; - Div_impl_50_f_div := fun (self : t_i32) (other : t_i32)=> - t_i32 (Div_f_div (i32_0 self) (i32_0 other)); + Div_f_Output := t_i32; + Div_f_div := fun (self : t_i32) (other : t_i32)=> + Build_t_i32 (Div_f_div (i32_0 self) (i32_0 other)); }. Instance t_Div_551701934 : t_Div ((t_i64)) ((t_i64)) := { - Div_impl_51_f_Output := t_i64; - Div_impl_51_f_div := fun (self : t_i64) (other : t_i64)=> - t_i64 (Div_f_div (i64_0 self) (i64_0 other)); + Div_f_Output := t_i64; + Div_f_div := fun (self : t_i64) (other : t_i64)=> + Build_t_i64 (Div_f_div (i64_0 self) (i64_0 other)); }. Instance t_Div_650346214 : t_Div ((t_i128)) ((t_i128)) := { - Div_impl_52_f_Output := t_i128; - Div_impl_52_f_div := fun (self : t_i128) (other : t_i128)=> - t_i128 (Div_f_div (i128_0 self) (i128_0 other)); + Div_f_Output := t_i128; + Div_f_div := fun (self : t_i128) (other : t_i128)=> + Build_t_i128 (Div_f_div (i128_0 self) (i128_0 other)); }. Instance t_Div_911978922 : t_Div ((t_isize)) ((t_isize)) := { - Div_impl_53_f_Output := t_isize; - Div_impl_53_f_div := fun (self : t_isize) (other : t_isize)=> - t_isize (Div_f_div (isize_0 self) (isize_0 other)); + Div_f_Output := t_isize; + Div_f_div := fun (self : t_isize) (other : t_isize)=> + Build_t_isize (Div_f_div (isize_0 self) (isize_0 other)); }. Instance t_Rem_580678374 : t_Rem ((t_i8)) ((t_i8)) := { - Rem_impl_60_f_Output := t_i8; - Rem_impl_60_f_rem := fun (self : t_i8) (other : t_i8)=> - t_i8 (Rem_f_rem (i8_0 self) (i8_0 other)); + Rem_f_Output := t_i8; + Rem_f_rem := fun (self : t_i8) (other : t_i8)=> + Build_t_i8 (Rem_f_rem (i8_0 self) (i8_0 other)); }. Definition rem_euclid622298453 (self : t_i8) (rhs : t_i8) : t_i8 := @@ -4404,9 +3836,9 @@ Definition rem_euclid622298453 (self : t_i8) (rhs : t_i8) : t_i8 := Instance t_Rem_532407972 : t_Rem ((t_i16)) ((t_i16)) := { - Rem_impl_61_f_Output := t_i16; - Rem_impl_61_f_rem := fun (self : t_i16) (other : t_i16)=> - t_i16 (Rem_f_rem (i16_0 self) (i16_0 other)); + Rem_f_Output := t_i16; + Rem_f_rem := fun (self : t_i16) (other : t_i16)=> + Build_t_i16 (Rem_f_rem (i16_0 self) (i16_0 other)); }. Definition rem_euclid158017644 (self : t_i16) (rhs : t_i16) : t_i16 := @@ -4420,9 +3852,9 @@ Definition rem_euclid158017644 (self : t_i16) (rhs : t_i16) : t_i16 := Instance t_Rem_406274620 : t_Rem ((t_i32)) ((t_i32)) := { - Rem_impl_62_f_Output := t_i32; - Rem_impl_62_f_rem := fun (self : t_i32) (other : t_i32)=> - t_i32 (Rem_f_rem (i32_0 self) (i32_0 other)); + Rem_f_Output := t_i32; + Rem_f_rem := fun (self : t_i32) (other : t_i32)=> + Build_t_i32 (Rem_f_rem (i32_0 self) (i32_0 other)); }. Definition rem_euclid881249982 (self : t_i32) (rhs : t_i32) : t_i32 := @@ -4436,9 +3868,9 @@ Definition rem_euclid881249982 (self : t_i32) (rhs : t_i32) : t_i32 := Instance t_Rem_296096507 : t_Rem ((t_i64)) ((t_i64)) := { - Rem_impl_63_f_Output := t_i64; - Rem_impl_63_f_rem := fun (self : t_i64) (other : t_i64)=> - t_i64 (Rem_f_rem (i64_0 self) (i64_0 other)); + Rem_f_Output := t_i64; + Rem_f_rem := fun (self : t_i64) (other : t_i64)=> + Build_t_i64 (Rem_f_rem (i64_0 self) (i64_0 other)); }. Definition rem_euclid1057082210 (self : t_i64) (rhs : t_i64) : t_i64 := @@ -4452,9 +3884,9 @@ Definition rem_euclid1057082210 (self : t_i64) (rhs : t_i64) : t_i64 := Instance t_Rem_773614977 : t_Rem ((t_i128)) ((t_i128)) := { - Rem_impl_64_f_Output := t_i128; - Rem_impl_64_f_rem := fun (self : t_i128) (other : t_i128)=> - t_i128 (Rem_f_rem (i128_0 self) (i128_0 other)); + Rem_f_Output := t_i128; + Rem_f_rem := fun (self : t_i128) (other : t_i128)=> + Build_t_i128 (Rem_f_rem (i128_0 self) (i128_0 other)); }. Definition rem_euclid254910751 (self : t_i128) (rhs : t_i128) : t_i128 := @@ -4468,9 +3900,9 @@ Definition rem_euclid254910751 (self : t_i128) (rhs : t_i128) : t_i128 := Instance t_Rem_136872616 : t_Rem ((t_isize)) ((t_isize)) := { - Rem_impl_65_f_Output := t_isize; - Rem_impl_65_f_rem := fun (self : t_isize) (other : t_isize)=> - t_isize (Rem_f_rem (isize_0 self) (isize_0 other)); + Rem_f_Output := t_isize; + Rem_f_rem := fun (self : t_isize) (other : t_isize)=> + Build_t_isize (Rem_f_rem (isize_0 self) (isize_0 other)); }. Definition rem_euclid828379367 (self : t_isize) (rhs : t_isize) : t_isize := @@ -4484,96 +3916,636 @@ Definition rem_euclid828379367 (self : t_isize) (rhs : t_isize) : t_isize := Instance t_Not_500984294 : t_Not ((t_u8)) := { - Not_impl_f_Output := t_u8; - Not_impl_f_not := fun (self : t_u8)=> - t_u8 (Not_f_not (u8_0 self)); + Not_f_Output := t_u8; + Not_f_not := fun (self : t_u8)=> + Build_t_u8 (Not_f_not (u8_0 self)); }. -Definition count_zeros558337492 (self : t_u8) : t_u32 := - count_ones202509899 (Not_f_not (self)). +(* Definition count_zeros558337492 (self : t_u8) : t_u32 := *) +(* count_ones202509899 (Not_f_not (self)). *) -Definition leading_ones55148479 (self : t_u8) : t_u32 := - leading_zeros75047366 (Not_f_not (self)). +(* Definition leading_ones55148479 (self : t_u8) : t_u32 := *) +(* leading_zeros75047366 (Not_f_not (self)). *) -Definition trailing_ones359778731 (self : t_u8) : t_u32 := - trailing_zeros572929871 (Not_f_not (self)). +(* Definition trailing_ones359778731 (self : t_u8) : t_u32 := *) +(* trailing_zeros572929871 (Not_f_not (self)). *) Instance t_Not_560691647 : t_Not ((t_u16)) := { - Not_impl_1_f_Output := t_u16; - Not_impl_1_f_not := fun (self : t_u16)=> - t_u16 (Not_f_not (u16_0 self)); + Not_f_Output := t_u16; + Not_f_not := fun (self : t_u16)=> + Build_t_u16 (Not_f_not (u16_0 self)); }. -Definition count_zeros199825317 (self : t_u16) : t_u32 := - count_ones91875752 (Not_f_not (self)). +(* Definition count_zeros199825317 (self : t_u16) : t_u32 := *) +(* count_ones91875752 (Not_f_not (self)). *) -Definition leading_ones164277656 (self : t_u16) : t_u32 := - leading_zeros462412478 (Not_f_not (self)). +(* Definition leading_ones164277656 (self : t_u16) : t_u32 := *) +(* leading_zeros462412478 (Not_f_not (self)). *) -Definition trailing_ones903944727 (self : t_u16) : t_u32 := - trailing_zeros421474733 (Not_f_not (self)). +(* Definition trailing_ones903944727 (self : t_u16) : t_u32 := *) +(* trailing_zeros421474733 (Not_f_not (self)). *) Instance t_Not_220208504 : t_Not ((t_u32)) := { - Not_impl_2_f_Output := t_u32; - Not_impl_2_f_not := fun (self : t_u32)=> - t_u32 (Not_f_not (u32_0 self)); + Not_f_Output := t_u32; + Not_f_not := fun (self : t_u32)=> + Build_t_u32 (Not_f_not (u32_0 self)); }. -Definition count_zeros942566041 (self : t_u32) : t_u32 := - count_ones776185738 (Not_f_not (self)). +(* Definition count_zeros942566041 (self : t_u32) : t_u32 := *) +(* count_ones776185738 (Not_f_not (self)). *) -Definition leading_ones766486760 (self : t_u32) : t_u32 := - leading_zeros698221972 (Not_f_not (self)). +(* Definition leading_ones766486760 (self : t_u32) : t_u32 := *) +(* leading_zeros698221972 (Not_f_not (self)). *) -Definition trailing_ones223371510 (self : t_u32) : t_u32 := - trailing_zeros1061560720 (Not_f_not (self)). +(* Definition trailing_ones223371510 (self : t_u32) : t_u32 := *) +(* trailing_zeros1061560720 (Not_f_not (self)). *) Instance t_Not_655044209 : t_Not ((t_u64)) := { - Not_impl_3_f_Output := t_u64; - Not_impl_3_f_not := fun (self : t_u64)=> - t_u64 (Not_f_not (u64_0 self)); + Not_f_Output := t_u64; + Not_f_not := fun (self : t_u64)=> + Build_t_u64 (Not_f_not (u64_0 self)); }. -Definition count_zeros60346158 (self : t_u64) : t_u32 := - count_ones235885653 (Not_f_not (self)). +(* Definition count_zeros60346158 (self : t_u64) : t_u32 := *) +(* count_ones235885653 (Not_f_not (self)). *) -Definition leading_ones404666910 (self : t_u64) : t_u32 := - leading_zeros338302110 (Not_f_not (self)). +(* Definition leading_ones404666910 (self : t_u64) : t_u32 := *) +(* leading_zeros338302110 (Not_f_not (self)). *) -Definition trailing_ones601201120 (self : t_u64) : t_u32 := - trailing_zeros188346231 (Not_f_not (self)). +(* Definition trailing_ones601201120 (self : t_u64) : t_u32 := *) +(* trailing_zeros188346231 (Not_f_not (self)). *) Instance t_Not_851738617 : t_Not ((t_u128)) := { - Not_impl_4_f_Output := t_u128; - Not_impl_4_f_not := fun (self : t_u128)=> - t_u128 (Not_f_not (u128_0 self)); + Not_f_Output := t_u128; + Not_f_not := fun (self : t_u128)=> + Build_t_u128 (Not_f_not (u128_0 self)); }. -Definition count_zeros824862815 (self : t_u128) : t_u32 := - count_ones926736261 (Not_f_not (self)). +(* Definition count_zeros824862815 (self : t_u128) : t_u32 := *) +(* count_ones926736261 (Not_f_not (self)). *) -Definition leading_ones475503572 (self : t_u128) : t_u32 := - leading_zeros19644612 (Not_f_not (self)). +(* Definition leading_ones475503572 (self : t_u128) : t_u32 := *) +(* leading_zeros19644612 (Not_f_not (self)). *) -Definition trailing_ones705845381 (self : t_u128) : t_u32 := - trailing_zeros821715250 (Not_f_not (self)). +(* Definition trailing_ones705845381 (self : t_u128) : t_u32 := *) +(* trailing_zeros821715250 (Not_f_not (self)). *) Instance t_Not_677551814 : t_Not ((t_usize)) := { - Not_impl_5_f_Output := t_usize; - Not_impl_5_f_not := fun (self : t_usize)=> - t_usize (Not_f_not (usize_0 self)); + Not_f_Output := t_usize; + Not_f_not := fun (self : t_usize)=> + Build_t_usize (Not_f_not (usize_0 self)); }. -Definition count_zeros73479642 (self : t_usize) : t_u32 := - count_ones441645762 (Not_f_not (self)). +(* Definition count_zeros73479642 (self : t_usize) : t_u32 := *) +(* count_ones441645762 (Not_f_not (self)). *) + +(* Definition leading_ones667660708 (self : t_usize) : t_u32 := *) +(* leading_zeros905233489 (Not_f_not (self)). *) -Definition leading_ones667660708 (self : t_usize) : t_u32 := - leading_zeros905233489 (Not_f_not (self)). +(* Definition trailing_ones979548463 (self : t_usize) : t_u32 := *) +(* trailing_zeros42066260 (Not_f_not (self)). *) -Definition trailing_ones979548463 (self : t_usize) : t_u32 := - trailing_zeros42066260 (Not_f_not (self)). +Record t_TryFromSliceError : Type := + { + TryFromSliceError_0 : unit; + }. +Arguments Build_t_TryFromSliceError. +Arguments TryFromSliceError_0. +#[export] Instance settable_t_TryFromSliceError : Settable _ := + settable! (Build_t_TryFromSliceError) . +Notation "'TryFromSliceError'" := Build_t_TryFromSliceError. + +Definition t_Seq (v_T : Type) `{t_Sized (v_T)} : Type := list v_T. + +Instance t_Clone_640571940 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Seq ((v_T)))) := + { + Clone_f_clone := fun (self : t_Seq ((v_T)))=> + self; + }. + +Definition t_LIST (v_T : Type) `{t_Sized (v_T)} : Type := list v_T. +Notation "'LIST_NIL'" := nil. +Notation "'LIST_CONS'" := (fun a b => cons b a). + +Definition nil `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} '(_ : unit) : t_Seq ((v_T)) := nil. + +Record t_Slice (v_T : Type) `{t_Sized (v_T)} : Type := + { + Slice_f_v : t_Seq ((v_T)); + }. +Arguments Build_t_Slice (_) {_}. +Arguments Slice_f_v {_} {_}. +#[export] Instance settable_t_Slice `{v_T : Type} `{t_Sized (v_T)} : Settable _ := + settable! (Build_t_Slice v_T) . + +(* Instance t_From_692299963 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_From ((t_Slice ((v_T)))) ((t_Slice v_T)) := *) +(* { *) +(* From_f_from := fun (x : t_Slice v_T)=> *) +(* t_Slice (t_Seq (impl__to_vec (x))); *) +(* }. *) + +Record t_Array (v_T : Type) (v_N : t_usize) `{t_Sized (v_T)} : Type := + { + Array_f_v : t_Slice ((v_T)); + }. +Arguments Build_t_Array {_} {_} {_}. +Arguments Array_f_v {_} {_} {_}. +#[export] Instance settable_t_Array `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} : Settable _ := + settable! (@Build_t_Array v_T v_N _) . + +Instance t_Clone_962303223 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Array ((v_T)) (v_N))) := + { + Clone_f_clone := fun (self : t_Array ((v_T)) (v_N))=> + Build_t_Array (Clone_f_clone (Array_f_v self)); + }. + +Definition cast `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} (self : t_Array ((v_T)) (v_N)) : t_Slice ((v_T)) := + Array_f_v self. + +(* Instance t_Index_927562605 `{v_T : Type} `{v_I : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Sized (v_I)} `{t_Clone (v_T)} `{t_Index (t_Slice ((v_T))) (v_I)} : t_Index ((t_Array ((v_T)) (v_N))) ((v_I)) := *) +(* { *) +(* Index_f_Output := Index_f_Output; *) +(* Index_f_index := fun (self : t_Array ((v_T)) (v_N)) (index : v_I)=> *) +(* Index_f_index (cast (self)) (index); *) +(* }. *) + +(* Instance t_From_684363179 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_From ((t_Array (v_T) (v_N))) ((t_Array ((v_T)) (v_N))) := *) +(* { *) +(* From_f_from := fun (x : t_Array ((v_T)) (v_N))=> *) +(* match TryInto_f_try_into (Seq_f_v Slice_f_v Array_f_v x) with *) +(* | Result_Ok (x) => *) +(* x *) +(* | _ => *) +(* never_to_any (panic_fmt (impl_2__new_const (["some error?"%string]))) *) +(* end; *) +(* }. *) + +Instance t_Index_324031838 `{v_T : Type} `{v_I : Type} `{t_Sized (v_T)} `{t_Sized (v_I)} `{v_SliceIndex (v_I) (t_Slice ((v_T)))} : t_Index ((t_Slice ((v_T)))) ((v_I)) := + { + Index_f_Output := SliceIndex_f_Output; + Index_f_index := fun (self : t_Slice ((v_T))) (index : v_I)=> + SliceIndex_f_index (index) (self); + }. + +Definition cons `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) (t : v_T) : t_Seq ((v_T)) := + cons s t. + +(* Instance t_From_1005673342 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_From ((t_Array ((v_T)) (v_N))) ((t_Array (v_T) (v_N))) := *) +(* { *) +(* From_f_from := fun (x : t_Array (v_T) (v_N))=> *) +(* t_Array (t_Slice (t_Seq (impl__to_vec (Index_f_index (x) (Build_t_RangeFull))))); *) +(* }. *) + +(* Instance v_SliceIndex_1030023794 `{v_T : Type} `{t_Sized (v_T)} : v_SliceIndex ((t_RangeFull)) ((t_Slice ((v_T)))) := *) +(* { *) +(* SliceIndex_f_Output := t_Slice ((v_T)); *) +(* SliceIndex_f_index := fun (self : t_RangeFull) (slice : t_Slice ((v_T)))=> *) +(* slice; *) +(* }. *) + +(* Instance t_AsRef_175264108 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_AsRef ((t_Array ((v_T)) (v_N))) ((t_Slice ((v_T)))) := *) +(* { *) +(* AsRef_f_as_ref := fun (self : t_Array ((v_T)) (v_N))=> *) +(* Index_f_index (self) (Build_t_RangeFull); *) +(* }. *) + +Definition match_list `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : t_LIST ((v_T)) := s. + +(* Fixpoint from_u128_binary (x : t_u128) `{PartialEq_f_ne (x) (0) = true} : t_Positive := *) +(* if *) +(* PartialEq_f_eq (x) (1) *) +(* then *) +(* xH *) +(* else *) +(* if *) +(* PartialEq_f_eq (Rem_f_rem (x) (2)) (0) *) +(* then *) +(* xO (from_u128_binary (Div_f_div (x) (Build_t_u128 (Build_t_U128 2)))) *) +(* else *) +(* xI (from_u128_binary (Div_f_div (x) (2))). *) + +(* Instance t_From_383682059 : t_From ((t_HaxInt)) ((t_u128)) := *) +(* { *) +(* From_f_from := fun (x : t_u128)=> *) +(* if *) +(* PartialEq_f_eq (x) (0) *) +(* then *) +(* v_HaxInt_ZERO *) +(* else *) +(* positive_to_int (from_u128_binary (x)); *) +(* }. *) + +(* Instance t_From_394907254 : t_From ((t_Z)) ((t_i128)) := *) +(* { *) +(* From_f_from := fun (x : t_i128)=> *) +(* match Ord_f_cmp (x) (0) with *) +(* | Ordering_Equal => *) +(* Z_ZERO *) +(* | Ordering_Less => *) +(* Z_NEG (from_u128_binary (impl__i128__unsigned_abs (x))) *) +(* | Ordering_Greater => *) +(* Z_POS (from_u128_binary (impl__i128__unsigned_abs (x))) *) +(* end; *) +(* }. *) + +(* Fixpoint from_u16_binary (x : t_u16) `{ne (x) (0) = true} : t_Positive := *) +(* if *) +(* t_PartialEq_f_eq (x) (1) *) +(* then *) +(* xH *) +(* else *) +(* if *) +(* t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) *) +(* then *) +(* xO (from_u16_binary (t_Div_f_div (x) (2))) *) +(* else *) +(* xI (from_u16_binary (t_Div_f_div (x) (2))). *) + +(* Instance t_From_283547720 : t_From ((t_HaxInt)) ((t_u16)) := *) +(* { *) +(* From_f_from := fun (x : t_u16)=> *) +(* if *) +(* t_PartialEq_f_eq (x) (0) *) +(* then *) +(* v_HaxInt_ZERO *) +(* else *) +(* positive_to_int (from_u16_binary (x)); *) +(* }. *) + +(* Instance t_From_960274744 : t_From ((t_Z)) ((t_i16)) := *) +(* { *) +(* From_f_from := fun (x : t_i16)=> *) +(* match Ord_f_cmp (x) (0) with *) +(* | Ordering_Equal => *) +(* Z_ZERO *) +(* | Ordering_Less => *) +(* Z_NEG (from_u16_binary (impl__i16__unsigned_abs (x))) *) +(* | Ordering_Greater => *) +(* Z_POS (from_u16_binary (impl__i16__unsigned_abs (x))) *) +(* end; *) +(* }. *) + +(* Fixpoint from_u32_binary (x : t_u32) `{ne (x) (0) = true} : t_Positive := *) +(* if *) +(* t_PartialEq_f_eq (x) (1) *) +(* then *) +(* xH *) +(* else *) +(* if *) +(* t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) *) +(* then *) +(* xO (from_u32_binary (t_Div_f_div (x) (2))) *) +(* else *) +(* xI (from_u32_binary (t_Div_f_div (x) (2))). *) + +(* Instance t_From_247317262 : t_From ((t_HaxInt)) ((t_u32)) := *) +(* { *) +(* From_f_from := fun (x : t_u32)=> *) +(* if *) +(* t_PartialEq_f_eq (x) (0) *) +(* then *) +(* v_HaxInt_ZERO *) +(* else *) +(* positive_to_int (from_u32_binary (x)); *) +(* }. *) + +(* Instance t_From_1033810922 : t_From ((t_Z)) ((t_i32)) := *) +(* { *) +(* From_f_from := fun (x : t_i32)=> *) +(* match Ord_f_cmp (x) (0) with *) +(* | Ordering_Equal => *) +(* Z_ZERO *) +(* | Ordering_Less => *) +(* Z_NEG (from_u32_binary (impl__i32__unsigned_abs (x))) *) +(* | Ordering_Greater => *) +(* Z_POS (from_u32_binary (impl__i32__unsigned_abs (x))) *) +(* end; *) +(* }. *) + +(* Fixpoint from_u64_binary (x : t_u64) `{ne (x) (0) = true} : t_Positive := *) +(* if *) +(* t_PartialEq_f_eq (x) (1) *) +(* then *) +(* xH *) +(* else *) +(* if *) +(* t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) *) +(* then *) +(* xO (from_u64_binary (t_Div_f_div (x) (2))) *) +(* else *) +(* xI (from_u64_binary (t_Div_f_div (x) (2))). *) + +(* Instance t_From_703205527 : t_From ((t_HaxInt)) ((t_u64)) := *) +(* { *) +(* From_f_from := fun (x : t_u64)=> *) +(* if *) +(* t_PartialEq_f_eq (x) (0) *) +(* then *) +(* v_HaxInt_ZERO *) +(* else *) +(* positive_to_int (from_u64_binary (x)); *) +(* }. *) + +(* Instance t_From_494553464 : t_From ((t_Z)) ((t_i64)) := *) +(* { *) +(* From_f_from := fun (x : t_i64)=> *) +(* match Ord_f_cmp (x) (0) with *) +(* | Ordering_Equal => *) +(* Z_ZERO *) +(* | Ordering_Less => *) +(* Z_NEG (from_u64_binary (impl__i64__unsigned_abs (x))) *) +(* | Ordering_Greater => *) +(* Z_POS (from_u64_binary (impl__i64__unsigned_abs (x))) *) +(* end; *) +(* }. *) + +(* Fixpoint from_u8_binary (x : t_u8) `{ne (x) (0) = true} : t_Positive := *) +(* if *) +(* t_PartialEq_f_eq (x) (1) *) +(* then *) +(* xH *) +(* else *) +(* if *) +(* t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) *) +(* then *) +(* xO (from_u8_binary (t_Div_f_div (x) (2))) *) +(* else *) +(* xI (from_u8_binary (t_Div_f_div (x) (2))). *) + +(* Instance t_From_421078324 : t_From ((t_HaxInt)) ((t_u8)) := *) +(* { *) +(* From_f_from := fun (x : t_u8)=> *) +(* if *) +(* t_PartialEq_f_eq (x) (0) *) +(* then *) +(* v_HaxInt_ZERO *) +(* else *) +(* positive_to_int (from_u8_binary (x)); *) +(* }. *) + +(* Instance t_From_976104611 : t_From ((t_Z)) ((t_i8)) := *) +(* { *) +(* From_f_from := fun (x : t_i8)=> *) +(* match Ord_f_cmp (x) (0) with *) +(* | Ordering_Equal => *) +(* Z_ZERO *) +(* | Ordering_Less => *) +(* Z_NEG (from_u8_binary (impl__unsigned_abs (x))) *) +(* | Ordering_Greater => *) +(* Z_POS (from_u8_binary (impl__unsigned_abs (x))) *) +(* end; *) +(* }. *) + +(* Fixpoint from_usize_binary (x : t_usize) `{ne (x) (0) = true} : t_Positive := *) +(* if *) +(* t_PartialEq_f_eq (x) (1) *) +(* then *) +(* xH *) +(* else *) +(* if *) +(* t_PartialEq_f_eq (t_Rem_f_rem (x) (2)) (0) *) +(* then *) +(* xO (from_usize_binary (t_Div_f_div (x) (2))) *) +(* else *) +(* xI (from_usize_binary (t_Div_f_div (x) (2))). *) + +(* Instance t_From_226738852 : t_From ((t_HaxInt)) ((t_usize)) := *) +(* { *) +(* From_f_from := fun (x : t_usize)=> *) +(* if *) +(* t_PartialEq_f_eq (x) (0) *) +(* then *) +(* v_HaxInt_ZERO *) +(* else *) +(* positive_to_int (from_usize_binary (x)); *) +(* }. *) + +(* Instance t_From_235021044 : t_From ((t_Z)) ((t_isize)) := *) +(* { *) +(* From_f_from := fun (x : t_isize)=> *) +(* match Ord_f_cmp (x) (0) with *) +(* | Ordering_Equal => *) +(* Z_ZERO *) +(* | Ordering_Less => *) +(* Z_NEG (from_usize_binary (impl__isize__unsigned_abs (x))) *) +(* | Ordering_Greater => *) +(* Z_POS (from_usize_binary (impl__isize__unsigned_abs (x))) *) +(* end; *) +(* }. *) + +(* Fixpoint to_u128_binary (self : t_Positive) : t_u128 := *) +(* match match_positive (self) with *) +(* | POSITIVE_XH => *) +(* 1 *) +(* | POSITIVE_XO (p) => *) +(* t_Mul_f_mul (to_u128_binary (p)) (2) *) +(* | POSITIVE_XI (p) => *) +(* t_Add_f_add (t_Mul_f_mul (to_u128_binary (p)) (2)) (1) *) +(* end. *) + +(* Instance t_From_312029210 : t_From ((t_u128)) ((t_HaxInt)) := *) +(* { *) +(* From_f_from := fun (x : t_HaxInt)=> *) +(* match match_pos (x) with *) +(* | POS_ZERO => *) +(* 0 *) +(* | POS_POS (p) => *) +(* to_u128_binary (p) *) +(* end; *) +(* }. *) + +(* Instance t_From_166626519 : t_From ((t_i128)) ((t_Z)) := *) +(* { *) +(* From_f_from := fun (x : t_Z)=> *) +(* match x with *) +(* | Z_NEG (x) => *) +(* sub (neg (cast (sub (to_u128_binary (x)) (1)))) (1) *) +(* | Z_ZERO => *) +(* 0 *) +(* | Z_POS (x) => *) +(* cast (to_u128_binary (x)) *) +(* end; *) +(* }. *) + +(* Fixpoint to_u16_binary (self : t_Positive) : t_u16 := *) +(* match match_positive (self) with *) +(* | POSITIVE_XH => *) +(* 1 *) +(* | POSITIVE_XO (p) => *) +(* t_Mul_f_mul (to_u16_binary (p)) (2) *) +(* | POSITIVE_XI (p) => *) +(* t_Add_f_add (t_Mul_f_mul (to_u16_binary (p)) (2)) (1) *) +(* end. *) + +(* Instance t_From_863803022 : t_From ((t_u16)) ((t_HaxInt)) := *) +(* { *) +(* From_f_from := fun (x : t_HaxInt)=> *) +(* match match_pos (x) with *) +(* | POS_ZERO => *) +(* 0 *) +(* | POS_POS (p) => *) +(* to_u16_binary (p) *) +(* end; *) +(* }. *) + +(* Instance t_From_217241508 : t_From ((t_i16)) ((t_Z)) := *) +(* { *) +(* From_f_from := fun (x : t_Z)=> *) +(* match x with *) +(* | Z_NEG (x) => *) +(* sub (neg (cast (sub (to_u16_binary (x)) (1)))) (1) *) +(* | Z_ZERO => *) +(* 0 *) +(* | Z_POS (x) => *) +(* cast (to_u16_binary (x)) *) +(* end; *) +(* }. *) + +(* Fixpoint to_u32_binary (self : t_Positive) : t_u32 := *) +(* match match_positive (self) with *) +(* | POSITIVE_XH => *) +(* 1 *) +(* | POSITIVE_XO (p) => *) +(* t_Mul_f_mul (to_u32_binary (p)) (2) *) +(* | POSITIVE_XI (p) => *) +(* t_Add_f_add (t_Mul_f_mul (to_u32_binary (p)) (2)) (1) *) +(* end. *) + +(* Instance t_From_38549956 : t_From ((t_u32)) ((t_HaxInt)) := *) +(* { *) +(* From_f_from := fun (x : t_HaxInt)=> *) +(* match match_pos (x) with *) +(* | POS_ZERO => *) +(* 0 *) +(* | POS_POS (p) => *) +(* to_u32_binary (p) *) +(* end; *) +(* }. *) + +(* Instance t_From_567539816 : t_From ((t_i32)) ((t_Z)) := *) +(* { *) +(* From_f_from := fun (x : t_Z)=> *) +(* match x with *) +(* | Z_NEG (x) => *) +(* sub (neg (cast (sub (to_u32_binary (x)) (1)))) (1) *) +(* | Z_ZERO => *) +(* 0 *) +(* | Z_POS (x) => *) +(* cast (to_u32_binary (x)) *) +(* end; *) +(* }. *) + +(* Fixpoint to_u64_binary (self : t_Positive) : t_u64 := *) +(* match match_positive (self) with *) +(* | POSITIVE_XH => *) +(* 1 *) +(* | POSITIVE_XO (p) => *) +(* t_Mul_f_mul (to_u64_binary (p)) (2) *) +(* | POSITIVE_XI (p) => *) +(* t_Add_f_add (t_Mul_f_mul (to_u64_binary (p)) (2)) (1) *) +(* end. *) + +(* Instance t_From_100316698 : t_From ((t_u64)) ((t_HaxInt)) := *) +(* { *) +(* From_f_from := fun (x : t_HaxInt)=> *) +(* match match_pos (x) with *) +(* | POS_ZERO => *) +(* 0 *) +(* | POS_POS (p) => *) +(* to_u64_binary (p) *) +(* end; *) +(* }. *) + +(* Instance t_From_99611562 : t_From ((t_i64)) ((t_Z)) := *) +(* { *) +(* From_f_from := fun (x : t_Z)=> *) +(* match x with *) +(* | Z_NEG (x) => *) +(* sub (neg (cast (sub (to_u64_binary (x)) (1)))) (1) *) +(* | Z_ZERO => *) +(* 0 *) +(* | Z_POS (x) => *) +(* cast (to_u64_binary (x)) *) +(* end; *) +(* }. *) + +(* Fixpoint to_u8_binary (self : t_Positive) : t_u8 := *) +(* match match_positive (self) with *) +(* | POSITIVE_XH => *) +(* 1 *) +(* | POSITIVE_XO (p) => *) +(* t_Mul_f_mul (to_u8_binary (p)) (2) *) +(* | POSITIVE_XI (p) => *) +(* t_Add_f_add (t_Mul_f_mul (to_u8_binary (p)) (2)) (1) *) +(* end. *) + +(* Instance t_From_360336196 : t_From ((t_u8)) ((t_HaxInt)) := *) +(* { *) +(* From_f_from := fun (x : t_HaxInt)=> *) +(* match match_pos (x) with *) +(* | POS_ZERO => *) +(* 0 *) +(* | POS_POS (p) => *) +(* to_u8_binary (p) *) +(* end; *) +(* }. *) + +(* Instance t_From_168893964 : t_From ((t_i8)) ((t_Z)) := *) +(* { *) +(* From_f_from := fun (x : t_Z)=> *) +(* match x with *) +(* | Z_NEG (x) => *) +(* sub (neg (cast (sub (to_u8_binary (x)) (1)))) (1) *) +(* | Z_ZERO => *) +(* 0 *) +(* | Z_POS (x) => *) +(* cast (to_u8_binary (x)) *) +(* end; *) +(* }. *) + +(* Fixpoint to_usize_binary (self : t_Positive) : t_usize := *) +(* match match_positive (self) with *) +(* | POSITIVE_XH => *) +(* 1 *) +(* | POSITIVE_XO (p) => *) +(* t_Mul_f_mul (to_usize_binary (p)) (2) *) +(* | POSITIVE_XI (p) => *) +(* t_Add_f_add (t_Mul_f_mul (to_usize_binary (p)) (2)) (1) *) +(* end. *) + +(* Instance t_From_545039540 : t_From ((t_usize)) ((t_HaxInt)) := *) +(* { *) +(* From_f_from := fun (x : t_HaxInt)=> *) +(* match match_pos (x) with *) +(* | POS_ZERO => *) +(* 0 *) +(* | POS_POS (p) => *) +(* to_usize_binary (p) *) +(* end; *) +(* }. *) + +(* Instance t_From_931346405 : t_From ((t_isize)) ((t_Z)) := *) +(* { *) +(* From_f_from := fun (x : t_Z)=> *) +(* match x with *) +(* | Z_NEG (x) => *) +(* sub (neg (cast (sub (to_usize_binary (x)) (1)))) (1) *) +(* | Z_ZERO => *) +(* 0 *) +(* | Z_POS (x) => *) +(* cast (to_usize_binary (x)) *) +(* end; *) +(* }. *) + +(* Instance v_SliceIndex_622480125 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : v_SliceIndex ((t_usize)) ((t_Slice ((v_T)))) := *) +(* { *) +(* SliceIndex_f_Output := v_T; *) +(* SliceIndex_f_index := fun (self : t_usize) (slice : t_Slice ((v_T)))=> *) +(* let x : t_usize := Into_f_into (U64_f_v usize_0 self) in *) +(* Index_f_index (Seq_f_v Slice_f_v slice) (x); *) +(* }. *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base.v b/proof-libs/coq/coq/generated-core/src/Core_Base.v index 7e4eaf95a..9b6140c14 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base.v @@ -12,69 +12,25 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Base_Spec. +Export Core_Base_Spec. -From Core Require Import spec. -Export spec. +From Core Require Import Core_Base_Binary. +Export Core_Base_Binary. -From Core Require Import binary. -Export binary. +From Core Require Import Core_Base_Pos. +Export Core_Base_Pos. -From Core Require Import pos. -Export pos. +From Core Require Import Core_Base_Z. +Export Core_Base_Z. -From Core Require Import z. -Export z. +(* From Core Require Import Core_Base_Number_conversion. *) +(* Export Core_Base_Number_conversion. *) -From Core Require Import number_conversion. -Export number_conversion. - -From Core Require Import seq. -Export seq. +From Core Require Import Core_Base_Seq. +Export Core_Base_Seq. (* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v index f0472a30e..c67c519d6 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v @@ -12,55 +12,17 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - From Core Require Import Core_Base_Spec. Export Core_Base_Spec. -From Core Require Import Core_Cmp (t_Ordering). -Export Core_Cmp (t_Ordering). +From Core Require Import Core_Cmp. +Export Core_Cmp. + +From Core Require Import Core_Option. +Export Core_Option. + +From Core Require Import Core_Clone. +Export Core_Clone. Fixpoint positive_cmp__cmp_binary_cont (x : t_Positive) (y : t_Positive) (r : t_Ordering) : t_Ordering := match match_positive (x) with @@ -124,19 +86,6 @@ Fixpoint positive_succ (s : t_Positive) : t_Positive := xO (positive_succ (q)) end. -Definition positive_add (lhs : t_Positive) (rhs : t_Positive) : t_Positive := - positive_add__add (lhs) (rhs). - -Fixpoint positive_mul (lhs : t_Positive) (rhs : t_Positive) : t_Positive := - match match_positive (lhs) with - | POSITIVE_XH => - rhs - | POSITIVE_XO (p) => - xO (positive_mul (p) (rhs)) - | POSITIVE_XI (p) => - positive_add (Clone_f_clone (rhs)) (xO (positive_mul (p) (rhs))) - end. - Fixpoint positive_add__add (lhs : t_Positive) (rhs : t_Positive) : t_Positive := match match_positive (lhs) with | POSITIVE_XH => @@ -166,9 +115,9 @@ Fixpoint positive_add__add (lhs : t_Positive) (rhs : t_Positive) : t_Positive := | POSITIVE_XI (q) => xO (positive_add__add_carry (p) (q)) end - end. + end -Fixpoint positive_add__add_carry (lhs : t_Positive) (rhs : t_Positive) : t_Positive := +with positive_add__add_carry (lhs : t_Positive) (rhs : t_Positive) : t_Positive := match match_positive (lhs) with | POSITIVE_XH => match match_positive (rhs) with @@ -198,3 +147,16 @@ Fixpoint positive_add__add_carry (lhs : t_Positive) (rhs : t_Positive) : t_Posit xI (positive_add__add_carry (p) (q)) end end. + +Definition positive_add (lhs : t_Positive) (rhs : t_Positive) : t_Positive := + positive_add__add (lhs) (rhs). + +Fixpoint positive_mul (lhs : t_Positive) (rhs : t_Positive) : t_Positive := + match match_positive (lhs) with + | POSITIVE_XH => + rhs + | POSITIVE_XO (p) => + xO (positive_mul (p) (rhs)) + | POSITIVE_XI (p) => + positive_add (Clone_f_clone (rhs)) (xO (positive_mul (p) (rhs))) + end. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v index 045695834..286ef8ce0 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v @@ -12,50 +12,6 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - From Core Require Import Core_Base_Spec. Export Core_Base_Spec. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v index a4024f524..cfd1242e5 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v @@ -12,50 +12,6 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - From Core Require Import Core_Base_Spec. Export Core_Base_Spec. @@ -339,6 +295,54 @@ Definition haxint_add (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := end end. +Fixpoint haxint_sub__sub_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := + match match_positive (lhs) with + | POSITIVE_XH => + v_HaxInt_ZERO + | POSITIVE_XO (p) => + match match_positive (rhs) with + | POSITIVE_XH => + positive_to_int (positive_pred_double (p)) + | POSITIVE_XO (q) => + haxint_sub__double_mask (haxint_sub__sub_binary (p) (q)) + | POSITIVE_XI (q) => + haxint_sub__succ_double_mask (haxint_sub__sub_carry (p) (q)) + end + | POSITIVE_XI (p) => + match match_positive (rhs) with + | POSITIVE_XH => + positive_to_int (xO (p)) + | POSITIVE_XO (q) => + haxint_sub__succ_double_mask (haxint_sub__sub_binary (p) (q)) + | POSITIVE_XI (q) => + haxint_sub__double_mask (haxint_sub__sub_binary (p) (q)) + end + end + +with haxint_sub__sub_carry (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := + match match_positive (lhs) with + | POSITIVE_XH => + v_HaxInt_ZERO + | POSITIVE_XO (p) => + match match_positive (rhs) with + | POSITIVE_XH => + haxint_sub__double_pred_mask (p) + | POSITIVE_XO (q) => + haxint_sub__succ_double_mask (haxint_sub__sub_carry (p) (q)) + | POSITIVE_XI (q) => + haxint_sub__double_mask (haxint_sub__sub_carry (p) (q)) + end + | POSITIVE_XI (p) => + match match_positive (rhs) with + | POSITIVE_XH => + positive_to_int (positive_pred_double (p)) + | POSITIVE_XO (q) => + haxint_sub__double_mask (haxint_sub__sub_binary (p) (q)) + | POSITIVE_XI (q) => + haxint_sub__succ_double_mask (haxint_sub__sub_carry (p) (q)) + end + end. + Definition haxint_sub (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := match match_pos (lhs) with | POS_ZERO => @@ -415,51 +419,3 @@ Definition haxint_mul (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := Definition haxint_rem (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := let (_,r) := haxint_divmod (lhs) (rhs) in r. - -Fixpoint haxint_sub__sub_binary (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := - match match_positive (lhs) with - | POSITIVE_XH => - v_HaxInt_ZERO - | POSITIVE_XO (p) => - match match_positive (rhs) with - | POSITIVE_XH => - positive_to_int (positive_pred_double (p)) - | POSITIVE_XO (q) => - haxint_sub__double_mask (haxint_sub__sub_binary (p) (q)) - | POSITIVE_XI (q) => - haxint_sub__succ_double_mask (haxint_sub__sub_carry (p) (q)) - end - | POSITIVE_XI (p) => - match match_positive (rhs) with - | POSITIVE_XH => - positive_to_int (xO (p)) - | POSITIVE_XO (q) => - haxint_sub__succ_double_mask (haxint_sub__sub_binary (p) (q)) - | POSITIVE_XI (q) => - haxint_sub__double_mask (haxint_sub__sub_binary (p) (q)) - end - end. - -Fixpoint haxint_sub__sub_carry (lhs : t_Positive) (rhs : t_Positive) : t_HaxInt := - match match_positive (lhs) with - | POSITIVE_XH => - v_HaxInt_ZERO - | POSITIVE_XO (p) => - match match_positive (rhs) with - | POSITIVE_XH => - haxint_sub__double_pred_mask (p) - | POSITIVE_XO (q) => - haxint_sub__succ_double_mask (haxint_sub__sub_carry (p) (q)) - | POSITIVE_XI (q) => - haxint_sub__double_mask (haxint_sub__sub_carry (p) (q)) - end - | POSITIVE_XI (p) => - match match_positive (rhs) with - | POSITIVE_XH => - positive_to_int (positive_pred_double (p)) - | POSITIVE_XO (q) => - haxint_sub__double_mask (haxint_sub__sub_binary (p) (q)) - | POSITIVE_XI (q) => - haxint_sub__succ_double_mask (haxint_sub__sub_carry (p) (q)) - end - end. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v index eac05b8b1..4e2d5e877 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v @@ -12,73 +12,29 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - From Core Require Import Core_Base_Spec. Export Core_Base_Spec. -From Core Require Import Core_Base_Haxint_lt. -Export Core_Base_Haxint_lt. +From Core Require Import Core_Base_Pos. +Export Core_Base_Pos. From Core Require Import Core_Clone (t_Clone). Export Core_Clone (t_Clone). -From Core Require Import Core (t_cmp). -Export Core (t_cmp). +From Core Require Import Core_Cmp. +Export Core_Cmp. From Core Require Import Core_Marker (t_Sized). Export Core_Marker (t_Sized). -From Core Require Import Core (t_panicking). -Export Core (t_panicking). +From Core Require Import Core_Panicking. +Export Core_Panicking. -Definition hd__panic_cold_explicit '(_ : unit) : t_Never := - panic_explicit (tt). +Definition hd__panic_cold_explicit '(_ : unit) `{HFalse : t_Never} : t_Never := + panic_explicit (tt) HFalse. -Definition set_index__set_index_unary__panic_cold_explicit '(_ : unit) : t_Never := - panic_explicit (tt). +Definition set_index__set_index_unary__panic_cold_explicit '(_ : unit) `{HFalse : t_Never} : t_Never := + panic_explicit (tt) HFalse. Definition is_empty `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : bool := match match_list (s) with @@ -88,18 +44,18 @@ Definition is_empty `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ( false end. -Definition hd `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) `{negb (is_empty (s)) = true} : v_T := - match match_list (s) with +Definition hd `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) `{Hpre : negb (is_empty (s)) = true} : v_T := + match match_list (s) as s return negb (is_empty (s)) = true -> _ with | LIST_NIL => - never_to_any (hd__panic_cold_explicit (tt)) + fun HFalse => never_to_any (hd__panic_cold_explicit (tt) (False_rect _ (Bool.diff_false_true HFalse))) | LIST_CONS (hd) (_) => - hd - end. + fun _ => hd + end Hpre. -Definition tl `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) `{negb (is_empty (s)) = true} : t_Seq ((v_T)) := +Definition tl `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) `{Hpre : negb (is_empty (s)) = true} : t_Seq ((v_T)) := match match_list (s) with | LIST_NIL => - nil (tt) + nil (* (tt) *) | LIST_CONS (_) (tl) => tl end. @@ -119,37 +75,146 @@ Fixpoint eq_inner `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} `{t_PartialEq Instance t_PartialEq_126322860 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} `{t_PartialEq (v_T) (v_T)} : t_PartialEq ((t_Seq ((v_T)))) ((t_Seq ((v_T)))) := { - PartialEq_impl_f_eq := fun (self : t_Seq ((v_T))) (other : t_Seq ((v_T)))=> + PartialEq_f_eq := fun (self : t_Seq ((v_T))) (other : t_Seq ((v_T)))=> eq_inner (Clone_f_clone (self)) (Clone_f_clone (other)); - PartialEq_impl_f_ne := fun (self : t_Seq ((v_T))) (other : t_Seq ((v_T)))=> + PartialEq_f_ne := fun (self : t_Seq ((v_T))) (other : t_Seq ((v_T)))=> negb (eq_inner (Clone_f_clone (self)) (Clone_f_clone (other))); }. -Fixpoint get_index__get_index_unary `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (l : t_Seq ((v_T))) (i : t_Unary) : v_T := +Fixpoint len__len_unary `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : t_Unary := + match match_list (s) with + | LIST_NIL => + unary_from_int(v_HaxInt_ZERO) + | LIST_CONS (_) (tl) => + succ (len__len_unary (tl)) + end. + +Definition len `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : t_HaxInt := + unary_to_int(len__len_unary(s)). + +Lemma positive_cmp_is_spec : + forall p q, match positive_cmp p q with | Ordering_Less => Lt | Ordering_Equal => Eq | Ordering_Greater => Gt end = (p ?= q)%positive. + { + clear. + intros. + + unfold positive_cmp. + unfold "?="%positive. + + set (Ordering_Equal). + pose (match Eq with | Lt => Ordering_Less | Gt => Ordering_Greater | Eq => Ordering_Equal end). + replace t with t0 by reflexivity. + clear t. + + assert (forall c p q, c <> Eq -> Pos.compare_cont c p q <> Eq). + { + clear ; intros. + generalize dependent c. + generalize dependent q. + induction p ; intros ; destruct q, c ; (easy || now apply IHp). + } + + assert (forall c p q, c <> Ordering_Equal -> positive_cmp__cmp_binary_cont p q c <> Ordering_Equal). + { + clear ; intros. + generalize dependent c. + generalize dependent q. + induction p ; intros ; destruct q, c ; (easy || now apply IHp). + } + + subst t0. + set Eq. + generalize dependent c. + generalize dependent q. + induction p ; intros. + - destruct q. + + apply IHp. + + simpl. + rewrite <- IHp. + destruct positive_cmp__cmp_binary_cont eqn:ov. + * reflexivity. + * exfalso. refine (H0 _ p q _ ov). easy. + * reflexivity. + + reflexivity. + - destruct q. + + simpl. + rewrite <- IHp. + destruct positive_cmp__cmp_binary_cont eqn:ov. + * reflexivity. + * exfalso. refine (H0 _ p q _ ov). easy. + * reflexivity. + + apply IHp. + + reflexivity. + - now destruct q, c. + } +Qed. + +Lemma haxint_lt_is_spec : forall x y, haxint_lt x y = N.ltb x y. + { + intros. + destruct x as [ | p], y as [ | q]. + - easy. + - easy. + - easy. + - unfold haxint_lt. + unfold haxint_cmp. + simpl. + + unfold N.ltb. + simpl. + + rewrite <- positive_cmp_is_spec. + + now destruct (positive_cmp). + } +Qed. + +Program Fixpoint get_index__get_index_unary `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (l : t_Seq ((v_T))) (i : t_Unary) `{Hpre : haxint_lt(unary_to_int i) (len l) = true} : v_T := match match_unary (i) with | UNARY_ZERO => - hd (l) + hd (Hpre := Hpre) (l) | UNARY_SUCC (n) => - get_index__get_index_unary (tl (l)) (n) + get_index__get_index_unary (tl (Hpre := _) (l)) (n) end. +Next Obligation. + unfold match_unary in Heq_anonymous. + subst. + now destruct l. +Qed. +Next Obligation. + unfold match_unary in Heq_anonymous. + subst. + now destruct l. +Qed. +Next Obligation. + unfold match_unary in Heq_anonymous. + subst. -Definition get_index `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) (i : t_HaxInt) : v_T := - get_index__get_index_unary (s) (unary_from_int (i)). + destruct l. + - easy. + - simpl. -Fixpoint len `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : t_HaxInt := - match match_list (s) with - | LIST_NIL => - v_HaxInt_ZERO - | LIST_CONS (_) (tl) => - succ (len (tl)) - end. + rewrite haxint_lt_is_spec. + epose Hpre. + rewrite haxint_lt_is_spec in e. + + apply N.ltb_lt. + apply N.ltb_lt in e. + apply N.succ_lt_mono. + unfold len ; rewrite <- !Nnat.Nat2N.inj_succ. + apply e. +Qed. +Fail Next Obligation. + +Definition get_index `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) (i : t_HaxInt) {Hpre : haxint_lt (i) (len s) = true} : v_T := + get_index__get_index_unary (Hpre := ltac:(now rewrite Nnat.N2Nat.id)) (s) (unary_from_int (i)). Fixpoint repeat__repeat_unary `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (n : t_Unary) (v : v_T) : t_Seq ((v_T)) := match match_unary (n) with | UNARY_ZERO => - nil (tt) + nil (* (tt) *) | UNARY_SUCC (m) => - cons (repeat__repeat_unary (m) (Clone_f_clone (v))) (v) + cons (repeat__repeat_unary (m) (Clone_f_clone (v))) v end. Definition repeat `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (n : t_HaxInt) (v : v_T) : t_Seq ((v_T)) := @@ -164,12 +229,12 @@ Fixpoint rev__rev_accum `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_S end. Definition rev `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) : t_Seq ((v_T)) := - rev__rev_accum (s) (nil (tt)). + rev__rev_accum (s) (nil (* (tt) *)). -Fixpoint set_index__set_index_unary `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (x : t_Seq ((v_T))) (i : t_Unary) (v : v_T) : t_Seq ((v_T)) := +Program Fixpoint set_index__set_index_unary `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (x : t_Seq ((v_T))) (i : t_Unary) (v : v_T) `{Hpre : haxint_lt(unary_to_int i) (len x) = true} : t_Seq ((v_T)) := match match_list (x) with | LIST_NIL => - never_to_any (set_index__set_index_unary__panic_cold_explicit (tt)) + never_to_any (set_index__set_index_unary__panic_cold_explicit (tt) _) | LIST_CONS (hd) (tl) => match match_unary (i) with | UNARY_ZERO => @@ -178,6 +243,28 @@ Fixpoint set_index__set_index_unary `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_ cons (set_index__set_index_unary (tl) (n) (v)) (hd) end end. +Next Obligation. + unfold match_list in Heq_anonymous. + subst. + now destruct i. +Qed. +Next Obligation. + unfold match_unary in Heq_anonymous. + subst. + unfold match_list in Heq_anonymous0. + subst. + + + rewrite haxint_lt_is_spec. + rewrite haxint_lt_is_spec in Hpre. + + apply N.ltb_lt. + apply N.ltb_lt in Hpre. + apply N.succ_lt_mono. + unfold len ; rewrite <- !Nnat.Nat2N.inj_succ. + apply Hpre. +Qed. +Fail Next Obligation. Definition set_index `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq ((v_T))) (i : t_HaxInt) (v : v_T) `{haxint_lt (i) (len (s)) = true} : t_Seq ((v_T)) := - set_index__set_index_unary (s) (unary_from_int (i)) (v). + set_index__set_index_unary (s) (Hpre := ltac:(now rewrite Nnat.N2Nat.id)) (unary_from_int (i)) (v). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v deleted file mode 100644 index 1080900e6..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec.v +++ /dev/null @@ -1,92 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Require Import List. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import Ascii. -Require Import String. -Require Import Coq.Floats.Floats. -From RecordUpdate Require Import RecordSet. -Import RecordSetNotations. - -(* From Core Require Import Core. *) - -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - - - -From Core Require Import haxint. -Export haxint. - -From Core Require Import Haxint (t_succ). -Export Haxint (t_succ). - -From Core Require Import unary. -Export unary. - -From Core Require Import binary. -Export binary. - -From Core Require Import z. -Export z. - -From Core Require Import seq. -Export seq. - -From Core Require Import constants. -Export constants. - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) - -(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v deleted file mode 100644 index 219f598ec..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary.v +++ /dev/null @@ -1,67 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Require Import List. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import Ascii. -Require Import String. -Require Import Coq.Floats.Floats. -From RecordUpdate Require Import RecordSet. -Import RecordSetNotations. - -(* From Core Require Import Core. *) - -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import pos. -Export pos. - -From Core Require Import positive. -Export positive. - -(* NotImplementedYet *) - -(* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v deleted file mode 100644 index dd59b14aa..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Pos.v +++ /dev/null @@ -1,77 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Require Import List. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import Ascii. -Require Import String. -Require Import Coq.Floats.Floats. -From RecordUpdate Require Import RecordSet. -Import RecordSetNotations. - -(* From Core Require Import Core. *) - -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core_Base_Spec_Binary_Super_Haxint. -Export Core_Base_Spec_Binary_Super_Haxint. - -From Core Require Import Core_Base_Spec_Binary_Positive. -Export Core_Base_Spec_Binary_Positive. - -Inductive t_POS : Type := -| POS_ZERO -| POS_POS : t_Positive -> _. -Arguments POS_ZERO. -Arguments POS_POS. - -Definition match_pos (s : t_HaxInt) : t_POS := - if - is_zero (Clone_f_clone (s)) - then - POS_ZERO - else - POS_POS (positive_from_int (s)). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v deleted file mode 100644 index ec7884b46..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Binary_Positive.v +++ /dev/null @@ -1,121 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Require Import List. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import Ascii. -Require Import String. -Require Import Coq.Floats.Floats. -From RecordUpdate Require Import RecordSet. -Import RecordSetNotations. - -(* From Core Require Import Core. *) - -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core_Base_Spec_Binary_Super_Haxint. -Export Core_Base_Spec_Binary_Super_Haxint. - -Record t_Positive : Type := - { - Positive_0 : t_HaxInt; - }. -Arguments Build_t_Positive. -Arguments Positive_0. -#[export] Instance settable_t_Positive : Settable _ := - settable! (Build_t_Positive) . -Notation "'Positive'" := Build_t_Positive. - -Inductive t_POSITIVE : Type := -| POSITIVE_XH -| POSITIVE_XO : t_Positive -> _ -| POSITIVE_XI : t_Positive -> _. -Arguments POSITIVE_XH. -Arguments POSITIVE_XO. -Arguments POSITIVE_XI. - -Definition positive_from_int (x : t_HaxInt) : t_Positive := - Build_t_Positive (x). - -Definition positive_to_int (s : t_Positive) : t_HaxInt := - Positive_0 s. - -Definition xH : t_Positive := - Build_t_Positive (v_HaxInt_ONE). - -Instance t_Clone_16961168 : t_Clone ((t_Positive)) := - { - Clone_impl_f_clone := fun (self : t_Positive)=> - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))); - }. - -Definition match_positive__is_xH (s : t_Positive) : bool := - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). - -Definition match_positive__is_xI (s : t_Positive) : bool := - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). - -Definition match_positive__is_xO (s : t_Positive) : bool := - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). - -Definition xI (s : t_Positive) : t_Positive := - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). - -Definition xO (s : t_Positive) : t_Positive := - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). - -Definition match_positive (s : t_Positive) : t_POSITIVE := - if - match_positive__is_xH (Clone_f_clone (s)) - then - POSITIVE_XH - else - if - match_positive__is_xO (Clone_f_clone (s)) - then - POSITIVE_XO (positive_from_int (div2 (positive_to_int (s)))) - else - POSITIVE_XI (positive_from_int (div2 (positive_to_int (s)))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v deleted file mode 100644 index 10e11483f..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Constants.v +++ /dev/null @@ -1,111 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Require Import List. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import Ascii. -Require Import String. -Require Import Coq.Floats.Floats. -From RecordUpdate Require Import RecordSet. -Import RecordSetNotations. - -(* From Core Require Import Core. *) - -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core_Base_Spec_Haxint. -Export Core_Base_Spec_Haxint. - -Definition v_BITS_128_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([128]))). - -Definition v_BITS_16_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([16]))). - -Definition v_BITS_32_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([32]))). - -Definition v_BITS_64_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([64]))). - -Definition v_BITS_8_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([8]))). - -Definition v_WORDSIZE_128_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 1]))). - -Definition v_WORDSIZE_128_SUB_1_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255; 255]))). - -Definition v_WORDSIZE_16_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([0; 0; 1]))). - -Definition v_WORDSIZE_16_SUB_1_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([255; 255]))). - -Definition v_WORDSIZE_32_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([0; 0; 0; 0; 1]))). - -Definition v_WORDSIZE_32_SUB_1_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([255; 255; 255; 255]))). - -Definition v_WORDSIZE_4_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([128]))). - -Definition v_WORDSIZE_4_SUB_1_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([127]))). - -Definition v_WORDSIZE_64_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([0; 0; 0; 0; 0; 0; 0; 0; 1]))). - -Definition v_WORDSIZE_64_SUB_1_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([255; 255; 255; 255; 255; 255; 255; 255]))). - -Definition v_WORDSIZE_8_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([0; 1]))). - -Definition v_WORDSIZE_8_SUB_1_ : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([255]))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v deleted file mode 100644 index 0ed1995d2..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Haxint.v +++ /dev/null @@ -1,87 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Require Import List. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import Ascii. -Require Import String. -Require Import Coq.Floats.Floats. -From RecordUpdate Require Import RecordSet. -Import RecordSetNotations. - -(* From Core Require Import Core. *) - -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -Record t_HaxInt : Type := - { - HaxInt_f_v : t_Cow ((t_Slice t_u8)); - }. -Arguments Build_t_HaxInt. -Arguments HaxInt_f_v. -#[export] Instance settable_t_HaxInt : Settable _ := - settable! (Build_t_HaxInt) . - -Definition v_HaxInt_ONE : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([1]))). - -Definition v_HaxInt_TWO : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([2]))). - -Definition v_HaxInt_ZERO : t_HaxInt := - Build_t_HaxInt (Cow_Borrowed (unsize ([]))). - -Instance t_Clone_622375820 : t_Clone ((t_HaxInt)) := - { - Clone_impl_f_clone := fun (self : t_HaxInt)=> - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))); - }. - -Definition div2 (s : t_HaxInt) : t_HaxInt := - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). - -Definition is_zero (s : t_HaxInt) : bool := - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v deleted file mode 100644 index cc19255f6..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Seq.v +++ /dev/null @@ -1,75 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Require Import List. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import Ascii. -Require Import String. -Require Import Coq.Floats.Floats. -From RecordUpdate Require Import RecordSet. -Import RecordSetNotations. - -(* From Core Require Import Core. *) - -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -Notation "'t_Seq'" := (t_Seq). - -Notation "'Seq_f_v'" := (Seq_f_v). - -Notation "'impl'" := (impl). - -Notation "'t_LIST'" := (t_LIST). - -Notation "'LIST_NIL'" := (LIST_NIL). - -Notation "'LIST_CONS'" := (LIST_CONS). - -Notation "'nil'" := (nil). - -Notation "'cons'" := (cons). - -Notation "'match_list'" := (match_list). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v deleted file mode 100644 index 935433761..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Unary.v +++ /dev/null @@ -1,102 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Require Import List. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import Ascii. -Require Import String. -Require Import Coq.Floats.Floats. -From RecordUpdate Require Import RecordSet. -Import RecordSetNotations. - -(* From Core Require Import Core. *) - -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core_Base_Spec_Haxint. -Export Core_Base_Spec_Haxint. - -Record t_Unary : Type := - { - Unary_0 : t_HaxInt; - }. -Arguments Build_t_Unary. -Arguments Unary_0. -#[export] Instance settable_t_Unary : Settable _ := - settable! (Build_t_Unary) . -Notation "'Unary'" := Build_t_Unary. - -Inductive t_UNARY : Type := -| UNARY_ZERO -| UNARY_SUCC : t_Unary -> _. -Arguments UNARY_ZERO. -Arguments UNARY_SUCC. - -Definition unary_from_int (x : t_HaxInt) : t_Unary := - Build_t_Unary (x). - -Definition unary_to_int (s : t_Unary) : t_HaxInt := - Unary_0 s. - -Instance t_Clone_289793624 : t_Clone ((t_Unary)) := - { - Clone_impl_f_clone := fun (self : t_Unary)=> - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))); - }. - -Definition pred (x : t_Unary) : t_Unary := - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). - -Definition match_unary (s : t_Unary) : t_UNARY := - if - is_zero (unary_to_int (Clone_f_clone (s))) - then - UNARY_ZERO - else - UNARY_SUCC (pred (s)). - -Definition succ (x : t_Unary) : t_Unary := - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v deleted file mode 100644 index 73ff4d4f8..000000000 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Spec_Z.v +++ /dev/null @@ -1,74 +0,0 @@ -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Require Import List. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import Ascii. -Require Import String. -Require Import Coq.Floats.Floats. -From RecordUpdate Require Import RecordSet. -Import RecordSetNotations. - -(* From Core Require Import Core. *) - -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core_Base_Spec_Binary. -Export Core_Base_Spec_Binary. - -Inductive t_Z : Type := -| Z_NEG : t_Positive -> _ -| Z_ZERO -| Z_POS : t_Positive -> _. -Arguments Z_NEG. -Arguments Z_ZERO. -Arguments Z_POS. - -Definition v_Z_ONE : t_Z := - Z_POS (xH). - -Definition v_Z_TWO : t_Z := - Z_POS (Build_t_Positive (v_HaxInt_TWO)). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v b/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v index 5bbffacc2..7a3a4585b 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v @@ -12,50 +12,6 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - From Core Require Import Core_Base_Spec. Export Core_Base_Spec. @@ -65,6 +21,9 @@ Export Core_Base_Binary. From Core Require Import Core_Cmp (t_Ordering). Export Core_Cmp (t_Ordering). +From Core Require Import Core_Base_Pos. +Export Core_Base_Pos. + Definition z_neg (x : t_Z) : t_Z := match x with | Z_NEG (p) => @@ -80,7 +39,7 @@ Definition z_bitor__n_succ (x : t_POS) : t_Positive := | POS_ZERO => xH | POS_POS (p) => - positive_from_int (succ (positive_to_int (p))) + positive_from_int (Hpos := ltac:(easy)) (unary_to_int (succ (unary_from_int (positive_to_int (p))))) end. Definition z_add__z_double (s : t_Z) : t_Z := @@ -182,7 +141,7 @@ Definition z_bitor__n_and (lhs : t_POS) (rhs : t_POS) : t_POS := | POS_ZERO => POS_ZERO | POS_POS (q) => - POS_POS (positive_from_int (bitand_binary (p) (q))) + match_pos (bitand_binary (p) (q)) end end. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v index 246ed40f6..2b2f1b1c2 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface.v @@ -12,55 +12,11 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. -From Core Require Import int. -Export int. - -From Core Require Import coerce. -Export coerce. +From Core Require Import Core_Base_interface_Coerce. +Export Core_Base_interface_Coerce. (* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v index 3ea3645c1..a08de4901 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v @@ -12,49 +12,8 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Marker. +Export Core_Marker. Class t_Concretization (v_Self : Type) (v_T : Type) `{t_Sized (v_T)} : Type := { diff --git a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v index a58dcdfd7..0fa9edfaf 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v @@ -1,3 +1,4 @@ + (* File automatically generated by Hacspec *) From Coq Require Import ZArith. Require Import List. @@ -12,79 +13,23 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core (t_cmp). -Export Core (t_cmp). - -From Core Require Import Core (t_ops). -Export Core (t_ops). - -From Core Require Import Core (t_base). -Export Core (t_base). - - - -From Core Require Import Core_Base_interface_Coerce_Abstraction. -Export Core_Base_interface_Coerce_Abstraction. - -From Core Require Import Core_Base_interface_Coerce_Concretization. -Export Core_Base_interface_Coerce_Concretization. - - - -From Core Require Import Core_Option (t_Option). -Export Core_Option (t_Option). - - - -From Core Require Import Core_Option_Option (t_None). -Export Core_Option_Option (t_None). - -From Core Require Import Core_Option_Option (t_Some). -Export Core_Option_Option (t_Some). +From Core Require Import Core_Cmp. +Export Core_Cmp. + +From Core Require Import Core_Ops. +Export Core_Ops. + +From Core Require Import Core_Base. +Export Core_Base. + + + +From Core Require Import Core_Base_interface_Coerce. +Export Core_Base_interface_Coerce. + + +From Core Require Import Core_Option. +Export Core_Option. From Core Require Import Core_Clone (t_Clone). Export Core_Clone (t_Clone). @@ -247,72 +192,72 @@ Arguments U8_f_v. (* NotImplementedYet *) -Instance t_Concretization_407178874 : t_Concretization ((t_Z)) ((t_I128)) := +#[global] Instance t_Concretization_407178874 : t_Concretization ((t_Z)) ((t_I128)) := { - Concretization_impl_43_f_concretize := fun (self : t_Z)=> + Concretization_f_concretize := fun (self : t_Z)=> Build_t_I128 (self); }. -Instance t_Clone_960918039 : t_Clone ((t_I128)) := +#[global] Instance t_Clone_960918039 : t_Clone ((t_I128)) := { - Clone_impl_51_f_clone := fun (self : t_I128)=> + Clone_f_clone := fun (self : t_I128)=> Build_t_I128 (Clone_f_clone (I128_f_v self)); }. -Instance t_Concretization_1068646878 : t_Concretization ((t_Z)) ((t_I64)) := +#[global] Instance t_Concretization_1068646878 : t_Concretization ((t_Z)) ((t_I64)) := { - Concretization_impl_57_f_concretize := fun (self : t_Z)=> + Concretization_f_concretize := fun (self : t_Z)=> Build_t_I64 (self); }. -Instance t_Clone_305340151 : t_Clone ((t_I64)) := +#[global] Instance t_Clone_305340151 : t_Clone ((t_I64)) := { - Clone_impl_65_f_clone := fun (self : t_I64)=> + Clone_f_clone := fun (self : t_I64)=> Build_t_I64 (Clone_f_clone (I64_f_v self)); }. -Instance t_Concretization_499270091 : t_Concretization ((t_Z)) ((t_I32)) := +#[global] Instance t_Concretization_499270091 : t_Concretization ((t_Z)) ((t_I32)) := { - Concretization_impl_71_f_concretize := fun (self : t_Z)=> + Concretization_f_concretize := fun (self : t_Z)=> Build_t_I32 (self); }. -Instance t_Clone_774571516 : t_Clone ((t_I32)) := +#[global] Instance t_Clone_774571516 : t_Clone ((t_I32)) := { - Clone_impl_79_f_clone := fun (self : t_I32)=> + Clone_f_clone := fun (self : t_I32)=> Build_t_I32 (Clone_f_clone (I32_f_v self)); }. -Instance t_Concretization_432063162 : t_Concretization ((t_Z)) ((t_I16)) := +#[global] Instance t_Concretization_432063162 : t_Concretization ((t_Z)) ((t_I16)) := { - Concretization_impl_85_f_concretize := fun (self : t_Z)=> + Concretization_f_concretize := fun (self : t_Z)=> Build_t_I16 (self); }. -Instance t_Clone_611206751 : t_Clone ((t_I16)) := +#[global] Instance t_Clone_611206751 : t_Clone ((t_I16)) := { - Clone_impl_93_f_clone := fun (self : t_I16)=> + Clone_f_clone := fun (self : t_I16)=> Build_t_I16 (Clone_f_clone (I16_f_v self)); }. -Instance t_Concretization_232722110 : t_Concretization ((t_Z)) ((t_I8)) := +#[global] Instance t_Concretization_232722110 : t_Concretization ((t_Z)) ((t_I8)) := { - Concretization_impl_99_f_concretize := fun (self : t_Z)=> + Concretization_f_concretize := fun (self : t_Z)=> Build_t_I8 (self); }. -Instance t_Clone_122768833 : t_Clone ((t_I8)) := +#[global] Instance t_Clone_122768833 : t_Clone ((t_I8)) := { - Clone_impl_107_f_clone := fun (self : t_I8)=> + Clone_f_clone := fun (self : t_I8)=> Build_t_I8 (Clone_f_clone (I8_f_v self)); }. -Instance t_Constants_572255769 : t_Constants ((t_I128)) := +#[global] Instance t_Constants_572255769 : t_Constants ((t_I128)) := { - Constants_impl_40_f_ZERO := Build_t_I128 (Z_ZERO); - Constants_impl_40_f_ONE := Build_t_I128 (Z_POS (xH)); - Constants_impl_40_f_MIN := Build_t_I128 (Z_NEG (Build_t_Positive (v_WORDSIZE_64_))); - Constants_impl_40_f_MAX := Build_t_I128 (Z_POS (Build_t_Positive (v_WORDSIZE_64_SUB_1_))); + Constants_f_ZERO := Build_t_I128 (Z_ZERO); + Constants_f_ONE := Build_t_I128 (Z_POS (xH)); + Constants_f_MIN := Build_t_I128 (Z_NEG (positive_from_int (Hpos := ltac:(easy)) (v_WORDSIZE_64_))); + Constants_f_MAX := Build_t_I128 (Z_POS (positive_from_int (Hpos := ltac:(easy)) (v_WORDSIZE_64_SUB_1_))); }. Definition impl_41__BITS : t_U32 := @@ -321,12 +266,12 @@ Definition impl_41__BITS : t_U32 := Definition impl_41__WORDSIZE : t_HaxInt := v_WORDSIZE_128_. -Instance t_Constants_908090553 : t_Constants ((t_I64)) := +#[global] Instance t_Constants_908090553 : t_Constants ((t_I64)) := { - Constants_impl_54_f_ZERO := Build_t_I64 (Z_ZERO); - Constants_impl_54_f_ONE := Build_t_I64 (Z_POS (xH)); - Constants_impl_54_f_MIN := Build_t_I64 (Z_NEG (Build_t_Positive (v_WORDSIZE_32_))); - Constants_impl_54_f_MAX := Build_t_I64 (Z_POS (Build_t_Positive (v_WORDSIZE_32_SUB_1_))); + Constants_f_ZERO := Build_t_I64 (Z_ZERO); + Constants_f_ONE := Build_t_I64 (Z_POS (xH)); + Constants_f_MIN := Build_t_I64 (Z_NEG (positive_from_int (Hpos := ltac:(easy)) (v_WORDSIZE_32_))); + Constants_f_MAX := Build_t_I64 (Z_POS (positive_from_int (Hpos := ltac:(easy)) (v_WORDSIZE_32_SUB_1_))); }. Definition impl_55__BITS : t_U32 := @@ -335,12 +280,12 @@ Definition impl_55__BITS : t_U32 := Definition impl_55__WORDSIZE : t_HaxInt := v_WORDSIZE_64_. -Instance t_Constants_99970330 : t_Constants ((t_I32)) := +#[global] Instance t_Constants_99970330 : t_Constants ((t_I32)) := { - Constants_impl_68_f_ZERO := Build_t_I32 (Z_ZERO); - Constants_impl_68_f_ONE := Build_t_I32 (Z_POS (xH)); - Constants_impl_68_f_MIN := Build_t_I32 (Z_NEG (Build_t_Positive (v_WORDSIZE_16_))); - Constants_impl_68_f_MAX := Build_t_I32 (Z_POS (Build_t_Positive (v_WORDSIZE_16_SUB_1_))); + Constants_f_ZERO := Build_t_I32 (Z_ZERO); + Constants_f_ONE := Build_t_I32 (Z_POS (xH)); + Constants_f_MIN := Build_t_I32 (Z_NEG (positive_from_int (Hpos := ltac:(easy)) (v_WORDSIZE_16_))); + Constants_f_MAX := Build_t_I32 (Z_POS (positive_from_int (Hpos := ltac:(easy)) (v_WORDSIZE_16_SUB_1_))); }. Definition impl_69__BITS : t_U32 := @@ -349,12 +294,12 @@ Definition impl_69__BITS : t_U32 := Definition impl_69__WORDSIZE : t_HaxInt := v_WORDSIZE_32_. -Instance t_Constants_687261461 : t_Constants ((t_I16)) := +#[global] Instance t_Constants_687261461 : t_Constants ((t_I16)) := { - Constants_impl_82_f_ZERO := Build_t_I16 (Z_ZERO); - Constants_impl_82_f_ONE := Build_t_I16 (Z_POS (xH)); - Constants_impl_82_f_MIN := Build_t_I16 (Z_NEG (Build_t_Positive (v_WORDSIZE_8_))); - Constants_impl_82_f_MAX := Build_t_I16 (Z_POS (Build_t_Positive (v_WORDSIZE_8_SUB_1_))); + Constants_f_ZERO := Build_t_I16 (Z_ZERO); + Constants_f_ONE := Build_t_I16 (Z_POS (xH)); + Constants_f_MIN := Build_t_I16 (Z_NEG (positive_from_int (Hpos := ltac:(easy)) (v_WORDSIZE_8_))); + Constants_f_MAX := Build_t_I16 (Z_POS (positive_from_int (Hpos := ltac:(easy)) (v_WORDSIZE_8_SUB_1_))); }. Definition impl_83__BITS : t_U32 := @@ -363,12 +308,12 @@ Definition impl_83__BITS : t_U32 := Definition impl_83__WORDSIZE : t_HaxInt := v_WORDSIZE_16_. -Instance t_Constants_636847136 : t_Constants ((t_I8)) := +#[global] Instance t_Constants_636847136 : t_Constants ((t_I8)) := { - Constants_impl_96_f_ZERO := Build_t_I8 (Z_ZERO); - Constants_impl_96_f_ONE := Build_t_I8 (Z_POS (xH)); - Constants_impl_96_f_MIN := Build_t_I8 (Z_NEG (Build_t_Positive (v_WORDSIZE_4_))); - Constants_impl_96_f_MAX := Build_t_I8 (Z_POS (Build_t_Positive (v_WORDSIZE_4_SUB_1_))); + Constants_f_ZERO := Build_t_I8 (Z_ZERO); + Constants_f_ONE := Build_t_I8 (Z_POS (xH)); + Constants_f_MIN := Build_t_I8 (Z_NEG (positive_from_int (Hpos := ltac:(easy)) (v_WORDSIZE_4_))); + Constants_f_MAX := Build_t_I8 (Z_POS (positive_from_int (Hpos := ltac:(easy)) (v_WORDSIZE_4_SUB_1_))); }. Definition impl_97__BITS : t_U32 := @@ -377,12 +322,12 @@ Definition impl_97__BITS : t_U32 := Definition impl_97__WORDSIZE : t_HaxInt := v_WORDSIZE_8_. -Instance t_Constants_119702187 : t_Constants ((t_U128)) := +#[global] Instance t_Constants_119702187 : t_Constants ((t_U128)) := { - Constants_impl_110_f_ZERO := Build_t_U128 (v_HaxInt_ZERO); - Constants_impl_110_f_ONE := Build_t_U128 (v_HaxInt_ONE); - Constants_impl_110_f_MIN := Build_t_U128 (v_HaxInt_ZERO); - Constants_impl_110_f_MAX := Build_t_U128 (v_WORDSIZE_128_SUB_1_); + Constants_f_ZERO := Build_t_U128 (v_HaxInt_ZERO); + Constants_f_ONE := Build_t_U128 (v_HaxInt_ONE); + Constants_f_MIN := Build_t_U128 (v_HaxInt_ZERO); + Constants_f_MAX := Build_t_U128 (v_WORDSIZE_128_SUB_1_); }. Definition impl_111__BITS : t_U32 := @@ -391,12 +336,12 @@ Definition impl_111__BITS : t_U32 := Definition impl_111__WORDSIZE : t_HaxInt := v_WORDSIZE_128_. -Instance t_Constants_579677195 : t_Constants ((t_U64)) := +#[global] Instance t_Constants_579677195 : t_Constants ((t_U64)) := { - Constants_impl_137_f_ZERO := Build_t_U64 (v_HaxInt_ZERO); - Constants_impl_137_f_ONE := Build_t_U64 (v_HaxInt_ONE); - Constants_impl_137_f_MIN := Build_t_U64 (v_HaxInt_ZERO); - Constants_impl_137_f_MAX := Build_t_U64 (v_WORDSIZE_64_SUB_1_); + Constants_f_ZERO := Build_t_U64 (v_HaxInt_ZERO); + Constants_f_ONE := Build_t_U64 (v_HaxInt_ONE); + Constants_f_MIN := Build_t_U64 (v_HaxInt_ZERO); + Constants_f_MAX := Build_t_U64 (v_WORDSIZE_64_SUB_1_); }. Definition impl_138__BITS : t_U32 := @@ -405,12 +350,12 @@ Definition impl_138__BITS : t_U32 := Definition impl_138__WORDSIZE : t_HaxInt := v_WORDSIZE_64_. -Instance t_Constants_63564700 : t_Constants ((t_U32)) := +#[global] Instance t_Constants_63564700 : t_Constants ((t_U32)) := { - Constants_impl_164_f_ZERO := Build_t_U32 (v_HaxInt_ZERO); - Constants_impl_164_f_ONE := Build_t_U32 (v_HaxInt_ONE); - Constants_impl_164_f_MIN := Build_t_U32 (v_HaxInt_ZERO); - Constants_impl_164_f_MAX := Build_t_U32 (v_WORDSIZE_32_SUB_1_); + Constants_f_ZERO := Build_t_U32 (v_HaxInt_ZERO); + Constants_f_ONE := Build_t_U32 (v_HaxInt_ONE); + Constants_f_MIN := Build_t_U32 (v_HaxInt_ZERO); + Constants_f_MAX := Build_t_U32 (v_WORDSIZE_32_SUB_1_); }. Definition impl_165__BITS : t_U32 := @@ -419,12 +364,12 @@ Definition impl_165__BITS : t_U32 := Definition impl_165__WORDSIZE : t_HaxInt := v_WORDSIZE_32_. -Instance t_Constants_221027212 : t_Constants ((t_U16)) := +#[global] Instance t_Constants_221027212 : t_Constants ((t_U16)) := { - Constants_impl_191_f_ZERO := Build_t_U16 (v_HaxInt_ZERO); - Constants_impl_191_f_ONE := Build_t_U16 (v_HaxInt_ONE); - Constants_impl_191_f_MIN := Build_t_U16 (v_HaxInt_ZERO); - Constants_impl_191_f_MAX := Build_t_U16 (v_WORDSIZE_16_SUB_1_); + Constants_f_ZERO := Build_t_U16 (v_HaxInt_ZERO); + Constants_f_ONE := Build_t_U16 (v_HaxInt_ONE); + Constants_f_MIN := Build_t_U16 (v_HaxInt_ZERO); + Constants_f_MAX := Build_t_U16 (v_WORDSIZE_16_SUB_1_); }. Definition impl_192__BITS : t_U32 := @@ -433,12 +378,12 @@ Definition impl_192__BITS : t_U32 := Definition impl_192__WORDSIZE : t_HaxInt := v_WORDSIZE_16_. -Instance t_Constants_932070468 : t_Constants ((t_U8)) := +#[global] Instance t_Constants_932070468 : t_Constants ((t_U8)) := { - Constants_impl_218_f_ZERO := Build_t_U8 (v_HaxInt_ZERO); - Constants_impl_218_f_ONE := Build_t_U8 (v_HaxInt_ONE); - Constants_impl_218_f_MIN := Build_t_U8 (v_HaxInt_ZERO); - Constants_impl_218_f_MAX := Build_t_U8 (v_WORDSIZE_8_SUB_1_); + Constants_f_ZERO := Build_t_U8 (v_HaxInt_ZERO); + Constants_f_ONE := Build_t_U8 (v_HaxInt_ONE); + Constants_f_MIN := Build_t_U8 (v_HaxInt_ZERO); + Constants_f_MAX := Build_t_U8 (v_WORDSIZE_8_SUB_1_); }. Definition impl_219__BITS : t_U32 := @@ -447,87 +392,87 @@ Definition impl_219__BITS : t_U32 := Definition impl_219__WORDSIZE : t_HaxInt := v_WORDSIZE_8_. -Instance t_Clone_138729312 : t_Clone ((t_U128)) := +#[global] Instance t_Clone_138729312 : t_Clone ((t_U128)) := { - Clone_impl_134_f_clone := fun (self : t_U128)=> + Clone_f_clone := fun (self : t_U128)=> Build_t_U128 (Clone_f_clone (U128_f_v self)); }. -Instance t_Clone_461763462 : t_Clone ((t_U64)) := +#[global] Instance t_Clone_461763462 : t_Clone ((t_U64)) := { - Clone_impl_161_f_clone := fun (self : t_U64)=> + Clone_f_clone := fun (self : t_U64)=> Build_t_U64 (Clone_f_clone (U64_f_v self)); }. -Instance t_Clone_412151272 : t_Clone ((t_U32)) := +#[global] Instance t_Clone_412151272 : t_Clone ((t_U32)) := { - Clone_impl_188_f_clone := fun (self : t_U32)=> + Clone_f_clone := fun (self : t_U32)=> Build_t_U32 (Clone_f_clone (U32_f_v self)); }. -Instance t_Clone_387504240 : t_Clone ((t_U16)) := +#[global] Instance t_Clone_387504240 : t_Clone ((t_U16)) := { - Clone_impl_215_f_clone := fun (self : t_U16)=> + Clone_f_clone := fun (self : t_U16)=> Build_t_U16 (Clone_f_clone (U16_f_v self)); }. -Instance t_Clone_917943387 : t_Clone ((t_U8)) := +#[global] Instance t_Clone_917943387 : t_Clone ((t_U8)) := { - Clone_impl_242_f_clone := fun (self : t_U8)=> + Clone_f_clone := fun (self : t_U8)=> Build_t_U8 (Clone_f_clone (U8_f_v self)); }. -Instance t_Abstraction_970113908 : t_Abstraction ((t_I128)) := +#[global] Instance t_Abstraction_970113908 : t_Abstraction ((t_I128)) := { - Abstraction_impl_42_f_AbstractType := t_Z; - Abstraction_impl_42_f_lift := fun (self : t_I128)=> + Abstraction_f_AbstractType := t_Z; + Abstraction_f_lift := fun (self : t_I128)=> I128_f_v self; }. -Instance t_From_330503528 : t_From ((t_I8)) ((t_I128)) := +#[global] Instance t_From_330503528 : t_From ((t_I8)) ((t_I128)) := { - From_impl_36_f_from := fun (x : t_I128)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I128)=> + Concretization_f_concretize (Abstraction_f_lift (x) : t_Z); }. -Instance t_From_185067369 : t_From ((t_I16)) ((t_I128)) := +#[global] Instance t_From_185067369 : t_From ((t_I16)) ((t_I128)) := { - From_impl_37_f_from := fun (x : t_I128)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (Abstraction_f_lift (x) : t_Z); }. -Instance t_From_106548803 : t_From ((t_I32)) ((t_I128)) := +#[globa] Instance t_From_106548803 : t_From ((t_I32)) ((t_I128)) := { - From_impl_38_f_from := fun (x : t_I128)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (Abstraction_f_lift (x) : t_Z); }. -Instance t_From_237552649 : t_From ((t_I64)) ((t_I128)) := +#[globa] Instance t_From_237552649 : t_From ((t_I64)) ((t_I128)) := { - From_impl_39_f_from := fun (x : t_I128)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (Abstraction_f_lift (x) : t_Z); }. -Instance t_PartialEq_488790252 : t_PartialEq ((t_I128)) ((t_I128)) := +#[globa] Instance t_PartialEq_488790252 : t_PartialEq ((t_I128)) ((t_I128)) := { - PartialEq_impl_52_f_eq := fun (self : t_I128) (rhs : t_I128)=> + PartialEq_f_eq := fun (self : t_I128) (rhs : t_I128)=> PartialEq_f_eq (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); - PartialEq_impl_52_f_ne := fun (self : t_I128) (rhs : t_I128)=> + PartialEq_f_ne := fun (self : t_I128) (rhs : t_I128)=> PartialEq_f_ne (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); }. -Instance t_PartialOrd_387128921 : t_PartialOrd ((t_I128)) ((t_I128)) := +#[globa] Instance t_PartialOrd_387128921 : t_PartialOrd ((t_I128)) ((t_I128)) := { - PartialOrd_impl_53_f_partial_cmp := fun (self : t_I128) (rhs : t_I128)=> + PartialOrd_f_partial_cmp := fun (self : t_I128) (rhs : t_I128)=> Option_Some (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); - PartialOrd_impl_53_f_lt := fun (self : t_I128) (rhs : t_I128)=> + PartialOrd_f_lt := fun (self : t_I128) (rhs : t_I128)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less => true | _ => false end; - PartialOrd_impl_53_f_le := fun (self : t_I128) (rhs : t_I128)=> + PartialOrd_f_le := fun (self : t_I128) (rhs : t_I128)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less | Ordering_Equal => @@ -535,14 +480,14 @@ Instance t_PartialOrd_387128921 : t_PartialOrd ((t_I128)) ((t_I128)) := | _ => false end; - PartialOrd_impl_53_f_gt := fun (self : t_I128) (rhs : t_I128)=> + PartialOrd_f_gt := fun (self : t_I128) (rhs : t_I128)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater => true | _ => false end; - PartialOrd_impl_53_f_ge := fun (self : t_I128) (rhs : t_I128)=> + PartialOrd_f_ge := fun (self : t_I128) (rhs : t_I128)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater | Ordering_Equal => @@ -552,57 +497,57 @@ Instance t_PartialOrd_387128921 : t_PartialOrd ((t_I128)) ((t_I128)) := end; }. -Instance t_Abstraction_692501606 : t_Abstraction ((t_I64)) := +#[globa] Instance t_Abstraction_692501606 : t_Abstraction ((t_I64)) := { - Abstraction_impl_56_f_AbstractType := t_Z; - Abstraction_impl_56_f_lift := fun (self : t_I64)=> + Abstraction_f_AbstractType := t_Z; + Abstraction_f_lift := fun (self : t_I64)=> I64_f_v self; }. -Instance t_From_318313768 : t_From ((t_I8)) ((t_I64)) := +#[globa] Instance t_From_318313768 : t_From ((t_I8)) ((t_I64)) := { - From_impl_32_f_from := fun (x : t_I64)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I8) (Abstraction_f_lift (x)); }. -Instance t_From_215423074 : t_From ((t_I16)) ((t_I64)) := +#[globa] Instance t_From_215423074 : t_From ((t_I16)) ((t_I64)) := { - From_impl_33_f_from := fun (x : t_I64)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (Abstraction_f_lift (x)); }. -Instance t_From_221659723 : t_From ((t_I32)) ((t_I64)) := +#[globa] Instance t_From_221659723 : t_From ((t_I32)) ((t_I64)) := { - From_impl_34_f_from := fun (x : t_I64)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (Abstraction_f_lift (x)); }. -Instance t_From_927453474 : t_From ((t_I128)) ((t_I64)) := +#[globa] Instance t_From_927453474 : t_From ((t_I128)) ((t_I64)) := { - From_impl_35_f_from := fun (x : t_I64)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (Abstraction_f_lift (x)); }. -Instance t_PartialEq_474861724 : t_PartialEq ((t_I64)) ((t_I64)) := +#[globa] Instance t_PartialEq_474861724 : t_PartialEq ((t_I64)) ((t_I64)) := { - PartialEq_impl_66_f_eq := fun (self : t_I64) (rhs : t_I64)=> - PartialEq_f_eq (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); - PartialEq_impl_66_f_ne := fun (self : t_I64) (rhs : t_I64)=> - PartialEq_f_ne (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_eq := fun (self : t_I64) (rhs : t_I64)=> + PartialEq_f_eq (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_ne := fun (self : t_I64) (rhs : t_I64)=> + PartialEq_f_ne (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); }. -Instance t_PartialOrd_552634265 : t_PartialOrd ((t_I64)) ((t_I64)) := +#[globa] Instance t_PartialOrd_552634265 : t_PartialOrd ((t_I64)) ((t_I64)) := { - PartialOrd_impl_67_f_partial_cmp := fun (self : t_I64) (rhs : t_I64)=> + PartialOrd_f_partial_cmp := fun (self : t_I64) (rhs : t_I64)=> Option_Some (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); - PartialOrd_impl_67_f_lt := fun (self : t_I64) (rhs : t_I64)=> + PartialOrd_f_lt := fun (self : t_I64) (rhs : t_I64)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less => true | _ => false end; - PartialOrd_impl_67_f_le := fun (self : t_I64) (rhs : t_I64)=> + PartialOrd_f_le := fun (self : t_I64) (rhs : t_I64)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less | Ordering_Equal => @@ -610,14 +555,14 @@ Instance t_PartialOrd_552634265 : t_PartialOrd ((t_I64)) ((t_I64)) := | _ => false end; - PartialOrd_impl_67_f_gt := fun (self : t_I64) (rhs : t_I64)=> + PartialOrd_f_gt := fun (self : t_I64) (rhs : t_I64)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater => true | _ => false end; - PartialOrd_impl_67_f_ge := fun (self : t_I64) (rhs : t_I64)=> + PartialOrd_f_ge := fun (self : t_I64) (rhs : t_I64)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater | Ordering_Equal => @@ -627,57 +572,57 @@ Instance t_PartialOrd_552634265 : t_PartialOrd ((t_I64)) ((t_I64)) := end; }. -Instance t_Abstraction_493183574 : t_Abstraction ((t_I32)) := +#[globa] Instance t_Abstraction_493183574 : t_Abstraction ((t_I32)) := { - Abstraction_impl_70_f_AbstractType := t_Z; - Abstraction_impl_70_f_lift := fun (self : t_I32)=> + Abstraction_f_AbstractType := t_Z; + Abstraction_f_lift := fun (self : t_I32)=> I32_f_v self; }. -Instance t_From_573287156 : t_From ((t_I8)) ((t_I32)) := +#[globa] Instance t_From_573287156 : t_From ((t_I8)) ((t_I32)) := { - From_impl_28_f_from := fun (x : t_I32)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I8) (Abstraction_f_lift (x)); }. -Instance t_From_278670998 : t_From ((t_I16)) ((t_I32)) := +#[globa] Instance t_From_278670998 : t_From ((t_I16)) ((t_I32)) := { - From_impl_29_f_from := fun (x : t_I32)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (Abstraction_f_lift (x)); }. -Instance t_From_697572388 : t_From ((t_I64)) ((t_I32)) := +#[globa] Instance t_From_697572388 : t_From ((t_I64)) ((t_I32)) := { - From_impl_30_f_from := fun (x : t_I32)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (Abstraction_f_lift (x)); }. -Instance t_From_30146175 : t_From ((t_I128)) ((t_I32)) := +#[globa] Instance t_From_30146175 : t_From ((t_I128)) ((t_I32)) := { - From_impl_31_f_from := fun (x : t_I32)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (Abstraction_f_lift (x)); }. -Instance t_PartialEq_795859780 : t_PartialEq ((t_I32)) ((t_I32)) := +#[globa] Instance t_PartialEq_795859780 : t_PartialEq ((t_I32)) ((t_I32)) := { - PartialEq_impl_80_f_eq := fun (self : t_I32) (rhs : t_I32)=> - PartialEq_f_eq (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); - PartialEq_impl_80_f_ne := fun (self : t_I32) (rhs : t_I32)=> - PartialEq_f_ne (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_eq := fun (self : t_I32) (rhs : t_I32)=> + PartialEq_f_eq (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_ne := fun (self : t_I32) (rhs : t_I32)=> + PartialEq_f_ne (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); }. -Instance t_PartialOrd_126468614 : t_PartialOrd ((t_I32)) ((t_I32)) := +#[globa] Instance t_PartialOrd_126468614 : t_PartialOrd ((t_I32)) ((t_I32)) := { - PartialOrd_impl_81_f_partial_cmp := fun (self : t_I32) (rhs : t_I32)=> + PartialOrd_f_partial_cmp := fun (self : t_I32) (rhs : t_I32)=> Option_Some (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); - PartialOrd_impl_81_f_lt := fun (self : t_I32) (rhs : t_I32)=> + PartialOrd_f_lt := fun (self : t_I32) (rhs : t_I32)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less => true | _ => false end; - PartialOrd_impl_81_f_le := fun (self : t_I32) (rhs : t_I32)=> + PartialOrd_f_le := fun (self : t_I32) (rhs : t_I32)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less | Ordering_Equal => @@ -685,14 +630,14 @@ Instance t_PartialOrd_126468614 : t_PartialOrd ((t_I32)) ((t_I32)) := | _ => false end; - PartialOrd_impl_81_f_gt := fun (self : t_I32) (rhs : t_I32)=> + PartialOrd_f_gt := fun (self : t_I32) (rhs : t_I32)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater => true | _ => false end; - PartialOrd_impl_81_f_ge := fun (self : t_I32) (rhs : t_I32)=> + PartialOrd_f_ge := fun (self : t_I32) (rhs : t_I32)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater | Ordering_Equal => @@ -702,57 +647,57 @@ Instance t_PartialOrd_126468614 : t_PartialOrd ((t_I32)) ((t_I32)) := end; }. -Instance t_Abstraction_8671741 : t_Abstraction ((t_I16)) := +#[globa] Instance t_Abstraction_8671741 : t_Abstraction ((t_I16)) := { - Abstraction_impl_84_f_AbstractType := t_Z; - Abstraction_impl_84_f_lift := fun (self : t_I16)=> + Abstraction_f_AbstractType := t_Z; + Abstraction_f_lift := fun (self : t_I16)=> I16_f_v self; }. -Instance t_From_767089390 : t_From ((t_I8)) ((t_I16)) := +#[globa] Instance t_From_767089390 : t_From ((t_I8)) ((t_I16)) := { - From_impl_24_f_from := fun (x : t_I16)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I8) (Abstraction_f_lift (x)); }. -Instance t_From_339600325 : t_From ((t_I32)) ((t_I16)) := +#[globa] Instance t_From_339600325 : t_From ((t_I32)) ((t_I16)) := { - From_impl_25_f_from := fun (x : t_I16)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (Abstraction_f_lift (x)); }. -Instance t_From_929749154 : t_From ((t_I64)) ((t_I16)) := +#[globa] Instance t_From_929749154 : t_From ((t_I64)) ((t_I16)) := { - From_impl_26_f_from := fun (x : t_I16)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (Abstraction_f_lift (x)); }. -Instance t_From_366897745 : t_From ((t_I128)) ((t_I16)) := +#[globa] Instance t_From_366897745 : t_From ((t_I128)) ((t_I16)) := { - From_impl_27_f_from := fun (x : t_I16)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (Abstraction_f_lift (x)); }. -Instance t_PartialEq_359538097 : t_PartialEq ((t_I16)) ((t_I16)) := +#[globa] Instance t_PartialEq_359538097 : t_PartialEq ((t_I16)) ((t_I16)) := { - PartialEq_impl_94_f_eq := fun (self : t_I16) (rhs : t_I16)=> - PartialEq_f_eq (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); - PartialEq_impl_94_f_ne := fun (self : t_I16) (rhs : t_I16)=> - PartialEq_f_ne (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_eq := fun (self : t_I16) (rhs : t_I16)=> + PartialEq_f_eq (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_ne := fun (self : t_I16) (rhs : t_I16)=> + PartialEq_f_ne (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); }. -Instance t_PartialOrd_524872806 : t_PartialOrd ((t_I16)) ((t_I16)) := +#[globa] Instance t_PartialOrd_524872806 : t_PartialOrd ((t_I16)) ((t_I16)) := { - PartialOrd_impl_95_f_partial_cmp := fun (self : t_I16) (rhs : t_I16)=> + PartialOrd_f_partial_cmp := fun (self : t_I16) (rhs : t_I16)=> Option_Some (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); - PartialOrd_impl_95_f_lt := fun (self : t_I16) (rhs : t_I16)=> + PartialOrd_f_lt := fun (self : t_I16) (rhs : t_I16)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less => true | _ => false end; - PartialOrd_impl_95_f_le := fun (self : t_I16) (rhs : t_I16)=> + PartialOrd_f_le := fun (self : t_I16) (rhs : t_I16)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less | Ordering_Equal => @@ -760,14 +705,14 @@ Instance t_PartialOrd_524872806 : t_PartialOrd ((t_I16)) ((t_I16)) := | _ => false end; - PartialOrd_impl_95_f_gt := fun (self : t_I16) (rhs : t_I16)=> + PartialOrd_f_gt := fun (self : t_I16) (rhs : t_I16)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater => true | _ => false end; - PartialOrd_impl_95_f_ge := fun (self : t_I16) (rhs : t_I16)=> + PartialOrd_f_ge := fun (self : t_I16) (rhs : t_I16)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater | Ordering_Equal => @@ -777,57 +722,57 @@ Instance t_PartialOrd_524872806 : t_PartialOrd ((t_I16)) ((t_I16)) := end; }. -Instance t_Abstraction_78490685 : t_Abstraction ((t_I8)) := +#[globa] Instance t_Abstraction_78490685 : t_Abstraction ((t_I8)) := { - Abstraction_impl_98_f_AbstractType := t_Z; - Abstraction_impl_98_f_lift := fun (self : t_I8)=> + Abstraction_f_AbstractType := t_Z; + Abstraction_f_lift := fun (self : t_I8)=> I8_f_v self; }. -Instance t_From_995744130 : t_From ((t_I16)) ((t_I8)) := +#[globa] Instance t_From_995744130 : t_From ((t_I16)) ((t_I8)) := { - From_impl_20_f_from := fun (x : t_I8)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (Abstraction_f_lift (x)); }. -Instance t_From_513826093 : t_From ((t_I32)) ((t_I8)) := +#[globa] Instance t_From_513826093 : t_From ((t_I32)) ((t_I8)) := { - From_impl_21_f_from := fun (x : t_I8)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (Abstraction_f_lift (x)); }. -Instance t_From_843443999 : t_From ((t_I64)) ((t_I8)) := +#[globa] Instance t_From_843443999 : t_From ((t_I64)) ((t_I8)) := { - From_impl_22_f_from := fun (x : t_I8)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (Abstraction_f_lift (x)); }. -Instance t_From_532428771 : t_From ((t_I128)) ((t_I8)) := +#[globa] Instance t_From_532428771 : t_From ((t_I128)) ((t_I8)) := { - From_impl_23_f_from := fun (x : t_I8)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_I8)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_Z t_I128) (Abstraction_f_lift (x)); }. -Instance t_PartialEq_594648758 : t_PartialEq ((t_I8)) ((t_I8)) := +#[globa] Instance t_PartialEq_594648758 : t_PartialEq ((t_I8)) ((t_I8)) := { - PartialEq_impl_108_f_eq := fun (self : t_I8) (rhs : t_I8)=> - PartialEq_f_eq (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); - PartialEq_impl_108_f_ne := fun (self : t_I8) (rhs : t_I8)=> - PartialEq_f_ne (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_eq := fun (self : t_I8) (rhs : t_I8)=> + PartialEq_f_eq (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_ne := fun (self : t_I8) (rhs : t_I8)=> + PartialEq_f_ne (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); }. -Instance t_PartialOrd_221919414 : t_PartialOrd ((t_I8)) ((t_I8)) := +#[globa] Instance t_PartialOrd_221919414 : t_PartialOrd ((t_I8)) ((t_I8)) := { - PartialOrd_impl_109_f_partial_cmp := fun (self : t_I8) (rhs : t_I8)=> + PartialOrd_f_partial_cmp := fun (self : t_I8) (rhs : t_I8)=> Option_Some (z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); - PartialOrd_impl_109_f_lt := fun (self : t_I8) (rhs : t_I8)=> + PartialOrd_f_lt := fun (self : t_I8) (rhs : t_I8)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less => true | _ => false end; - PartialOrd_impl_109_f_le := fun (self : t_I8) (rhs : t_I8)=> + PartialOrd_f_le := fun (self : t_I8) (rhs : t_I8)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less | Ordering_Equal => @@ -835,14 +780,14 @@ Instance t_PartialOrd_221919414 : t_PartialOrd ((t_I8)) ((t_I8)) := | _ => false end; - PartialOrd_impl_109_f_gt := fun (self : t_I8) (rhs : t_I8)=> + PartialOrd_f_gt := fun (self : t_I8) (rhs : t_I8)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater => true | _ => false end; - PartialOrd_impl_109_f_ge := fun (self : t_I8) (rhs : t_I8)=> + PartialOrd_f_ge := fun (self : t_I8) (rhs : t_I8)=> match z_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater | Ordering_Equal => @@ -852,33 +797,33 @@ Instance t_PartialOrd_221919414 : t_PartialOrd ((t_I8)) ((t_I8)) := end; }. -Instance t_Abstraction_133243863 : t_Abstraction ((t_U128)) := +#[globa] Instance t_Abstraction_133243863 : t_Abstraction ((t_U128)) := { - Abstraction_impl_112_f_AbstractType := t_HaxInt; - Abstraction_impl_112_f_lift := fun (self : t_U128)=> + Abstraction_f_AbstractType := t_HaxInt; + Abstraction_f_lift := fun (self : t_U128)=> U128_f_v self; }. -Instance t_PartialEq_792968920 : t_PartialEq ((t_U128)) ((t_U128)) := +#[globa] Instance t_PartialEq_792968920 : t_PartialEq ((t_U128)) ((t_U128)) := { - PartialEq_impl_135_f_eq := fun (self : t_U128) (rhs : t_U128)=> - PartialEq_f_eq (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); - PartialEq_impl_135_f_ne := fun (self : t_U128) (rhs : t_U128)=> - PartialEq_f_ne (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_eq := fun (self : t_U128) (rhs : t_U128)=> + PartialEq_f_eq (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_ne := fun (self : t_U128) (rhs : t_U128)=> + PartialEq_f_ne (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); }. -Instance t_PartialOrd_168269581 : t_PartialOrd ((t_U128)) ((t_U128)) := +#[globa] Instance t_PartialOrd_168269581 : t_PartialOrd ((t_U128)) ((t_U128)) := { - PartialOrd_impl_136_f_partial_cmp := fun (self : t_U128) (rhs : t_U128)=> + PartialOrd_f_partial_cmp := fun (self : t_U128) (rhs : t_U128)=> Option_Some (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); - PartialOrd_impl_136_f_lt := fun (self : t_U128) (rhs : t_U128)=> + PartialOrd_f_lt := fun (self : t_U128) (rhs : t_U128)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less => true | _ => false end; - PartialOrd_impl_136_f_le := fun (self : t_U128) (rhs : t_U128)=> + PartialOrd_f_le := fun (self : t_U128) (rhs : t_U128)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less | Ordering_Equal => @@ -886,14 +831,14 @@ Instance t_PartialOrd_168269581 : t_PartialOrd ((t_U128)) ((t_U128)) := | _ => false end; - PartialOrd_impl_136_f_gt := fun (self : t_U128) (rhs : t_U128)=> + PartialOrd_f_gt := fun (self : t_U128) (rhs : t_U128)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater => true | _ => false end; - PartialOrd_impl_136_f_ge := fun (self : t_U128) (rhs : t_U128)=> + PartialOrd_f_ge := fun (self : t_U128) (rhs : t_U128)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater | Ordering_Equal => @@ -903,33 +848,33 @@ Instance t_PartialOrd_168269581 : t_PartialOrd ((t_U128)) ((t_U128)) := end; }. -Instance t_Abstraction_219241396 : t_Abstraction ((t_U64)) := +#[globa] Instance t_Abstraction_219241396 : t_Abstraction ((t_U64)) := { - Abstraction_impl_139_f_AbstractType := t_HaxInt; - Abstraction_impl_139_f_lift := fun (self : t_U64)=> + Abstraction_f_AbstractType := t_HaxInt; + Abstraction_f_lift := fun (self : t_U64)=> U64_f_v self; }. -Instance t_PartialEq_162514109 : t_PartialEq ((t_U64)) ((t_U64)) := +#[globa] Instance t_PartialEq_162514109 : t_PartialEq ((t_U64)) ((t_U64)) := { - PartialEq_impl_162_f_eq := fun (self : t_U64) (rhs : t_U64)=> - PartialEq_f_eq (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); - PartialEq_impl_162_f_ne := fun (self : t_U64) (rhs : t_U64)=> - PartialEq_f_ne (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_eq := fun (self : t_U64) (rhs : t_U64)=> + PartialEq_f_eq (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_ne := fun (self : t_U64) (rhs : t_U64)=> + PartialEq_f_ne (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); }. -Instance t_PartialOrd_210240032 : t_PartialOrd ((t_U64)) ((t_U64)) := +#[globa] Instance t_PartialOrd_210240032 : t_PartialOrd ((t_U64)) ((t_U64)) := { - PartialOrd_impl_163_f_partial_cmp := fun (self : t_U64) (rhs : t_U64)=> + PartialOrd_f_partial_cmp := fun (self : t_U64) (rhs : t_U64)=> Option_Some (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); - PartialOrd_impl_163_f_lt := fun (self : t_U64) (rhs : t_U64)=> + PartialOrd_f_lt := fun (self : t_U64) (rhs : t_U64)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less => true | _ => false end; - PartialOrd_impl_163_f_le := fun (self : t_U64) (rhs : t_U64)=> + PartialOrd_f_le := fun (self : t_U64) (rhs : t_U64)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less | Ordering_Equal => @@ -937,14 +882,14 @@ Instance t_PartialOrd_210240032 : t_PartialOrd ((t_U64)) ((t_U64)) := | _ => false end; - PartialOrd_impl_163_f_gt := fun (self : t_U64) (rhs : t_U64)=> + PartialOrd_f_gt := fun (self : t_U64) (rhs : t_U64)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater => true | _ => false end; - PartialOrd_impl_163_f_ge := fun (self : t_U64) (rhs : t_U64)=> + PartialOrd_f_ge := fun (self : t_U64) (rhs : t_U64)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater | Ordering_Equal => @@ -954,33 +899,33 @@ Instance t_PartialOrd_210240032 : t_PartialOrd ((t_U64)) ((t_U64)) := end; }. -Instance t_Abstraction_517050128 : t_Abstraction ((t_U32)) := +#[globa] Instance t_Abstraction_517050128 : t_Abstraction ((t_U32)) := { - Abstraction_impl_166_f_AbstractType := t_HaxInt; - Abstraction_impl_166_f_lift := fun (self : t_U32)=> + Abstraction_f_AbstractType := t_HaxInt; + Abstraction_f_lift := fun (self : t_U32)=> U32_f_v self; }. -Instance t_PartialEq_894496962 : t_PartialEq ((t_U32)) ((t_U32)) := +#[globa] Instance t_PartialEq_894496962 : t_PartialEq ((t_U32)) ((t_U32)) := { - PartialEq_impl_189_f_eq := fun (self : t_U32) (rhs : t_U32)=> - PartialEq_f_eq (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); - PartialEq_impl_189_f_ne := fun (self : t_U32) (rhs : t_U32)=> - PartialEq_f_ne (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_eq := fun (self : t_U32) (rhs : t_U32)=> + PartialEq_f_eq (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_ne := fun (self : t_U32) (rhs : t_U32)=> + PartialEq_f_ne (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); }. -Instance t_PartialOrd_534404445 : t_PartialOrd ((t_U32)) ((t_U32)) := +#[globa] Instance t_PartialOrd_534404445 : t_PartialOrd ((t_U32)) ((t_U32)) := { - PartialOrd_impl_190_f_partial_cmp := fun (self : t_U32) (rhs : t_U32)=> + PartialOrd_f_partial_cmp := fun (self : t_U32) (rhs : t_U32)=> Option_Some (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); - PartialOrd_impl_190_f_lt := fun (self : t_U32) (rhs : t_U32)=> + PartialOrd_f_lt := fun (self : t_U32) (rhs : t_U32)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less => true | _ => false end; - PartialOrd_impl_190_f_le := fun (self : t_U32) (rhs : t_U32)=> + PartialOrd_f_le := fun (self : t_U32) (rhs : t_U32)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less | Ordering_Equal => @@ -988,14 +933,14 @@ Instance t_PartialOrd_534404445 : t_PartialOrd ((t_U32)) ((t_U32)) := | _ => false end; - PartialOrd_impl_190_f_gt := fun (self : t_U32) (rhs : t_U32)=> + PartialOrd_f_gt := fun (self : t_U32) (rhs : t_U32)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater => true | _ => false end; - PartialOrd_impl_190_f_ge := fun (self : t_U32) (rhs : t_U32)=> + PartialOrd_f_ge := fun (self : t_U32) (rhs : t_U32)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater | Ordering_Equal => @@ -1005,33 +950,33 @@ Instance t_PartialOrd_534404445 : t_PartialOrd ((t_U32)) ((t_U32)) := end; }. -Instance t_Abstraction_994821584 : t_Abstraction ((t_U16)) := +#[globa] Instance t_Abstraction_994821584 : t_Abstraction ((t_U16)) := { - Abstraction_impl_193_f_AbstractType := t_HaxInt; - Abstraction_impl_193_f_lift := fun (self : t_U16)=> + Abstraction_f_AbstractType := t_HaxInt; + Abstraction_f_lift := fun (self : t_U16)=> U16_f_v self; }. -Instance t_PartialEq_603208302 : t_PartialEq ((t_U16)) ((t_U16)) := +#[globa] Instance t_PartialEq_603208302 : t_PartialEq ((t_U16)) ((t_U16)) := { - PartialEq_impl_216_f_eq := fun (self : t_U16) (rhs : t_U16)=> - PartialEq_f_eq (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); - PartialEq_impl_216_f_ne := fun (self : t_U16) (rhs : t_U16)=> - PartialEq_f_ne (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_eq := fun (self : t_U16) (rhs : t_U16)=> + PartialEq_f_eq (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_ne := fun (self : t_U16) (rhs : t_U16)=> + PartialEq_f_ne (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); }. -Instance t_PartialOrd_595325431 : t_PartialOrd ((t_U16)) ((t_U16)) := +#[globa] Instance t_PartialOrd_595325431 : t_PartialOrd ((t_U16)) ((t_U16)) := { - PartialOrd_impl_217_f_partial_cmp := fun (self : t_U16) (rhs : t_U16)=> + PartialOrd_f_partial_cmp := fun (self : t_U16) (rhs : t_U16)=> Option_Some (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); - PartialOrd_impl_217_f_lt := fun (self : t_U16) (rhs : t_U16)=> + PartialOrd_f_lt := fun (self : t_U16) (rhs : t_U16)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less => true | _ => false end; - PartialOrd_impl_217_f_le := fun (self : t_U16) (rhs : t_U16)=> + PartialOrd_f_le := fun (self : t_U16) (rhs : t_U16)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less | Ordering_Equal => @@ -1039,14 +984,14 @@ Instance t_PartialOrd_595325431 : t_PartialOrd ((t_U16)) ((t_U16)) := | _ => false end; - PartialOrd_impl_217_f_gt := fun (self : t_U16) (rhs : t_U16)=> + PartialOrd_f_gt := fun (self : t_U16) (rhs : t_U16)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater => true | _ => false end; - PartialOrd_impl_217_f_ge := fun (self : t_U16) (rhs : t_U16)=> + PartialOrd_f_ge := fun (self : t_U16) (rhs : t_U16)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater | Ordering_Equal => @@ -1056,33 +1001,33 @@ Instance t_PartialOrd_595325431 : t_PartialOrd ((t_U16)) ((t_U16)) := end; }. -Instance t_Abstraction_789996186 : t_Abstraction ((t_U8)) := +#[globa] Instance t_Abstraction_789996186 : t_Abstraction ((t_U8)) := { - Abstraction_impl_220_f_AbstractType := t_HaxInt; - Abstraction_impl_220_f_lift := fun (self : t_U8)=> + Abstraction_f_AbstractType := t_HaxInt; + Abstraction_f_lift := fun (self : t_U8)=> U8_f_v self; }. -Instance t_PartialEq_774173636 : t_PartialEq ((t_U8)) ((t_U8)) := +#[globa] Instance t_PartialEq_774173636 : t_PartialEq ((t_U8)) ((t_U8)) := { - PartialEq_impl_243_f_eq := fun (self : t_U8) (rhs : t_U8)=> - PartialEq_f_eq (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); - PartialEq_impl_243_f_ne := fun (self : t_U8) (rhs : t_U8)=> - PartialEq_f_ne (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_eq := fun (self : t_U8) (rhs : t_U8)=> + PartialEq_f_eq (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); + PartialEq_f_ne := fun (self : t_U8) (rhs : t_U8)=> + PartialEq_f_ne (t_PartialEq := _ : t_PartialEq t_Ordering t_Ordering) (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))) (Ordering_Equal); }. -Instance t_PartialOrd_577399304 : t_PartialOrd ((t_U8)) ((t_U8)) := +#[globa] Instance t_PartialOrd_577399304 : t_PartialOrd ((t_U8)) ((t_U8)) := { - PartialOrd_impl_244_f_partial_cmp := fun (self : t_U8) (rhs : t_U8)=> + PartialOrd_f_partial_cmp := fun (self : t_U8) (rhs : t_U8)=> Option_Some (haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs)))); - PartialOrd_impl_244_f_lt := fun (self : t_U8) (rhs : t_U8)=> + PartialOrd_f_lt := fun (self : t_U8) (rhs : t_U8)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less => true | _ => false end; - PartialOrd_impl_244_f_le := fun (self : t_U8) (rhs : t_U8)=> + PartialOrd_f_le := fun (self : t_U8) (rhs : t_U8)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Less | Ordering_Equal => @@ -1090,14 +1035,14 @@ Instance t_PartialOrd_577399304 : t_PartialOrd ((t_U8)) ((t_U8)) := | _ => false end; - PartialOrd_impl_244_f_gt := fun (self : t_U8) (rhs : t_U8)=> + PartialOrd_f_gt := fun (self : t_U8) (rhs : t_U8)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater => true | _ => false end; - PartialOrd_impl_244_f_ge := fun (self : t_U8) (rhs : t_U8)=> + PartialOrd_f_ge := fun (self : t_U8) (rhs : t_U8)=> match haxint_cmp (Abstraction_f_lift (Clone_f_clone (self))) (Abstraction_f_lift (Clone_f_clone (rhs))) with | Ordering_Greater | Ordering_Equal => @@ -1107,1097 +1052,1097 @@ Instance t_PartialOrd_577399304 : t_PartialOrd ((t_U8)) ((t_U8)) := end; }. -Instance t_Neg_375517228 : t_Neg ((t_I128)) := +#[globa] Instance t_Neg_375517228 : t_Neg ((t_I128)) := { - Neg_impl_48_f_Output := t_I128; - Neg_impl_48_f_neg := fun (self : t_I128)=> - Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); + Neg_f_Output := t_I128; + Neg_f_neg := fun (self : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (z_neg (Abstraction_f_lift (self))); }. -Instance t_BitOr_938342430 : t_BitOr ((t_I128)) ((t_I128)) := +#[globa] Instance t_BitOr_938342430 : t_BitOr ((t_I128)) ((t_I128)) := { - BitOr_impl_50_f_Output := t_I128; - BitOr_impl_50_f_bitor := fun (self : t_I128) (rhs : t_I128)=> - Concretization_f_concretize (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitOr_f_Output := t_I128; + BitOr_f_bitor := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Neg_210530286 : t_Neg ((t_I64)) := +#[globa] Instance t_Neg_210530286 : t_Neg ((t_I64)) := { - Neg_impl_62_f_Output := t_I64; - Neg_impl_62_f_neg := fun (self : t_I64)=> - Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); + Neg_f_Output := t_I64; + Neg_f_neg := fun (self : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (z_neg (Abstraction_f_lift (self))); }. -Instance t_BitOr_329754853 : t_BitOr ((t_I64)) ((t_I64)) := +#[globa] Instance t_BitOr_329754853 : t_BitOr ((t_I64)) ((t_I64)) := { - BitOr_impl_64_f_Output := t_I64; - BitOr_impl_64_f_bitor := fun (self : t_I64) (rhs : t_I64)=> - Concretization_f_concretize (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitOr_f_Output := t_I64; + BitOr_f_bitor := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Neg_104016941 : t_Neg ((t_I32)) := +#[globa] Instance t_Neg_104016941 : t_Neg ((t_I32)) := { - Neg_impl_76_f_Output := t_I32; - Neg_impl_76_f_neg := fun (self : t_I32)=> - Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); + Neg_f_Output := t_I32; + Neg_f_neg := fun (self : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (z_neg (Abstraction_f_lift (self))); }. -Instance t_BitOr_840483685 : t_BitOr ((t_I32)) ((t_I32)) := +#[globa] Instance t_BitOr_840483685 : t_BitOr ((t_I32)) ((t_I32)) := { - BitOr_impl_78_f_Output := t_I32; - BitOr_impl_78_f_bitor := fun (self : t_I32) (rhs : t_I32)=> - Concretization_f_concretize (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitOr_f_Output := t_I32; + BitOr_f_bitor := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Neg_1063990797 : t_Neg ((t_I16)) := +#[globa] Instance t_Neg_1063990797 : t_Neg ((t_I16)) := { - Neg_impl_90_f_Output := t_I16; - Neg_impl_90_f_neg := fun (self : t_I16)=> - Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); + Neg_f_Output := t_I16; + Neg_f_neg := fun (self : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (z_neg (Abstraction_f_lift (self))); }. -Instance t_BitOr_450806124 : t_BitOr ((t_I16)) ((t_I16)) := +#[globa] Instance t_BitOr_450806124 : t_BitOr ((t_I16)) ((t_I16)) := { - BitOr_impl_92_f_Output := t_I16; - BitOr_impl_92_f_bitor := fun (self : t_I16) (rhs : t_I16)=> - Concretization_f_concretize (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitOr_f_Output := t_I16; + BitOr_f_bitor := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Neg_979719905 : t_Neg ((t_I8)) := +#[globa] Instance t_Neg_979719905 : t_Neg ((t_I8)) := { - Neg_impl_104_f_Output := t_I8; - Neg_impl_104_f_neg := fun (self : t_I8)=> + Neg_f_Output := t_I8; + Neg_f_neg := fun (self : t_I8)=> Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); }. -Instance t_BitOr_828862178 : t_BitOr ((t_I8)) ((t_I8)) := +#[globa] Instance t_BitOr_828862178 : t_BitOr ((t_I8)) ((t_I8)) := { - BitOr_impl_106_f_Output := t_I8; - BitOr_impl_106_f_bitor := fun (self : t_I8) (rhs : t_I8)=> + BitOr_f_Output := t_I8; + BitOr_f_bitor := fun (self : t_I8) (rhs : t_I8)=> Concretization_f_concretize (z_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Add_749575336 : t_Add ((t_I128)) ((t_I128)) := +#[globa] Instance t_Add_749575336 : t_Add ((t_I128)) ((t_I128)) := { - Add_impl_46_f_Output := t_I128; - Add_impl_46_f_add := fun (self : t_I128) (rhs : t_I128)=> - Concretization_f_concretize (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Add_f_Output := t_I128; + Add_f_add := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Sub_800692471 : t_Sub ((t_I128)) ((t_I128)) := +#[globa] Instance t_Sub_800692471 : t_Sub ((t_I128)) ((t_I128)) := { - Sub_impl_49_f_Output := t_I128; - Sub_impl_49_f_sub := fun (self : t_I128) (rhs : t_I128)=> - Concretization_f_concretize (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Sub_f_Output := t_I128; + Sub_f_sub := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Add_87367909 : t_Add ((t_I64)) ((t_I64)) := +#[globa] Instance t_Add_87367909 : t_Add ((t_I64)) ((t_I64)) := { - Add_impl_60_f_Output := t_I64; - Add_impl_60_f_add := fun (self : t_I64) (rhs : t_I64)=> - Concretization_f_concretize (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Add_f_Output := t_I64; + Add_f_add := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Sub_741383133 : t_Sub ((t_I64)) ((t_I64)) := +#[globa] Instance t_Sub_741383133 : t_Sub ((t_I64)) ((t_I64)) := { - Sub_impl_63_f_Output := t_I64; - Sub_impl_63_f_sub := fun (self : t_I64) (rhs : t_I64)=> - Concretization_f_concretize (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Sub_f_Output := t_I64; + Sub_f_sub := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Add_574043038 : t_Add ((t_I32)) ((t_I32)) := +#[globa] Instance t_Add_574043038 : t_Add ((t_I32)) ((t_I32)) := { - Add_impl_74_f_Output := t_I32; - Add_impl_74_f_add := fun (self : t_I32) (rhs : t_I32)=> - Concretization_f_concretize (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Add_f_Output := t_I32; + Add_f_add := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Sub_699874712 : t_Sub ((t_I32)) ((t_I32)) := +#[globa] Instance t_Sub_699874712 : t_Sub ((t_I32)) ((t_I32)) := { - Sub_impl_77_f_Output := t_I32; - Sub_impl_77_f_sub := fun (self : t_I32) (rhs : t_I32)=> - Concretization_f_concretize (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Sub_f_Output := t_I32; + Sub_f_sub := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Add_413164706 : t_Add ((t_I16)) ((t_I16)) := +#[globa] Instance t_Add_413164706 : t_Add ((t_I16)) ((t_I16)) := { - Add_impl_88_f_Output := t_I16; - Add_impl_88_f_add := fun (self : t_I16) (rhs : t_I16)=> - Concretization_f_concretize (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Add_f_Output := t_I16; + Add_f_add := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Sub_544358249 : t_Sub ((t_I16)) ((t_I16)) := +#[globa] Instance t_Sub_544358249 : t_Sub ((t_I16)) ((t_I16)) := { - Sub_impl_91_f_Output := t_I16; - Sub_impl_91_f_sub := fun (self : t_I16) (rhs : t_I16)=> - Concretization_f_concretize (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Sub_f_Output := t_I16; + Sub_f_sub := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Add_335735231 : t_Add ((t_I8)) ((t_I8)) := +#[globa] Instance t_Add_335735231 : t_Add ((t_I8)) ((t_I8)) := { - Add_impl_102_f_Output := t_I8; - Add_impl_102_f_add := fun (self : t_I8) (rhs : t_I8)=> + Add_f_Output := t_I8; + Add_f_add := fun (self : t_I8) (rhs : t_I8)=> Concretization_f_concretize (z_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Sub_257575332 : t_Sub ((t_I8)) ((t_I8)) := +#[globa] Instance t_Sub_257575332 : t_Sub ((t_I8)) ((t_I8)) := { - Sub_impl_105_f_Output := t_I8; - Sub_impl_105_f_sub := fun (self : t_I8) (rhs : t_I8)=> + Sub_f_Output := t_I8; + Sub_f_sub := fun (self : t_I8) (rhs : t_I8)=> Concretization_f_concretize (z_sub (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Concretization_943450188 : t_Concretization ((t_HaxInt)) ((t_U128)) := +#[globa] Instance t_Concretization_943450188 : t_Concretization ((t_HaxInt)) ((t_U128)) := { - Concretization_impl_113_f_concretize := fun (self : t_HaxInt)=> + Concretization_f_concretize := fun (self : t_HaxInt)=> Build_t_U128 (haxint_rem (self) (v_WORDSIZE_128_)); }. -Instance t_From_355161674 : t_From ((t_U128)) ((t_U8)) := +#[globa] Instance t_From_355161674 : t_From ((t_U128)) ((t_U8)) := { - From_impl_3_f_from := fun (x : t_U8)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (Abstraction_f_lift (x)); }. -Instance t_From_739905379 : t_From ((t_U128)) ((t_U16)) := +#[globa] Instance t_From_739905379 : t_From ((t_U128)) ((t_U16)) := { - From_impl_7_f_from := fun (x : t_U16)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U16)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U128) (Abstraction_f_lift (x)); }. -Instance t_From_487010006 : t_From ((t_U128)) ((t_U32)) := +#[globa] Instance t_From_487010006 : t_From ((t_U128)) ((t_U32)) := { - From_impl_11_f_from := fun (x : t_U32)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U32)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U128) (Abstraction_f_lift (x)); }. -Instance t_From_665417617 : t_From ((t_U128)) ((t_U64)) := +#[globa] Instance t_From_665417617 : t_From ((t_U128)) ((t_U64)) := { - From_impl_15_f_from := fun (x : t_U64)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U64)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U128) (Abstraction_f_lift (x)); }. -Instance t_Concretization_10977439 : t_Concretization ((t_HaxInt)) ((t_U64)) := +#[globa] Instance t_Concretization_10977439 : t_Concretization ((t_HaxInt)) ((t_U64)) := { - Concretization_impl_140_f_concretize := fun (self : t_HaxInt)=> + Concretization_f_concretize := fun (self : t_HaxInt)=> Build_t_U64 (haxint_rem (self) (v_WORDSIZE_64_)); }. -Instance t_From_746191059 : t_From ((t_U64)) ((t_U8)) := +#[globa] Instance t_From_746191059 : t_From ((t_U64)) ((t_U8)) := { - From_impl_2_f_from := fun (x : t_U8)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U8)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U64) (Abstraction_f_lift (x)); }. -Instance t_From_598353876 : t_From ((t_U64)) ((t_U16)) := +#[globa] Instance t_From_598353876 : t_From ((t_U64)) ((t_U16)) := { - From_impl_6_f_from := fun (x : t_U16)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U16)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U64) (Abstraction_f_lift (x)); }. -Instance t_From_293255347 : t_From ((t_U64)) ((t_U32)) := +#[globa] Instance t_From_293255347 : t_From ((t_U64)) ((t_U32)) := { - From_impl_10_f_from := fun (x : t_U32)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U32)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U64) (Abstraction_f_lift (x)); }. -Instance t_From_478031507 : t_From ((t_U64)) ((t_U128)) := +#[globa] Instance t_From_478031507 : t_From ((t_U64)) ((t_U128)) := { - From_impl_19_f_from := fun (x : t_U128)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U128)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U64) (Abstraction_f_lift (x)); }. -Instance t_Concretization_264065114 : t_Concretization ((t_HaxInt)) ((t_U32)) := +#[globa] Instance t_Concretization_264065114 : t_Concretization ((t_HaxInt)) ((t_U32)) := { - Concretization_impl_167_f_concretize := fun (self : t_HaxInt)=> + Concretization_f_concretize := fun (self : t_HaxInt)=> Build_t_U32 (haxint_rem (self) (v_WORDSIZE_32_)); }. -Instance t_From_675834555 : t_From ((t_U32)) ((t_U8)) := +#[globa] Instance t_From_675834555 : t_From ((t_U32)) ((t_U8)) := { - From_impl_1_f_from := fun (x : t_U8)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U8)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U32) (Abstraction_f_lift (x)); }. -Instance t_From_410569540 : t_From ((t_U32)) ((t_U16)) := +#[globa] Instance t_From_410569540 : t_From ((t_U32)) ((t_U16)) := { - From_impl_5_f_from := fun (x : t_U16)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U16)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U32) (Abstraction_f_lift (x)); }. -Instance t_From_616913228 : t_From ((t_U32)) ((t_U64)) := +#[globa] Instance t_From_616913228 : t_From ((t_U32)) ((t_U64)) := { - From_impl_14_f_from := fun (x : t_U64)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U64)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U32) (Abstraction_f_lift (x)); }. -Instance t_From_376625380 : t_From ((t_U32)) ((t_U128)) := +#[globa] Instance t_From_376625380 : t_From ((t_U32)) ((t_U128)) := { - From_impl_18_f_from := fun (x : t_U128)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U128)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U32) (Abstraction_f_lift (x)); }. -Instance t_Concretization_656994795 : t_Concretization ((t_HaxInt)) ((t_U16)) := +#[globa] Instance t_Concretization_656994795 : t_Concretization ((t_HaxInt)) ((t_U16)) := { - Concretization_impl_194_f_concretize := fun (self : t_HaxInt)=> + Concretization_f_concretize := fun (self : t_HaxInt)=> Build_t_U16 (haxint_rem (self) (v_WORDSIZE_16_)); }. -Instance t_From_352276566 : t_From ((t_U16)) ((t_U8)) := +#[globa] Instance t_From_352276566 : t_From ((t_U16)) ((t_U8)) := { - From_impl_f_from := fun (x : t_U8)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (Abstraction_f_lift (x)); }. -Instance t_From_699842532 : t_From ((t_U16)) ((t_U32)) := +#[globa] Instance t_From_699842532 : t_From ((t_U16)) ((t_U32)) := { - From_impl_9_f_from := fun (x : t_U32)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U32)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U16) (Abstraction_f_lift (x)); }. -Instance t_From_326646767 : t_From ((t_U16)) ((t_U64)) := +#[globa] Instance t_From_326646767 : t_From ((t_U16)) ((t_U64)) := { - From_impl_13_f_from := fun (x : t_U64)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U64)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U16) (Abstraction_f_lift (x)); }. -Instance t_From_604186294 : t_From ((t_U16)) ((t_U128)) := +#[globa] Instance t_From_604186294 : t_From ((t_U16)) ((t_U128)) := { - From_impl_17_f_from := fun (x : t_U128)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U128)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U16) (Abstraction_f_lift (x)); }. -Instance t_Concretization_492312374 : t_Concretization ((t_HaxInt)) ((t_U8)) := +#[globa] Instance t_Concretization_492312374 : t_Concretization ((t_HaxInt)) ((t_U8)) := { - Concretization_impl_221_f_concretize := fun (self : t_HaxInt)=> + Concretization_f_concretize := fun (self : t_HaxInt)=> Build_t_U8 (haxint_rem (self) (v_WORDSIZE_8_)); }. -Instance t_From_374313775 : t_From ((t_U8)) ((t_U16)) := +#[globa] Instance t_From_374313775 : t_From ((t_U8)) ((t_U16)) := { - From_impl_4_f_from := fun (x : t_U16)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U16)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U8) (Abstraction_f_lift (x)); }. -Instance t_From_42776580 : t_From ((t_U8)) ((t_U32)) := +#[globa] Instance t_From_42776580 : t_From ((t_U8)) ((t_U32)) := { - From_impl_8_f_from := fun (x : t_U32)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U32)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U8) (Abstraction_f_lift (x)); }. -Instance t_From_480314375 : t_From ((t_U8)) ((t_U64)) := +#[globa] Instance t_From_480314375 : t_From ((t_U8)) ((t_U64)) := { - From_impl_12_f_from := fun (x : t_U64)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U64)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U8) (Abstraction_f_lift (x)); }. -Instance t_From_135782329 : t_From ((t_U8)) ((t_U128)) := +#[globa] Instance t_From_135782329 : t_From ((t_U8)) ((t_U128)) := { - From_impl_16_f_from := fun (x : t_U128)=> - Concretization_f_concretize (Abstraction_f_lift (x)); + From_f_from := fun (x : t_U128)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U8) (Abstraction_f_lift (x)); }. -Instance t_Mul_180009375 : t_Mul ((t_I128)) ((t_I128)) := +#[globa] Instance t_Mul_180009375 : t_Mul ((t_I128)) ((t_I128)) := { - Mul_impl_44_f_Output := t_I128; - Mul_impl_44_f_mul := fun (self : t_I128) (rhs : t_I128)=> - Concretization_f_concretize (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Mul_f_Output := t_I128; + Mul_f_mul := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Mul_1051209688 : t_Mul ((t_I64)) ((t_I64)) := +#[globa] Instance t_Mul_1051209688 : t_Mul ((t_I64)) ((t_I64)) := { - Mul_impl_58_f_Output := t_I64; - Mul_impl_58_f_mul := fun (self : t_I64) (rhs : t_I64)=> - Concretization_f_concretize (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Mul_f_Output := t_I64; + Mul_f_mul := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Mul_481497752 : t_Mul ((t_I32)) ((t_I32)) := +#[globa] Instance t_Mul_481497752 : t_Mul ((t_I32)) ((t_I32)) := { - Mul_impl_72_f_Output := t_I32; - Mul_impl_72_f_mul := fun (self : t_I32) (rhs : t_I32)=> - Concretization_f_concretize (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Mul_f_Output := t_I32; + Mul_f_mul := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Mul_768005208 : t_Mul ((t_I16)) ((t_I16)) := +#[globa] Instance t_Mul_768005208 : t_Mul ((t_I16)) ((t_I16)) := { - Mul_impl_86_f_Output := t_I16; - Mul_impl_86_f_mul := fun (self : t_I16) (rhs : t_I16)=> - Concretization_f_concretize (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Mul_f_Output := t_I16; + Mul_f_mul := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Mul_1057691929 : t_Mul ((t_I8)) ((t_I8)) := +#[globa] Instance t_Mul_1057691929 : t_Mul ((t_I8)) ((t_I8)) := { - Mul_impl_100_f_Output := t_I8; - Mul_impl_100_f_mul := fun (self : t_I8) (rhs : t_I8)=> - Concretization_f_concretize (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Mul_f_Output := t_I8; + Mul_f_mul := fun (self : t_I8) (rhs : t_I8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I8) (z_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Neg_200638412 : t_Neg ((t_U128)) := +#[globa] Instance t_Neg_200638412 : t_Neg ((t_U128)) := { - Neg_impl_114_f_Output := t_U128; - Neg_impl_114_f_neg := fun (self : t_U128)=> - Concretization_f_concretize (haxint_sub (v_WORDSIZE_128_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_128_))); + Neg_f_Output := t_U128; + Neg_f_neg := fun (self : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_sub (v_WORDSIZE_128_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_128_))); }. -Instance t_Mul_508073751 : t_Mul ((t_U128)) ((t_U128)) := +#[globa] Instance t_Mul_508073751 : t_Mul ((t_U128)) ((t_U128)) := { - Mul_impl_117_f_Output := t_U128; - Mul_impl_117_f_mul := fun (self : t_U128) (rhs : t_U128)=> - Concretization_f_concretize (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Mul_f_Output := t_U128; + Mul_f_mul := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Rem_184769952 : t_Rem ((t_U128)) ((t_U128)) := +#[globa] Instance t_Rem_184769952 : t_Rem ((t_U128)) ((t_U128)) := { - Rem_impl_118_f_Output := t_U128; - Rem_impl_118_f_rem := fun (self : t_U128) (rhs : t_U128)=> - Concretization_f_concretize (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Rem_f_Output := t_U128; + Rem_f_rem := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Add_74062568 : t_Add ((t_U128)) ((t_U128)) := +#[globa] Instance t_Add_74062568 : t_Add ((t_U128)) ((t_U128)) := { - Add_impl_119_f_Output := t_U128; - Add_impl_119_f_add := fun (self : t_U128) (rhs : t_U128)=> - Concretization_f_concretize (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Add_f_Output := t_U128; + Add_f_add := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Div_697142148 : t_Div ((t_U128)) ((t_U128)) := +#[globa] Instance t_Div_697142148 : t_Div ((t_U128)) ((t_U128)) := { - Div_impl_120_f_Output := t_U128; - Div_impl_120_f_div := fun (self : t_U128) (rhs : t_U128)=> - Concretization_f_concretize (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Div_f_Output := t_U128; + Div_f_div := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_912131656 : t_Shl ((t_U128)) ((t_U8)) := +#[globa] Instance t_Shl_912131656 : t_Shl ((t_U128)) ((t_U8)) := { - Shl_impl_121_f_Output := t_U128; - Shl_impl_121_f_shl := fun (self : t_U128) (rhs : t_U8)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U128; + Shl_f_shl := fun (self : t_U128) (rhs : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_188720840 : t_Shl ((t_U128)) ((t_U16)) := +#[globa] Instance t_Shl_188720840 : t_Shl ((t_U128)) ((t_U16)) := { - Shl_impl_122_f_Output := t_U128; - Shl_impl_122_f_shl := fun (self : t_U128) (rhs : t_U16)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U128; + Shl_f_shl := fun (self : t_U128) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_674581806 : t_Shl ((t_U128)) ((t_U32)) := +#[globa] Instance t_Shl_674581806 : t_Shl ((t_U128)) ((t_U32)) := { - Shl_impl_123_f_Output := t_U128; - Shl_impl_123_f_shl := fun (self : t_U128) (rhs : t_U32)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U128; + Shl_f_shl := fun (self : t_U128) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_230523808 : t_Shl ((t_U128)) ((t_U64)) := +#[globa] Instance t_Shl_230523808 : t_Shl ((t_U128)) ((t_U64)) := { - Shl_impl_124_f_Output := t_U128; - Shl_impl_124_f_shl := fun (self : t_U128) (rhs : t_U64)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U128; + Shl_f_shl := fun (self : t_U128) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_304350501 : t_Shl ((t_U128)) ((t_U128)) := +#[globa] Instance t_Shl_304350501 : t_Shl ((t_U128)) ((t_U128)) := { - Shl_impl_125_f_Output := t_U128; - Shl_impl_125_f_shl := fun (self : t_U128) (rhs : t_U128)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U128; + Shl_f_shl := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_584068908 : t_Shr ((t_U128)) ((t_U8)) := +#[globa] Instance t_Shr_584068908 : t_Shr ((t_U128)) ((t_U8)) := { - Shr_impl_126_f_Output := t_U128; - Shr_impl_126_f_shr := fun (self : t_U128) (rhs : t_U8)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U128; + Shr_f_shr := fun (self : t_U128) (rhs : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_73833277 : t_Shr ((t_U128)) ((t_U16)) := +#[globa] Instance t_Shr_73833277 : t_Shr ((t_U128)) ((t_U16)) := { - Shr_impl_127_f_Output := t_U128; - Shr_impl_127_f_shr := fun (self : t_U128) (rhs : t_U16)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U128; + Shr_f_shr := fun (self : t_U128) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_50912121 : t_Shr ((t_U128)) ((t_U32)) := +#[globa] Instance t_Shr_50912121 : t_Shr ((t_U128)) ((t_U32)) := { - Shr_impl_128_f_Output := t_U128; - Shr_impl_128_f_shr := fun (self : t_U128) (rhs : t_U32)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U128; + Shr_f_shr := fun (self : t_U128) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_282345299 : t_Shr ((t_U128)) ((t_U64)) := +#[globa] Instance t_Shr_282345299 : t_Shr ((t_U128)) ((t_U64)) := { - Shr_impl_129_f_Output := t_U128; - Shr_impl_129_f_shr := fun (self : t_U128) (rhs : t_U64)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U128; + Shr_f_shr := fun (self : t_U128) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_354892033 : t_Shr ((t_U128)) ((t_U128)) := +#[globa] Instance t_Shr_354892033 : t_Shr ((t_U128)) ((t_U128)) := { - Shr_impl_130_f_Output := t_U128; - Shr_impl_130_f_shr := fun (self : t_U128) (rhs : t_U128)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U128; + Shr_f_shr := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitXor_457452962 : t_BitXor ((t_U128)) ((t_U128)) := +#[globa] Instance t_BitXor_457452962 : t_BitXor ((t_U128)) ((t_U128)) := { - BitXor_impl_131_f_Output := t_U128; - BitXor_impl_131_f_bitxor := fun (self : t_U128) (rhs : t_U128)=> - Concretization_f_concretize (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitXor_f_Output := t_U128; + BitXor_f_bitxor := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitAnd_499214249 : t_BitAnd ((t_U128)) ((t_U128)) := +#[globa] Instance t_BitAnd_499214249 : t_BitAnd ((t_U128)) ((t_U128)) := { - BitAnd_impl_132_f_Output := t_U128; - BitAnd_impl_132_f_bitand := fun (self : t_U128) (rhs : t_U128)=> - Concretization_f_concretize (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitAnd_f_Output := t_U128; + BitAnd_f_bitand := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitOr_579754702 : t_BitOr ((t_U128)) ((t_U128)) := +#[globa] Instance t_BitOr_579754702 : t_BitOr ((t_U128)) ((t_U128)) := { - BitOr_impl_133_f_Output := t_U128; - BitOr_impl_133_f_bitor := fun (self : t_U128) (rhs : t_U128)=> - Concretization_f_concretize (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitOr_f_Output := t_U128; + BitOr_f_bitor := fun (self : t_U128) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Neg_338880159 : t_Neg ((t_U64)) := +#[globa] Instance t_Neg_338880159 : t_Neg ((t_U64)) := { - Neg_impl_141_f_Output := t_U64; - Neg_impl_141_f_neg := fun (self : t_U64)=> - Concretization_f_concretize (haxint_sub (v_WORDSIZE_64_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_64_))); + Neg_f_Output := t_U64; + Neg_f_neg := fun (self : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_sub (v_WORDSIZE_64_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_64_))); }. -Instance t_Mul_785129859 : t_Mul ((t_U64)) ((t_U64)) := +#[globa] Instance t_Mul_785129859 : t_Mul ((t_U64)) ((t_U64)) := { - Mul_impl_144_f_Output := t_U64; - Mul_impl_144_f_mul := fun (self : t_U64) (rhs : t_U64)=> - Concretization_f_concretize (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Mul_f_Output := t_U64; + Mul_f_mul := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Rem_450198244 : t_Rem ((t_U64)) ((t_U64)) := +#[globa] Instance t_Rem_450198244 : t_Rem ((t_U64)) ((t_U64)) := { - Rem_impl_145_f_Output := t_U64; - Rem_impl_145_f_rem := fun (self : t_U64) (rhs : t_U64)=> - Concretization_f_concretize (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Rem_f_Output := t_U64; + Rem_f_rem := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Add_880469818 : t_Add ((t_U64)) ((t_U64)) := +#[globa] Instance t_Add_880469818 : t_Add ((t_U64)) ((t_U64)) := { - Add_impl_146_f_Output := t_U64; - Add_impl_146_f_add := fun (self : t_U64) (rhs : t_U64)=> - Concretization_f_concretize (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Add_f_Output := t_U64; + Add_f_add := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Div_1065913959 : t_Div ((t_U64)) ((t_U64)) := +#[globa] Instance t_Div_1065913959 : t_Div ((t_U64)) ((t_U64)) := { - Div_impl_147_f_Output := t_U64; - Div_impl_147_f_div := fun (self : t_U64) (rhs : t_U64)=> - Concretization_f_concretize (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Div_f_Output := t_U64; + Div_f_div := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_307107617 : t_Shl ((t_U64)) ((t_U8)) := +#[globa] Instance t_Shl_307107617 : t_Shl ((t_U64)) ((t_U8)) := { - Shl_impl_148_f_Output := t_U64; - Shl_impl_148_f_shl := fun (self : t_U64) (rhs : t_U8)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U64; + Shl_f_shl := fun (self : t_U64) (rhs : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64 )(haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_521831749 : t_Shl ((t_U64)) ((t_U16)) := +#[globa] Instance t_Shl_521831749 : t_Shl ((t_U64)) ((t_U16)) := { - Shl_impl_149_f_Output := t_U64; - Shl_impl_149_f_shl := fun (self : t_U64) (rhs : t_U16)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U64; + Shl_f_shl := fun (self : t_U64) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_243646433 : t_Shl ((t_U64)) ((t_U32)) := +#[globa] Instance t_Shl_243646433 : t_Shl ((t_U64)) ((t_U32)) := { - Shl_impl_150_f_Output := t_U64; - Shl_impl_150_f_shl := fun (self : t_U64) (rhs : t_U32)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U64; + Shl_f_shl := fun (self : t_U64) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_732371970 : t_Shl ((t_U64)) ((t_U64)) := +#[globa] Instance t_Shl_732371970 : t_Shl ((t_U64)) ((t_U64)) := { - Shl_impl_151_f_Output := t_U64; - Shl_impl_151_f_shl := fun (self : t_U64) (rhs : t_U64)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U64; + Shl_f_shl := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_362455113 : t_Shl ((t_U64)) ((t_U128)) := +#[globa] Instance t_Shl_362455113 : t_Shl ((t_U64)) ((t_U128)) := { - Shl_impl_152_f_Output := t_U64; - Shl_impl_152_f_shl := fun (self : t_U64) (rhs : t_U128)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U64; + Shl_f_shl := fun (self : t_U64) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_675607391 : t_Shr ((t_U64)) ((t_U8)) := +#[globa] Instance t_Shr_675607391 : t_Shr ((t_U64)) ((t_U8)) := { - Shr_impl_153_f_Output := t_U64; - Shr_impl_153_f_shr := fun (self : t_U64) (rhs : t_U8)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U64; + Shr_f_shr := fun (self : t_U64) (rhs : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_163042579 : t_Shr ((t_U64)) ((t_U16)) := +#[globa] Instance t_Shr_163042579 : t_Shr ((t_U64)) ((t_U16)) := { - Shr_impl_154_f_Output := t_U64; - Shr_impl_154_f_shr := fun (self : t_U64) (rhs : t_U16)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U64; + Shr_f_shr := fun (self : t_U64) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_329072619 : t_Shr ((t_U64)) ((t_U32)) := +#[globa] Instance t_Shr_329072619 : t_Shr ((t_U64)) ((t_U32)) := { - Shr_impl_155_f_Output := t_U64; - Shr_impl_155_f_shr := fun (self : t_U64) (rhs : t_U32)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U64; + Shr_f_shr := fun (self : t_U64) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_1046321056 : t_Shr ((t_U64)) ((t_U64)) := +#[globa] Instance t_Shr_1046321056 : t_Shr ((t_U64)) ((t_U64)) := { - Shr_impl_156_f_Output := t_U64; - Shr_impl_156_f_shr := fun (self : t_U64) (rhs : t_U64)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U64; + Shr_f_shr := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_1027159812 : t_Shr ((t_U64)) ((t_U128)) := +#[globa] Instance t_Shr_1027159812 : t_Shr ((t_U64)) ((t_U128)) := { - Shr_impl_157_f_Output := t_U64; - Shr_impl_157_f_shr := fun (self : t_U64) (rhs : t_U128)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U64; + Shr_f_shr := fun (self : t_U64) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitXor_771705591 : t_BitXor ((t_U64)) ((t_U64)) := +#[globa] Instance t_BitXor_771705591 : t_BitXor ((t_U64)) ((t_U64)) := { - BitXor_impl_158_f_Output := t_U64; - BitXor_impl_158_f_bitxor := fun (self : t_U64) (rhs : t_U64)=> - Concretization_f_concretize (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitXor_f_Output := t_U64; + BitXor_f_bitxor := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitAnd_61309855 : t_BitAnd ((t_U64)) ((t_U64)) := +#[globa] Instance t_BitAnd_61309855 : t_BitAnd ((t_U64)) ((t_U64)) := { - BitAnd_impl_159_f_Output := t_U64; - BitAnd_impl_159_f_bitand := fun (self : t_U64) (rhs : t_U64)=> - Concretization_f_concretize (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitAnd_f_Output := t_U64; + BitAnd_f_bitand := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitOr_584478327 : t_BitOr ((t_U64)) ((t_U64)) := +#[globa] Instance t_BitOr_584478327 : t_BitOr ((t_U64)) ((t_U64)) := { - BitOr_impl_160_f_Output := t_U64; - BitOr_impl_160_f_bitor := fun (self : t_U64) (rhs : t_U64)=> - Concretization_f_concretize (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitOr_f_Output := t_U64; + BitOr_f_bitor := fun (self : t_U64) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U64) (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Neg_660092460 : t_Neg ((t_U32)) := +#[globa] Instance t_Neg_660092460 : t_Neg ((t_U32)) := { - Neg_impl_168_f_Output := t_U32; - Neg_impl_168_f_neg := fun (self : t_U32)=> - Concretization_f_concretize (haxint_sub (v_WORDSIZE_32_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_32_))); + Neg_f_Output := t_U32; + Neg_f_neg := fun (self : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_sub (v_WORDSIZE_32_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_32_))); }. -Instance t_Mul_907086750 : t_Mul ((t_U32)) ((t_U32)) := +#[globa] Instance t_Mul_907086750 : t_Mul ((t_U32)) ((t_U32)) := { - Mul_impl_171_f_Output := t_U32; - Mul_impl_171_f_mul := fun (self : t_U32) (rhs : t_U32)=> - Concretization_f_concretize (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Mul_f_Output := t_U32; + Mul_f_mul := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Rem_754047547 : t_Rem ((t_U32)) ((t_U32)) := +#[globa] Instance t_Rem_754047547 : t_Rem ((t_U32)) ((t_U32)) := { - Rem_impl_172_f_Output := t_U32; - Rem_impl_172_f_rem := fun (self : t_U32) (rhs : t_U32)=> - Concretization_f_concretize (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Rem_f_Output := t_U32; + Rem_f_rem := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Add_62760194 : t_Add ((t_U32)) ((t_U32)) := +#[globa] Instance t_Add_62760194 : t_Add ((t_U32)) ((t_U32)) := { - Add_impl_173_f_Output := t_U32; - Add_impl_173_f_add := fun (self : t_U32) (rhs : t_U32)=> - Concretization_f_concretize (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Add_f_Output := t_U32; + Add_f_add := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Div_1036065219 : t_Div ((t_U32)) ((t_U32)) := +#[globa] Instance t_Div_1036065219 : t_Div ((t_U32)) ((t_U32)) := { - Div_impl_174_f_Output := t_U32; - Div_impl_174_f_div := fun (self : t_U32) (rhs : t_U32)=> - Concretization_f_concretize (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Div_f_Output := t_U32; + Div_f_div := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_940272829 : t_Shl ((t_U32)) ((t_U8)) := +#[globa] Instance t_Shl_940272829 : t_Shl ((t_U32)) ((t_U8)) := { - Shl_impl_175_f_Output := t_U32; - Shl_impl_175_f_shl := fun (self : t_U32) (rhs : t_U8)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U32; + Shl_f_shl := fun (self : t_U32) (rhs : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_184065944 : t_Shl ((t_U32)) ((t_U16)) := +#[globa] Instance t_Shl_184065944 : t_Shl ((t_U32)) ((t_U16)) := { - Shl_impl_176_f_Output := t_U32; - Shl_impl_176_f_shl := fun (self : t_U32) (rhs : t_U16)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U32; + Shl_f_shl := fun (self : t_U32) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_512141775 : t_Shl ((t_U32)) ((t_U32)) := +#[globa] Instance t_Shl_512141775 : t_Shl ((t_U32)) ((t_U32)) := { - Shl_impl_177_f_Output := t_U32; - Shl_impl_177_f_shl := fun (self : t_U32) (rhs : t_U32)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U32; + Shl_f_shl := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_760382167 : t_Shl ((t_U32)) ((t_U64)) := +#[globa] Instance t_Shl_760382167 : t_Shl ((t_U32)) ((t_U64)) := { - Shl_impl_178_f_Output := t_U32; - Shl_impl_178_f_shl := fun (self : t_U32) (rhs : t_U64)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U32; + Shl_f_shl := fun (self : t_U32) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_938844716 : t_Shl ((t_U32)) ((t_U128)) := +#[globa] Instance t_Shl_938844716 : t_Shl ((t_U32)) ((t_U128)) := { - Shl_impl_179_f_Output := t_U32; - Shl_impl_179_f_shl := fun (self : t_U32) (rhs : t_U128)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U32; + Shl_f_shl := fun (self : t_U32) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_376401556 : t_Shr ((t_U32)) ((t_U8)) := +#[globa] Instance t_Shr_376401556 : t_Shr ((t_U32)) ((t_U8)) := { - Shr_impl_180_f_Output := t_U32; - Shr_impl_180_f_shr := fun (self : t_U32) (rhs : t_U8)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U32; + Shr_f_shr := fun (self : t_U32) (rhs : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_816225657 : t_Shr ((t_U32)) ((t_U16)) := +#[globa] Instance t_Shr_816225657 : t_Shr ((t_U32)) ((t_U16)) := { - Shr_impl_181_f_Output := t_U32; - Shr_impl_181_f_shr := fun (self : t_U32) (rhs : t_U16)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U32; + Shr_f_shr := fun (self : t_U32) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_131570199 : t_Shr ((t_U32)) ((t_U32)) := +#[globa] Instance t_Shr_131570199 : t_Shr ((t_U32)) ((t_U32)) := { - Shr_impl_182_f_Output := t_U32; - Shr_impl_182_f_shr := fun (self : t_U32) (rhs : t_U32)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U32; + Shr_f_shr := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_643141508 : t_Shr ((t_U32)) ((t_U64)) := +#[globa] Instance t_Shr_643141508 : t_Shr ((t_U32)) ((t_U64)) := { - Shr_impl_183_f_Output := t_U32; - Shr_impl_183_f_shr := fun (self : t_U32) (rhs : t_U64)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U32; + Shr_f_shr := fun (self : t_U32) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_472576920 : t_Shr ((t_U32)) ((t_U128)) := +#[globa] Instance t_Shr_472576920 : t_Shr ((t_U32)) ((t_U128)) := { - Shr_impl_184_f_Output := t_U32; - Shr_impl_184_f_shr := fun (self : t_U32) (rhs : t_U128)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U32; + Shr_f_shr := fun (self : t_U32) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitXor_568575701 : t_BitXor ((t_U32)) ((t_U32)) := +#[globa] Instance t_BitXor_568575701 : t_BitXor ((t_U32)) ((t_U32)) := { - BitXor_impl_185_f_Output := t_U32; - BitXor_impl_185_f_bitxor := fun (self : t_U32) (rhs : t_U32)=> - Concretization_f_concretize (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitXor_f_Output := t_U32; + BitXor_f_bitxor := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitAnd_188629984 : t_BitAnd ((t_U32)) ((t_U32)) := +#[globa] Instance t_BitAnd_188629984 : t_BitAnd ((t_U32)) ((t_U32)) := { - BitAnd_impl_186_f_Output := t_U32; - BitAnd_impl_186_f_bitand := fun (self : t_U32) (rhs : t_U32)=> - Concretization_f_concretize (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitAnd_f_Output := t_U32; + BitAnd_f_bitand := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitOr_727300711 : t_BitOr ((t_U32)) ((t_U32)) := +#[globa] Instance t_BitOr_727300711 : t_BitOr ((t_U32)) ((t_U32)) := { - BitOr_impl_187_f_Output := t_U32; - BitOr_impl_187_f_bitor := fun (self : t_U32) (rhs : t_U32)=> - Concretization_f_concretize (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitOr_f_Output := t_U32; + BitOr_f_bitor := fun (self : t_U32) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U32) (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Neg_524209972 : t_Neg ((t_U16)) := +#[globa] Instance t_Neg_524209972 : t_Neg ((t_U16)) := { - Neg_impl_195_f_Output := t_U16; - Neg_impl_195_f_neg := fun (self : t_U16)=> - Concretization_f_concretize (haxint_sub (v_WORDSIZE_16_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_16_))); + Neg_f_Output := t_U16; + Neg_f_neg := fun (self : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_sub (v_WORDSIZE_16_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_16_))); }. -Instance t_Mul_813798593 : t_Mul ((t_U16)) ((t_U16)) := +#[globa] Instance t_Mul_813798593 : t_Mul ((t_U16)) ((t_U16)) := { - Mul_impl_198_f_Output := t_U16; - Mul_impl_198_f_mul := fun (self : t_U16) (rhs : t_U16)=> - Concretization_f_concretize (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Mul_f_Output := t_U16; + Mul_f_mul := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Rem_1023129312 : t_Rem ((t_U16)) ((t_U16)) := +#[globa] Instance t_Rem_1023129312 : t_Rem ((t_U16)) ((t_U16)) := { - Rem_impl_199_f_Output := t_U16; - Rem_impl_199_f_rem := fun (self : t_U16) (rhs : t_U16)=> - Concretization_f_concretize (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Rem_f_Output := t_U16; + Rem_f_rem := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Add_669194837 : t_Add ((t_U16)) ((t_U16)) := +#[globa] Instance t_Add_669194837 : t_Add ((t_U16)) ((t_U16)) := { - Add_impl_200_f_Output := t_U16; - Add_impl_200_f_add := fun (self : t_U16) (rhs : t_U16)=> - Concretization_f_concretize (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Add_f_Output := t_U16; + Add_f_add := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Div_599727096 : t_Div ((t_U16)) ((t_U16)) := +#[globa] Instance t_Div_599727096 : t_Div ((t_U16)) ((t_U16)) := { - Div_impl_201_f_Output := t_U16; - Div_impl_201_f_div := fun (self : t_U16) (rhs : t_U16)=> - Concretization_f_concretize (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Div_f_Output := t_U16; + Div_f_div := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_254354835 : t_Shl ((t_U16)) ((t_U8)) := +#[globa] Instance t_Shl_254354835 : t_Shl ((t_U16)) ((t_U8)) := { - Shl_impl_202_f_Output := t_U16; - Shl_impl_202_f_shl := fun (self : t_U16) (rhs : t_U8)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U16; + Shl_f_shl := fun (self : t_U16) (rhs : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_786190756 : t_Shl ((t_U16)) ((t_U16)) := +#[globa] Instance t_Shl_786190756 : t_Shl ((t_U16)) ((t_U16)) := { - Shl_impl_203_f_Output := t_U16; - Shl_impl_203_f_shl := fun (self : t_U16) (rhs : t_U16)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U16; + Shl_f_shl := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_961613024 : t_Shl ((t_U16)) ((t_U32)) := +#[globa] Instance t_Shl_961613024 : t_Shl ((t_U16)) ((t_U32)) := { - Shl_impl_204_f_Output := t_U16; - Shl_impl_204_f_shl := fun (self : t_U16) (rhs : t_U32)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U16; + Shl_f_shl := fun (self : t_U16) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_699049796 : t_Shl ((t_U16)) ((t_U64)) := +#[globa] Instance t_Shl_699049796 : t_Shl ((t_U16)) ((t_U64)) := { - Shl_impl_205_f_Output := t_U16; - Shl_impl_205_f_shl := fun (self : t_U16) (rhs : t_U64)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U16; + Shl_f_shl := fun (self : t_U16) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_98667823 : t_Shl ((t_U16)) ((t_U128)) := +#[globa] Instance t_Shl_98667823 : t_Shl ((t_U16)) ((t_U128)) := { - Shl_impl_206_f_Output := t_U16; - Shl_impl_206_f_shl := fun (self : t_U16) (rhs : t_U128)=> - Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shl_f_Output := t_U16; + Shl_f_shl := fun (self : t_U16) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_116990915 : t_Shr ((t_U16)) ((t_U8)) := +#[globa] Instance t_Shr_116990915 : t_Shr ((t_U16)) ((t_U8)) := { - Shr_impl_207_f_Output := t_U16; - Shr_impl_207_f_shr := fun (self : t_U16) (rhs : t_U8)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U16; + Shr_f_shr := fun (self : t_U16) (rhs : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_53270962 : t_Shr ((t_U16)) ((t_U16)) := +#[globa] Instance t_Shr_53270962 : t_Shr ((t_U16)) ((t_U16)) := { - Shr_impl_208_f_Output := t_U16; - Shr_impl_208_f_shr := fun (self : t_U16) (rhs : t_U16)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U16; + Shr_f_shr := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_622272332 : t_Shr ((t_U16)) ((t_U32)) := +#[globa] Instance t_Shr_622272332 : t_Shr ((t_U16)) ((t_U32)) := { - Shr_impl_209_f_Output := t_U16; - Shr_impl_209_f_shr := fun (self : t_U16) (rhs : t_U32)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U16; + Shr_f_shr := fun (self : t_U16) (rhs : t_U32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_1061476863 : t_Shr ((t_U16)) ((t_U64)) := +#[globa] Instance t_Shr_1061476863 : t_Shr ((t_U16)) ((t_U64)) := { - Shr_impl_210_f_Output := t_U16; - Shr_impl_210_f_shr := fun (self : t_U16) (rhs : t_U64)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U16; + Shr_f_shr := fun (self : t_U16) (rhs : t_U64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_148349277 : t_Shr ((t_U16)) ((t_U128)) := +#[globa] Instance t_Shr_148349277 : t_Shr ((t_U16)) ((t_U128)) := { - Shr_impl_211_f_Output := t_U16; - Shr_impl_211_f_shr := fun (self : t_U16) (rhs : t_U128)=> - Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Shr_f_Output := t_U16; + Shr_f_shr := fun (self : t_U16) (rhs : t_U128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitXor_39308972 : t_BitXor ((t_U16)) ((t_U16)) := +#[globa] Instance t_BitXor_39308972 : t_BitXor ((t_U16)) ((t_U16)) := { - BitXor_impl_212_f_Output := t_U16; - BitXor_impl_212_f_bitxor := fun (self : t_U16) (rhs : t_U16)=> - Concretization_f_concretize (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitXor_f_Output := t_U16; + BitXor_f_bitxor := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitAnd_100986953 : t_BitAnd ((t_U16)) ((t_U16)) := +#[globa] Instance t_BitAnd_100986953 : t_BitAnd ((t_U16)) ((t_U16)) := { - BitAnd_impl_213_f_Output := t_U16; - BitAnd_impl_213_f_bitand := fun (self : t_U16) (rhs : t_U16)=> - Concretization_f_concretize (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitAnd_f_Output := t_U16; + BitAnd_f_bitand := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitOr_321212552 : t_BitOr ((t_U16)) ((t_U16)) := +#[globa] Instance t_BitOr_321212552 : t_BitOr ((t_U16)) ((t_U16)) := { - BitOr_impl_214_f_Output := t_U16; - BitOr_impl_214_f_bitor := fun (self : t_U16) (rhs : t_U16)=> - Concretization_f_concretize (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + BitOr_f_Output := t_U16; + BitOr_f_bitor := fun (self : t_U16) (rhs : t_U16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Neg_410091205 : t_Neg ((t_U8)) := +#[globa] Instance t_Neg_410091205 : t_Neg ((t_U8)) := { - Neg_impl_222_f_Output := t_U8; - Neg_impl_222_f_neg := fun (self : t_U8)=> + Neg_f_Output := t_U8; + Neg_f_neg := fun (self : t_U8)=> Concretization_f_concretize (haxint_sub (v_WORDSIZE_8_) (haxint_rem (Abstraction_f_lift (self)) (v_WORDSIZE_8_))); }. -Instance t_Mul_116494850 : t_Mul ((t_U8)) ((t_U8)) := +#[globa] Instance t_Mul_116494850 : t_Mul ((t_U8)) ((t_U8)) := { - Mul_impl_225_f_Output := t_U8; - Mul_impl_225_f_mul := fun (self : t_U8) (rhs : t_U8)=> + Mul_f_Output := t_U8; + Mul_f_mul := fun (self : t_U8) (rhs : t_U8)=> Concretization_f_concretize (haxint_mul (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Rem_674469245 : t_Rem ((t_U8)) ((t_U8)) := +#[globa] Instance t_Rem_674469245 : t_Rem ((t_U8)) ((t_U8)) := { - Rem_impl_226_f_Output := t_U8; - Rem_impl_226_f_rem := fun (self : t_U8) (rhs : t_U8)=> + Rem_f_Output := t_U8; + Rem_f_rem := fun (self : t_U8) (rhs : t_U8)=> Concretization_f_concretize (haxint_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Add_886374338 : t_Add ((t_U8)) ((t_U8)) := +#[globa] Instance t_Add_886374338 : t_Add ((t_U8)) ((t_U8)) := { - Add_impl_227_f_Output := t_U8; - Add_impl_227_f_add := fun (self : t_U8) (rhs : t_U8)=> + Add_f_Output := t_U8; + Add_f_add := fun (self : t_U8) (rhs : t_U8)=> Concretization_f_concretize (haxint_add (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Div_7559770 : t_Div ((t_U8)) ((t_U8)) := +#[globa] Instance t_Div_7559770 : t_Div ((t_U8)) ((t_U8)) := { - Div_impl_228_f_Output := t_U8; - Div_impl_228_f_div := fun (self : t_U8) (rhs : t_U8)=> + Div_f_Output := t_U8; + Div_f_div := fun (self : t_U8) (rhs : t_U8)=> Concretization_f_concretize (haxint_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_889664521 : t_Shl ((t_U8)) ((t_U8)) := +#[globa] Instance t_Shl_889664521 : t_Shl ((t_U8)) ((t_U8)) := { - Shl_impl_229_f_Output := t_U8; - Shl_impl_229_f_shl := fun (self : t_U8) (rhs : t_U8)=> + Shl_f_Output := t_U8; + Shl_f_shl := fun (self : t_U8) (rhs : t_U8)=> Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_268581730 : t_Shl ((t_U8)) ((t_U16)) := +#[globa] Instance t_Shl_268581730 : t_Shl ((t_U8)) ((t_U16)) := { - Shl_impl_230_f_Output := t_U8; - Shl_impl_230_f_shl := fun (self : t_U8) (rhs : t_U16)=> + Shl_f_Output := t_U8; + Shl_f_shl := fun (self : t_U8) (rhs : t_U16)=> Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_833473770 : t_Shl ((t_U8)) ((t_U32)) := +#[globa] Instance t_Shl_833473770 : t_Shl ((t_U8)) ((t_U32)) := { - Shl_impl_231_f_Output := t_U8; - Shl_impl_231_f_shl := fun (self : t_U8) (rhs : t_U32)=> + Shl_f_Output := t_U8; + Shl_f_shl := fun (self : t_U8) (rhs : t_U32)=> Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_896563459 : t_Shl ((t_U8)) ((t_U64)) := +#[globa] Instance t_Shl_896563459 : t_Shl ((t_U8)) ((t_U64)) := { - Shl_impl_232_f_Output := t_U8; - Shl_impl_232_f_shl := fun (self : t_U8) (rhs : t_U64)=> + Shl_f_Output := t_U8; + Shl_f_shl := fun (self : t_U8) (rhs : t_U64)=> Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shl_595294021 : t_Shl ((t_U8)) ((t_U128)) := +#[globa] Instance t_Shl_595294021 : t_Shl ((t_U8)) ((t_U128)) := { - Shl_impl_233_f_Output := t_U8; - Shl_impl_233_f_shl := fun (self : t_U8) (rhs : t_U128)=> + Shl_f_Output := t_U8; + Shl_f_shl := fun (self : t_U8) (rhs : t_U128)=> Concretization_f_concretize (haxint_shl (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_467626732 : t_Shr ((t_U8)) ((t_U8)) := +#[globa] Instance t_Shr_467626732 : t_Shr ((t_U8)) ((t_U8)) := { - Shr_impl_234_f_Output := t_U8; - Shr_impl_234_f_shr := fun (self : t_U8) (rhs : t_U8)=> + Shr_f_Output := t_U8; + Shr_f_shr := fun (self : t_U8) (rhs : t_U8)=> Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_985367369 : t_Shr ((t_U8)) ((t_U16)) := +#[globa] Instance t_Shr_985367369 : t_Shr ((t_U8)) ((t_U16)) := { - Shr_impl_235_f_Output := t_U8; - Shr_impl_235_f_shr := fun (self : t_U8) (rhs : t_U16)=> + Shr_f_Output := t_U8; + Shr_f_shr := fun (self : t_U8) (rhs : t_U16)=> Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_868101800 : t_Shr ((t_U8)) ((t_U32)) := +#[globa] Instance t_Shr_868101800 : t_Shr ((t_U8)) ((t_U32)) := { - Shr_impl_236_f_Output := t_U8; - Shr_impl_236_f_shr := fun (self : t_U8) (rhs : t_U32)=> + Shr_f_Output := t_U8; + Shr_f_shr := fun (self : t_U8) (rhs : t_U32)=> Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_300023283 : t_Shr ((t_U8)) ((t_U64)) := +#[globa] Instance t_Shr_300023283 : t_Shr ((t_U8)) ((t_U64)) := { - Shr_impl_237_f_Output := t_U8; - Shr_impl_237_f_shr := fun (self : t_U8) (rhs : t_U64)=> + Shr_f_Output := t_U8; + Shr_f_shr := fun (self : t_U8) (rhs : t_U64)=> Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Shr_794091640 : t_Shr ((t_U8)) ((t_U128)) := +#[globa] Instance t_Shr_794091640 : t_Shr ((t_U8)) ((t_U128)) := { - Shr_impl_238_f_Output := t_U8; - Shr_impl_238_f_shr := fun (self : t_U8) (rhs : t_U128)=> + Shr_f_Output := t_U8; + Shr_f_shr := fun (self : t_U8) (rhs : t_U128)=> Concretization_f_concretize (haxint_shr (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitXor_24738444 : t_BitXor ((t_U8)) ((t_U8)) := +#[globa] Instance t_BitXor_24738444 : t_BitXor ((t_U8)) ((t_U8)) := { - BitXor_impl_239_f_Output := t_U8; - BitXor_impl_239_f_bitxor := fun (self : t_U8) (rhs : t_U8)=> + BitXor_f_Output := t_U8; + BitXor_f_bitxor := fun (self : t_U8) (rhs : t_U8)=> Concretization_f_concretize (haxint_bitxor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitAnd_358790390 : t_BitAnd ((t_U8)) ((t_U8)) := +#[globa] Instance t_BitAnd_358790390 : t_BitAnd ((t_U8)) ((t_U8)) := { - BitAnd_impl_240_f_Output := t_U8; - BitAnd_impl_240_f_bitand := fun (self : t_U8) (rhs : t_U8)=> + BitAnd_f_Output := t_U8; + BitAnd_f_bitand := fun (self : t_U8) (rhs : t_U8)=> Concretization_f_concretize (haxint_bitand (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_BitOr_349401480 : t_BitOr ((t_U8)) ((t_U8)) := +#[globa] Instance t_BitOr_349401480 : t_BitOr ((t_U8)) ((t_U8)) := { - BitOr_impl_241_f_Output := t_U8; - BitOr_impl_241_f_bitor := fun (self : t_U8) (rhs : t_U8)=> + BitOr_f_Output := t_U8; + BitOr_f_bitor := fun (self : t_U8) (rhs : t_U8)=> Concretization_f_concretize (haxint_bitor (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Rem_998027599 : t_Rem ((t_I128)) ((t_I128)) := +#[globa] Instance t_Rem_998027599 : t_Rem ((t_I128)) ((t_I128)) := { - Rem_impl_45_f_Output := t_I128; - Rem_impl_45_f_rem := fun (self : t_I128) (rhs : t_I128)=> - Concretization_f_concretize (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Rem_f_Output := t_I128; + Rem_f_rem := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Div_865866956 : t_Div ((t_I128)) ((t_I128)) := +#[globa] Instance t_Div_865866956 : t_Div ((t_I128)) ((t_I128)) := { - Div_impl_47_f_Output := t_I128; - Div_impl_47_f_div := fun (self : t_I128) (rhs : t_I128)=> - Concretization_f_concretize (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Div_f_Output := t_I128; + Div_f_div := fun (self : t_I128) (rhs : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Rem_957489424 : t_Rem ((t_I64)) ((t_I64)) := +#[globa] Instance t_Rem_957489424 : t_Rem ((t_I64)) ((t_I64)) := { - Rem_impl_59_f_Output := t_I64; - Rem_impl_59_f_rem := fun (self : t_I64) (rhs : t_I64)=> - Concretization_f_concretize (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Rem_f_Output := t_I64; + Rem_f_rem := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Div_611785525 : t_Div ((t_I64)) ((t_I64)) := +#[globa] Instance t_Div_611785525 : t_Div ((t_I64)) ((t_I64)) := { - Div_impl_61_f_Output := t_I64; - Div_impl_61_f_div := fun (self : t_I64) (rhs : t_I64)=> - Concretization_f_concretize (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Div_f_Output := t_I64; + Div_f_div := fun (self : t_I64) (rhs : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Rem_219303214 : t_Rem ((t_I32)) ((t_I32)) := +#[globa] Instance t_Rem_219303214 : t_Rem ((t_I32)) ((t_I32)) := { - Rem_impl_73_f_Output := t_I32; - Rem_impl_73_f_rem := fun (self : t_I32) (rhs : t_I32)=> - Concretization_f_concretize (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Rem_f_Output := t_I32; + Rem_f_rem := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Div_1002924104 : t_Div ((t_I32)) ((t_I32)) := +#[globa] Instance t_Div_1002924104 : t_Div ((t_I32)) ((t_I32)) := { - Div_impl_75_f_Output := t_I32; - Div_impl_75_f_div := fun (self : t_I32) (rhs : t_I32)=> - Concretization_f_concretize (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Div_f_Output := t_I32; + Div_f_div := fun (self : t_I32) (rhs : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Rem_948867246 : t_Rem ((t_I16)) ((t_I16)) := +#[globa] Instance t_Rem_948867246 : t_Rem ((t_I16)) ((t_I16)) := { - Rem_impl_87_f_Output := t_I16; - Rem_impl_87_f_rem := fun (self : t_I16) (rhs : t_I16)=> - Concretization_f_concretize (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Rem_f_Output := t_I16; + Rem_f_rem := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Div_357493436 : t_Div ((t_I16)) ((t_I16)) := +#[globa] Instance t_Div_357493436 : t_Div ((t_I16)) ((t_I16)) := { - Div_impl_89_f_Output := t_I16; - Div_impl_89_f_div := fun (self : t_I16) (rhs : t_I16)=> - Concretization_f_concretize (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Div_f_Output := t_I16; + Div_f_div := fun (self : t_I16) (rhs : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Rem_228000167 : t_Rem ((t_I8)) ((t_I8)) := +#[globa] Instance t_Rem_228000167 : t_Rem ((t_I8)) ((t_I8)) := { - Rem_impl_101_f_Output := t_I8; - Rem_impl_101_f_rem := fun (self : t_I8) (rhs : t_I8)=> - Concretization_f_concretize (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Rem_f_Output := t_I8; + Rem_f_rem := fun (self : t_I8) (rhs : t_I8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I8) (z_rem (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Div_470010025 : t_Div ((t_I8)) ((t_I8)) := +#[globa] Instance t_Div_470010025 : t_Div ((t_I8)) ((t_I8)) := { - Div_impl_103_f_Output := t_I8; - Div_impl_103_f_div := fun (self : t_I8) (rhs : t_I8)=> - Concretization_f_concretize (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); + Div_f_Output := t_I8; + Div_f_div := fun (self : t_I8) (rhs : t_I8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I8) (z_div (Abstraction_f_lift (self)) (Abstraction_f_lift (rhs))); }. -Instance t_Sub_1018502693 : t_Sub ((t_U128)) ((t_U128)) := +#[globa] Instance t_Sub_1018502693 : t_Sub ((t_U128)) ((t_U128)) := { - Sub_impl_115_f_Output := t_U128; - Sub_impl_115_f_sub := fun (self : t_U128) (rhs : t_U128)=> - Add_f_add (self) (Neg_f_neg (rhs)); + Sub_f_Output := t_U128; + Sub_f_sub := fun (self : t_U128) (rhs : t_U128)=> + Add_f_add (t_Add := _ : t_Add t_U128 t_U128) (self) (Neg_f_neg (rhs)); }. -Instance t_Not_758360759 : t_Not ((t_U128)) := +#[globa] Instance t_Not_758360759 : t_Not ((t_U128)) := { - Not_impl_116_f_Output := t_U128; - Not_impl_116_f_not := fun (self : t_U128)=> + Not_f_Output := t_U128; + Not_f_not := fun (self : t_U128)=> BitXor_f_bitxor (self) (Constants_f_MAX); }. -Instance t_Sub_919216830 : t_Sub ((t_U64)) ((t_U64)) := +#[globa] Instance t_Sub_919216830 : t_Sub ((t_U64)) ((t_U64)) := { - Sub_impl_142_f_Output := t_U64; - Sub_impl_142_f_sub := fun (self : t_U64) (rhs : t_U64)=> - Add_f_add (self) (Neg_f_neg (rhs)); + Sub_f_Output := t_U64; + Sub_f_sub := fun (self : t_U64) (rhs : t_U64)=> + Add_f_add (t_Add := _ : t_Add _ t_U64) (self) (Neg_f_neg (rhs)); }. -Instance t_Not_693249901 : t_Not ((t_U64)) := +#[globa] Instance t_Not_693249901 : t_Not ((t_U64)) := { - Not_impl_143_f_Output := t_U64; - Not_impl_143_f_not := fun (self : t_U64)=> + Not_f_Output := t_U64; + Not_f_not := fun (self : t_U64)=> BitXor_f_bitxor (self) (Constants_f_MAX); }. -Instance t_Sub_22623594 : t_Sub ((t_U32)) ((t_U32)) := +#[globa] Instance t_Sub_22623594 : t_Sub ((t_U32)) ((t_U32)) := { - Sub_impl_169_f_Output := t_U32; - Sub_impl_169_f_sub := fun (self : t_U32) (rhs : t_U32)=> - Add_f_add (self) (Neg_f_neg (rhs)); + Sub_f_Output := t_U32; + Sub_f_sub := fun (self : t_U32) (rhs : t_U32)=> + Add_f_add (t_Add := _ : t_Add _ t_U32) (self) (Neg_f_neg (rhs)); }. -Instance t_Not_183316157 : t_Not ((t_U32)) := +#[globa] Instance t_Not_183316157 : t_Not ((t_U32)) := { - Not_impl_170_f_Output := t_U32; - Not_impl_170_f_not := fun (self : t_U32)=> + Not_f_Output := t_U32; + Not_f_not := fun (self : t_U32)=> BitXor_f_bitxor (self) (Constants_f_MAX); }. -Instance t_Sub_502320750 : t_Sub ((t_U16)) ((t_U16)) := +#[globa] Instance t_Sub_502320750 : t_Sub ((t_U16)) ((t_U16)) := { - Sub_impl_196_f_Output := t_U16; - Sub_impl_196_f_sub := fun (self : t_U16) (rhs : t_U16)=> - Add_f_add (self) (Neg_f_neg (rhs)); + Sub_f_Output := t_U16; + Sub_f_sub := fun (self : t_U16) (rhs : t_U16)=> + Add_f_add (t_Add := _ : t_Add _ t_U16) (self) (Neg_f_neg (rhs)); }. -Instance t_Not_669226601 : t_Not ((t_U16)) := +#[globa] Instance t_Not_669226601 : t_Not ((t_U16)) := { - Not_impl_197_f_Output := t_U16; - Not_impl_197_f_not := fun (self : t_U16)=> + Not_f_Output := t_U16; + Not_f_not := fun (self : t_U16)=> BitXor_f_bitxor (self) (Constants_f_MAX); }. -Instance t_Sub_299023787 : t_Sub ((t_U8)) ((t_U8)) := +#[globa] Instance t_Sub_299023787 : t_Sub ((t_U8)) ((t_U8)) := { - Sub_impl_223_f_Output := t_U8; - Sub_impl_223_f_sub := fun (self : t_U8) (rhs : t_U8)=> - Add_f_add (self) (Neg_f_neg (rhs)); + Sub_f_Output := t_U8; + Sub_f_sub := fun (self : t_U8) (rhs : t_U8)=> + Add_f_add (t_Add := _ : t_Add _ t_U8) (self) (Neg_f_neg (rhs)); }. -Instance t_Not_761019181 : t_Not ((t_U8)) := +#[globa] Instance t_Not_761019181 : t_Not ((t_U8)) := { - Not_impl_224_f_Output := t_U8; - Not_impl_224_f_not := fun (self : t_U8)=> + Not_f_Output := t_U8; + Not_f_not := fun (self : t_U8)=> BitXor_f_bitxor (self) (Constants_f_MAX); }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Clone.v b/proof-libs/coq/coq/generated-core/src/Core_Clone.v index 5f90b8871..929548ba0 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Clone.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Clone.v @@ -12,52 +12,10 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - Class t_Clone (v_Self : Type) : Type := { Clone_f_clone : v_Self -> v_Self; }. Arguments t_Clone (_). + +#[global] Instance t_Clone_any T : t_Clone T := { Clone_f_clone := id }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Cmp.v b/proof-libs/coq/coq/generated-core/src/Core_Cmp.v index 5e60833f0..afe5cec36 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Cmp.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Cmp.v @@ -12,59 +12,13 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - - - From Core Require Import Core_Option (t_Option). Export Core_Option (t_Option). -Definition discriminant_Ordering_Equal : t_i8 := +Definition discriminant_Ordering_Equal := 0. -Definition discriminant_Ordering_Greater : t_i8 := +Definition discriminant_Ordering_Greater := 1. Inductive t_Ordering : Type := @@ -109,10 +63,10 @@ Definition impl__Ordering__reverse (self : t_Ordering) : t_Ordering := Ordering_Less end. -Definition discriminant_Ordering_Less : t_i8 := +Definition discriminant_Ordering_Less := -1. -Definition t_Ordering_cast_to_repr (x : t_Ordering) : t_i8 := +Definition t_Ordering_cast_to_repr (x : t_Ordering) := match x with | Ordering_Less => discriminant_Ordering_Less @@ -153,9 +107,9 @@ Definition impl__Ordering__is_ne (self : t_Ordering) : bool := false end). -Instance t_PartialEq_603824491 : t_PartialEq ((t_Ordering)) ((t_Ordering)) := +#[global] Instance t_PartialEq_603824491 : t_PartialEq ((t_Ordering)) ((t_Ordering)) := { - PartialEq_impl_1_f_eq := fun (self : t_Ordering) (other : t_Ordering)=> + PartialEq_f_eq := fun (self : t_Ordering) (other : t_Ordering)=> match self with | Ordering_Less => match other with @@ -179,7 +133,7 @@ Instance t_PartialEq_603824491 : t_PartialEq ((t_Ordering)) ((t_Ordering)) := false end end; - PartialEq_impl_1_f_ne := fun (self : t_Ordering) (other : t_Ordering)=> + PartialEq_f_ne := fun (self : t_Ordering) (other : t_Ordering)=> negb (match self with | Ordering_Less => match other with diff --git a/proof-libs/coq/coq/generated-core/src/Core_Convert.v b/proof-libs/coq/coq/generated-core/src/Core_Convert.v index fe1c71bea..657b96ee6 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Convert.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Convert.v @@ -12,49 +12,8 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Marker. +Export Core_Marker. Class t_From (v_Self : Type) (v_T : Type) `{t_Sized (v_Self)} `{t_Sized (v_T)} : Type := { @@ -64,7 +23,7 @@ Arguments t_From (_) (_) {_} {_}. Instance t_From_46353410 `{v_T : Type} `{t_Sized (v_T)} : t_From ((v_T)) ((v_T)) := { - From_impl_1_f_from := fun (t : v_T)=> + From_f_from := fun (t : v_T)=> t; }. @@ -74,8 +33,8 @@ Class t_Into (v_Self : Type) (v_T : Type) `{t_Sized (v_Self)} `{t_Sized (v_T)} : }. Arguments t_Into (_) (_) {_} {_}. -Instance t_Into_730689925 `{v_T : Type} `{v_U : Type} `{t_Sized (v_T)} `{t_Sized (v_U)} `{t_From (v_U) (v_T)} : t_Into ((v_T)) ((v_U)) := +#[global] Instance t_Into_730689925 `{v_T : Type} `{v_U : Type} `{t_Sized (v_T)} `{t_Sized (v_U)} `{t_From (v_U) (v_T)} : t_Into ((v_T)) ((v_U)) := { - Into_impl_f_into := fun (self : v_T)=> + Into_f_into := fun (self : v_T)=> From_f_from (self); }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Marker.v b/proof-libs/coq/coq/generated-core/src/Core_Marker.v index 7bf9c11ca..4316e2fb9 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Marker.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Marker.v @@ -1,3 +1,4 @@ + (* File automatically generated by Hacspec *) From Coq Require Import ZArith. Require Import List. @@ -12,50 +13,6 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - From Core Require Import Core_Clone (t_Clone). Export Core_Clone (t_Clone). @@ -78,3 +35,5 @@ Class t_Tuple (v_Self : Type) : Type := { }. Arguments t_Tuple (_). + +#[global] Instance t_Sized_any T : t_Sized T := {}. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Num.v b/proof-libs/coq/coq/generated-core/src/Core_Num.v index 9b555ad9e..d06a6c592 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Num.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Num.v @@ -12,50 +12,6 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - From Core Require Import Core_Base_interface (t_int). Export Core_Base_interface (t_int). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v b/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v index 4b1cbcbe0..ddc4bf8db 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v @@ -12,48 +12,4 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - (* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops.v b/proof-libs/coq/coq/generated-core/src/Core_Ops.v index b743c934e..36a0f6925 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops.v @@ -12,102 +12,62 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - - - -From Core Require Import Self_Arith (t_Add). -Export Self_Arith (t_Add). - -From Core Require Import Self_Arith (t_Div). -Export Self_Arith (t_Div). - -From Core Require Import Self_Arith (t_Mul). -Export Self_Arith (t_Mul). - -From Core Require Import Self_Arith (t_Neg). -Export Self_Arith (t_Neg). - -From Core Require Import Self_Arith (t_Rem). -Export Self_Arith (t_Rem). - -From Core Require Import Self_Arith (t_Sub). -Export Self_Arith (t_Sub). - - - -From Core Require Import Self_Bit (t_BitAnd). -Export Self_Bit (t_BitAnd). - -From Core Require Import Self_Bit (t_BitOr). -Export Self_Bit (t_BitOr). - -From Core Require Import Self_Bit (t_BitXor). -Export Self_Bit (t_BitXor). - -From Core Require Import Self_Bit (t_Not). -Export Self_Bit (t_Not). - -From Core Require Import Self_Bit (t_Shl). -Export Self_Bit (t_Shl). - -From Core Require Import Self_Bit (t_Shr). -Export Self_Bit (t_Shr). - - - -From Core Require Import Self_Index (t_Index). -Export Self_Index (t_Index). - - - -From Core Require Import Self_Range (t_Range). -Export Self_Range (t_Range). - -From Core Require Import Self_Index_range (t_IndexRange). -Export Self_Index_range (t_IndexRange). +(* From Core Require Import Core_Ops_Arith (t_Add). *) +(* Export Core_Ops_Arith (t_Add). *) + +(* From Core Require Import Core_Ops_Arith (t_Div). *) +(* Export Core_Ops_Arith (t_Div). *) + +(* From Core Require Import Core_Ops_Arith (t_Mul). *) +(* Export Core_Ops_Arith (t_Mul). *) + +(* From Core Require Import Core_Ops_Arith (t_Neg). *) +(* Export Core_Ops_Arith (t_Neg). *) + +(* From Core Require Import Core_Ops_Arith (t_Rem). *) +(* Export Core_Ops_Arith (t_Rem). *) + +(* From Core Require Import Core_Ops_Arith (t_Sub). *) +(* Export Core_Ops_Arith (t_Sub). *) + +From Core Require Import Core_Ops_Arith. +Export Core_Ops_Arith. + + + +(* From Core Require Import Core_Ops_Bit (t_BitAnd). *) +(* Export Core_Ops_Bit (t_BitAnd). *) + +(* From Core Require Import Core_Ops_Bit (t_BitOr). *) +(* Export Core_Ops_Bit (t_BitOr). *) + +(* From Core Require Import Core_Ops_Bit (t_BitXor). *) +(* Export Core_Ops_Bit (t_BitXor). *) + +(* From Core Require Import Core_Ops_Bit (t_Not). *) +(* Export Core_Ops_Bit (t_Not). *) + +(* From Core Require Import Core_Ops_Bit (t_Shl). *) +(* Export Core_Ops_Bit (t_Shl). *) + +(* From Core Require Import Core_Ops_Bit (t_Shr). *) +(* Export Core_Ops_Bit (t_Shr). *) + +From Core Require Import Core_Ops_Bit. +Export Core_Ops_Bit. + + + +From Core Require Import Core_Ops_Index (t_Index). +Export Core_Ops_Index (t_Index). + + + +From Core Require Import Core_Ops_Range. +Export Core_Ops_Range. + +(* From Core Require Import Core_Ops_Index_range (t_IndexRange). *) +(* Export Core_Ops_Index_range (t_IndexRange). *) (* NotImplementedYet *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v index 86707c070..f76ce2826 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v @@ -12,50 +12,6 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - From Core Require Import Core_Marker (t_Sized). Export Core_Marker (t_Sized). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v index 29fe33f34..3c779c97c 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v @@ -12,50 +12,6 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - From Core Require Import Core_Marker (t_Sized). Export Core_Marker (t_Sized). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v index 6c1c14d87..9ff5aa568 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v @@ -12,50 +12,6 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - Class t_Index (v_Self : Type) (v_Idx : Type) : Type := { Index_f_Output : Type; diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v index 02b0f9574..26cb3abac 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v @@ -12,52 +12,8 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core (t_primitive). -Export Core (t_primitive). +From Core Require Import Core_Primitive. +Export Core_Primitive. From Core Require Import Core_Iter (t_Iterator). Export Core_Iter (t_Iterator). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v index 64b2e14ee..e711f3c73 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v @@ -12,49 +12,8 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Marker. +Export Core_Marker. Record t_Range (v_Idx : Type) `{t_Sized (v_Idx)} : Type := { diff --git a/proof-libs/coq/coq/generated-core/src/Core_Option.v b/proof-libs/coq/coq/generated-core/src/Core_Option.v index 8e1ea84f0..e102f26e3 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Option.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Option.v @@ -12,57 +12,14 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Clone. +Export Core_Clone. +From Core Require Import Core_Marker (t_Sized). +Export Core_Marker (t_Sized). - -From Core Require Import Core_Panicking (t_panic). -Export Core_Panicking (t_panic). - -From Core Require Import Core_Panicking (t_panic_display). -Export Core_Panicking (t_panic_display). +From Core Require Import Core_Panicking (panic). +Export Core_Panicking (panic). Inductive t_Option (v_T : Type) `{t_Sized (v_T)} : Type := | Option_None @@ -72,7 +29,7 @@ Arguments Option_Some {_} {_}. Instance t_Clone_390068633 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Option ((v_T)))) := { - Clone_impl_f_clone := fun (self : t_Option ((v_T)))=> + Clone_f_clone := fun (self : t_Option ((v_T)))=> match self with | Option_Some (x) => Option_Some (Clone_f_clone (x)) @@ -89,32 +46,32 @@ Definition impl_1__is_some `{v_T : Type} `{t_Sized (v_T)} (self : t_Option ((v_T false end. -Definition impl_1__map `{v_T : Type} `{v_U : Type} `{v_F : Type} `{t_Sized (v_T)} `{t_Sized (v_U)} `{t_Sized (v_F)} `{t_FnOnce (v_F) ((v_T))} `{_.(FnOnce_f_Output) = v_U} (self : t_Option ((v_T))) (f : v_F) : t_Option ((v_U)) := - match self with - | Option_Some (x) => - Option_Some (FnOnce_f_call_once (f) ((x))) - | Option_None => - Option_None - end. +(* Definition impl_1__map `{v_T : Type} `{v_U : Type} `{v_F : Type} `{t_Sized (v_T)} `{t_Sized (v_U)} `{t_Sized (v_F)} `{t_FnOnce (v_F) ((v_T))} `{_.(FnOnce_f_Output) = v_U} (self : t_Option ((v_T))) (f : v_F) : t_Option ((v_U)) := *) +(* match self with *) +(* | Option_Some (x) => *) +(* Option_Some (FnOnce_f_call_once (f) ((x))) *) +(* | Option_None => *) +(* Option_None *) +(* end. *) -Definition unwrap_failed '(_ : unit) : t_Never := - panic ("called `Option::unwrap()` on a `None` value"%string). +(* Definition unwrap_failed '(_ : unit) : t_Never := *) +(* panic ("called `Option::unwrap()` on a `None` value"%string). *) -Definition impl_1__unwrap `{v_T : Type} `{t_Sized (v_T)} (self : t_Option ((v_T))) `{impl_1__is_some (self___) = true} : v_T := - match self with - | Option_Some (val) => - val - | Option_None => - never_to_any (unwrap_failed (tt)) - end. +(* Definition impl_1__unwrap `{v_T : Type} `{t_Sized (v_T)} (self : t_Option ((v_T))) `{impl_1__is_some (self___) = true} : v_T := *) +(* match self with *) +(* | Option_Some (val) => *) +(* val *) +(* | Option_None => *) +(* never_to_any (unwrap_failed (tt)) *) +(* end. *) -Definition expect_failed (msg : string) : t_Never := - panic_display (msg). +(* Definition expect_failed (msg : string) : t_Never := *) +(* panic (msg). *) -Definition impl_1__expect `{v_T : Type} `{t_Sized (v_T)} (self : t_Option ((v_T))) (msg : string) : v_T := - match self with - | Option_Some (val) => - val - | Option_None => - never_to_any (expect_failed (msg)) - end. +(* Definition impl_1__expect `{v_T : Type} `{t_Sized (v_T)} (self : t_Option ((v_T))) (msg : string) : v_T := *) +(* match self with *) +(* | Option_Some (val) => *) +(* val *) +(* | Option_None => *) +(* never_to_any (expect_failed (msg)) *) +(* end. *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Panicking.v b/proof-libs/coq/coq/generated-core/src/Core_Panicking.v index 972e26070..42d61e406 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Panicking.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Panicking.v @@ -12,79 +12,6 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core (t_fmt). -Export Core (t_fmt). - - - -From Core Require Import Core_Panic (t_Location). -Export Core_Panic (t_Location). - -From Core Require Import Core_Panic (t_PanicInfo). -Export Core_Panic (t_PanicInfo). - -Inductive t_AssertKind : Type := -| AssertKind_Eq -| AssertKind_Ne -| AssertKind_Match. -Arguments AssertKind_Eq. -Arguments AssertKind_Ne. -Arguments AssertKind_Match. - -Definition t_AssertKind_cast_to_repr (x : t_AssertKind) : t_isize := - match x with - | AssertKind_Eq => - 0 - | AssertKind_Ne => - 1 - | AssertKind_Match => - 3 - end. - Inductive t_Never : Type := . @@ -92,18 +19,12 @@ Definition t_Never_cast_to_repr (x : t_Never) : t_Never := match x with end. -Definition never_to_any `{v_T : Type} `{t_Sized (v_T)} (x : t_Never) : v_T := - never_to_any (match x with +Definition never_to_any `{v_T : Type} (x : t_Never) : v_T := + (match x with end). -Fixpoint panic_fmt (fmt : t_Arguments) : t_Never := - panic_fmt (fmt). - -Definition panic (expr : string) : t_Never := - panic_fmt (impl_2__new_const ([expr])). - -Definition panic_display `{v_T : Type} `{t_Sized (v_T)} `{t_Display (v_T)} (x : v_T) : t_Never := - panic_fmt (impl_2__new_v1 ([""%string]) ([impl_1__new_display (x)])). +Definition panic (expr : string) {HFalse : t_Never} : t_Never := + never_to_any HFalse. -Definition panic_explicit '(_ : unit) : t_Never := - panic_display ("explicit panic"%string). +Definition panic_explicit '(_ : unit) `{HFalse : t_Never} : t_Never := + never_to_any HFalse. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Primitive.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive.v index 62cc6ce4d..4642ac344 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Primitive.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive.v @@ -12,109 +12,20 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - - - -From Core Require Import Core_Ops (t_Add). -Export Core_Ops (t_Add). - -From Core Require Import Core_Ops (t_Div). -Export Core_Ops (t_Div). - -From Core Require Import Core_Ops (t_Mul). -Export Core_Ops (t_Mul). - -From Core Require Import Core_Ops (t_Neg). -Export Core_Ops (t_Neg). - -From Core Require Import Core_Ops (t_Rem). -Export Core_Ops (t_Rem). - -From Core Require Import Core_Ops (t_Sub). -Export Core_Ops (t_Sub). - - - -From Core Require Import Core_Ops (t_BitAnd). -Export Core_Ops (t_BitAnd). - -From Core Require Import Core_Ops (t_BitOr). -Export Core_Ops (t_BitOr). - -From Core Require Import Core_Ops (t_BitXor). -Export Core_Ops (t_BitXor). - -From Core Require Import Core_Ops (t_Not). -Export Core_Ops (t_Not). - -From Core Require Import Core_Ops (t_Shl). -Export Core_Ops (t_Shl). - -From Core Require Import Core_Ops (t_Shr). -Export Core_Ops (t_Shr). - - - -From Core Require Import Core_Cmp (t_Ordering). -Export Core_Cmp (t_Ordering). - -From Core Require Import Core_Cmp (t_PartialEq). -Export Core_Cmp (t_PartialEq). - -From Core Require Import Core_Cmp (t_PartialOrd). -Export Core_Cmp (t_PartialOrd). - -From Core Require Import Core (t_base). -Export Core (t_base). - -From Core Require Import Core_Base (t_number_conversion). -Export Core_Base (t_number_conversion). - -From Core Require Import Core_Base_interface (t_int). -Export Core_Base_interface (t_int). +From Core Require Import Core_Ops. +Export Core_Ops. + +From Core Require Import Core_Cmp. +Export Core_Cmp. + +From Core Require Import Core_Base. +Export Core_Base. + +(* From Core Require Import Core_Base_Number_conversion. *) +(* Export Core_Base_Number_conversion. *) + +From Core Require Import Core_Base_interface_Int. +Export Core_Base_interface_Int. Notation "'t_Slice'" := (t_Slice). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Result.v b/proof-libs/coq/coq/generated-core/src/Core_Result.v index d2d421a45..d5caaaccf 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Result.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Result.v @@ -12,49 +12,8 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Option. +Export Core_Option. Inductive t_Result (v_T : Type) (v_E : Type) `{t_Sized (v_T)} `{t_Sized (v_E)} : Type := | Result_Ok : v_T -> _ From 7d7c6deb5bf9d4b5aa23c6a21b806f1e1c405fe7 Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Mon, 25 Nov 2024 16:24:29 +0100 Subject: [PATCH 25/59] Library implementation needed for coverage --- proof-libs/coq/coq/generated-core/_CoqProject | 15 ++-- .../phase_library/NumberNotation.v | 52 ++++++++++++ .../coq/generated-core/phase_library/TODO.v | 24 ++++++ proof-libs/coq/coq/generated-core/src/Core.v | 57 +++---------- .../coq/generated-core/src/Core_Primitive.v | 81 ++++++++++--------- 5 files changed, 137 insertions(+), 92 deletions(-) create mode 100644 proof-libs/coq/coq/generated-core/phase_library/NumberNotation.v create mode 100644 proof-libs/coq/coq/generated-core/phase_library/TODO.v diff --git a/proof-libs/coq/coq/generated-core/_CoqProject b/proof-libs/coq/coq/generated-core/_CoqProject index d597276c5..3cbbac069 100644 --- a/proof-libs/coq/coq/generated-core/_CoqProject +++ b/proof-libs/coq/coq/generated-core/_CoqProject @@ -60,12 +60,17 @@ ./phase_library/ControlFlow.v -# ./src/Core_Primitive.v - +# Bundles: Core_Primitive.v, ./src/Core_Array_Rec_bundle_579704328.v +./src/Core_Primitive.v + # ./src/Core_Num.v # Broken? +./phase_library/NumberNotation.v +./phase_library/TODO.v + +./src/Core.v # # Extra @@ -74,7 +79,7 @@ # Core_Slice_Index_Private_slice_index.v # Core_Slice_Index.v # Core_Slice.v -# Core_Result.v +# ----- Core_Result.v # Core_Primitive_Number_conversion_i.v # Core_Primitive_Number_conversion.v # Core_Primitive.v @@ -89,8 +94,8 @@ # Core_Ops_Arith_Impls_for_prims.v # ----- Core_Ops_Arith.v # ----- Core_Ops.v -# Core_Num_Uint_macros.v -# Core_Num_Int_macros.v +# ----- Core_Num_Uint_macros.v +# ----- Core_Num_Int_macros.v # Core_Num.v # ----- Core_Marker.v # Core_Iter_Traits_Marker.v diff --git a/proof-libs/coq/coq/generated-core/phase_library/NumberNotation.v b/proof-libs/coq/coq/generated-core/phase_library/NumberNotation.v new file mode 100644 index 000000000..866a6c5b0 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/phase_library/NumberNotation.v @@ -0,0 +1,52 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +Require Import Core_Primitive. +Export Core_Primitive. + +(* Handwritten *) + +Coercion Build_t_i8 : t_I8 >-> t_i8. +Coercion Build_t_I8 : Z >-> t_I8. + +Coercion Build_t_i16 : t_I16 >-> t_i16. +Coercion Build_t_I16 : Z >-> t_I16. + +Coercion Build_t_i32 : t_I32 >-> t_i32. +Coercion Build_t_I32 : Z >-> t_I32. + +Coercion Build_t_i64 : t_I64 >-> t_i64. +Coercion Build_t_I64 : Z >-> t_I64. + +Coercion Build_t_i128 : t_I128 >-> t_i128. +Coercion Build_t_I128 : Z >-> t_I128. + +Coercion Build_t_isize : t_I64 >-> t_isize. + +Coercion Build_t_u8 : t_U8 >-> t_u8. +Coercion Build_t_U8 : N >-> t_U8. + +Coercion Build_t_u16 : t_U16 >-> t_u16. +Coercion Build_t_U16 : N >-> t_U16. + +Coercion Build_t_u32 : t_U32 >-> t_u32. +Coercion Build_t_U32 : N >-> t_U32. + +Coercion Build_t_u64 : t_U64 >-> t_u64. +Coercion Build_t_U64 : N >-> t_U64. + +Coercion Build_t_u128 : t_U128 >-> t_u128. +Coercion Build_t_U128 : N >-> t_U128. + +Coercion Build_t_usize : t_U64 >-> t_usize. + +Coercion Z.to_N : Z >-> N. diff --git a/proof-libs/coq/coq/generated-core/phase_library/TODO.v b/proof-libs/coq/coq/generated-core/phase_library/TODO.v new file mode 100644 index 000000000..7c7c40708 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/phase_library/TODO.v @@ -0,0 +1,24 @@ +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. + +Require Import Core_Primitive. +Export Core_Primitive. + +(* Array coercions *) +Coercion Build_t_Array : t_Slice >-> t_Array. +Coercion Build_t_Slice : list >-> t_Slice. + +Definition unsize {A} (x : A) := x. +Definition repeat {v_T} (a : v_T) b : t_Array v_T b := List.repeat a (N.to_nat (U64_f_v (usize_0 b))). + +Definition t_String := string. +Definition ToString_f_to_string (x : string) : string := x. diff --git a/proof-libs/coq/coq/generated-core/src/Core.v b/proof-libs/coq/coq/generated-core/src/Core.v index 211e91b83..50062a6f4 100644 --- a/proof-libs/coq/coq/generated-core/src/Core.v +++ b/proof-libs/coq/coq/generated-core/src/Core.v @@ -12,54 +12,8 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - - - -From Core Require Import primitive. -Export primitive. +From Core Require Import Core_Primitive. +Export Core_Primitive. (* NotImplementedYet *) @@ -106,3 +60,10 @@ Export primitive. (* NotImplementedYet *) (* NotImplementedYet *) + + +From Core Require Import NumberNotation. +Export NumberNotation. + +From Core Require Import TODO. +Export TODO. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Primitive.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive.v index 4642ac344..68e97b241 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Primitive.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive.v @@ -27,11 +27,14 @@ Export Core_Base. From Core Require Import Core_Base_interface_Int. Export Core_Base_interface_Int. +From Core Require Import Core_Array_Rec_bundle_579704328. +Export Core_Array_Rec_bundle_579704328. + Notation "'t_Slice'" := (t_Slice). Notation "'Slice_f_v'" := (Slice_f_v). -Notation "'impl_2'" := (impl_2). +(* Notation "'impl_2'" := (impl_2). *) Notation "'t_Array'" := (t_Array). @@ -43,37 +46,37 @@ Notation "'t_i128'" := (t_i128). Notation "'i128_0'" := (i128_0). -Notation "'impl_25'" := (impl_25). +(* Notation "'impl_25'" := (impl_25). *) Notation "'t_i16'" := (t_i16). Notation "'i16_0'" := (i16_0). -Notation "'impl_19'" := (impl_19). +(* Notation "'impl_19'" := (impl_19). *) Notation "'t_i32'" := (t_i32). Notation "'i32_0'" := (i32_0). -Notation "'impl_21'" := (impl_21). +(* Notation "'impl_21'" := (impl_21). *) Notation "'t_i64'" := (t_i64). Notation "'i64_0'" := (i64_0). -Notation "'impl_23'" := (impl_23). +(* Notation "'impl_23'" := (impl_23). *) Notation "'t_i8'" := (t_i8). Notation "'i8_0'" := (i8_0). -Notation "'impl_17'" := (impl_17). +(* Notation "'impl_17'" := (impl_17). *) Notation "'t_isize'" := (t_isize). Notation "'isize_0'" := (isize_0). -Notation "'impl_27'" := (impl_27). +(* Notation "'impl_27'" := (impl_27). *) (* NotImplementedYet *) @@ -111,66 +114,66 @@ Notation "'usize_0'" := (usize_0). (* NotImplementedYet *) -Notation "'impl_1'" := (impl_1). +(* Notation "'impl_1'" := (impl_1). *) -Notation "'impl_5'" := (impl_5). +(* Notation "'impl_5'" := (impl_5). *) -Notation "'impl_7'" := (impl_7). +(* Notation "'impl_7'" := (impl_7). *) -Notation "'impl_9'" := (impl_9). +(* Notation "'impl_9'" := (impl_9). *) -Notation "'impl_11'" := (impl_11). +(* Notation "'impl_11'" := (impl_11). *) -Notation "'impl_13'" := (impl_13). +(* Notation "'impl_13'" := (impl_13). *) -Notation "'impl_15'" := (impl_15). +(* Notation "'impl_15'" := (impl_15). *) -Notation "'impl'" := (impl). +(* Notation "'impl'" := (impl). *) -Notation "'impl_29'" := (impl_29). +(* Notation "'impl_29'" := (impl_29). *) -Notation "'impl_30'" := (impl_30). +(* Notation "'impl_30'" := (impl_30). *) -Notation "'impl_31'" := (impl_31). +(* Notation "'impl_31'" := (impl_31). *) -Notation "'impl_32'" := (impl_32). +(* Notation "'impl_32'" := (impl_32). *) -Notation "'impl_33'" := (impl_33). +(* Notation "'impl_33'" := (impl_33). *) -Notation "'impl_34'" := (impl_34). +(* Notation "'impl_34'" := (impl_34). *) -Notation "'impl_35'" := (impl_35). +(* Notation "'impl_35'" := (impl_35). *) -Notation "'impl_36'" := (impl_36). +(* Notation "'impl_36'" := (impl_36). *) -Notation "'impl_37'" := (impl_37). +(* Notation "'impl_37'" := (impl_37). *) -Notation "'impl_38'" := (impl_38). +(* Notation "'impl_38'" := (impl_38). *) -Notation "'impl_39'" := (impl_39). +(* Notation "'impl_39'" := (impl_39). *) -Notation "'impl_40'" := (impl_40). +(* Notation "'impl_40'" := (impl_40). *) -Notation "'impl_41'" := (impl_41). +(* Notation "'impl_41'" := (impl_41). *) -Notation "'impl_42'" := (impl_42). +(* Notation "'impl_42'" := (impl_42). *) -Notation "'impl_43'" := (impl_43). +(* Notation "'impl_43'" := (impl_43). *) -Notation "'impl_44'" := (impl_44). +(* Notation "'impl_44'" := (impl_44). *) -Notation "'impl_45'" := (impl_45). +(* Notation "'impl_45'" := (impl_45). *) -Notation "'impl_46'" := (impl_46). +(* Notation "'impl_46'" := (impl_46). *) -Notation "'impl_47'" := (impl_47). +(* Notation "'impl_47'" := (impl_47). *) -Notation "'impl_48'" := (impl_48). +(* Notation "'impl_48'" := (impl_48). *) -Notation "'impl_49'" := (impl_49). +(* Notation "'impl_49'" := (impl_49). *) -Notation "'impl_50'" := (impl_50). +(* Notation "'impl_50'" := (impl_50). *) -Notation "'impl_51'" := (impl_51). +(* Notation "'impl_51'" := (impl_51). *) -Notation "'impl_52'" := (impl_52). +(* Notation "'impl_52'" := (impl_52). *) From 0a165d6e897112d961a1a4cb9ddfa570c36e30ff Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Mon, 25 Nov 2024 18:27:12 +0100 Subject: [PATCH 26/59] Option map update --- proof-libs/coq/coq/generated-core/_CoqProject | 2 + .../coq/generated-core/phase_library/TODO.v | 11 +++ proof-libs/coq/coq/generated-core/src/Core.v | 2 + .../generated-core/src/Core_Ops_Function.v | 69 +++++-------------- .../coq/coq/generated-core/src/Core_Option.v | 21 ++++-- 5 files changed, 46 insertions(+), 59 deletions(-) diff --git a/proof-libs/coq/coq/generated-core/_CoqProject b/proof-libs/coq/coq/generated-core/_CoqProject index 3cbbac069..c6d0473b9 100644 --- a/proof-libs/coq/coq/generated-core/_CoqProject +++ b/proof-libs/coq/coq/generated-core/_CoqProject @@ -9,6 +9,8 @@ ./src/Core_Panicking.v +./src/Core_Ops_Function.v + ./src/Core_Option.v ./src/Core_Cmp.v diff --git a/proof-libs/coq/coq/generated-core/phase_library/TODO.v b/proof-libs/coq/coq/generated-core/phase_library/TODO.v index 7c7c40708..9720e8785 100644 --- a/proof-libs/coq/coq/generated-core/phase_library/TODO.v +++ b/proof-libs/coq/coq/generated-core/phase_library/TODO.v @@ -22,3 +22,14 @@ Definition repeat {v_T} (a : v_T) b : t_Array v_T b := List.repeat a (N.to_nat ( Definition t_String := string. Definition ToString_f_to_string (x : string) : string := x. + +Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. +(* Inductive globality := | t_Global. *) +(* Definition t_Vec T (_ : globality) : Type := list T. *) +(* Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). *) +(* Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). *) +(* Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. *) +(* Definition impl__with_capacity {A} (_ : Z) : list A := nil. *) +(* Definition impl_1__push {A} l (x : A) := cons l x. *) +(* Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := {| x |}. *) +(* Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). *) diff --git a/proof-libs/coq/coq/generated-core/src/Core.v b/proof-libs/coq/coq/generated-core/src/Core.v index 50062a6f4..92054e7fd 100644 --- a/proof-libs/coq/coq/generated-core/src/Core.v +++ b/proof-libs/coq/coq/generated-core/src/Core.v @@ -61,6 +61,8 @@ Export Core_Primitive. (* NotImplementedYet *) +From Core Require Import Core_Option. +Export Core_Option. From Core Require Import NumberNotation. Export NumberNotation. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v index c88ac1f12..e1f66c0a9 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v @@ -12,71 +12,36 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core_Marker (t_Tuple). -Export Core_Marker (t_Tuple). +From Core Require Import Core_Marker. +Export Core_Marker. (* NotImplementedYet *) -Class t_FnOnce (v_Self : Type) (v_Args : Type) `{t_Sized (v_Args)} `{t_Tuple (v_Args)} : Type := +Class t_FnOnce (v_Self : Type) (v_Args : Type) (* `{t_Sized (v_Args)} `{t_Tuple (v_Args)} *) : Type := { FnOnce_f_Output : Type; _ :: `{t_Sized (FnOnce_f_Output)}; FnOnce_f_call_once : v_Self -> v_Args -> FnOnce_f_Output; }. -Arguments t_FnOnce (_) (_) {_} {_}. +Arguments t_FnOnce (_) (_) (* {_} {_} *). -Class t_FnMut (v_Self : Type) (v_Args : Type) `{t_FnOnce (v_Self) (v_Args)} `{t_Sized (v_Args)} `{t_Tuple (v_Args)} : Type := +Class t_FnMut (v_Self : Type) (v_Args : Type) `{t_FnOnce (v_Self) (v_Args)} (* `{t_Sized (v_Args)} `{t_Tuple (v_Args)} *) : Type := { FnMut_f_call_mut : v_Self -> v_Args -> (v_Self*FnOnce_f_Output); }. -Arguments t_FnMut (_) (_) {_} {_} {_}. +Arguments t_FnMut (_) (_) {_} (* {_} {_} *). -Class t_Fn (v_Self : Type) (v_Args : Type) `{t_FnMut (v_Self) (v_Args)} `{t_Sized (v_Args)} `{t_Tuple (v_Args)} : Type := +Class t_Fn (v_Self : Type) (v_Args : Type) `{t_FnMut (v_Self) (v_Args)} (* `{t_Sized (v_Args)} `{t_Tuple (v_Args)} *) : Type := { Fn_f_call : v_Self -> v_Args -> FnOnce_f_Output; }. -Arguments t_Fn (_) (_) {_} {_} {_}. +Arguments t_Fn (_) (_) {_} (* {_} {_} *). + + + +#[global] Instance t_FnOnceAny {A B} : t_FnOnce (A -> B) A. +Proof. + econstructor. + easy. + refine (fun f x => f x). +Defined. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Option.v b/proof-libs/coq/coq/generated-core/src/Core_Option.v index e102f26e3..a9e834b9e 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Option.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Option.v @@ -21,6 +21,9 @@ Export Core_Marker (t_Sized). From Core Require Import Core_Panicking (panic). Export Core_Panicking (panic). +From Core Require Import Core_Ops_Function. +Export Core_Ops_Function. + Inductive t_Option (v_T : Type) `{t_Sized (v_T)} : Type := | Option_None | Option_Some : v_T -> _. @@ -46,13 +49,17 @@ Definition impl_1__is_some `{v_T : Type} `{t_Sized (v_T)} (self : t_Option ((v_T false end. -(* Definition impl_1__map `{v_T : Type} `{v_U : Type} `{v_F : Type} `{t_Sized (v_T)} `{t_Sized (v_U)} `{t_Sized (v_F)} `{t_FnOnce (v_F) ((v_T))} `{_.(FnOnce_f_Output) = v_U} (self : t_Option ((v_T))) (f : v_F) : t_Option ((v_U)) := *) -(* match self with *) -(* | Option_Some (x) => *) -(* Option_Some (FnOnce_f_call_once (f) ((x))) *) -(* | Option_None => *) -(* Option_None *) -(* end. *) +Program Definition impl__map `{v_T : Type} `{v_U : Type} `{v_F : Type} `{t_Sized (v_T)} `{t_Sized (v_U)} `{t_Sized (v_F)} `{t_FnOnce (v_F) ((v_T))} `{_.(FnOnce_f_Output) = v_U} (self : t_Option ((v_T))) (f : v_F) : t_Option ((v_U)) := + match self with + | Option_Some (x) => + Option_Some _ (* (FnOnce_f_call_once (f) ((x))) *) + | Option_None => + Option_None + end. +Next Obligation. + refine (FnOnce_f_call_once (f) ((x))). +Defined. +Fail Next Obligation. (* Definition unwrap_failed '(_ : unit) : t_Never := *) (* panic ("called `Option::unwrap()` on a `None` value"%string). *) From 02fa6afc68aba1a3c51b6159963490fbbfe732fd Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Tue, 26 Nov 2024 14:14:19 +0100 Subject: [PATCH 27/59] refactor(engine/dependencies): functorize, get rid of `original_items` --- engine/lib/dependencies.ml | 931 +++++++++++++++++++------------------ 1 file changed, 490 insertions(+), 441 deletions(-) diff --git a/engine/lib/dependencies.ml b/engine/lib/dependencies.ml index e46fcb555..dfe22957f 100644 --- a/engine/lib/dependencies.ml +++ b/engine/lib/dependencies.ml @@ -33,482 +33,531 @@ module Make (F : Features.T) = struct module Attrs = Attr_payloads.Make (F) (Error) - let uid_associated_items (items : item list) : attrs -> item list = - let open Attrs.WithItems (struct - let items = items - end) in - raw_associated_item >> List.map ~f:(snd >> item_of_uid) - - module ItemGraph = struct - module G = Graph.Persistent.Digraph.Concrete (Concrete_ident) - module Topological = Graph.Topological.Make_stable (G) - module Oper = Graph.Oper.P (G) - - let vertices_of_item (i : item) : G.V.t list = - let ( @ ) = Set.union in - let v = U.Reducers.collect_concrete_idents in - let concat_map f = - List.map ~f >> Set.union_list (module Concrete_ident) - in - let set = - match i.v with - | Fn { name = _; generics; body; params; _ } -> - v#visit_generics () generics - @ v#visit_expr () body - @ concat_map (v#visit_param ()) params - | TyAlias { name = _; generics; ty } -> - v#visit_generics () generics @ v#visit_ty () ty - | Type { name = _; generics; variants; is_struct = (_ : bool) } -> - v#visit_generics () generics - @ concat_map (v#visit_variant ()) variants - | IMacroInvokation { macro; argument = (_ : string); span; witness = _ } - -> - v#visit_concrete_ident () macro @ v#visit_span () span - | Trait { name = _; generics; items; safety = _ } -> - v#visit_generics () generics - @ concat_map (v#visit_trait_item ()) items - | Impl { generics; self_ty; of_trait; items; parent_bounds; safety = _ } - -> - v#visit_generics () generics - @ v#visit_ty () self_ty - @ v#visit_concrete_ident () (fst of_trait) - @ concat_map (v#visit_generic_value ()) (snd of_trait) - @ concat_map (v#visit_impl_item ()) items - @ concat_map - (fun (ie, ii) -> - v#visit_impl_expr () ie @ v#visit_impl_ident () ii) - parent_bounds - | Alias { name = _; item } -> v#visit_concrete_ident () item - | Use _ | Quote _ | HaxError _ | NotImplementedYet -> - Set.empty (module Concrete_ident) - in - set |> Set.to_list - - let vertices_of_items ~uid_associated_items (items : item list) : G.E.t list - = - List.concat_map - ~f:(fun i -> - let assoc = - uid_associated_items i.attrs |> List.map ~f:(fun i -> i.ident) - in - vertices_of_item i @ assoc |> List.map ~f:(Fn.const i.ident &&& Fn.id)) - items - - let of_items ~original_items (items : item list) : G.t = - let init = - List.fold ~init:G.empty ~f:(fun g -> ident_of >> G.add_vertex g) items - in - let uid_associated_items = uid_associated_items original_items in - vertices_of_items ~uid_associated_items items - |> List.fold ~init ~f:(G.add_edge >> uncurry) - - let transitive_dependencies_of (g : G.t) (selection : Concrete_ident.t list) - : Concrete_ident.t Hash_set.t = - let set = Hash_set.create (module Concrete_ident) in - let rec visit vertex = - if Hash_set.mem set vertex |> not then ( - Hash_set.add set vertex; - G.iter_succ visit g vertex) - in - List.filter ~f:(G.mem_vertex g) selection |> List.iter ~f:visit; - set + module type WITH_ITEMS = sig + val uid_associated_items : item list -> Ast.attrs -> item list + val bundle_cyclic_modules : item list -> item list + val sort : item list -> item list + val recursive_bundles : item list -> item list list * item list + + val filter_by_inclusion_clauses : + Types.inclusion_clause list -> item list -> item list + end - let transitive_dependencies_of_items ~original_items (items : item list) - ?(graph = of_items ~original_items items) - (selection : Concrete_ident.t list) : item list = - let set = transitive_dependencies_of graph selection in - items |> List.filter ~f:(ident_of >> Hash_set.mem set) + module WithItems (CTX : sig + val items : item list + end) = + struct + let uid_associated_items : attrs -> item list = + let open Attrs.WithItems (struct + let items = CTX.items + end) in + raw_associated_item >> List.map ~f:(snd >> item_of_uid) + + module ItemGraph = struct + module G = Graph.Persistent.Digraph.Concrete (Concrete_ident) + module Topological = Graph.Topological.Make_stable (G) + module Oper = Graph.Oper.P (G) + + let vertices_of_item (i : item) : G.V.t list = + let ( @ ) = Set.union in + let v = U.Reducers.collect_concrete_idents in + let concat_map f = + List.map ~f >> Set.union_list (module Concrete_ident) + in + let set = + match i.v with + | Fn { name = _; generics; body; params; _ } -> + v#visit_generics () generics + @ v#visit_expr () body + @ concat_map (v#visit_param ()) params + | TyAlias { name = _; generics; ty } -> + v#visit_generics () generics @ v#visit_ty () ty + | Type { name = _; generics; variants; is_struct = (_ : bool) } -> + v#visit_generics () generics + @ concat_map (v#visit_variant ()) variants + | IMacroInvokation + { macro; argument = (_ : string); span; witness = _ } -> + v#visit_concrete_ident () macro @ v#visit_span () span + | Trait { name = _; generics; items; safety = _ } -> + v#visit_generics () generics + @ concat_map (v#visit_trait_item ()) items + | Impl + { generics; self_ty; of_trait; items; parent_bounds; safety = _ } + -> + v#visit_generics () generics + @ v#visit_ty () self_ty + @ v#visit_concrete_ident () (fst of_trait) + @ concat_map (v#visit_generic_value ()) (snd of_trait) + @ concat_map (v#visit_impl_item ()) items + @ concat_map + (fun (ie, ii) -> + v#visit_impl_expr () ie @ v#visit_impl_ident () ii) + parent_bounds + | Alias { name = _; item } -> v#visit_concrete_ident () item + | Use _ | Quote _ | HaxError _ | NotImplementedYet -> + Set.empty (module Concrete_ident) + in + set |> Set.to_list - module MutRec = struct - module Bundle = struct - type t = concrete_ident list + let vertices_of_items (items : item list) : G.E.t list = + List.concat_map + ~f:(fun i -> + let assoc = + uid_associated_items i.attrs |> List.map ~f:(fun i -> i.ident) + in + vertices_of_item i @ assoc + |> List.map ~f:(Fn.const i.ident &&& Fn.id)) + items - let namespaces_of : t -> Namespace.Set.t = - List.map ~f:Namespace.of_concrete_ident - >> Set.of_list (module Namespace) + let of_items (items : item list) : G.t = + let init = + List.fold ~init:G.empty ~f:(fun g -> ident_of >> G.add_vertex g) items + in + vertices_of_items items |> List.fold ~init ~f:(G.add_edge >> uncurry) + + let transitive_dependencies_of (g : G.t) + (selection : Concrete_ident.t list) : Concrete_ident.t Hash_set.t = + let set = Hash_set.create (module Concrete_ident) in + let rec visit vertex = + if Hash_set.mem set vertex |> not then ( + Hash_set.add set vertex; + G.iter_succ visit g vertex) + in + List.filter ~f:(G.mem_vertex g) selection |> List.iter ~f:visit; + set + + let transitive_dependencies_of_items (items : item list) + ?(graph = of_items items) (selection : Concrete_ident.t list) : + item list = + let set = transitive_dependencies_of graph selection in + items |> List.filter ~f:(ident_of >> Hash_set.mem set) + + module MutRec = struct + module Bundle = struct + type t = concrete_ident list + + let namespaces_of : t -> Namespace.Set.t = + List.map ~f:Namespace.of_concrete_ident + >> Set.of_list (module Namespace) + + let homogeneous_namespace (ns : t) : bool = + Set.length (namespaces_of ns) <= 1 + end + + type t = { + mut_rec_bundles : Bundle.t list; + non_mut_rec : concrete_ident list; + } + + module SCC = Graph.Components.Make (G) + + let of_graph (g : G.t) : t = + let is_mut_rec_with_itself x = G.mem_edge g x x in + let mut_rec_bundles, non_mut_rec = + SCC.scc_list g + |> List.partition_map ~f:(function + | [] -> failwith "scc_list returned empty cluster" + | [ x ] when is_mut_rec_with_itself x |> not -> Second x + | bundle -> First bundle) + in + { mut_rec_bundles; non_mut_rec } - let homogeneous_namespace (ns : t) : bool = - Set.length (namespaces_of ns) <= 1 + let all_homogeneous_namespace (g : G.t) = + List.for_all ~f:Bundle.homogeneous_namespace + (of_graph g).mut_rec_bundles end - type t = { - mut_rec_bundles : Bundle.t list; - non_mut_rec : concrete_ident list; - } - - module SCC = Graph.Components.Make (G) + module CyclicDep = struct + module Bundle = struct + type t = Concrete_ident.t list + + module G = Graph.Persistent.Graph.Concrete (Concrete_ident) + module CC = Graph.Components.Undirected (G) + + let cycles g = CC.components_list g + end + + (* This is a solution that bundles together everything that belongs to the same module SCC. + It results in bundles that are much bigger than they could be but is a simple solution + to the problem described in https://github.com/hacspec/hax/issues/995#issuecomment-2411114404 *) + let of_mod_sccs (items : item list) + (mod_graph_cycles : Namespace.Set.t list) : Bundle.t list = + let item_names = List.map items ~f:(fun x -> x.ident) in + let cycles = + List.filter mod_graph_cycles ~f:(fun set -> + Prelude.Set.length set > 1) + in + let bundles = + List.map cycles ~f:(fun set -> + List.filter item_names ~f:(fun item -> + Prelude.Set.mem set (Namespace.of_concrete_ident item))) + in + bundles + end - let of_graph (g : G.t) : t = - let is_mut_rec_with_itself x = G.mem_edge g x x in - let mut_rec_bundles, non_mut_rec = - SCC.scc_list g - |> List.partition_map ~f:(function - | [] -> failwith "scc_list returned empty cluster" - | [ x ] when is_mut_rec_with_itself x |> not -> Second x - | bundle -> First bundle) - in - { mut_rec_bundles; non_mut_rec } + open Graph.Graphviz.Dot (struct + include G - let all_homogeneous_namespace (g : G.t) = - List.for_all ~f:Bundle.homogeneous_namespace - (of_graph g).mut_rec_bundles - end + let graph_attributes _ = [] + let default_vertex_attributes _ = [] + let vertex_name i = "\"" ^ Concrete_ident.show i ^ "\"" - module CyclicDep = struct - module Bundle = struct - type t = Concrete_ident.t list + let vertex_attributes i = + [ `Label (Concrete_ident.DefaultViewAPI.to_definition_name i) ] - module G = Graph.Persistent.Graph.Concrete (Concrete_ident) - module CC = Graph.Components.Undirected (G) + let get_subgraph i = + let ns = Namespace.of_concrete_ident i in + let sg_name = String.concat ~sep:"__" ns in + let label = String.concat ~sep:"::" ns in + let open Graph.Graphviz.DotAttributes in + Some { sg_name; sg_attributes = [ `Label label ]; sg_parent = None } - let cycles g = CC.components_list g - end + let default_edge_attributes _ = [] + let edge_attributes _ = [] + end) - (* This is a solution that bundles together everything that belongs to the same module SCC. - It results in bundles that are much bigger than they could be but is a simple solution - to the problem described in https://github.com/hacspec/hax/issues/995#issuecomment-2411114404 *) - let of_mod_sccs (items : item list) - (mod_graph_cycles : Namespace.Set.t list) : Bundle.t list = - let item_names = List.map items ~f:(fun x -> x.ident) in - let cycles = - List.filter mod_graph_cycles ~f:(fun set -> - Prelude.Set.length set > 1) - in - let bundles = - List.map cycles ~f:(fun set -> - List.filter item_names ~f:(fun item -> - Prelude.Set.mem set (Namespace.of_concrete_ident item))) - in - bundles + let print oc items = output_graph oc (of_items items) end - open Graph.Graphviz.Dot (struct - include G + module ModGraph = struct + module G = Graph.Persistent.Digraph.Concrete (Namespace) + + let of_items (items : item list) : G.t = + let ig = ItemGraph.of_items items in + List.map ~f:(ident_of >> (Namespace.of_concrete_ident &&& Fn.id)) items + |> Map.of_alist_multi (module Namespace) + |> Map.map + ~f: + (List.concat_map + ~f: + (ItemGraph.G.succ ig + >> List.map ~f:Namespace.of_concrete_ident) + >> Set.of_list (module Namespace) + >> Set.to_list) + |> Map.to_alist + |> List.concat_map ~f:(fun (x, ys) -> List.map ~f:(fun y -> (x, y)) ys) + |> List.fold ~init:G.empty ~f:(G.add_edge >> uncurry) - let graph_attributes _ = [] - let default_vertex_attributes _ = [] - let vertex_name i = "\"" ^ Concrete_ident.show i ^ "\"" + module SCC = Graph.Components.Make (G) - let vertex_attributes i = - [ `Label (Concrete_ident.DefaultViewAPI.to_definition_name i) ] + let cycles g : Namespace.Set.t list = + SCC.scc_list g |> List.map ~f:(Set.of_list (module Namespace)) - let get_subgraph i = - let ns = Namespace.of_concrete_ident i in - let sg_name = String.concat ~sep:"__" ns in - let label = String.concat ~sep:"::" ns in - let open Graph.Graphviz.DotAttributes in - Some { sg_name; sg_attributes = [ `Label label ]; sg_parent = None } + open Graph.Graphviz.Dot (struct + include G - let default_edge_attributes _ = [] - let edge_attributes _ = [] - end) + let graph_attributes _ = [] + let default_vertex_attributes _ = [] + let vertex_name ns = "\"" ^ String.concat ~sep:"::" ns ^ "\"" + let vertex_attributes _ = [] + let get_subgraph _ = None + let default_edge_attributes _ = [] + let edge_attributes _ = [] + end) - let print oc items = output_graph oc (of_items ~original_items:items items) - end + let print oc items = + let g = of_items items in + let complicated_ones = + SCC.scc_list g + |> List.concat_map ~f:(function [] | [ _ ] -> [] | bundle -> bundle) + in + let g = + List.concat_map + ~f:(fun ns -> + List.map + ~f:(fun y -> (ns, y)) + (G.succ g ns + |> List.filter + ~f:(List.mem ~equal:[%equal: Namespace.t] complicated_ones) + )) + complicated_ones + |> List.fold ~init:G.empty ~f:(G.add_edge >> uncurry) + in + output_graph oc g + end - module ModGraph = struct - module G = Graph.Persistent.Digraph.Concrete (Namespace) - - let of_items (items : item list) : G.t = - let ig = ItemGraph.of_items ~original_items:items items in - List.map ~f:(ident_of >> (Namespace.of_concrete_ident &&& Fn.id)) items - |> Map.of_alist_multi (module Namespace) - |> Map.map - ~f: - (List.concat_map - ~f: - (ItemGraph.G.succ ig - >> List.map ~f:Namespace.of_concrete_ident) - >> Set.of_list (module Namespace) - >> Set.to_list) - |> Map.to_alist - |> List.concat_map ~f:(fun (x, ys) -> List.map ~f:(fun y -> (x, y)) ys) - |> List.fold ~init:G.empty ~f:(G.add_edge >> uncurry) - - module SCC = Graph.Components.Make (G) - - let cycles g : Namespace.Set.t list = - SCC.scc_list g |> List.map ~f:(Set.of_list (module Namespace)) - - open Graph.Graphviz.Dot (struct - include G - - let graph_attributes _ = [] - let default_vertex_attributes _ = [] - let vertex_name ns = "\"" ^ String.concat ~sep:"::" ns ^ "\"" - let vertex_attributes _ = [] - let get_subgraph _ = None - let default_edge_attributes _ = [] - let edge_attributes _ = [] - end) - - let print oc items = - let g = of_items items in - let complicated_ones = - SCC.scc_list g - |> List.concat_map ~f:(function [] | [ _ ] -> [] | bundle -> bundle) - in - let g = - List.concat_map - ~f:(fun ns -> - List.map - ~f:(fun y -> (ns, y)) - (G.succ g ns - |> List.filter - ~f:(List.mem ~equal:[%equal: Namespace.t] complicated_ones))) - complicated_ones - |> List.fold ~init:G.empty ~f:(G.add_edge >> uncurry) - in - output_graph oc g - end + let ident_list_to_string = + List.map ~f:Concrete_ident.DefaultViewAPI.show >> String.concat ~sep:", " - let ident_list_to_string = - List.map ~f:Concrete_ident.DefaultViewAPI.show >> String.concat ~sep:", " - - let sort (items : item list) : item list = - let g = - ItemGraph.of_items ~original_items:items items |> ItemGraph.Oper.mirror - in - let lookup (name : concrete_ident) = - List.find ~f:(ident_of >> Concrete_ident.equal name) items - in - let items' = - ItemGraph.Topological.fold List.cons g [] - |> List.filter_map ~f:lookup |> List.rev - in - assert ( - let of_list = - List.map ~f:ident_of >> Set.of_list (module Concrete_ident) + let sort (items : item list) : item list = + let g = ItemGraph.of_items items |> ItemGraph.Oper.mirror in + let lookup (name : concrete_ident) = + List.find ~f:(ident_of >> Concrete_ident.equal name) items in - let items = of_list items in - let items' = of_list items' in - Set.equal items items'); - items' - - let filter_by_inclusion_clauses' ~original_items - (clauses : Types.inclusion_clause list) (items : item list) : - item list * Concrete_ident.t Hash_set.t = - let graph = ItemGraph.of_items ~original_items items in - let of_list = Set.of_list (module Concrete_ident) in - let selection = List.map ~f:ident_of items |> of_list in - let deps_of = - let to_set = Hash_set.to_list >> of_list in - Set.to_list >> ItemGraph.transitive_dependencies_of graph >> to_set - in - let show_ident_set = - Set.to_list - >> List.map ~f:Concrete_ident.DefaultViewAPI.show - >> List.map ~f:(fun s -> " - " ^ s) - >> String.concat ~sep:"\n" - in - let show_inclusion_clause Types.{ kind; namespace } = - (match kind with - | Excluded -> "-" - | SignatureOnly -> "+:" - | Included deps_kind -> ( - match deps_kind with - | Transitive -> "+" - | Shallow -> "+~" - | None' -> "+!")) - ^ "[" - ^ (List.map - ~f:(function Glob One -> "*" | Glob Many -> "**" | Exact s -> s) - namespace.chunks - |> String.concat ~sep:"::") - ^ "]" - in - let items_drop_body = Hash_set.create (module Concrete_ident) in - let apply_clause selection' (clause : Types.inclusion_clause) = - let matches = Concrete_ident.matches_namespace clause.Types.namespace in - let matched0 = Set.filter ~f:matches selection in - let with_deps, drop_bodies = - match clause.kind with - | Included Transitive -> (true, false) - | Included Shallow -> (true, true) - | Included None' -> (false, false) - | SignatureOnly -> (false, true) - | Excluded -> (false, false) + let items' = + ItemGraph.Topological.fold List.cons g [] + |> List.filter_map ~f:lookup |> List.rev in - let matched = matched0 |> if with_deps then deps_of else Fn.id in - if drop_bodies then ( - Set.iter ~f:(Hash_set.add items_drop_body) matched; - Set.iter ~f:(Hash_set.remove items_drop_body) matched0); - Logs.info (fun m -> - m "The clause [%s] will %s the following Rust items:\n%s" - (show_inclusion_clause clause) - (match clause.kind with Excluded -> "remove" | _ -> "add") - @@ show_ident_set matched); - let set_op = - match clause.kind with - | Included _ | SignatureOnly -> Set.union - | Excluded -> Set.diff + assert ( + let of_list = + List.map ~f:ident_of >> Set.of_list (module Concrete_ident) + in + let items = of_list items in + let items' = of_list items' in + Set.equal items items'); + items' + + let filter_by_inclusion_clauses' (clauses : Types.inclusion_clause list) + (items : item list) : item list * Concrete_ident.t Hash_set.t = + let graph = ItemGraph.of_items items in + let of_list = Set.of_list (module Concrete_ident) in + let selection = List.map ~f:ident_of items |> of_list in + let deps_of = + let to_set = Hash_set.to_list >> of_list in + Set.to_list >> ItemGraph.transitive_dependencies_of graph >> to_set in - let result = set_op selection' matched in - result - in - let selection = List.fold ~init:selection ~f:apply_clause clauses in - Logs.info (fun m -> - m "The following Rust items are going to be extracted:\n%s" - @@ show_ident_set selection); - (List.filter ~f:(ident_of >> Set.mem selection) items, items_drop_body) - - let filter_by_inclusion_clauses (clauses : Types.inclusion_clause list) - (items : item list) : item list = - let f = filter_by_inclusion_clauses' ~original_items:items clauses in - let selection = - let items', items_drop_body = f items in - let items', _ = - (* when one includes only shallow dependencies, we just remove bodies *) - List.map - ~f:(fun item -> - if Hash_set.mem items_drop_body (ident_of item) then - U.Mappers.drop_bodies#visit_item () item - else item) - items' - |> f + let show_ident_set = + Set.to_list + >> List.map ~f:Concrete_ident.DefaultViewAPI.show + >> List.map ~f:(fun s -> " - " ^ s) + >> String.concat ~sep:"\n" in - List.map ~f:ident_of items' |> Set.of_list (module Concrete_ident) - in - List.filter ~f:(ident_of >> Set.mem selection) items - - (* Construct the new item `f item` (say `item'`), and create a - "symbolic link" to `item'`. Returns a pair that consists in the - symbolic link and in `item'`. *) - let shallow_copy (f : item -> item) - (variants_renamings : - concrete_ident * concrete_ident -> - (concrete_ident * concrete_ident) list) (item : item) : item list = - let item' = f item in - let old_new = (ident_of item, ident_of item') in - let aliases = - List.map (old_new :: variants_renamings old_new) - ~f:(fun (old_ident, new_ident) -> - let attrs = - List.filter ~f:(fun att -> Attrs.late_skip [ att ]) item.attrs - in - - { item with v = Alias { name = old_ident; item = new_ident }; attrs }) - in - item' :: aliases - - let bundle_cyclic_modules (items : item list) : item list = - let from_ident ident : item option = - List.find ~f:(fun i -> [%equal: Concrete_ident.t] i.ident ident) items - in - let mut_rec_bundles = - let mod_graph_cycles = ModGraph.of_items items |> ModGraph.cycles in - (* `Use` items shouldn't be bundled as they have no dependencies - and they have dummy names. *) - let non_use_items = - List.filter - ~f:(fun item -> - match item.v with Use _ | NotImplementedYet -> false | _ -> true) - items + let show_inclusion_clause Types.{ kind; namespace } = + (match kind with + | Excluded -> "-" + | SignatureOnly -> "+:" + | Included deps_kind -> ( + match deps_kind with + | Transitive -> "+" + | Shallow -> "+~" + | None' -> "+!")) + ^ "[" + ^ (List.map + ~f:(function Glob One -> "*" | Glob Many -> "**" | Exact s -> s) + namespace.chunks + |> String.concat ~sep:"::") + ^ "]" in - let bundles = - ItemGraph.CyclicDep.of_mod_sccs non_use_items mod_graph_cycles + let items_drop_body = Hash_set.create (module Concrete_ident) in + let apply_clause selection' (clause : Types.inclusion_clause) = + let matches = Concrete_ident.matches_namespace clause.Types.namespace in + let matched0 = Set.filter ~f:matches selection in + let with_deps, drop_bodies = + match clause.kind with + | Included Transitive -> (true, false) + | Included Shallow -> (true, true) + | Included None' -> (false, false) + | SignatureOnly -> (false, true) + | Excluded -> (false, false) + in + let matched = matched0 |> if with_deps then deps_of else Fn.id in + if drop_bodies then ( + Set.iter ~f:(Hash_set.add items_drop_body) matched; + Set.iter ~f:(Hash_set.remove items_drop_body) matched0); + Logs.info (fun m -> + m "The clause [%s] will %s the following Rust items:\n%s" + (show_inclusion_clause clause) + (match clause.kind with Excluded -> "remove" | _ -> "add") + @@ show_ident_set matched); + let set_op = + match clause.kind with + | Included _ | SignatureOnly -> Set.union + | Excluded -> Set.diff + in + let result = set_op selection' matched in + result in - let f = List.filter_map ~f:from_ident in - List.map ~f bundles - in - - let transform (bundle : item list) = - let ns : Concrete_ident.t = - Concrete_ident.Create.fresh_module ~from:(List.map ~f:ident_of bundle) + let selection = List.fold ~init:selection ~f:apply_clause clauses in + Logs.info (fun m -> + m "The following Rust items are going to be extracted:\n%s" + @@ show_ident_set selection); + (List.filter ~f:(ident_of >> Set.mem selection) items, items_drop_body) + + let filter_by_inclusion_clauses (clauses : Types.inclusion_clause list) + (items : item list) : item list = + let f = filter_by_inclusion_clauses' clauses in + let selection = + let items', items_drop_body = f items in + let items', _ = + (* when one includes only shallow dependencies, we just remove bodies *) + List.map + ~f:(fun item -> + if Hash_set.mem items_drop_body (ident_of item) then + U.Mappers.drop_bodies#visit_item () item + else item) + items' + |> f + in + List.map ~f:ident_of items' |> Set.of_list (module Concrete_ident) in - let new_name_under_ns : Concrete_ident.t -> Concrete_ident.t = - Concrete_ident.Create.move_under ~new_parent:ns + List.filter ~f:(ident_of >> Set.mem selection) items + + (* Construct the new item `f item` (say `item'`), and create a + "symbolic link" to `item'`. Returns a pair that consists in the + symbolic link and in `item'`. *) + let shallow_copy (f : item -> item) + (variants_renamings : + concrete_ident * concrete_ident -> + (concrete_ident * concrete_ident) list) (item : item) : item list = + let item' = f item in + let old_new = (ident_of item, ident_of item') in + let aliases = + List.map (old_new :: variants_renamings old_new) + ~f:(fun (old_ident, new_ident) -> + let attrs = + List.filter ~f:(fun att -> Attrs.late_skip [ att ]) item.attrs + in + + { + item with + v = Alias { name = old_ident; item = new_ident }; + attrs; + }) in - let new_names = List.map ~f:(ident_of >> new_name_under_ns) bundle in - let duplicates = - new_names |> List.find_all_dups ~compare:Concrete_ident.compare + item' :: aliases + + let bundle_cyclic_modules (items : item list) : item list = + let from_ident ident : item option = + List.find ~f:(fun i -> [%equal: Concrete_ident.t] i.ident ident) items in - (* Verify name clashes *) - (* In case of clash, add hash *) - let add_prefix id = - if - not - (List.mem duplicates (new_name_under_ns id) - ~equal:Concrete_ident.equal) - then id - else - Concrete_ident.Create.map_last - ~f:(fun name -> name ^ (Concrete_ident.hash id |> Int.to_string)) - id + let mut_rec_bundles = + let mod_graph_cycles = ModGraph.of_items items |> ModGraph.cycles in + (* `Use` items shouldn't be bundled as they have no dependencies + and they have dummy names. *) + let non_use_items = + List.filter + ~f:(fun item -> + match item.v with Use _ | NotImplementedYet -> false | _ -> true) + items + in + let bundles = + ItemGraph.CyclicDep.of_mod_sccs non_use_items mod_graph_cycles + in + let f = List.filter_map ~f:from_ident in + List.map ~f bundles in - let renamings = - List.map - ~f:(ident_of >> (Fn.id &&& (add_prefix >> new_name_under_ns))) - bundle + + let transform (bundle : item list) = + let ns : Concrete_ident.t = + Concrete_ident.Create.fresh_module ~from:(List.map ~f:ident_of bundle) + in + let new_name_under_ns : Concrete_ident.t -> Concrete_ident.t = + Concrete_ident.Create.move_under ~new_parent:ns + in + let new_names = List.map ~f:(ident_of >> new_name_under_ns) bundle in + let duplicates = + new_names |> List.find_all_dups ~compare:Concrete_ident.compare + in + (* Verify name clashes *) + (* In case of clash, add hash *) + let add_prefix id = + if + not + (List.mem duplicates (new_name_under_ns id) + ~equal:Concrete_ident.equal) + then id + else + Concrete_ident.Create.map_last + ~f:(fun name -> name ^ (Concrete_ident.hash id |> Int.to_string)) + id + in + let renamings = + List.map + ~f:(ident_of >> (Fn.id &&& (add_prefix >> new_name_under_ns))) + bundle + in + let variants_renamings (previous_name, new_name) = + match from_ident previous_name with + | Some { v = Type { variants; is_struct = false; _ }; _ } -> + List.map variants ~f:(fun { name; _ } -> + ( name, + Concrete_ident.Create.move_under ~new_parent:new_name name + )) + | Some { v = Type { variants; is_struct = true; _ }; _ } -> + List.concat_map variants ~f:(fun { arguments; _ } -> + List.map arguments ~f:(fun (name, _, _) -> + ( name, + Concrete_ident.Create.move_under ~new_parent:new_name + name ))) + | _ -> [] + in + let variant_and_constructors_renamings = + List.concat_map ~f:variants_renamings renamings + |> List.concat_map ~f:(fun (old_name, new_name) -> + [ + (old_name, new_name); + ( Concrete_ident.Create.constructor old_name, + Concrete_ident.Create.constructor new_name ); + ]) + in + let renamings = + Map.of_alist_exn + (module Concrete_ident) + (renamings @ variant_and_constructors_renamings) + in + let rename = + let renamer _lvl i = + Map.find renamings i |> Option.value ~default:i + in + (U.Mappers.rename_concrete_idents renamer)#visit_item ExprLevel + in + fun it -> shallow_copy rename variants_renamings it in - let variants_renamings (previous_name, new_name) = - match from_ident previous_name with - | Some { v = Type { variants; is_struct = false; _ }; _ } -> - List.map variants ~f:(fun { name; _ } -> - ( name, - Concrete_ident.Create.move_under ~new_parent:new_name name )) - | Some { v = Type { variants; is_struct = true; _ }; _ } -> - List.concat_map variants ~f:(fun { arguments; _ } -> - List.map arguments ~f:(fun (name, _, _) -> - ( name, - Concrete_ident.Create.move_under ~new_parent:new_name name - ))) - | _ -> [] + let bundle_transforms = + List.concat_map mut_rec_bundles ~f:(fun bundle -> + let bundle_value = + ( List.map ~f:ident_of bundle + |> ItemGraph.MutRec.Bundle.homogeneous_namespace, + transform bundle ) + in + List.map bundle ~f:(fun item -> (item, bundle_value))) in - let variant_and_constructors_renamings = - List.concat_map ~f:variants_renamings renamings - |> List.concat_map ~f:(fun (old_name, new_name) -> - [ - (old_name, new_name); - ( Concrete_ident.Create.constructor old_name, - Concrete_ident.Create.constructor new_name ); - ]) + let module ComparableItem = struct + module T = struct + type t = item [@@deriving sexp_of, compare, hash] + end + + include T + include Comparable.Make (T) + end in + let bundle_of_item = + Hashtbl.of_alist_exn (module ComparableItem) bundle_transforms in - let renamings = - Map.of_alist_exn - (module Concrete_ident) - (renamings @ variant_and_constructors_renamings) + let maybe_transform_item item = + match Hashtbl.find bundle_of_item item with + | Some (homogeneous_bundle, transform_bundle) -> + if homogeneous_bundle then [ item ] else transform_bundle item + | None -> [ item ] in - let rename = - let renamer _lvl i = Map.find renamings i |> Option.value ~default:i in - (U.Mappers.rename_concrete_idents renamer)#visit_item ExprLevel + List.concat_map items ~f:maybe_transform_item + + let recursive_bundles (items : item list) : item list list * item list = + let g = ItemGraph.of_items items in + let bundles = ItemGraph.MutRec.of_graph g in + let from_ident ident : item option = + List.find ~f:(fun i -> [%equal: Concrete_ident.t] i.ident ident) items in - fun it -> shallow_copy rename variants_renamings it - in - let bundle_transforms = - List.concat_map mut_rec_bundles ~f:(fun bundle -> - let bundle_value = - ( List.map ~f:ident_of bundle - |> ItemGraph.MutRec.Bundle.homogeneous_namespace, - transform bundle ) - in - List.map bundle ~f:(fun item -> (item, bundle_value))) - in - let module ComparableItem = struct - module T = struct - type t = item [@@deriving sexp_of, compare, hash] - end + let f = List.filter_map ~f:from_ident in + (List.map ~f bundles.mut_rec_bundles, f bundles.non_mut_rec) + end - include T - include Comparable.Make (T) - end in - let bundle_of_item = - Hashtbl.of_alist_exn (module ComparableItem) bundle_transforms - in - let maybe_transform_item item = - match Hashtbl.find bundle_of_item item with - | Some (homogeneous_bundle, transform_bundle) -> - if homogeneous_bundle then [ item ] else transform_bundle item - | None -> [ item ] - in - List.concat_map items ~f:maybe_transform_item - - let recursive_bundles (items : item list) : item list list * item list = - let g = ItemGraph.of_items ~original_items:items items in - let bundles = ItemGraph.MutRec.of_graph g in - let from_ident ident : item option = - List.find ~f:(fun i -> [%equal: Concrete_ident.t] i.ident ident) items - in - let f = List.filter_map ~f:from_ident in - (List.map ~f bundles.mut_rec_bundles, f bundles.non_mut_rec) + let uid_associated_items items' = + let open WithItems (struct + let items = items' + end) in + uid_associated_items + + let bundle_cyclic_modules items' = + let open WithItems (struct + let items = items' + end) in + bundle_cyclic_modules items' + + let sort items' = + let open WithItems (struct + let items = items' + end) in + sort items' + + let recursive_bundles items' = + let open WithItems (struct + let items = items' + end) in + recursive_bundles items' + + let filter_by_inclusion_clauses clauses items' = + let open WithItems (struct + let items = items' + end) in + filter_by_inclusion_clauses clauses items' end From ecd49473348b4be7a7c3c5bdbc4ab50190400c24 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Tue, 26 Nov 2024 14:41:03 +0100 Subject: [PATCH 28/59] fix(engine/dependencies): item order (fixes #771) --- engine/lib/dependencies.ml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/engine/lib/dependencies.ml b/engine/lib/dependencies.ml index dfe22957f..0aa79f898 100644 --- a/engine/lib/dependencies.ml +++ b/engine/lib/dependencies.ml @@ -53,8 +53,34 @@ module Make (F : Features.T) = struct end) in raw_associated_item >> List.map ~f:(snd >> item_of_uid) + (** `Ordered_concrete_ident` is just like `Concrete_ident`, but + the semantics of comparing two concrete idents is now defined in + term of which comes first in `CTX.items`. If we compare items not + present in `CTX.items` we revert to `Concrete_ident.compare`. *) + module Ordered_concrete_ident = struct + include Concrete_ident + + open struct + let order : t -> int option = + let table : (t, int) Hashtbl.t = + let table = Hashtbl.create (module Concrete_ident) in + List.iteri CTX.items ~f:(fun i item -> + Hashtbl.set ~key:item.ident ~data:i table); + table + in + Hashtbl.find table + end + + let compare (a : t) (b : t) = + match (order a, order b) with + | Some a, Some b -> Int.compare a b + | Some _, None -> 1 + | None, Some _ -> -1 + | _ -> Concrete_ident.compare a b + end + module ItemGraph = struct - module G = Graph.Persistent.Digraph.Concrete (Concrete_ident) + module G = Graph.Persistent.Digraph.Concrete (Ordered_concrete_ident) module Topological = Graph.Topological.Make_stable (G) module Oper = Graph.Oper.P (G) @@ -171,7 +197,7 @@ module Make (F : Features.T) = struct module Bundle = struct type t = Concrete_ident.t list - module G = Graph.Persistent.Graph.Concrete (Concrete_ident) + module G = Graph.Persistent.Graph.Concrete (Ordered_concrete_ident) module CC = Graph.Components.Undirected (G) let cycles g = CC.components_list g From 0a40953f05496bdb894e462bbb5846d2212ede2b Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Tue, 26 Nov 2024 15:24:11 +0100 Subject: [PATCH 29/59] Update core layout --- proof-libs/coq/coq/generated-core/_CoqProject | 43 +- .../coq/generated-core/phase_library/TODO.v | 8 + proof-libs/coq/coq/generated-core/src/Core.v | 9 + .../coq/coq/generated-core/src/Core_Array.v | 71 +- .../coq/generated-core/src/Core_Array_Iter.v | 76 +-- .../src/Core_Array_Rec_bundle_579704328.v | 616 +++++++++--------- .../coq/coq/generated-core/src/Core_Convert.v | 12 +- .../coq/generated-core/src/Core_Intrinsics.v | 128 ++-- .../src/Core_Iter_Traits_Iterator.v | 65 +- .../coq/coq/generated-core/src/Core_Marker.v | 7 + .../coq/coq/generated-core/src/Core_Num.v | 128 ++-- .../coq/coq/generated-core/src/Core_Ops.v | 4 +- .../generated-core/src/Core_Ops_Index_range.v | 40 +- .../src/Core_Primitive_Number_conversion.v | 139 ++-- .../src/Core_Primitive_Number_conversion_i.v | 141 ++-- .../coq/coq/generated-core/src/Core_Slice.v | 55 +- .../coq/generated-core/src/Core_Slice_Iter.v | 58 +- .../core/Alloc.Alloc.fst | 0 .../core/Alloc.Collections.Binary_heap.fsti | 0 .../core/Alloc.Fmt.fsti | 0 .../core/Alloc.Slice.fst | 0 .../core/Alloc.String.fst | 0 .../{handwritten-core => }/core/Alloc.Vec.fst | 0 .../core/Core.Array.Iter.fsti | 0 .../core/Core.Array.fst | 0 .../core/Core.Clone.fst | 0 .../{handwritten-core => }/core/Core.Cmp.fsti | 0 .../core/Core.Convert.fst | 0 .../core/Core.Core_arch.Arm_shared.Neon.fsti | 0 .../core/Core.Core_arch.X86.fsti | 0 .../core/Core.Core_arch.fsti | 0 .../core/Core.Default.fsti | 0 .../core/Core.Fmt.Rt.fsti | 0 .../{handwritten-core => }/core/Core.Fmt.fsti | 0 .../core/Core.Hint.fsti | 0 .../core/Core.Iter.Adapters.Enumerate.fst | 0 .../core/Core.Iter.Adapters.Step_by.fst | 0 .../core/Core.Iter.Traits.Collect.fst | 0 .../core/Core.Iter.Traits.Iterator.fst | 0 .../core/Core.Iter.fsti | 0 .../core/Core.Marker.fst | 0 .../{handwritten-core => }/core/Core.Mem.fsti | 0 .../core/Core.Num.Error.fsti | 0 .../{handwritten-core => }/core/Core.Num.fsti | 0 .../core/Core.Ops.Arith.Neg.fsti | 0 .../core/Core.Ops.Arith.fsti | 0 .../core/Core.Ops.Control_flow.fst | 0 .../core/Core.Ops.Deref.fst | 0 .../core/Core.Ops.Index.IndexMut.fst | 0 .../core/Core.Ops.Index.fst | 0 .../core/Core.Ops.Range.fsti | 0 .../core/Core.Ops.Try_trait.fst | 0 .../{handwritten-core => }/core/Core.Ops.fst | 0 .../core/Core.Option.fst | 0 .../core/Core.Panicking.fst | 0 .../core/Core.Result.fst | 0 .../core/Core.Slice.Iter.fst | 0 .../core/Core.Slice.fsti | 0 .../core/Core.Str.Converts.fsti | 0 .../core/Core.Str.Error.fsti | 0 .../{handwritten-core => }/core/Core.Str.fsti | 0 .../{handwritten-core => }/core/Core.fst | 0 .../{handwritten-core => }/core/Makefile | 0 .../{handwritten-core => }/core/README.md | 0 .../core/Rand_core.fsti | 0 .../core/Std.Io.Stdio.fsti | 0 .../rust_primitives/Makefile | 0 .../Rust_primitives.Arrays.fst | 0 .../Rust_primitives.Arrays.fsti | 0 .../Rust_primitives.BitVectors.fst | 0 .../Rust_primitives.BitVectors.fsti | 0 ...ives.Hax.Control_flow_monad.Mexception.fst | 0 ...mitives.Hax.Control_flow_monad.Moption.fst | 0 ...mitives.Hax.Control_flow_monad.Mresult.fst | 0 .../Rust_primitives.Hax.Folds.fsti | 0 .../Rust_primitives.Hax.Int.fst | 0 ...primitives.Hax.Monomorphized_update_at.fst | 0 ...rimitives.Hax.Monomorphized_update_at.fsti | 0 .../rust_primitives/Rust_primitives.Hax.fst | 0 .../Rust_primitives.Integers.fst | 0 .../Rust_primitives.Integers.fsti | 0 .../Rust_primitives.Iterators.fsti | 0 .../rust_primitives/Rust_primitives.fst | 0 83 files changed, 648 insertions(+), 952 deletions(-) rename proof-libs/fstar/{handwritten-core => }/core/Alloc.Alloc.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Alloc.Collections.Binary_heap.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Alloc.Fmt.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Alloc.Slice.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Alloc.String.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Alloc.Vec.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Array.Iter.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Array.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Clone.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Cmp.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Convert.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Core_arch.Arm_shared.Neon.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Core_arch.X86.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Core_arch.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Default.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Fmt.Rt.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Fmt.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Hint.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Iter.Adapters.Enumerate.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Iter.Adapters.Step_by.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Iter.Traits.Collect.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Iter.Traits.Iterator.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Iter.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Marker.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Mem.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Num.Error.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Num.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Ops.Arith.Neg.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Ops.Arith.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Ops.Control_flow.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Ops.Deref.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Ops.Index.IndexMut.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Ops.Index.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Ops.Range.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Ops.Try_trait.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Ops.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Option.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Panicking.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Result.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Slice.Iter.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Slice.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Str.Converts.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Str.Error.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.Str.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Core.fst (100%) rename proof-libs/fstar/{handwritten-core => }/core/Makefile (100%) rename proof-libs/fstar/{handwritten-core => }/core/README.md (100%) rename proof-libs/fstar/{handwritten-core => }/core/Rand_core.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/core/Std.Io.Stdio.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Makefile (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Arrays.fst (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Arrays.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.BitVectors.fst (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.BitVectors.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mexception.fst (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Moption.fst (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mresult.fst (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Hax.Folds.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Hax.Int.fst (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Hax.fst (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Integers.fst (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Integers.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.Iterators.fsti (100%) rename proof-libs/fstar/{handwritten-core => }/rust_primitives/Rust_primitives.fst (100%) diff --git a/proof-libs/coq/coq/generated-core/_CoqProject b/proof-libs/coq/coq/generated-core/_CoqProject index c6d0473b9..e02d03ddd 100644 --- a/proof-libs/coq/coq/generated-core/_CoqProject +++ b/proof-libs/coq/coq/generated-core/_CoqProject @@ -47,6 +47,10 @@ ./src/Core_Ops_Range.v +./src/Core_Iter_Traits_Iterator.v + +./src/Core_Ops_Index_range.v + ./src/Core_Ops.v ./src/Core_Base_interface_Coerce.v @@ -65,26 +69,37 @@ # Bundles: Core_Primitive.v, ./src/Core_Array_Rec_bundle_579704328.v -./src/Core_Primitive.v +# ./src/Core_Primitive_Number_conversion.v +# ./src/Core_Primitive_Number_conversion_i.v -# ./src/Core_Num.v # Broken? +./src/Core_Primitive.v ./phase_library/NumberNotation.v ./phase_library/TODO.v +./src/Core_Intrinsics.v + +./src/Core_Num.v # Broken? + +./src/Core_Slice_Iter.v +./src/Core_Slice.v + +./src/Core_Array_Iter.v +./src/Core_Array.v + ./src/Core.v # # Extra # Core_Slice_Iter_Macros.v -# Core_Slice_Iter.v +# ----- Core_Slice_Iter.v # Core_Slice_Index_Private_slice_index.v # Core_Slice_Index.v -# Core_Slice.v +# ----- Core_Slice.v # ----- Core_Result.v -# Core_Primitive_Number_conversion_i.v -# Core_Primitive_Number_conversion.v -# Core_Primitive.v +# ----- Core_Primitive_Number_conversion_i.v +# ----- Core_Primitive_Number_conversion.v +# ----- Core_Primitive.v # ----- Core_Panicking.v # ----- Core_Option.v # ----- Core_Ops_Range.v @@ -98,7 +113,7 @@ # ----- Core_Ops.v # ----- Core_Num_Uint_macros.v # ----- Core_Num_Int_macros.v -# Core_Num.v +# ----- Core_Num.v # ----- Core_Marker.v # Core_Iter_Traits_Marker.v # Core_Iter_Traits_Iterator.v @@ -107,7 +122,7 @@ # Core_Iter_Traits.v # Core_Iter_Range.v # Core_Iter.v -# Core_Intrinsics.v +# ----- Core_Intrinsics.v # Core_Fmt.v # ----- Core_Convert.v # ----- Core_Cmp.v @@ -124,7 +139,7 @@ # Core_Base_interface_Int_I128_proofs.v # ----- Core_Base_interface_Int.v # ----- Core_Base_interface_Coerce.v -# Core_Base_interface.v +# ----- Core_Base_interface.v # ----- Core_Base_Z.v # ----- Core_Base_Spec_Z.v # ----- Core_Base_Spec_Unary.v @@ -140,7 +155,7 @@ # Core_Base_Number_conversion.v # ----- Core_Base_Binary.v # ----- Core_Base.v -# Core_Array_Rec_bundle_579704328.v -# Core_Array_Iter.v -# Core_Array.v -# Core.v \ No newline at end of file +# ----- Core_Array_Rec_bundle_579704328.v +# ----- Core_Array_Iter.v +# ----- Core_Array.v +# ----- Core.v \ No newline at end of file diff --git a/proof-libs/coq/coq/generated-core/phase_library/TODO.v b/proof-libs/coq/coq/generated-core/phase_library/TODO.v index 9720e8785..253bad01a 100644 --- a/proof-libs/coq/coq/generated-core/phase_library/TODO.v +++ b/proof-libs/coq/coq/generated-core/phase_library/TODO.v @@ -33,3 +33,11 @@ Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. (* Definition impl_1__push {A} l (x : A) := cons l x. *) (* Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := {| x |}. *) (* Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). *) + +Fixpoint build_range (l : nat) (f : nat) (a : list t_usize) : list t_usize := + match f with + | 0%nat => a + | (S n)%nat => build_range (S l) n (cons a (Build_t_usize (Build_t_U64 (unary_to_int l)))) + end. + +Definition fold_range {A : Type} (l : t_usize) (u : t_usize) (_ : A -> t_usize -> bool) (x : A) (f : A -> t_usize -> A) : A := List.fold_left f (build_range (unary_from_int (U64_f_v (usize_0 l))) (unary_from_int (U64_f_v (usize_0 (Sub_f_sub u l)))) nil) x. diff --git a/proof-libs/coq/coq/generated-core/src/Core.v b/proof-libs/coq/coq/generated-core/src/Core.v index 92054e7fd..3965e9d91 100644 --- a/proof-libs/coq/coq/generated-core/src/Core.v +++ b/proof-libs/coq/coq/generated-core/src/Core.v @@ -64,6 +64,15 @@ Export Core_Primitive. From Core Require Import Core_Option. Export Core_Option. +From Core Require Import Core_Array_Rec_bundle_579704328. +Export Core_Array_Rec_bundle_579704328. + +From Core Require Import Core_Ops. +Export Core_Ops. + +From Core Require Import Core_Ops_Index. +Export Core_Ops_Index. + From Core Require Import NumberNotation. Export NumberNotation. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array.v b/proof-libs/coq/coq/generated-core/src/Core_Array.v index 58124ad53..c59a39ce4 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Array.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Array.v @@ -12,66 +12,17 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Ops_Index. +Export Core_Ops_Index. +(* From Core Require Import Core_Ops_IndexMut. *) +(* Export Core_Ops (t_IndexMut). *) +From Core Require Import Core_Primitive. +Export Core_Primitive. -From Core Require Import Core_Ops (t_Index). -Export Core_Ops (t_Index). - -From Core Require Import Core_Ops (t_IndexMut). -Export Core_Ops (t_IndexMut). - -From Core Require Import Core_Primitive (t_Slice). -Export Core_Primitive (t_Slice). - -From Core Require Import Core_Primitive (t_Array). -Export Core_Primitive (t_Array). - -From Core Require Import Self_Iter (t_IntoIter). -Export Self_Iter (t_IntoIter). +From Core Require Import Core_Array_Iter. +Export Core_Array_Iter. Notation "'t_TryFromSliceError'" := (t_TryFromSliceError). @@ -79,8 +30,8 @@ Notation "'TryFromSliceError_0'" := (TryFromSliceError_0). (* NotImplementedYet *) -Notation "'impl_2'" := (impl_2). +(* Notation "'impl_2'" := (impl_2). *) -Notation "'impl_1'" := (impl_1). +(* Notation "'impl_1'" := (impl_1). *) -Notation "'impl'" := (impl). +(* Notation "'impl'" := (impl). *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v b/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v index 7662013e8..3ee71113d 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v @@ -12,75 +12,31 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Num. +Export Core_Num. -From Core Require Import Core_Num (t_NonZero). -Export Core_Num (t_NonZero). +From Core Require Import Core_Ops_Index_range. +Export Core_Ops_Index_range. -From Core Require Import Core_Ops (t_IndexRange). -Export Core_Ops (t_IndexRange). +From Core Require Import Core_Ops_Range. +Export Core_Ops_Range. -From Core Require Import Core_Ops (t_Range). -Export Core_Ops (t_Range). +From Core Require Import Core_Primitive. +Export Core_Primitive. -From Core Require Import Core_Primitive (t_Array). -Export Core_Primitive (t_Array). +(* From Core Require Import Core_Iter (t_IntoIterator). *) +(* Export Core_Iter (t_IntoIterator). *) -From Core Require Import Core_Iter (t_IntoIterator). -Export Core_Iter (t_IntoIterator). +From Core Require Import Core_Clone. +Export Core_Clone. -From Core Require Import Core (t_clone). -Export Core (t_clone). +From Core Require Import Core_Base. +Export Core_Base. -From Core Require Import Core (t_base). -Export Core (t_base). - -From Core Require Import hax_lib. -Export hax_lib. +(* From Core Require Import hax_lib. *) +(* Export hax_lib. *) Record t_IntoIter (v_T : Type) (v_N : t_usize) `{t_Sized (v_T)} : Type := { diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v b/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v index 245ee6f39..8c8e830e8 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v @@ -30,7 +30,7 @@ Arguments i128_0. settable! (Build_t_i128) . Notation "'i128'" := Build_t_i128. -Instance t_Clone_173398349 : t_Clone ((t_i128)) := +#[global] Instance t_Clone_173398349 : t_Clone ((t_i128)) := { Clone_f_clone := fun (self : t_i128)=> self; }. @@ -45,7 +45,7 @@ Arguments i16_0. settable! (Build_t_i16) . Notation "'i16'" := Build_t_i16. -Instance t_Clone_192670426 : t_Clone ((t_i16)) := +#[global] Instance t_Clone_192670426 : t_Clone ((t_i16)) := { Clone_f_clone := fun (self : t_i16)=> Build_t_i16 (Clone_f_clone (i16_0 self)); @@ -61,7 +61,7 @@ Arguments i32_0. settable! (Build_t_i32) . Notation "'i32'" := Build_t_i32. -Instance t_Clone_502683757 : t_Clone ((t_i32)) := +#[global] Instance t_Clone_502683757 : t_Clone ((t_i32)) := { Clone_f_clone := fun (self : t_i32)=> Build_t_i32 (Clone_f_clone (i32_0 self)); @@ -77,7 +77,7 @@ Arguments i64_0. settable! (Build_t_i64) . Notation "'i64'" := Build_t_i64. -Instance t_Clone_208076318 : t_Clone ((t_i64)) := +#[global] Instance t_Clone_208076318 : t_Clone ((t_i64)) := { Clone_f_clone := fun (self : t_i64)=> Build_t_i64 (Clone_f_clone (i64_0 self)); @@ -93,7 +93,7 @@ Arguments i8_0. settable! (Build_t_i8) . Notation "'i8'" := Build_t_i8. -Instance t_Clone_654126073 : t_Clone ((t_i8)) := +#[global] Instance t_Clone_654126073 : t_Clone ((t_i8)) := { Clone_f_clone := fun (self : t_i8)=> Build_t_i8 (Clone_f_clone (i8_0 self)); @@ -109,19 +109,19 @@ Arguments isize_0. settable! (Build_t_isize) . Notation "'isize'" := Build_t_isize. -Instance t_Clone_36465747 : t_Clone ((t_isize)) := +#[global] Instance t_Clone_36465747 : t_Clone ((t_isize)) := { Clone_f_clone := fun (self : t_isize)=> Build_t_isize (Clone_f_clone (isize_0 self)); }. -Instance t_From_200584765 : t_From ((t_isize)) ((t_i64)) := +#[global] Instance t_From_200584765 : t_From ((t_isize)) ((t_i64)) := { From_f_from := fun (x : t_i64)=> Build_t_isize (Into_f_into (i64_0 x)); }. -Instance t_From_705632684 : t_From ((t_i64)) ((t_isize)) := +#[global] Instance t_From_705632684 : t_From ((t_i64)) ((t_isize)) := { From_f_from := fun (x : t_isize)=> Build_t_i64 (Into_f_into (isize_0 x)); @@ -223,13 +223,13 @@ Definition from_le418743864 (x : t_usize) : t_usize := Definition to_le946822077 (self : t_usize) : t_usize := self. -Instance t_From_1035345737 : t_From ((t_usize)) ((t_u64)) := +#[global] Instance t_From_1035345737 : t_From ((t_usize)) ((t_u64)) := { From_f_from := fun (x : t_u64)=> Build_t_usize (Into_f_into (u64_0 x)); }. -Instance t_From_478985084 : t_From ((t_u64)) ((t_usize)) := +#[global] Instance t_From_478985084 : t_From ((t_u64)) ((t_usize)) := { From_f_from := fun (x : t_usize)=> Build_t_u64 (Into_f_into (usize_0 x)); @@ -240,11 +240,11 @@ Class v_Sealed (v_Self : Type) : Type := }. Arguments v_Sealed (_). -Instance v_Sealed_639968800 : v_Sealed ((t_usize)) := +#[global] Instance v_Sealed_639968800 : v_Sealed ((t_usize)) := { }. -Instance v_Sealed_740757788 : v_Sealed ((t_Range ((t_usize)))) := +#[global] Instance v_Sealed_740757788 : v_Sealed ((t_Range ((t_usize)))) := { }. @@ -384,37 +384,37 @@ Definition v_MAX750570916 : t_usize := Definition v_MIN861571008 : t_usize := Build_t_usize (Constants_f_MIN). -Instance t_Clone_832469823 : t_Clone ((t_u8)) := +#[global] Instance t_Clone_832469823 : t_Clone ((t_u8)) := { Clone_f_clone := fun (self : t_u8)=> Build_t_u8 (Clone_f_clone (u8_0 self)); }. -Instance t_Clone_562622454 : t_Clone ((t_u16)) := +#[global] Instance t_Clone_562622454 : t_Clone ((t_u16)) := { Clone_f_clone := fun (self : t_u16)=> Build_t_u16 (Clone_f_clone (u16_0 self)); }. -Instance t_Clone_1034302141 : t_Clone ((t_u32)) := +#[global] Instance t_Clone_1034302141 : t_Clone ((t_u32)) := { Clone_f_clone := fun (self : t_u32)=> Build_t_u32 (Clone_f_clone (u32_0 self)); }. -Instance t_Clone_189576787 : t_Clone ((t_u64)) := +#[global] Instance t_Clone_189576787 : t_Clone ((t_u64)) := { Clone_f_clone := fun (self : t_u64)=> Build_t_u64 (Clone_f_clone (u64_0 self)); }. -Instance t_Clone_296673181 : t_Clone ((t_u128)) := +#[global] Instance t_Clone_296673181 : t_Clone ((t_u128)) := { Clone_f_clone := fun (self : t_u128)=> Build_t_u128 (Clone_f_clone (u128_0 self)); }. -Instance t_Clone_466142540 : t_Clone ((t_usize)) := +#[global] Instance t_Clone_466142540 : t_Clone ((t_usize)) := { Clone_f_clone := fun (self : t_usize)=> Build_t_usize (Clone_f_clone (usize_0 self)); @@ -427,7 +427,7 @@ Class v_SliceIndex (v_Self : Type) (v_T : Type) `{v_Sealed (v_Self)} : Type := }. Arguments v_SliceIndex (_) (_) {_}. -Instance t_PartialEq_234431236 : t_PartialEq ((t_u8)) ((t_u8)) := +#[global] Instance t_PartialEq_234431236 : t_PartialEq ((t_u8)) ((t_u8)) := { PartialEq_f_eq := fun (self : t_u8) (rhs : t_u8)=> PartialEq_f_eq (u8_0 self) (u8_0 rhs); @@ -435,7 +435,7 @@ Instance t_PartialEq_234431236 : t_PartialEq ((t_u8)) ((t_u8)) := negb (PartialEq_f_eq (u8_0 self) (u8_0 rhs)); }. -Instance t_PartialOrd_835131600 : t_PartialOrd ((t_u8)) ((t_u8)) := +#[global] Instance t_PartialOrd_835131600 : t_PartialOrd ((t_u8)) ((t_u8)) := { PartialOrd_f_partial_cmp := fun (self : t_u8) (rhs : t_u8)=> PartialOrd_f_partial_cmp (u8_0 self) (u8_0 rhs); @@ -471,7 +471,7 @@ Instance t_PartialOrd_835131600 : t_PartialOrd ((t_u8)) ((t_u8)) := end; }. -Instance t_PartialEq_965259828 : t_PartialEq ((t_u16)) ((t_u16)) := +#[global] Instance t_PartialEq_965259828 : t_PartialEq ((t_u16)) ((t_u16)) := { PartialEq_f_eq := fun (self : t_u16) (rhs : t_u16)=> PartialEq_f_eq (u16_0 self) (u16_0 rhs); @@ -479,7 +479,7 @@ Instance t_PartialEq_965259828 : t_PartialEq ((t_u16)) ((t_u16)) := negb (PartialEq_f_eq (u16_0 self) (u16_0 rhs)); }. -Instance t_PartialOrd_116974173 : t_PartialOrd ((t_u16)) ((t_u16)) := +#[global] Instance t_PartialOrd_116974173 : t_PartialOrd ((t_u16)) ((t_u16)) := { PartialOrd_f_partial_cmp := fun (self : t_u16) (rhs : t_u16)=> PartialOrd_f_partial_cmp (u16_0 self) (u16_0 rhs); @@ -515,7 +515,7 @@ Instance t_PartialOrd_116974173 : t_PartialOrd ((t_u16)) ((t_u16)) := end; }. -Instance t_PartialEq_739399974 : t_PartialEq ((t_u32)) ((t_u32)) := +#[global] Instance t_PartialEq_739399974 : t_PartialEq ((t_u32)) ((t_u32)) := { PartialEq_f_eq := fun (self : t_u32) (rhs : t_u32)=> PartialEq_f_eq (u32_0 self) (u32_0 rhs); @@ -523,7 +523,7 @@ Instance t_PartialEq_739399974 : t_PartialEq ((t_u32)) ((t_u32)) := negb (PartialEq_f_eq (u32_0 self) (u32_0 rhs)); }. -Instance t_PartialOrd_553141371 : t_PartialOrd ((t_u32)) ((t_u32)) := +#[global] Instance t_PartialOrd_553141371 : t_PartialOrd ((t_u32)) ((t_u32)) := { PartialOrd_f_partial_cmp := fun (self : t_u32) (rhs : t_u32)=> PartialOrd_f_partial_cmp (u32_0 self) (u32_0 rhs); @@ -559,7 +559,7 @@ Instance t_PartialOrd_553141371 : t_PartialOrd ((t_u32)) ((t_u32)) := end; }. -Instance t_PartialEq_464367537 : t_PartialEq ((t_u64)) ((t_u64)) := +#[global] Instance t_PartialEq_464367537 : t_PartialEq ((t_u64)) ((t_u64)) := { PartialEq_f_eq := fun (self : t_u64) (rhs : t_u64)=> PartialEq_f_eq (u64_0 self) (u64_0 rhs); @@ -567,7 +567,7 @@ Instance t_PartialEq_464367537 : t_PartialEq ((t_u64)) ((t_u64)) := negb (PartialEq_f_eq (u64_0 self) (u64_0 rhs)); }. -Instance t_PartialOrd_207997255 : t_PartialOrd ((t_u64)) ((t_u64)) := +#[global] Instance t_PartialOrd_207997255 : t_PartialOrd ((t_u64)) ((t_u64)) := { PartialOrd_f_partial_cmp := fun (self : t_u64) (rhs : t_u64)=> PartialOrd_f_partial_cmp (u64_0 self) (u64_0 rhs); @@ -603,7 +603,7 @@ Instance t_PartialOrd_207997255 : t_PartialOrd ((t_u64)) ((t_u64)) := end; }. -Instance t_PartialEq_876938738 : t_PartialEq ((t_u128)) ((t_u128)) := +#[global] Instance t_PartialEq_876938738 : t_PartialEq ((t_u128)) ((t_u128)) := { PartialEq_f_eq := fun (self : t_u128) (rhs : t_u128)=> PartialEq_f_eq (u128_0 self) (u128_0 rhs); @@ -611,7 +611,7 @@ Instance t_PartialEq_876938738 : t_PartialEq ((t_u128)) ((t_u128)) := negb (PartialEq_f_eq (u128_0 self) (u128_0 rhs)); }. -Instance t_PartialOrd_566729496 : t_PartialOrd ((t_u128)) ((t_u128)) := +#[global] Instance t_PartialOrd_566729496 : t_PartialOrd ((t_u128)) ((t_u128)) := { PartialOrd_f_partial_cmp := fun (self : t_u128) (rhs : t_u128)=> PartialOrd_f_partial_cmp (u128_0 self) (u128_0 rhs); @@ -647,7 +647,7 @@ Instance t_PartialOrd_566729496 : t_PartialOrd ((t_u128)) ((t_u128)) := end; }. -Instance t_PartialEq_1011013145 : t_PartialEq ((t_usize)) ((t_usize)) := +#[global] Instance t_PartialEq_1011013145 : t_PartialEq ((t_usize)) ((t_usize)) := { PartialEq_f_eq := fun (self : t_usize) (rhs : t_usize)=> PartialEq_f_eq (usize_0 self) (usize_0 rhs); @@ -655,7 +655,7 @@ Instance t_PartialEq_1011013145 : t_PartialEq ((t_usize)) ((t_usize)) := negb (PartialEq_f_eq (usize_0 self) (usize_0 rhs)); }. -Instance t_PartialOrd_917114071 : t_PartialOrd ((t_usize)) ((t_usize)) := +#[global] Instance t_PartialOrd_917114071 : t_PartialOrd ((t_usize)) ((t_usize)) := { PartialOrd_f_partial_cmp := fun (self : t_usize) (rhs : t_usize)=> PartialOrd_f_partial_cmp (usize_0 self) (usize_0 rhs); @@ -691,7 +691,7 @@ Instance t_PartialOrd_917114071 : t_PartialOrd ((t_usize)) ((t_usize)) := end; }. -Instance t_PartialEq_515285814 : t_PartialEq ((t_i8)) ((t_i8)) := +#[global] Instance t_PartialEq_515285814 : t_PartialEq ((t_i8)) ((t_i8)) := { PartialEq_f_eq := fun (self : t_i8) (rhs : t_i8)=> PartialEq_f_eq (i8_0 self) (i8_0 rhs); @@ -699,7 +699,7 @@ Instance t_PartialEq_515285814 : t_PartialEq ((t_i8)) ((t_i8)) := negb (PartialEq_f_eq (i8_0 self) (i8_0 rhs)); }. -Instance t_PartialOrd_610141491 : t_PartialOrd ((t_i8)) ((t_i8)) := +#[global] Instance t_PartialOrd_610141491 : t_PartialOrd ((t_i8)) ((t_i8)) := { PartialOrd_f_partial_cmp := fun (self : t_i8) (rhs : t_i8)=> PartialOrd_f_partial_cmp (i8_0 self) (i8_0 rhs); @@ -735,7 +735,7 @@ Instance t_PartialOrd_610141491 : t_PartialOrd ((t_i8)) ((t_i8)) := end; }. -Instance t_PartialEq_341364762 : t_PartialEq ((t_i16)) ((t_i16)) := +#[global] Instance t_PartialEq_341364762 : t_PartialEq ((t_i16)) ((t_i16)) := { PartialEq_f_eq := fun (self : t_i16) (rhs : t_i16)=> PartialEq_f_eq (i16_0 self) (i16_0 rhs); @@ -743,7 +743,7 @@ Instance t_PartialEq_341364762 : t_PartialEq ((t_i16)) ((t_i16)) := negb (PartialEq_f_eq (i16_0 self) (i16_0 rhs)); }. -Instance t_PartialOrd_685280672 : t_PartialOrd ((t_i16)) ((t_i16)) := +#[global] Instance t_PartialOrd_685280672 : t_PartialOrd ((t_i16)) ((t_i16)) := { PartialOrd_f_partial_cmp := fun (self : t_i16) (rhs : t_i16)=> PartialOrd_f_partial_cmp (i16_0 self) (i16_0 rhs); @@ -779,7 +779,7 @@ Instance t_PartialOrd_685280672 : t_PartialOrd ((t_i16)) ((t_i16)) := end; }. -Instance t_PartialEq_335582486 : t_PartialEq ((t_i32)) ((t_i32)) := +#[global] Instance t_PartialEq_335582486 : t_PartialEq ((t_i32)) ((t_i32)) := { PartialEq_f_eq := fun (self : t_i32) (rhs : t_i32)=> PartialEq_f_eq (i32_0 self) (i32_0 rhs); @@ -787,7 +787,7 @@ Instance t_PartialEq_335582486 : t_PartialEq ((t_i32)) ((t_i32)) := negb (PartialEq_f_eq (i32_0 self) (i32_0 rhs)); }. -Instance t_PartialOrd_776800970 : t_PartialOrd ((t_i32)) ((t_i32)) := +#[global] Instance t_PartialOrd_776800970 : t_PartialOrd ((t_i32)) ((t_i32)) := { PartialOrd_f_partial_cmp := fun (self : t_i32) (rhs : t_i32)=> PartialOrd_f_partial_cmp (i32_0 self) (i32_0 rhs); @@ -823,7 +823,7 @@ Instance t_PartialOrd_776800970 : t_PartialOrd ((t_i32)) ((t_i32)) := end; }. -Instance t_PartialEq_1019995697 : t_PartialEq ((t_i64)) ((t_i64)) := +#[global] Instance t_PartialEq_1019995697 : t_PartialEq ((t_i64)) ((t_i64)) := { PartialEq_f_eq := fun (self : t_i64) (rhs : t_i64)=> PartialEq_f_eq (i64_0 self) (i64_0 rhs); @@ -831,7 +831,7 @@ Instance t_PartialEq_1019995697 : t_PartialEq ((t_i64)) ((t_i64)) := negb (PartialEq_f_eq (i64_0 self) (i64_0 rhs)); }. -Instance t_PartialOrd_354028907 : t_PartialOrd ((t_i64)) ((t_i64)) := +#[global] Instance t_PartialOrd_354028907 : t_PartialOrd ((t_i64)) ((t_i64)) := { PartialOrd_f_partial_cmp := fun (self : t_i64) (rhs : t_i64)=> PartialOrd_f_partial_cmp (i64_0 self) (i64_0 rhs); @@ -867,7 +867,7 @@ Instance t_PartialOrd_354028907 : t_PartialOrd ((t_i64)) ((t_i64)) := end; }. -Instance t_PartialEq_476424898 : t_PartialEq ((t_i128)) ((t_i128)) := +#[global] Instance t_PartialEq_476424898 : t_PartialEq ((t_i128)) ((t_i128)) := { PartialEq_f_eq := fun (self : t_i128) (rhs : t_i128)=> PartialEq_f_eq (i128_0 self) (i128_0 rhs); @@ -875,7 +875,7 @@ Instance t_PartialEq_476424898 : t_PartialEq ((t_i128)) ((t_i128)) := negb (PartialEq_f_eq (i128_0 self) (i128_0 rhs)); }. -Instance t_PartialOrd_532073533 : t_PartialOrd ((t_i128)) ((t_i128)) := +#[global] Instance t_PartialOrd_532073533 : t_PartialOrd ((t_i128)) ((t_i128)) := { PartialOrd_f_partial_cmp := fun (self : t_i128) (rhs : t_i128)=> PartialOrd_f_partial_cmp (i128_0 self) (i128_0 rhs); @@ -911,7 +911,7 @@ Instance t_PartialOrd_532073533 : t_PartialOrd ((t_i128)) ((t_i128)) := end; }. -Instance t_PartialEq_675022234 : t_PartialEq ((t_isize)) ((t_isize)) := +#[global] Instance t_PartialEq_675022234 : t_PartialEq ((t_isize)) ((t_isize)) := { PartialEq_f_eq := fun (self : t_isize) (rhs : t_isize)=> PartialEq_f_eq (isize_0 self) (isize_0 rhs); @@ -919,7 +919,7 @@ Instance t_PartialEq_675022234 : t_PartialEq ((t_isize)) ((t_isize)) := negb (PartialEq_f_eq (isize_0 self) (isize_0 rhs)); }. -Instance t_PartialOrd_661215608 : t_PartialOrd ((t_isize)) ((t_isize)) := +#[global] Instance t_PartialOrd_661215608 : t_PartialOrd ((t_isize)) ((t_isize)) := { PartialOrd_f_partial_cmp := fun (self : t_isize) (rhs : t_isize)=> PartialOrd_f_partial_cmp (isize_0 self) (isize_0 rhs); @@ -1189,175 +1189,175 @@ Definition signum91486536 (self : t_isize) : t_isize := else Into_f_into (1). -Instance t_From_202441647 : t_From ((t_isize)) ((t_isize)) := +#[global] Instance t_From_202441647 : t_From ((t_isize)) ((t_isize)) := { From_f_from := fun (x : t_isize)=> Into_f_into (I64_f_v (isize_0 x)); }. -Instance t_From_100016775 : t_From ((t_i16)) ((t_i8)) := +#[global] Instance t_From_100016775 : t_From ((t_i16)) ((t_i8)) := { From_f_from := fun (x : t_i8)=> Build_t_i16 (Into_f_into (i8_0 x)); }. -Instance t_From_964712142 : t_From ((t_i32)) ((t_i8)) := +#[global] Instance t_From_964712142 : t_From ((t_i32)) ((t_i8)) := { From_f_from := fun (x : t_i8)=> Build_t_i32 (Into_f_into (i8_0 x)); }. -Instance t_From_512166668 : t_From ((t_i64)) ((t_i8)) := +#[global] Instance t_From_512166668 : t_From ((t_i64)) ((t_i8)) := { From_f_from := fun (x : t_i8)=> Build_t_i64 (Into_f_into (i8_0 x)); }. -Instance t_From_95828634 : t_From ((t_i128)) ((t_i8)) := +#[global] Instance t_From_95828634 : t_From ((t_i128)) ((t_i8)) := { From_f_from := fun (x : t_i8)=> Build_t_i128 (Into_f_into (i8_0 x)); }. -Instance t_From_48986939 : t_From ((t_isize)) ((t_i8)) := +#[global] Instance t_From_48986939 : t_From ((t_isize)) ((t_i8)) := { From_f_from := fun (x : t_i8)=> Build_t_isize (Into_f_into (i8_0 x)); }. -Instance t_From_325010041 : t_From ((t_i8)) ((t_i16)) := +#[global] Instance t_From_325010041 : t_From ((t_i8)) ((t_i16)) := { From_f_from := fun (x : t_i16)=> Build_t_i8 (Into_f_into (i16_0 x)); }. -Instance t_From_64357194 : t_From ((t_i32)) ((t_i16)) := +#[global] Instance t_From_64357194 : t_From ((t_i32)) ((t_i16)) := { From_f_from := fun (x : t_i16)=> Build_t_i32 (Into_f_into (i16_0 x)); }. -Instance t_From_840335964 : t_From ((t_i64)) ((t_i16)) := +#[global] Instance t_From_840335964 : t_From ((t_i64)) ((t_i16)) := { From_f_from := fun (x : t_i16)=> Build_t_i64 (Into_f_into (i16_0 x)); }. -Instance t_From_601385454 : t_From ((t_i128)) ((t_i16)) := +#[global] Instance t_From_601385454 : t_From ((t_i128)) ((t_i16)) := { From_f_from := fun (x : t_i16)=> Build_t_i128 (Into_f_into (i16_0 x)); }. -Instance t_From_755383497 : t_From ((t_isize)) ((t_i16)) := +#[global] Instance t_From_755383497 : t_From ((t_isize)) ((t_i16)) := { From_f_from := fun (x : t_i16)=> Build_t_isize (Into_f_into (i16_0 x)); }. -Instance t_From_926112880 : t_From ((t_i8)) ((t_i32)) := +#[global] Instance t_From_926112880 : t_From ((t_i8)) ((t_i32)) := { From_f_from := fun (x : t_i32)=> Build_t_i8 (Into_f_into (i32_0 x)); }. -Instance t_From_81353160 : t_From ((t_i16)) ((t_i32)) := +#[global] Instance t_From_81353160 : t_From ((t_i16)) ((t_i32)) := { From_f_from := fun (x : t_i32)=> Build_t_i16 (Into_f_into (i32_0 x)); }. -Instance t_From_549703007 : t_From ((t_i64)) ((t_i32)) := +#[global] Instance t_From_549703007 : t_From ((t_i64)) ((t_i32)) := { From_f_from := fun (x : t_i32)=> Build_t_i64 (Into_f_into (i32_0 x)); }. -Instance t_From_1001458175 : t_From ((t_i128)) ((t_i32)) := +#[global] Instance t_From_1001458175 : t_From ((t_i128)) ((t_i32)) := { From_f_from := fun (x : t_i32)=> Build_t_i128 (Into_f_into (i32_0 x)); }. -Instance t_From_329934859 : t_From ((t_isize)) ((t_i32)) := +#[global] Instance t_From_329934859 : t_From ((t_isize)) ((t_i32)) := { From_f_from := fun (x : t_i32)=> Build_t_isize (Into_f_into (i32_0 x)); }. -Instance t_From_381441019 : t_From ((t_i8)) ((t_i64)) := +#[global] Instance t_From_381441019 : t_From ((t_i8)) ((t_i64)) := { From_f_from := fun (x : t_i64)=> Build_t_i8 (Into_f_into (i64_0 x)); }. -Instance t_From_728811179 : t_From ((t_i16)) ((t_i64)) := +#[global] Instance t_From_728811179 : t_From ((t_i16)) ((t_i64)) := { From_f_from := fun (x : t_i64)=> Build_t_i16 (Into_f_into (i64_0 x)); }. -Instance t_From_1003839356 : t_From ((t_i32)) ((t_i64)) := +#[global] Instance t_From_1003839356 : t_From ((t_i32)) ((t_i64)) := { From_f_from := fun (x : t_i64)=> Build_t_i32 (Into_f_into (i64_0 x)); }. -Instance t_From_625109732 : t_From ((t_i128)) ((t_i64)) := +#[global] Instance t_From_625109732 : t_From ((t_i128)) ((t_i64)) := { From_f_from := fun (x : t_i64)=> Build_t_i128 (Into_f_into (i64_0 x)); }. -Instance t_From_34424521 : t_From ((t_i8)) ((t_i128)) := +#[global] Instance t_From_34424521 : t_From ((t_i8)) ((t_i128)) := { From_f_from := fun (x : t_i128)=> Build_t_i8 (Into_f_into (i128_0 x)); }. -Instance t_From_603602239 : t_From ((t_i16)) ((t_i128)) := +#[global] Instance t_From_603602239 : t_From ((t_i16)) ((t_i128)) := { From_f_from := fun (x : t_i128)=> Build_t_i16 (Into_f_into (i128_0 x)); }. -Instance t_From_479038908 : t_From ((t_i32)) ((t_i128)) := +#[global] Instance t_From_479038908 : t_From ((t_i32)) ((t_i128)) := { From_f_from := fun (x : t_i128)=> Build_t_i32 (Into_f_into (i128_0 x)); }. -Instance t_From_299745195 : t_From ((t_i64)) ((t_i128)) := +#[global] Instance t_From_299745195 : t_From ((t_i64)) ((t_i128)) := { From_f_from := fun (x : t_i128)=> Build_t_i64 (Into_f_into (i128_0 x)); }. -Instance t_From_615821455 : t_From ((t_isize)) ((t_i128)) := +#[global] Instance t_From_615821455 : t_From ((t_isize)) ((t_i128)) := { From_f_from := fun (x : t_i128)=> Build_t_isize (Into_f_into (i128_0 x)); }. -Instance t_From_376191918 : t_From ((t_i8)) ((t_isize)) := +#[global] Instance t_From_376191918 : t_From ((t_i8)) ((t_isize)) := { From_f_from := fun (x : t_isize)=> Build_t_i8 (Into_f_into (isize_0 x)); }. -Instance t_From_649927535 : t_From ((t_i16)) ((t_isize)) := +#[global] Instance t_From_649927535 : t_From ((t_i16)) ((t_isize)) := { From_f_from := fun (x : t_isize)=> Build_t_i16 (Into_f_into (isize_0 x)); }. -Instance t_From_395262437 : t_From ((t_i32)) ((t_isize)) := +#[global] Instance t_From_395262437 : t_From ((t_i32)) ((t_isize)) := { From_f_from := fun (x : t_isize)=> Build_t_i32 (Into_f_into (isize_0 x)); }. -Instance t_From_218237752 : t_From ((t_i128)) ((t_isize)) := +#[global] Instance t_From_218237752 : t_From ((t_i128)) ((t_isize)) := { From_f_from := fun (x : t_isize)=> Build_t_i128 (Into_f_into (isize_0 x)); @@ -1633,32 +1633,32 @@ Definition wrapping_abs347300819 (self : t_isize) : t_isize := else self. -Instance f_into_t_u8 : t_From t_u8 N := +#[global] Instance f_into_t_u8 : t_From t_u8 N := { From_f_from (x : N) := Build_t_u8 (Build_t_U8 x) }. -Instance f_into_t_u16 : t_From t_u16 N := +#[global] Instance f_into_t_u16 : t_From t_u16 N := { From_f_from (x : N) := Build_t_u16 (Build_t_U16 x) }. -Instance f_into_t_u32 : t_From t_u32 N := +#[global] Instance f_into_t_u32 : t_From t_u32 N := { From_f_from (x : N) := Build_t_u32 (Build_t_U32 x) }. -Instance f_into_t_u64 : t_From t_u64 N := +#[global] Instance f_into_t_u64 : t_From t_u64 N := { From_f_from (x : N) := Build_t_u64 (Build_t_U64 x) }. -Instance f_into_t_u128 : t_From t_u128 N := +#[global] Instance f_into_t_u128 : t_From t_u128 N := { From_f_from (x : N) := Build_t_u128 (Build_t_U128 x) }. -Instance f_into_t_usize : t_From t_usize N := +#[global] Instance f_into_t_usize : t_From t_usize N := { From_f_from (x : N) := Build_t_usize (Build_t_U64 x) }. @@ -1730,7 +1730,7 @@ Definition overflowing_add682280407 (self : t_usize) (rhs : t_usize) : (t_usize* add_with_overflow_usize (self) (rhs). Check t_Neg. -Instance t_Neg_125588538 : t_Neg ((t_i8)) := +#[global] Instance t_Neg_125588538 : t_Neg ((t_i8)) := { Neg_f_Output := t_i8; Neg_f_neg := fun (self : t_i8)=> @@ -1745,7 +1745,7 @@ Definition abs945505614 (self : t_i8) : t_i8 := else self. -Instance t_Neg_977573626 : t_Neg ((t_i16)) := +#[global] Instance t_Neg_977573626 : t_Neg ((t_i16)) := { Neg_f_Output := t_i16; Neg_f_neg := fun (self : t_i16)=> @@ -1760,7 +1760,7 @@ Definition abs581170970 (self : t_i16) : t_i16 := else self. -Instance t_Neg_289824503 : t_Neg ((t_i32)) := +#[global] Instance t_Neg_289824503 : t_Neg ((t_i32)) := { Neg_f_Output := t_i32; Neg_f_neg := fun (self : t_i32)=> @@ -1775,7 +1775,7 @@ Definition abs590464694 (self : t_i32) : t_i32 := else self. -Instance t_Neg_895800448 : t_Neg ((t_i64)) := +#[global] Instance t_Neg_895800448 : t_Neg ((t_i64)) := { Neg_f_Output := t_i64; Neg_f_neg := fun (self : t_i64)=> @@ -1790,7 +1790,7 @@ Definition abs654781043 (self : t_i64) : t_i64 := else self. -Instance t_Neg_830237431 : t_Neg ((t_i128)) := +#[global] Instance t_Neg_830237431 : t_Neg ((t_i128)) := { Neg_f_Output := t_i128; Neg_f_neg := fun (self : t_i128)=> @@ -1805,7 +1805,7 @@ Definition abs204417539 (self : t_i128) : t_i128 := else self. -Instance t_Neg_693499423 : t_Neg ((t_isize)) := +#[global] Instance t_Neg_693499423 : t_Neg ((t_isize)) := { Neg_f_Output := t_isize; Neg_f_neg := fun (self : t_isize)=> @@ -1820,211 +1820,211 @@ Definition abs220926056 (self : t_isize) : t_isize := else self. -Instance t_BitOr_174929276 : t_BitOr ((t_i8)) ((t_i8)) := +#[global] Instance t_BitOr_174929276 : t_BitOr ((t_i8)) ((t_i8)) := { BitOr_f_Output := t_i8; BitOr_f_bitor := fun (self : t_i8) (other : t_i8)=> Build_t_i8 (BitOr_f_bitor (i8_0 self) (i8_0 other)); }. -Instance t_BitOr_162600380 : t_BitOr ((t_i16)) ((t_i16)) := +#[global] Instance t_BitOr_162600380 : t_BitOr ((t_i16)) ((t_i16)) := { BitOr_f_Output := t_i16; BitOr_f_bitor := fun (self : t_i16) (other : t_i16)=> Build_t_i16 (BitOr_f_bitor (i16_0 self) (i16_0 other)); }. -Instance t_BitOr_64689421 : t_BitOr ((t_i32)) ((t_i32)) := +#[global] Instance t_BitOr_64689421 : t_BitOr ((t_i32)) ((t_i32)) := { BitOr_f_Output := t_i32; BitOr_f_bitor := fun (self : t_i32) (other : t_i32)=> Build_t_i32 (BitOr_f_bitor (i32_0 self) (i32_0 other)); }. -Instance t_BitOr_348780956 : t_BitOr ((t_i64)) ((t_i64)) := +#[global] Instance t_BitOr_348780956 : t_BitOr ((t_i64)) ((t_i64)) := { BitOr_f_Output := t_i64; BitOr_f_bitor := fun (self : t_i64) (other : t_i64)=> Build_t_i64 (BitOr_f_bitor (i64_0 self) (i64_0 other)); }. -Instance t_BitOr_643690063 : t_BitOr ((t_i128)) ((t_i128)) := +#[global] Instance t_BitOr_643690063 : t_BitOr ((t_i128)) ((t_i128)) := { BitOr_f_Output := t_i128; BitOr_f_bitor := fun (self : t_i128) (other : t_i128)=> Build_t_i128 (BitOr_f_bitor (i128_0 self) (i128_0 other)); }. -Instance t_BitOr_1027404433 : t_BitOr ((t_isize)) ((t_isize)) := +#[global] Instance t_BitOr_1027404433 : t_BitOr ((t_isize)) ((t_isize)) := { BitOr_f_Output := t_isize; BitOr_f_bitor := fun (self : t_isize) (other : t_isize)=> Build_t_isize (BitOr_f_bitor (isize_0 self) (isize_0 other)); }. -Instance t_From_124503227 : t_From ((t_u16)) ((t_u8)) := +#[global] Instance t_From_124503227 : t_From ((t_u16)) ((t_u8)) := { From_f_from := fun (x : t_u8)=> Build_t_u16 (Into_f_into (u8_0 x)); }. -Instance t_From_499390246 : t_From ((t_u32)) ((t_u8)) := +#[global] Instance t_From_499390246 : t_From ((t_u32)) ((t_u8)) := { From_f_from := fun (x : t_u8)=> Build_t_u32 (Into_f_into (u8_0 x)); }. -Instance t_From_1040523499 : t_From ((t_u64)) ((t_u8)) := +#[global] Instance t_From_1040523499 : t_From ((t_u64)) ((t_u8)) := { From_f_from := fun (x : t_u8)=> Build_t_u64 (Into_f_into (u8_0 x)); }. -Instance t_From_827336555 : t_From ((t_u128)) ((t_u8)) := +#[global] Instance t_From_827336555 : t_From ((t_u128)) ((t_u8)) := { From_f_from := fun (x : t_u8)=> Build_t_u128 (Into_f_into (u8_0 x)); }. -Instance t_From_1002852925 : t_From ((t_usize)) ((t_u8)) := +#[global] Instance t_From_1002852925 : t_From ((t_usize)) ((t_u8)) := { From_f_from := fun (x : t_u8)=> Build_t_usize (Into_f_into (u8_0 x)); }. -Instance t_From_476851440 : t_From ((t_u8)) ((t_u16)) := +#[global] Instance t_From_476851440 : t_From ((t_u8)) ((t_u16)) := { From_f_from := fun (x : t_u16)=> Build_t_u8 (Into_f_into (u16_0 x)); }. -Instance t_From_590504350 : t_From ((t_u32)) ((t_u16)) := +#[global] Instance t_From_590504350 : t_From ((t_u32)) ((t_u16)) := { From_f_from := fun (x : t_u16)=> Build_t_u32 (Into_f_into (u16_0 x)); }. -Instance t_From_786143320 : t_From ((t_u64)) ((t_u16)) := +#[global] Instance t_From_786143320 : t_From ((t_u64)) ((t_u16)) := { From_f_from := fun (x : t_u16)=> Build_t_u64 (Into_f_into (u16_0 x)); }. -Instance t_From_98507156 : t_From ((t_u128)) ((t_u16)) := +#[global] Instance t_From_98507156 : t_From ((t_u128)) ((t_u16)) := { From_f_from := fun (x : t_u16)=> Build_t_u128 (Into_f_into (u16_0 x)); }. -Instance t_From_427149512 : t_From ((t_usize)) ((t_u16)) := +#[global] Instance t_From_427149512 : t_From ((t_usize)) ((t_u16)) := { From_f_from := fun (x : t_u16)=> Build_t_usize (Into_f_into (u16_0 x)); }. -Instance t_From_306676060 : t_From ((t_u8)) ((t_u32)) := +#[global] Instance t_From_306676060 : t_From ((t_u8)) ((t_u32)) := { From_f_from := fun (x : t_u32)=> Build_t_u8 (Into_f_into (u32_0 x)); }. -Instance t_From_55624543 : t_From ((t_u16)) ((t_u32)) := +#[global] Instance t_From_55624543 : t_From ((t_u16)) ((t_u32)) := { From_f_from := fun (x : t_u32)=> Build_t_u16 (Into_f_into (u32_0 x)); }. -Instance t_From_863285405 : t_From ((t_u64)) ((t_u32)) := +#[global] Instance t_From_863285405 : t_From ((t_u64)) ((t_u32)) := { From_f_from := fun (x : t_u32)=> Build_t_u64 (Into_f_into (u32_0 x)); }. -Instance t_From_675130423 : t_From ((t_u128)) ((t_u32)) := +#[global] Instance t_From_675130423 : t_From ((t_u128)) ((t_u32)) := { From_f_from := fun (x : t_u32)=> Build_t_u128 (Into_f_into (u32_0 x)); }. -Instance t_From_295642421 : t_From ((t_usize)) ((t_u32)) := +#[global] Instance t_From_295642421 : t_From ((t_usize)) ((t_u32)) := { From_f_from := fun (x : t_u32)=> Build_t_usize (Into_f_into (u32_0 x)); }. -Instance t_From_690942554 : t_From ((t_u8)) ((t_u64)) := +#[global] Instance t_From_690942554 : t_From ((t_u8)) ((t_u64)) := { From_f_from := fun (x : t_u64)=> Build_t_u8 (Into_f_into (u64_0 x)); }. -Instance t_From_956877210 : t_From ((t_u16)) ((t_u64)) := +#[global] Instance t_From_956877210 : t_From ((t_u16)) ((t_u64)) := { From_f_from := fun (x : t_u64)=> Build_t_u16 (Into_f_into (u64_0 x)); }. -Instance t_From_124072492 : t_From ((t_u32)) ((t_u64)) := +#[global] Instance t_From_124072492 : t_From ((t_u32)) ((t_u64)) := { From_f_from := fun (x : t_u64)=> Build_t_u32 (Into_f_into (u64_0 x)); }. -Instance t_From_882228220 : t_From ((t_u128)) ((t_u64)) := +#[global] Instance t_From_882228220 : t_From ((t_u128)) ((t_u64)) := { From_f_from := fun (x : t_u64)=> Build_t_u128 (Into_f_into (u64_0 x)); }. -Instance t_From_1060762174 : t_From ((t_u8)) ((t_u128)) := +#[global] Instance t_From_1060762174 : t_From ((t_u8)) ((t_u128)) := { From_f_from := fun (x : t_u128)=> Build_t_u8 (Into_f_into (u128_0 x)); }. -Instance t_From_437123664 : t_From ((t_u16)) ((t_u128)) := +#[global] Instance t_From_437123664 : t_From ((t_u16)) ((t_u128)) := { From_f_from := fun (x : t_u128)=> Build_t_u16 (Into_f_into (u128_0 x)); }. -Instance t_From_685712174 : t_From ((t_u32)) ((t_u128)) := +#[global] Instance t_From_685712174 : t_From ((t_u32)) ((t_u128)) := { From_f_from := fun (x : t_u128)=> Build_t_u32 (Into_f_into (u128_0 x)); }. -Instance t_From_239215567 : t_From ((t_u64)) ((t_u128)) := +#[global] Instance t_From_239215567 : t_From ((t_u64)) ((t_u128)) := { From_f_from := fun (x : t_u128)=> Build_t_u64 (Into_f_into (u128_0 x)); }. -Instance t_From_583993496 : t_From ((t_usize)) ((t_u128)) := +#[global] Instance t_From_583993496 : t_From ((t_usize)) ((t_u128)) := { From_f_from := fun (x : t_u128)=> Build_t_usize (Into_f_into (u128_0 x)); }. -Instance t_From_1069835847 : t_From ((t_u8)) ((t_usize)) := +#[global] Instance t_From_1069835847 : t_From ((t_u8)) ((t_usize)) := { From_f_from := fun (x : t_usize)=> Build_t_u8 (Into_f_into (usize_0 x)); }. -Instance t_From_976343396 : t_From ((t_u16)) ((t_usize)) := +#[global] Instance t_From_976343396 : t_From ((t_u16)) ((t_usize)) := { From_f_from := fun (x : t_usize)=> Build_t_u16 (Into_f_into (usize_0 x)); }. -Instance t_From_448121712 : t_From ((t_u32)) ((t_usize)) := +#[global] Instance t_From_448121712 : t_From ((t_u32)) ((t_usize)) := { From_f_from := fun (x : t_usize)=> Build_t_u32 (Into_f_into (usize_0 x)); }. -Instance t_From_448032498 : t_From ((t_u128)) ((t_usize)) := +#[global] Instance t_From_448032498 : t_From ((t_u128)) ((t_usize)) := { From_f_from := fun (x : t_usize)=> Build_t_u128 (Into_f_into (usize_0 x)); @@ -2138,84 +2138,84 @@ Definition wrapping_add427637036 (self : t_usize) (rhs : t_usize) : t_usize := Definition wrapping_mul680896953 (self : t_usize) (rhs : t_usize) : t_usize := wrapping_mul_usize (self) (rhs). -Instance t_Add_695878175 : t_Add ((t_i8)) ((t_i8)) := +#[global] Instance t_Add_695878175 : t_Add ((t_i8)) ((t_i8)) := { Add_f_Output := t_i8; Add_f_add := fun (self : t_i8) (other : t_i8)=> Build_t_i8 (Add_f_add (i8_0 self) (i8_0 other)); }. -Instance t_Add_877139857 : t_Add ((t_i16)) ((t_i16)) := +#[global] Instance t_Add_877139857 : t_Add ((t_i16)) ((t_i16)) := { Add_f_Output := t_i16; Add_f_add := fun (self : t_i16) (other : t_i16)=> Build_t_i16 (Add_f_add (i16_0 self) (i16_0 other)); }. -Instance t_Add_426581780 : t_Add ((t_i32)) ((t_i32)) := +#[global] Instance t_Add_426581780 : t_Add ((t_i32)) ((t_i32)) := { Add_f_Output := t_i32; Add_f_add := fun (self : t_i32) (other : t_i32)=> Build_t_i32 (Add_f_add (i32_0 self) (i32_0 other)); }. -Instance t_Add_113633409 : t_Add ((t_i64)) ((t_i64)) := +#[global] Instance t_Add_113633409 : t_Add ((t_i64)) ((t_i64)) := { Add_f_Output := t_i64; Add_f_add := fun (self : t_i64) (other : t_i64)=> Build_t_i64 (Add_f_add (i64_0 self) (i64_0 other)); }. -Instance t_Add_788236527 : t_Add ((t_i128)) ((t_i128)) := +#[global] Instance t_Add_788236527 : t_Add ((t_i128)) ((t_i128)) := { Add_f_Output := t_i128; Add_f_add := fun (self : t_i128) (other : t_i128)=> Build_t_i128 (Add_f_add (i128_0 self) (i128_0 other)); }. -Instance t_Add_247333017 : t_Add ((t_isize)) ((t_isize)) := +#[global] Instance t_Add_247333017 : t_Add ((t_isize)) ((t_isize)) := { Add_f_Output := t_isize; Add_f_add := fun (self : t_isize) (other : t_isize)=> Build_t_isize (Add_f_add (isize_0 self) (isize_0 other)); }. -Instance t_Sub_756206062 : t_Sub ((t_i8)) ((t_i8)) := +#[global] Instance t_Sub_756206062 : t_Sub ((t_i8)) ((t_i8)) := { Sub_f_Output := t_i8; Sub_f_sub := fun (self : t_i8) (other : t_i8)=> Build_t_i8 (Sub_f_sub (i8_0 self) (i8_0 other)); }. -Instance t_Sub_618838212 : t_Sub ((t_i16)) ((t_i16)) := +#[global] Instance t_Sub_618838212 : t_Sub ((t_i16)) ((t_i16)) := { Sub_f_Output := t_i16; Sub_f_sub := fun (self : t_i16) (other : t_i16)=> Build_t_i16 (Sub_f_sub (i16_0 self) (i16_0 other)); }. -Instance t_Sub_44574118 : t_Sub ((t_i32)) ((t_i32)) := +#[global] Instance t_Sub_44574118 : t_Sub ((t_i32)) ((t_i32)) := { Sub_f_Output := t_i32; Sub_f_sub := fun (self : t_i32) (other : t_i32)=> Build_t_i32 (Sub_f_sub (i32_0 self) (i32_0 other)); }. -Instance t_Sub_287793174 : t_Sub ((t_i64)) ((t_i64)) := +#[global] Instance t_Sub_287793174 : t_Sub ((t_i64)) ((t_i64)) := { Sub_f_Output := t_i64; Sub_f_sub := fun (self : t_i64) (other : t_i64)=> Build_t_i64 (Sub_f_sub (i64_0 self) (i64_0 other)); }. -Instance t_Sub_837338145 : t_Sub ((t_i128)) ((t_i128)) := +#[global] Instance t_Sub_837338145 : t_Sub ((t_i128)) ((t_i128)) := { Sub_f_Output := t_i128; Sub_f_sub := fun (self : t_i128) (other : t_i128)=> Build_t_i128 (Sub_f_sub (i128_0 self) (i128_0 other)); }. -Instance t_Sub_22961567 : t_Sub ((t_isize)) ((t_isize)) := +#[global] Instance t_Sub_22961567 : t_Sub ((t_isize)) ((t_isize)) := { Sub_f_Output := t_isize; Sub_f_sub := fun (self : t_isize) (other : t_isize)=> @@ -2276,133 +2276,133 @@ Definition wrapping_sub813101882 (self : t_usize) (rhs : t_usize) : t_usize := Definition wrapping_neg342773446 (self : t_usize) : t_usize := wrapping_sub813101882 (Build_t_usize (Constants_f_ZERO)) (self). -Instance t_Add_63222257 : t_Add ((t_u8)) ((t_u8)) := +#[global] Instance t_Add_63222257 : t_Add ((t_u8)) ((t_u8)) := { Add_f_Output := t_u8; Add_f_add := fun (self : t_u8) (other : t_u8)=> Build_t_u8 (Add_f_add (u8_0 self) (u8_0 other)); }. -Instance t_Add_568595401 : t_Add ((t_u16)) ((t_u16)) := +#[global] Instance t_Add_568595401 : t_Add ((t_u16)) ((t_u16)) := { Add_f_Output := t_u16; Add_f_add := fun (self : t_u16) (other : t_u16)=> Build_t_u16 (Add_f_add (u16_0 self) (u16_0 other)); }. -Instance t_Add_99427071 : t_Add ((t_u32)) ((t_u32)) := +#[global] Instance t_Add_99427071 : t_Add ((t_u32)) ((t_u32)) := { Add_f_Output := t_u32; Add_f_add := fun (self : t_u32) (other : t_u32)=> Build_t_u32 (Add_f_add (u32_0 self) (u32_0 other)); }. -Instance t_Add_963057404 : t_Add ((t_u64)) ((t_u64)) := +#[global] Instance t_Add_963057404 : t_Add ((t_u64)) ((t_u64)) := { Add_f_Output := t_u64; Add_f_add := fun (self : t_u64) (other : t_u64)=> Build_t_u64 (Add_f_add (u64_0 self) (u64_0 other)); }. -Instance t_Add_258013445 : t_Add ((t_u128)) ((t_u128)) := +#[global] Instance t_Add_258013445 : t_Add ((t_u128)) ((t_u128)) := { Add_f_Output := t_u128; Add_f_add := fun (self : t_u128) (other : t_u128)=> Build_t_u128 (Add_f_add (u128_0 self) (u128_0 other)); }. -Instance t_Add_192585125 : t_Add ((t_usize)) ((t_usize)) := +#[global] Instance t_Add_192585125 : t_Add ((t_usize)) ((t_usize)) := { Add_f_Output := t_usize; Add_f_add := fun (self : t_usize) (other : t_usize)=> Build_t_usize (Add_f_add (usize_0 self) (usize_0 other)); }. -Instance t_Mul_307943337 : t_Mul ((t_u8)) ((t_u8)) := +#[global] Instance t_Mul_307943337 : t_Mul ((t_u8)) ((t_u8)) := { Mul_f_Output := t_u8; Mul_f_mul := fun (self : t_u8) (other : t_u8)=> Build_t_u8 (Mul_f_mul (u8_0 self) (u8_0 other)); }. -Instance t_Mul_579880302 : t_Mul ((t_u16)) ((t_u16)) := +#[global] Instance t_Mul_579880302 : t_Mul ((t_u16)) ((t_u16)) := { Mul_f_Output := t_u16; Mul_f_mul := fun (self : t_u16) (other : t_u16)=> Build_t_u16 (Mul_f_mul (u16_0 self) (u16_0 other)); }. -Instance t_Mul_969448321 : t_Mul ((t_u32)) ((t_u32)) := +#[global] Instance t_Mul_969448321 : t_Mul ((t_u32)) ((t_u32)) := { Mul_f_Output := t_u32; Mul_f_mul := fun (self : t_u32) (other : t_u32)=> Build_t_u32 (Mul_f_mul (u32_0 self) (u32_0 other)); }. -Instance t_Mul_572333733 : t_Mul ((t_u64)) ((t_u64)) := +#[global] Instance t_Mul_572333733 : t_Mul ((t_u64)) ((t_u64)) := { Mul_f_Output := t_u64; Mul_f_mul := fun (self : t_u64) (other : t_u64)=> Build_t_u64 (Mul_f_mul (u64_0 self) (u64_0 other)); }. -Instance t_Mul_904691459 : t_Mul ((t_u128)) ((t_u128)) := +#[global] Instance t_Mul_904691459 : t_Mul ((t_u128)) ((t_u128)) := { Mul_f_Output := t_u128; Mul_f_mul := fun (self : t_u128) (other : t_u128)=> Build_t_u128 (Mul_f_mul (u128_0 self) (u128_0 other)); }. -Instance t_Mul_490480124 : t_Mul ((t_usize)) ((t_usize)) := +#[global] Instance t_Mul_490480124 : t_Mul ((t_usize)) ((t_usize)) := { Mul_f_Output := t_usize; Mul_f_mul := fun (self : t_usize) (other : t_usize)=> Build_t_usize (Mul_f_mul (usize_0 self) (usize_0 other)); }. -Instance t_Mul_542253756 : t_Mul ((t_i8)) ((t_i8)) := +#[global] Instance t_Mul_542253756 : t_Mul ((t_i8)) ((t_i8)) := { Mul_f_Output := t_i8; Mul_f_mul := fun (self : t_i8) (other : t_i8)=> Build_t_i8 (Mul_f_mul (i8_0 self) (i8_0 other)); }. -Instance t_Mul_586956420 : t_Mul ((t_i16)) ((t_i16)) := +#[global] Instance t_Mul_586956420 : t_Mul ((t_i16)) ((t_i16)) := { Mul_f_Output := t_i16; Mul_f_mul := fun (self : t_i16) (other : t_i16)=> Build_t_i16 (Mul_f_mul (i16_0 self) (i16_0 other)); }. -Instance t_Mul_622712365 : t_Mul ((t_i32)) ((t_i32)) := +#[global] Instance t_Mul_622712365 : t_Mul ((t_i32)) ((t_i32)) := { Mul_f_Output := t_i32; Mul_f_mul := fun (self : t_i32) (other : t_i32)=> Build_t_i32 (Mul_f_mul (i32_0 self) (i32_0 other)); }. -Instance t_Mul_167399285 : t_Mul ((t_i64)) ((t_i64)) := +#[global] Instance t_Mul_167399285 : t_Mul ((t_i64)) ((t_i64)) := { Mul_f_Output := t_i64; Mul_f_mul := fun (self : t_i64) (other : t_i64)=> Build_t_i64 (Mul_f_mul (i64_0 self) (i64_0 other)); }. -Instance t_Mul_264435207 : t_Mul ((t_i128)) ((t_i128)) := +#[global] Instance t_Mul_264435207 : t_Mul ((t_i128)) ((t_i128)) := { Mul_f_Output := t_i128; Mul_f_mul := fun (self : t_i128) (other : t_i128)=> Build_t_i128 (Mul_f_mul (i128_0 self) (i128_0 other)); }. -Instance t_Mul_9915144 : t_Mul ((t_isize)) ((t_isize)) := +#[global] Instance t_Mul_9915144 : t_Mul ((t_isize)) ((t_isize)) := { Mul_f_Output := t_isize; Mul_f_mul := fun (self : t_isize) (other : t_isize)=> Build_t_isize (Mul_f_mul (isize_0 self) (isize_0 other)); }. -Instance t_Div_23426959 : t_Div ((t_u8)) ((t_u8)) := +#[global] Instance t_Div_23426959 : t_Div ((t_u8)) ((t_u8)) := { Div_f_Output := t_u8; Div_f_div := fun (self : t_u8) (other : t_u8)=> @@ -2415,7 +2415,7 @@ Definition wrapping_div660080892 (self : t_u8) (rhs : t_u8) : t_u8 := Definition wrapping_div_euclid481233436 (self : t_u8) (rhs : t_u8) : t_u8 := Div_f_div (self) (rhs). -Instance t_Div_469212879 : t_Div ((t_u16)) ((t_u16)) := +#[global] Instance t_Div_469212879 : t_Div ((t_u16)) ((t_u16)) := { Div_f_Output := t_u16; Div_f_div := fun (self : t_u16) (other : t_u16)=> @@ -2428,7 +2428,7 @@ Definition wrapping_div366977334 (self : t_u16) (rhs : t_u16) : t_u16 := Definition wrapping_div_euclid22267888 (self : t_u16) (rhs : t_u16) : t_u16 := Div_f_div (self) (rhs). -Instance t_Div_248596974 : t_Div ((t_u32)) ((t_u32)) := +#[global] Instance t_Div_248596974 : t_Div ((t_u32)) ((t_u32)) := { Div_f_Output := t_u32; Div_f_div := fun (self : t_u32) (other : t_u32)=> @@ -2441,7 +2441,7 @@ Definition wrapping_div931150450 (self : t_u32) (rhs : t_u32) : t_u32 := Definition wrapping_div_euclid606291997 (self : t_u32) (rhs : t_u32) : t_u32 := Div_f_div (self) (rhs). -Instance t_Div_901268642 : t_Div ((t_u64)) ((t_u64)) := +#[global] Instance t_Div_901268642 : t_Div ((t_u64)) ((t_u64)) := { Div_f_Output := t_u64; Div_f_div := fun (self : t_u64) (other : t_u64)=> @@ -2454,7 +2454,7 @@ Definition wrapping_div168427046 (self : t_u64) (rhs : t_u64) : t_u64 := Definition wrapping_div_euclid321252086 (self : t_u64) (rhs : t_u64) : t_u64 := Div_f_div (self) (rhs). -Instance t_Div_868602092 : t_Div ((t_u128)) ((t_u128)) := +#[global] Instance t_Div_868602092 : t_Div ((t_u128)) ((t_u128)) := { Div_f_Output := t_u128; Div_f_div := fun (self : t_u128) (other : t_u128)=> @@ -2467,7 +2467,7 @@ Definition wrapping_div692427683 (self : t_u128) (rhs : t_u128) : t_u128 := Definition wrapping_div_euclid926334515 (self : t_u128) (rhs : t_u128) : t_u128 := Div_f_div (self) (rhs). -Instance t_Div_740920454 : t_Div ((t_usize)) ((t_usize)) := +#[global] Instance t_Div_740920454 : t_Div ((t_usize)) ((t_usize)) := { Div_f_Output := t_usize; Div_f_div := fun (self : t_usize) (other : t_usize)=> @@ -2480,7 +2480,7 @@ Definition wrapping_div905768546 (self : t_usize) (rhs : t_usize) : t_usize := Definition wrapping_div_euclid90317722 (self : t_usize) (rhs : t_usize) : t_usize := Div_f_div (self) (rhs). -Instance t_Rem_485335443 : t_Rem ((t_u8)) ((t_u8)) := +#[global] Instance t_Rem_485335443 : t_Rem ((t_u8)) ((t_u8)) := { Rem_f_Output := t_u8; Rem_f_rem := fun (self : t_u8) (other : t_u8)=> @@ -2493,7 +2493,7 @@ Definition wrapping_rem984569721 (self : t_u8) (rhs : t_u8) : t_u8 := Definition wrapping_rem_euclid946579345 (self : t_u8) (rhs : t_u8) : t_u8 := Rem_f_rem (self) (rhs). -Instance t_Rem_780488465 : t_Rem ((t_u16)) ((t_u16)) := +#[global] Instance t_Rem_780488465 : t_Rem ((t_u16)) ((t_u16)) := { Rem_f_Output := t_u16; Rem_f_rem := fun (self : t_u16) (other : t_u16)=> @@ -2506,7 +2506,7 @@ Definition wrapping_rem378598035 (self : t_u16) (rhs : t_u16) : t_u16 := Definition wrapping_rem_euclid602402638 (self : t_u16) (rhs : t_u16) : t_u16 := Rem_f_rem (self) (rhs). -Instance t_Rem_734014529 : t_Rem ((t_u32)) ((t_u32)) := +#[global] Instance t_Rem_734014529 : t_Rem ((t_u32)) ((t_u32)) := { Rem_f_Output := t_u32; Rem_f_rem := fun (self : t_u32) (other : t_u32)=> @@ -2519,7 +2519,7 @@ Definition wrapping_rem292009099 (self : t_u32) (rhs : t_u32) : t_u32 := Definition wrapping_rem_euclid1020271291 (self : t_u32) (rhs : t_u32) : t_u32 := Rem_f_rem (self) (rhs). -Instance t_Rem_455480749 : t_Rem ((t_u64)) ((t_u64)) := +#[global] Instance t_Rem_455480749 : t_Rem ((t_u64)) ((t_u64)) := { Rem_f_Output := t_u64; Rem_f_rem := fun (self : t_u64) (other : t_u64)=> @@ -2532,7 +2532,7 @@ Definition wrapping_rem390602260 (self : t_u64) (rhs : t_u64) : t_u64 := Definition wrapping_rem_euclid839264546 (self : t_u64) (rhs : t_u64) : t_u64 := Rem_f_rem (self) (rhs). -Instance t_Rem_412060686 : t_Rem ((t_u128)) ((t_u128)) := +#[global] Instance t_Rem_412060686 : t_Rem ((t_u128)) ((t_u128)) := { Rem_f_Output := t_u128; Rem_f_rem := fun (self : t_u128) (other : t_u128)=> @@ -2545,7 +2545,7 @@ Definition wrapping_rem332379920 (self : t_u128) (rhs : t_u128) : t_u128 := Definition wrapping_rem_euclid646122423 (self : t_u128) (rhs : t_u128) : t_u128 := Rem_f_rem (self) (rhs). -Instance t_Rem_796467486 : t_Rem ((t_usize)) ((t_usize)) := +#[global] Instance t_Rem_796467486 : t_Rem ((t_usize)) ((t_usize)) := { Rem_f_Output := t_usize; Rem_f_rem := fun (self : t_usize) (other : t_usize)=> @@ -2558,651 +2558,651 @@ Definition wrapping_rem333089373 (self : t_usize) (rhs : t_usize) : t_usize := Definition wrapping_rem_euclid769656504 (self : t_usize) (rhs : t_usize) : t_usize := Rem_f_rem (self) (rhs). -Instance t_Shr_1061808511 : t_Shr ((t_u8)) ((t_u8)) := +#[global] Instance t_Shr_1061808511 : t_Shr ((t_u8)) ((t_u8)) := { Shr_f_Output := t_u8; Shr_f_shr := fun (self : t_u8) (other : t_u8)=> Build_t_u8 (Shr_f_shr (u8_0 self) (u8_0 other)); }. -Instance t_Shr_590944100 : t_Shr ((t_u8)) ((t_u16)) := +#[global] Instance t_Shr_590944100 : t_Shr ((t_u8)) ((t_u16)) := { Shr_f_Output := t_u8; Shr_f_shr := fun (self : t_u8) (other : t_u16)=> Build_t_u8 (Shr_f_shr (u8_0 self) (u16_0 other)); }. -Instance t_Shr_267395304 : t_Shr ((t_u8)) ((t_u32)) := +#[global] Instance t_Shr_267395304 : t_Shr ((t_u8)) ((t_u32)) := { Shr_f_Output := t_u8; Shr_f_shr := fun (self : t_u8) (other : t_u32)=> Build_t_u8 (Shr_f_shr (u8_0 self) (u32_0 other)); }. -Instance t_Shr_922719969 : t_Shr ((t_u8)) ((t_u64)) := +#[global] Instance t_Shr_922719969 : t_Shr ((t_u8)) ((t_u64)) := { Shr_f_Output := t_u8; Shr_f_shr := fun (self : t_u8) (other : t_u64)=> Build_t_u8 (Shr_f_shr (u8_0 self) (u64_0 other)); }. -Instance t_Shr_138723873 : t_Shr ((t_u8)) ((t_u128)) := +#[global] Instance t_Shr_138723873 : t_Shr ((t_u8)) ((t_u128)) := { Shr_f_Output := t_u8; Shr_f_shr := fun (self : t_u8) (other : t_u128)=> Build_t_u8 (Shr_f_shr (u8_0 self) (u128_0 other)); }. -Instance t_Shr_558887005 : t_Shr ((t_u8)) ((t_usize)) := +#[global] Instance t_Shr_558887005 : t_Shr ((t_u8)) ((t_usize)) := { Shr_f_Output := t_u8; Shr_f_shr := fun (self : t_u8) (other : t_usize)=> Build_t_u8 (Shr_f_shr (u8_0 self) (usize_0 other)); }. -Instance t_Shr_170693446 : t_Shr ((t_u16)) ((t_u8)) := +#[global] Instance t_Shr_170693446 : t_Shr ((t_u16)) ((t_u8)) := { Shr_f_Output := t_u16; Shr_f_shr := fun (self : t_u16) (other : t_u8)=> Build_t_u16 (Shr_f_shr (u16_0 self) (u8_0 other)); }. -Instance t_Shr_899863737 : t_Shr ((t_u16)) ((t_u16)) := +#[global] Instance t_Shr_899863737 : t_Shr ((t_u16)) ((t_u16)) := { Shr_f_Output := t_u16; Shr_f_shr := fun (self : t_u16) (other : t_u16)=> Build_t_u16 (Shr_f_shr (u16_0 self) (u16_0 other)); }. -Instance t_Shr_290867596 : t_Shr ((t_u16)) ((t_u32)) := +#[global] Instance t_Shr_290867596 : t_Shr ((t_u16)) ((t_u32)) := { Shr_f_Output := t_u16; Shr_f_shr := fun (self : t_u16) (other : t_u32)=> Build_t_u16 (Shr_f_shr (u16_0 self) (u32_0 other)); }. -Instance t_Shr_630800316 : t_Shr ((t_u16)) ((t_u64)) := +#[global] Instance t_Shr_630800316 : t_Shr ((t_u16)) ((t_u64)) := { Shr_f_Output := t_u16; Shr_f_shr := fun (self : t_u16) (other : t_u64)=> Build_t_u16 (Shr_f_shr (u16_0 self) (u64_0 other)); }. -Instance t_Shr_51138976 : t_Shr ((t_u16)) ((t_u128)) := +#[global] Instance t_Shr_51138976 : t_Shr ((t_u16)) ((t_u128)) := { Shr_f_Output := t_u16; Shr_f_shr := fun (self : t_u16) (other : t_u128)=> Build_t_u16 (Shr_f_shr (u16_0 self) (u128_0 other)); }. -Instance t_Shr_82567397 : t_Shr ((t_u16)) ((t_usize)) := +#[global] Instance t_Shr_82567397 : t_Shr ((t_u16)) ((t_usize)) := { Shr_f_Output := t_u16; Shr_f_shr := fun (self : t_u16) (other : t_usize)=> Build_t_u16 (Shr_f_shr (u16_0 self) (usize_0 other)); }. -Instance t_Shr_430948219 : t_Shr ((t_u32)) ((t_u8)) := +#[global] Instance t_Shr_430948219 : t_Shr ((t_u32)) ((t_u8)) := { Shr_f_Output := t_u32; Shr_f_shr := fun (self : t_u32) (other : t_u8)=> Build_t_u32 (Shr_f_shr (u32_0 self) (u8_0 other)); }. -Instance t_Shr_157675832 : t_Shr ((t_u32)) ((t_u16)) := +#[global] Instance t_Shr_157675832 : t_Shr ((t_u32)) ((t_u16)) := { Shr_f_Output := t_u32; Shr_f_shr := fun (self : t_u32) (other : t_u16)=> Build_t_u32 (Shr_f_shr (u32_0 self) (u16_0 other)); }. -Instance t_Shr_708845947 : t_Shr ((t_u32)) ((t_u32)) := +#[global] Instance t_Shr_708845947 : t_Shr ((t_u32)) ((t_u32)) := { Shr_f_Output := t_u32; Shr_f_shr := fun (self : t_u32) (other : t_u32)=> Build_t_u32 (Shr_f_shr (u32_0 self) (u32_0 other)); }. -Instance t_Shr_1060262347 : t_Shr ((t_u32)) ((t_u64)) := +#[global] Instance t_Shr_1060262347 : t_Shr ((t_u32)) ((t_u64)) := { Shr_f_Output := t_u32; Shr_f_shr := fun (self : t_u32) (other : t_u64)=> Build_t_u32 (Shr_f_shr (u32_0 self) (u64_0 other)); }. -Instance t_Shr_372764217 : t_Shr ((t_u32)) ((t_u128)) := +#[global] Instance t_Shr_372764217 : t_Shr ((t_u32)) ((t_u128)) := { Shr_f_Output := t_u32; Shr_f_shr := fun (self : t_u32) (other : t_u128)=> Build_t_u32 (Shr_f_shr (u32_0 self) (u128_0 other)); }. -Instance t_Shr_534962338 : t_Shr ((t_u32)) ((t_usize)) := +#[global] Instance t_Shr_534962338 : t_Shr ((t_u32)) ((t_usize)) := { Shr_f_Output := t_u32; Shr_f_shr := fun (self : t_u32) (other : t_usize)=> Build_t_u32 (Shr_f_shr (u32_0 self) (usize_0 other)); }. -Instance t_Shr_45695168 : t_Shr ((t_u64)) ((t_u8)) := +#[global] Instance t_Shr_45695168 : t_Shr ((t_u64)) ((t_u8)) := { Shr_f_Output := t_u64; Shr_f_shr := fun (self : t_u64) (other : t_u8)=> Build_t_u64 (Shr_f_shr (u64_0 self) (u8_0 other)); }. -Instance t_Shr_1027310629 : t_Shr ((t_u64)) ((t_u16)) := +#[global] Instance t_Shr_1027310629 : t_Shr ((t_u64)) ((t_u16)) := { Shr_f_Output := t_u64; Shr_f_shr := fun (self : t_u64) (other : t_u16)=> Build_t_u64 (Shr_f_shr (u64_0 self) (u16_0 other)); }. -Instance t_Shr_357793917 : t_Shr ((t_u64)) ((t_u32)) := +#[global] Instance t_Shr_357793917 : t_Shr ((t_u64)) ((t_u32)) := { Shr_f_Output := t_u64; Shr_f_shr := fun (self : t_u64) (other : t_u32)=> Build_t_u64 (Shr_f_shr (u64_0 self) (u32_0 other)); }. -Instance t_Shr_1038705817 : t_Shr ((t_u64)) ((t_u64)) := +#[global] Instance t_Shr_1038705817 : t_Shr ((t_u64)) ((t_u64)) := { Shr_f_Output := t_u64; Shr_f_shr := fun (self : t_u64) (other : t_u64)=> Build_t_u64 (Shr_f_shr (u64_0 self) (u64_0 other)); }. -Instance t_Shr_567649567 : t_Shr ((t_u64)) ((t_u128)) := +#[global] Instance t_Shr_567649567 : t_Shr ((t_u64)) ((t_u128)) := { Shr_f_Output := t_u64; Shr_f_shr := fun (self : t_u64) (other : t_u128)=> Build_t_u64 (Shr_f_shr (u64_0 self) (u128_0 other)); }. -Instance t_Shr_380280894 : t_Shr ((t_u64)) ((t_usize)) := +#[global] Instance t_Shr_380280894 : t_Shr ((t_u64)) ((t_usize)) := { Shr_f_Output := t_u64; Shr_f_shr := fun (self : t_u64) (other : t_usize)=> Build_t_u64 (Shr_f_shr (u64_0 self) (usize_0 other)); }. -Instance t_Shr_555027554 : t_Shr ((t_u128)) ((t_u8)) := +#[global] Instance t_Shr_555027554 : t_Shr ((t_u128)) ((t_u8)) := { Shr_f_Output := t_u128; Shr_f_shr := fun (self : t_u128) (other : t_u8)=> Build_t_u128 (Shr_f_shr (u128_0 self) (u8_0 other)); }. -Instance t_Shr_225523666 : t_Shr ((t_u128)) ((t_u16)) := +#[global] Instance t_Shr_225523666 : t_Shr ((t_u128)) ((t_u16)) := { Shr_f_Output := t_u128; Shr_f_shr := fun (self : t_u128) (other : t_u16)=> Build_t_u128 (Shr_f_shr (u128_0 self) (u16_0 other)); }. -Instance t_Shr_910916464 : t_Shr ((t_u128)) ((t_u32)) := +#[global] Instance t_Shr_910916464 : t_Shr ((t_u128)) ((t_u32)) := { Shr_f_Output := t_u128; Shr_f_shr := fun (self : t_u128) (other : t_u32)=> Build_t_u128 (Shr_f_shr (u128_0 self) (u32_0 other)); }. -Instance t_Shr_137291592 : t_Shr ((t_u128)) ((t_u64)) := +#[global] Instance t_Shr_137291592 : t_Shr ((t_u128)) ((t_u64)) := { Shr_f_Output := t_u128; Shr_f_shr := fun (self : t_u128) (other : t_u64)=> Build_t_u128 (Shr_f_shr (u128_0 self) (u64_0 other)); }. -Instance t_Shr_1070013296 : t_Shr ((t_u128)) ((t_u128)) := +#[global] Instance t_Shr_1070013296 : t_Shr ((t_u128)) ((t_u128)) := { Shr_f_Output := t_u128; Shr_f_shr := fun (self : t_u128) (other : t_u128)=> Build_t_u128 (Shr_f_shr (u128_0 self) (u128_0 other)); }. -Instance t_Shr_1009428374 : t_Shr ((t_u128)) ((t_usize)) := +#[global] Instance t_Shr_1009428374 : t_Shr ((t_u128)) ((t_usize)) := { Shr_f_Output := t_u128; Shr_f_shr := fun (self : t_u128) (other : t_usize)=> Build_t_u128 (Shr_f_shr (u128_0 self) (usize_0 other)); }. -Instance t_Shr_94723353 : t_Shr ((t_usize)) ((t_u8)) := +#[global] Instance t_Shr_94723353 : t_Shr ((t_usize)) ((t_u8)) := { Shr_f_Output := t_usize; Shr_f_shr := fun (self : t_usize) (other : t_u8)=> Build_t_usize (Shr_f_shr (usize_0 self) (u8_0 other)); }. -Instance t_Shr_18219058 : t_Shr ((t_usize)) ((t_u16)) := +#[global] Instance t_Shr_18219058 : t_Shr ((t_usize)) ((t_u16)) := { Shr_f_Output := t_usize; Shr_f_shr := fun (self : t_usize) (other : t_u16)=> Build_t_usize (Shr_f_shr (usize_0 self) (u16_0 other)); }. -Instance t_Shr_14441839 : t_Shr ((t_usize)) ((t_u32)) := +#[global] Instance t_Shr_14441839 : t_Shr ((t_usize)) ((t_u32)) := { Shr_f_Output := t_usize; Shr_f_shr := fun (self : t_usize) (other : t_u32)=> Build_t_usize (Shr_f_shr (usize_0 self) (u32_0 other)); }. -Instance t_Shr_642676920 : t_Shr ((t_usize)) ((t_u64)) := +#[global] Instance t_Shr_642676920 : t_Shr ((t_usize)) ((t_u64)) := { Shr_f_Output := t_usize; Shr_f_shr := fun (self : t_usize) (other : t_u64)=> Build_t_usize (Shr_f_shr (usize_0 self) (u64_0 other)); }. -Instance t_Shr_65876869 : t_Shr ((t_usize)) ((t_u128)) := +#[global] Instance t_Shr_65876869 : t_Shr ((t_usize)) ((t_u128)) := { Shr_f_Output := t_usize; Shr_f_shr := fun (self : t_usize) (other : t_u128)=> Build_t_usize (Shr_f_shr (usize_0 self) (u128_0 other)); }. -Instance t_Shr_833436714 : t_Shr ((t_usize)) ((t_usize)) := +#[global] Instance t_Shr_833436714 : t_Shr ((t_usize)) ((t_usize)) := { Shr_f_Output := t_usize; Shr_f_shr := fun (self : t_usize) (other : t_usize)=> Build_t_usize (Shr_f_shr (usize_0 self) (usize_0 other)); }. -Instance t_Shl_161455974 : t_Shl ((t_u8)) ((t_u8)) := +#[global] Instance t_Shl_161455974 : t_Shl ((t_u8)) ((t_u8)) := { Shl_f_Output := t_u8; Shl_f_shl := fun (self : t_u8) (other : t_u8)=> Build_t_u8 (Shl_f_shl (u8_0 self) (u8_0 other)); }. -Instance t_Shl_861055562 : t_Shl ((t_u8)) ((t_u16)) := +#[global] Instance t_Shl_861055562 : t_Shl ((t_u8)) ((t_u16)) := { Shl_f_Output := t_u8; Shl_f_shl := fun (self : t_u8) (other : t_u16)=> Build_t_u8 (Shl_f_shl (u8_0 self) (u16_0 other)); }. -Instance t_Shl_479938796 : t_Shl ((t_u8)) ((t_u32)) := +#[global] Instance t_Shl_479938796 : t_Shl ((t_u8)) ((t_u32)) := { Shl_f_Output := t_u8; Shl_f_shl := fun (self : t_u8) (other : t_u32)=> Build_t_u8 (Shl_f_shl (u8_0 self) (u32_0 other)); }. -Instance t_Shl_373462431 : t_Shl ((t_u8)) ((t_u64)) := +#[global] Instance t_Shl_373462431 : t_Shl ((t_u8)) ((t_u64)) := { Shl_f_Output := t_u8; Shl_f_shl := fun (self : t_u8) (other : t_u64)=> Build_t_u8 (Shl_f_shl (u8_0 self) (u64_0 other)); }. -Instance t_Shl_356733585 : t_Shl ((t_u8)) ((t_u128)) := +#[global] Instance t_Shl_356733585 : t_Shl ((t_u8)) ((t_u128)) := { Shl_f_Output := t_u8; Shl_f_shl := fun (self : t_u8) (other : t_u128)=> Build_t_u8 (Shl_f_shl (u8_0 self) (u128_0 other)); }. -Instance t_Shl_138823384 : t_Shl ((t_u8)) ((t_usize)) := +#[global] Instance t_Shl_138823384 : t_Shl ((t_u8)) ((t_usize)) := { Shl_f_Output := t_u8; Shl_f_shl := fun (self : t_u8) (other : t_usize)=> Build_t_u8 (Shl_f_shl (u8_0 self) (usize_0 other)); }. -Instance t_Shl_492599436 : t_Shl ((t_u16)) ((t_u8)) := +#[global] Instance t_Shl_492599436 : t_Shl ((t_u16)) ((t_u8)) := { Shl_f_Output := t_u16; Shl_f_shl := fun (self : t_u16) (other : t_u8)=> Build_t_u16 (Shl_f_shl (u16_0 self) (u8_0 other)); }. -Instance t_Shl_254997522 : t_Shl ((t_u16)) ((t_u16)) := +#[global] Instance t_Shl_254997522 : t_Shl ((t_u16)) ((t_u16)) := { Shl_f_Output := t_u16; Shl_f_shl := fun (self : t_u16) (other : t_u16)=> Build_t_u16 (Shl_f_shl (u16_0 self) (u16_0 other)); }. -Instance t_Shl_840888059 : t_Shl ((t_u16)) ((t_u32)) := +#[global] Instance t_Shl_840888059 : t_Shl ((t_u16)) ((t_u32)) := { Shl_f_Output := t_u16; Shl_f_shl := fun (self : t_u16) (other : t_u32)=> Build_t_u16 (Shl_f_shl (u16_0 self) (u32_0 other)); }. -Instance t_Shl_1017206779 : t_Shl ((t_u16)) ((t_u64)) := +#[global] Instance t_Shl_1017206779 : t_Shl ((t_u16)) ((t_u64)) := { Shl_f_Output := t_u16; Shl_f_shl := fun (self : t_u16) (other : t_u64)=> Build_t_u16 (Shl_f_shl (u16_0 self) (u64_0 other)); }. -Instance t_Shl_751151164 : t_Shl ((t_u16)) ((t_u128)) := +#[global] Instance t_Shl_751151164 : t_Shl ((t_u16)) ((t_u128)) := { Shl_f_Output := t_u16; Shl_f_shl := fun (self : t_u16) (other : t_u128)=> Build_t_u16 (Shl_f_shl (u16_0 self) (u128_0 other)); }. -Instance t_Shl_303578486 : t_Shl ((t_u16)) ((t_usize)) := +#[global] Instance t_Shl_303578486 : t_Shl ((t_u16)) ((t_usize)) := { Shl_f_Output := t_u16; Shl_f_shl := fun (self : t_u16) (other : t_usize)=> Build_t_u16 (Shl_f_shl (u16_0 self) (usize_0 other)); }. -Instance t_Shl_186069032 : t_Shl ((t_u32)) ((t_u8)) := +#[global] Instance t_Shl_186069032 : t_Shl ((t_u32)) ((t_u8)) := { Shl_f_Output := t_u32; Shl_f_shl := fun (self : t_u32) (other : t_u8)=> Build_t_u32 (Shl_f_shl (u32_0 self) (u8_0 other)); }. -Instance t_Shl_320616735 : t_Shl ((t_u32)) ((t_u16)) := +#[global] Instance t_Shl_320616735 : t_Shl ((t_u32)) ((t_u16)) := { Shl_f_Output := t_u32; Shl_f_shl := fun (self : t_u32) (other : t_u16)=> Build_t_u32 (Shl_f_shl (u32_0 self) (u16_0 other)); }. -Instance t_Shl_325940784 : t_Shl ((t_u32)) ((t_u32)) := +#[global] Instance t_Shl_325940784 : t_Shl ((t_u32)) ((t_u32)) := { Shl_f_Output := t_u32; Shl_f_shl := fun (self : t_u32) (other : t_u32)=> Build_t_u32 (Shl_f_shl (u32_0 self) (u32_0 other)); }. -Instance t_Shl_398883535 : t_Shl ((t_u32)) ((t_u64)) := +#[global] Instance t_Shl_398883535 : t_Shl ((t_u32)) ((t_u64)) := { Shl_f_Output := t_u32; Shl_f_shl := fun (self : t_u32) (other : t_u64)=> Build_t_u32 (Shl_f_shl (u32_0 self) (u64_0 other)); }. -Instance t_Shl_700909976 : t_Shl ((t_u32)) ((t_u128)) := +#[global] Instance t_Shl_700909976 : t_Shl ((t_u32)) ((t_u128)) := { Shl_f_Output := t_u32; Shl_f_shl := fun (self : t_u32) (other : t_u128)=> Build_t_u32 (Shl_f_shl (u32_0 self) (u128_0 other)); }. -Instance t_Shl_475027367 : t_Shl ((t_u32)) ((t_usize)) := +#[global] Instance t_Shl_475027367 : t_Shl ((t_u32)) ((t_usize)) := { Shl_f_Output := t_u32; Shl_f_shl := fun (self : t_u32) (other : t_usize)=> Build_t_u32 (Shl_f_shl (u32_0 self) (usize_0 other)); }. -Instance t_Shl_620046856 : t_Shl ((t_u64)) ((t_u8)) := +#[global] Instance t_Shl_620046856 : t_Shl ((t_u64)) ((t_u8)) := { Shl_f_Output := t_u64; Shl_f_shl := fun (self : t_u64) (other : t_u8)=> Build_t_u64 (Shl_f_shl (u64_0 self) (u8_0 other)); }. -Instance t_Shl_158077515 : t_Shl ((t_u64)) ((t_u16)) := +#[global] Instance t_Shl_158077515 : t_Shl ((t_u64)) ((t_u16)) := { Shl_f_Output := t_u64; Shl_f_shl := fun (self : t_u64) (other : t_u16)=> Build_t_u64 (Shl_f_shl (u64_0 self) (u16_0 other)); }. -Instance t_Shl_1071441050 : t_Shl ((t_u64)) ((t_u32)) := +#[global] Instance t_Shl_1071441050 : t_Shl ((t_u64)) ((t_u32)) := { Shl_f_Output := t_u64; Shl_f_shl := fun (self : t_u64) (other : t_u32)=> Build_t_u64 (Shl_f_shl (u64_0 self) (u32_0 other)); }. -Instance t_Shl_581241894 : t_Shl ((t_u64)) ((t_u64)) := +#[global] Instance t_Shl_581241894 : t_Shl ((t_u64)) ((t_u64)) := { Shl_f_Output := t_u64; Shl_f_shl := fun (self : t_u64) (other : t_u64)=> Build_t_u64 (Shl_f_shl (u64_0 self) (u64_0 other)); }. -Instance t_Shl_916302310 : t_Shl ((t_u64)) ((t_u128)) := +#[global] Instance t_Shl_916302310 : t_Shl ((t_u64)) ((t_u128)) := { Shl_f_Output := t_u64; Shl_f_shl := fun (self : t_u64) (other : t_u128)=> Build_t_u64 (Shl_f_shl (u64_0 self) (u128_0 other)); }. -Instance t_Shl_59609547 : t_Shl ((t_u64)) ((t_usize)) := +#[global] Instance t_Shl_59609547 : t_Shl ((t_u64)) ((t_usize)) := { Shl_f_Output := t_u64; Shl_f_shl := fun (self : t_u64) (other : t_usize)=> Build_t_u64 (Shl_f_shl (u64_0 self) (usize_0 other)); }. -Instance t_Shl_308574333 : t_Shl ((t_u128)) ((t_u8)) := +#[global] Instance t_Shl_308574333 : t_Shl ((t_u128)) ((t_u8)) := { Shl_f_Output := t_u128; Shl_f_shl := fun (self : t_u128) (other : t_u8)=> Build_t_u128 (Shl_f_shl (u128_0 self) (u8_0 other)); }. -Instance t_Shl_966677877 : t_Shl ((t_u128)) ((t_u16)) := +#[global] Instance t_Shl_966677877 : t_Shl ((t_u128)) ((t_u16)) := { Shl_f_Output := t_u128; Shl_f_shl := fun (self : t_u128) (other : t_u16)=> Build_t_u128 (Shl_f_shl (u128_0 self) (u16_0 other)); }. -Instance t_Shl_38932717 : t_Shl ((t_u128)) ((t_u32)) := +#[global] Instance t_Shl_38932717 : t_Shl ((t_u128)) ((t_u32)) := { Shl_f_Output := t_u128; Shl_f_shl := fun (self : t_u128) (other : t_u32)=> Build_t_u128 (Shl_f_shl (u128_0 self) (u32_0 other)); }. -Instance t_Shl_108085956 : t_Shl ((t_u128)) ((t_u64)) := +#[global] Instance t_Shl_108085956 : t_Shl ((t_u128)) ((t_u64)) := { Shl_f_Output := t_u128; Shl_f_shl := fun (self : t_u128) (other : t_u64)=> Build_t_u128 (Shl_f_shl (u128_0 self) (u64_0 other)); }. -Instance t_Shl_489587677 : t_Shl ((t_u128)) ((t_u128)) := +#[global] Instance t_Shl_489587677 : t_Shl ((t_u128)) ((t_u128)) := { Shl_f_Output := t_u128; Shl_f_shl := fun (self : t_u128) (other : t_u128)=> Build_t_u128 (Shl_f_shl (u128_0 self) (u128_0 other)); }. -Instance t_Shl_837150634 : t_Shl ((t_u128)) ((t_usize)) := +#[global] Instance t_Shl_837150634 : t_Shl ((t_u128)) ((t_usize)) := { Shl_f_Output := t_u128; Shl_f_shl := fun (self : t_u128) (other : t_usize)=> Build_t_u128 (Shl_f_shl (u128_0 self) (usize_0 other)); }. -Instance t_Shl_736165651 : t_Shl ((t_usize)) ((t_u8)) := +#[global] Instance t_Shl_736165651 : t_Shl ((t_usize)) ((t_u8)) := { Shl_f_Output := t_usize; Shl_f_shl := fun (self : t_usize) (other : t_u8)=> Build_t_usize (Shl_f_shl (usize_0 self) (u8_0 other)); }. -Instance t_Shl_740886741 : t_Shl ((t_usize)) ((t_u16)) := +#[global] Instance t_Shl_740886741 : t_Shl ((t_usize)) ((t_u16)) := { Shl_f_Output := t_usize; Shl_f_shl := fun (self : t_usize) (other : t_u16)=> Build_t_usize (Shl_f_shl (usize_0 self) (u16_0 other)); }. -Instance t_Shl_683246358 : t_Shl ((t_usize)) ((t_u32)) := +#[global] Instance t_Shl_683246358 : t_Shl ((t_usize)) ((t_u32)) := { Shl_f_Output := t_usize; Shl_f_shl := fun (self : t_usize) (other : t_u32)=> Build_t_usize (Shl_f_shl (usize_0 self) (u32_0 other)); }. -Instance t_Shl_436746920 : t_Shl ((t_usize)) ((t_u64)) := +#[global] Instance t_Shl_436746920 : t_Shl ((t_usize)) ((t_u64)) := { Shl_f_Output := t_usize; Shl_f_shl := fun (self : t_usize) (other : t_u64)=> Build_t_usize (Shl_f_shl (usize_0 self) (u64_0 other)); }. -Instance t_Shl_527409353 : t_Shl ((t_usize)) ((t_u128)) := +#[global] Instance t_Shl_527409353 : t_Shl ((t_usize)) ((t_u128)) := { Shl_f_Output := t_usize; Shl_f_shl := fun (self : t_usize) (other : t_u128)=> Build_t_usize (Shl_f_shl (usize_0 self) (u128_0 other)); }. -Instance t_Shl_982380013 : t_Shl ((t_usize)) ((t_usize)) := +#[global] Instance t_Shl_982380013 : t_Shl ((t_usize)) ((t_usize)) := { Shl_f_Output := t_usize; Shl_f_shl := fun (self : t_usize) (other : t_usize)=> Build_t_usize (Shl_f_shl (usize_0 self) (usize_0 other)); }. -Instance t_BitOr_669654947 : t_BitOr ((t_u8)) ((t_u8)) := +#[global] Instance t_BitOr_669654947 : t_BitOr ((t_u8)) ((t_u8)) := { BitOr_f_Output := t_u8; BitOr_f_bitor := fun (self : t_u8) (other : t_u8)=> Build_t_u8 (BitOr_f_bitor (u8_0 self) (u8_0 other)); }. -Instance t_BitOr_892941557 : t_BitOr ((t_u16)) ((t_u16)) := +#[global] Instance t_BitOr_892941557 : t_BitOr ((t_u16)) ((t_u16)) := { BitOr_f_Output := t_u16; BitOr_f_bitor := fun (self : t_u16) (other : t_u16)=> Build_t_u16 (BitOr_f_bitor (u16_0 self) (u16_0 other)); }. -Instance t_BitOr_991330847 : t_BitOr ((t_u32)) ((t_u32)) := +#[global] Instance t_BitOr_991330847 : t_BitOr ((t_u32)) ((t_u32)) := { BitOr_f_Output := t_u32; BitOr_f_bitor := fun (self : t_u32) (other : t_u32)=> Build_t_u32 (BitOr_f_bitor (u32_0 self) (u32_0 other)); }. -Instance t_BitOr_692971983 : t_BitOr ((t_u64)) ((t_u64)) := +#[global] Instance t_BitOr_692971983 : t_BitOr ((t_u64)) ((t_u64)) := { BitOr_f_Output := t_u64; BitOr_f_bitor := fun (self : t_u64) (other : t_u64)=> Build_t_u64 (BitOr_f_bitor (u64_0 self) (u64_0 other)); }. -Instance t_BitOr_227319538 : t_BitOr ((t_u128)) ((t_u128)) := +#[global] Instance t_BitOr_227319538 : t_BitOr ((t_u128)) ((t_u128)) := { BitOr_f_Output := t_u128; BitOr_f_bitor := fun (self : t_u128) (other : t_u128)=> Build_t_u128 (BitOr_f_bitor (u128_0 self) (u128_0 other)); }. -Instance t_BitOr_669787696 : t_BitOr ((t_usize)) ((t_usize)) := +#[global] Instance t_BitOr_669787696 : t_BitOr ((t_usize)) ((t_usize)) := { BitOr_f_Output := t_usize; BitOr_f_bitor := fun (self : t_usize) (other : t_usize)=> Build_t_usize (BitOr_f_bitor (usize_0 self) (usize_0 other)); }. -Instance t_BitXor_327788827 : t_BitXor ((t_u8)) ((t_u8)) := +#[global] Instance t_BitXor_327788827 : t_BitXor ((t_u8)) ((t_u8)) := { BitXor_f_Output := t_u8; BitXor_f_bitxor := fun (self : t_u8) (other : t_u8)=> Build_t_u8 (BitXor_f_bitxor (u8_0 self) (u8_0 other)); }. -Instance t_BitXor_661040931 : t_BitXor ((t_u16)) ((t_u16)) := +#[global] Instance t_BitXor_661040931 : t_BitXor ((t_u16)) ((t_u16)) := { BitXor_f_Output := t_u16; BitXor_f_bitxor := fun (self : t_u16) (other : t_u16)=> Build_t_u16 (BitXor_f_bitxor (u16_0 self) (u16_0 other)); }. -Instance t_BitXor_222957020 : t_BitXor ((t_u32)) ((t_u32)) := +#[global] Instance t_BitXor_222957020 : t_BitXor ((t_u32)) ((t_u32)) := { BitXor_f_Output := t_u32; BitXor_f_bitxor := fun (self : t_u32) (other : t_u32)=> Build_t_u32 (BitXor_f_bitxor (u32_0 self) (u32_0 other)); }. -Instance t_BitXor_530545977 : t_BitXor ((t_u64)) ((t_u64)) := +#[global] Instance t_BitXor_530545977 : t_BitXor ((t_u64)) ((t_u64)) := { BitXor_f_Output := t_u64; BitXor_f_bitxor := fun (self : t_u64) (other : t_u64)=> Build_t_u64 (BitXor_f_bitxor (u64_0 self) (u64_0 other)); }. -Instance t_BitXor_112780081 : t_BitXor ((t_u128)) ((t_u128)) := +#[global] Instance t_BitXor_112780081 : t_BitXor ((t_u128)) ((t_u128)) := { BitXor_f_Output := t_u128; BitXor_f_bitxor := fun (self : t_u128) (other : t_u128)=> Build_t_u128 (BitXor_f_bitxor (u128_0 self) (u128_0 other)); }. -Instance t_BitXor_969810999 : t_BitXor ((t_usize)) ((t_usize)) := +#[global] Instance t_BitXor_969810999 : t_BitXor ((t_usize)) ((t_usize)) := { BitXor_f_Output := t_usize; BitXor_f_bitxor := fun (self : t_usize) (other : t_usize)=> Build_t_usize (BitXor_f_bitxor (usize_0 self) (usize_0 other)); }. -Instance t_BitAnd_126469303 : t_BitAnd ((t_u8)) ((t_u8)) := +#[global] Instance t_BitAnd_126469303 : t_BitAnd ((t_u8)) ((t_u8)) := { BitAnd_f_Output := t_u8; BitAnd_f_bitand := fun (self : t_u8) (other : t_u8)=> Build_t_u8 (BitAnd_f_bitand (u8_0 self) (u8_0 other)); }. -Instance t_BitAnd_531525101 : t_BitAnd ((t_u16)) ((t_u16)) := +#[global] Instance t_BitAnd_531525101 : t_BitAnd ((t_u16)) ((t_u16)) := { BitAnd_f_Output := t_u16; BitAnd_f_bitand := fun (self : t_u16) (other : t_u16)=> Build_t_u16 (BitAnd_f_bitand (u16_0 self) (u16_0 other)); }. -Instance t_BitAnd_24728760 : t_BitAnd ((t_u32)) ((t_u32)) := +#[global] Instance t_BitAnd_24728760 : t_BitAnd ((t_u32)) ((t_u32)) := { BitAnd_f_Output := t_u32; BitAnd_f_bitand := fun (self : t_u32) (other : t_u32)=> Build_t_u32 (BitAnd_f_bitand (u32_0 self) (u32_0 other)); }. -Instance t_BitAnd_35845574 : t_BitAnd ((t_u64)) ((t_u64)) := +#[global] Instance t_BitAnd_35845574 : t_BitAnd ((t_u64)) ((t_u64)) := { BitAnd_f_Output := t_u64; BitAnd_f_bitand := fun (self : t_u64) (other : t_u64)=> Build_t_u64 (BitAnd_f_bitand (u64_0 self) (u64_0 other)); }. -Instance t_BitAnd_396424214 : t_BitAnd ((t_u128)) ((t_u128)) := +#[global] Instance t_BitAnd_396424214 : t_BitAnd ((t_u128)) ((t_u128)) := { BitAnd_f_Output := t_u128; BitAnd_f_bitand := fun (self : t_u128) (other : t_u128)=> Build_t_u128 (BitAnd_f_bitand (u128_0 self) (u128_0 other)); }. -Instance t_BitAnd_652458180 : t_BitAnd ((t_usize)) ((t_usize)) := +#[global] Instance t_BitAnd_652458180 : t_BitAnd ((t_usize)) ((t_usize)) := { BitAnd_f_Output := t_usize; BitAnd_f_bitand := fun (self : t_usize) (other : t_usize)=> Build_t_usize (BitAnd_f_bitand (usize_0 self) (usize_0 other)); }. -Instance t_Sub_81344668 : t_Sub ((t_u8)) ((t_u8)) := +#[global] Instance t_Sub_81344668 : t_Sub ((t_u8)) ((t_u8)) := { Sub_f_Output := t_u8; Sub_f_sub := fun (self : t_u8) (other : t_u8)=> Build_t_u8 (Sub_f_sub (u8_0 self) (u8_0 other)); }. -Instance t_Sub_1011801854 : t_Sub ((t_u16)) ((t_u16)) := +#[global] Instance t_Sub_1011801854 : t_Sub ((t_u16)) ((t_u16)) := { Sub_f_Output := t_u16; Sub_f_sub := fun (self : t_u16) (other : t_u16)=> Build_t_u16 (Sub_f_sub (u16_0 self) (u16_0 other)); }. -Instance t_Sub_1070652436 : t_Sub ((t_u32)) ((t_u32)) := +#[global] Instance t_Sub_1070652436 : t_Sub ((t_u32)) ((t_u32)) := { Sub_f_Output := t_u32; Sub_f_sub := fun (self : t_u32) (other : t_u32)=> @@ -3341,42 +3341,42 @@ Program Definition rotate_right442734174 (self : t_usize) (n : t_u32) : t_usize ControlFlow_Continue (never_to_any (_ (* hoist12 *)))). Fail Next Obligation. -Instance t_Sub_788323603 : t_Sub ((t_u64)) ((t_u64)) := +#[global] Instance t_Sub_788323603 : t_Sub ((t_u64)) ((t_u64)) := { Sub_f_Output := t_u64; Sub_f_sub := fun (self : t_u64) (other : t_u64)=> Build_t_u64 (Sub_f_sub (u64_0 self) (u64_0 other)); }. -Instance t_Sub_1046324685 : t_Sub ((t_u128)) ((t_u128)) := +#[global] Instance t_Sub_1046324685 : t_Sub ((t_u128)) ((t_u128)) := { Sub_f_Output := t_u128; Sub_f_sub := fun (self : t_u128) (other : t_u128)=> Build_t_u128 (Sub_f_sub (u128_0 self) (u128_0 other)); }. -Instance t_Sub_1064369889 : t_Sub ((t_usize)) ((t_usize)) := +#[global] Instance t_Sub_1064369889 : t_Sub ((t_usize)) ((t_usize)) := { Sub_f_Output := t_usize; Sub_f_sub := fun (self : t_usize) (other : t_usize)=> Build_t_usize (Sub_f_sub (usize_0 self) (usize_0 other)); }. -(* Definition bswap_u128 (x : t_u128) : t_u128 := *) -(* let count : t_u128 := Into_f_into (0) in *) -(* let count := fold_range (0) (Into_f_into (v_BITS136999051)) (fun count _ => *) -(* true) (count) (fun count i => *) -(* let low_bit : t_u128 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) -(* let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in *) +(* Program Definition bswap_u128 (x : t_u128) : t_u128 := *) +(* let count : t_u128 := Into_f_into (0%N) in *) +(* let count := fold_range (Build_t_usize (Build_t_U64 0%N)) (Into_f_into (v_BITS136999051)) (fun count _ => *) +(* true) (count) (fun (count : t_u128) (i : t_usize) => *) +(* let low_bit : t_u128 := (* Into_f_into *) (BitAnd_f_bitand (t_BitAnd := _ : t_BitAnd t_u128 t_u128) (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1%N) : t_u128)) in *) +(* let count : t_u128 := Add_f_add (t_Add := t_Add_258013445 : t_Add t_u128 t_u128) (Shl_f_shl (t_Shl := t_Shl_38932717 : t_Shl t_u128 t_u32) (count) (Into_f_into (1%N) : t_u32)) (low_bit) in *) (* count) in *) (* count. *) -(* Definition bswap_u16 (x : t_u16) : t_u16 := *) +(* Program Definition bswap_u16 (x : t_u16) : t_u16 := *) (* let count : t_u16 := Into_f_into (0) in *) -(* let count := fold_range (0) (Into_f_into (v_BITS277333551)) (fun count _ => *) -(* true) (count) (fun count i => *) -(* let low_bit : t_u16 := Into_f_into (BitAnd_f_bitand (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1))) in *) -(* let count := Add_f_add (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in *) +(* let count := fold_range (Build_t_usize (Build_t_U64 0%N)) (Into_f_into (v_BITS277333551)) (fun count _ => *) +(* true) (count) (fun (count : t_u16) (i : t_usize) => *) +(* let low_bit : t_u16 := (* Into_f_into *) (BitAnd_f_bitand (t_BitAnd := _ : t_BitAnd t_u16 t_u16) (Shr_f_shr (Clone_f_clone (x)) (Into_f_into (i))) (Into_f_into (1%N) : t_u16)) in *) +(* let count := Add_f_add (t_Add := _ : t_Add _ _) (Shl_f_shl (count) (Into_f_into (1))) (low_bit) in *) (* count) in *) (* count. *) @@ -3776,49 +3776,49 @@ Instance t_Sub_1064369889 : t_Sub ((t_usize)) ((t_usize)) := (* run (let hoist30 := ControlFlow_Break (cttz_usize (self)) in *) (* ControlFlow_Continue (never_to_any (hoist30))). *) -Instance t_Div_345870802 : t_Div ((t_i8)) ((t_i8)) := +#[global] Instance t_Div_345870802 : t_Div ((t_i8)) ((t_i8)) := { Div_f_Output := t_i8; Div_f_div := fun (self : t_i8) (other : t_i8)=> Build_t_i8 (Div_f_div (i8_0 self) (i8_0 other)); }. -Instance t_Div_69196905 : t_Div ((t_i16)) ((t_i16)) := +#[global] Instance t_Div_69196905 : t_Div ((t_i16)) ((t_i16)) := { Div_f_Output := t_i16; Div_f_div := fun (self : t_i16) (other : t_i16)=> Build_t_i16 (Div_f_div (i16_0 self) (i16_0 other)); }. -Instance t_Div_222178666 : t_Div ((t_i32)) ((t_i32)) := +#[global] Instance t_Div_222178666 : t_Div ((t_i32)) ((t_i32)) := { Div_f_Output := t_i32; Div_f_div := fun (self : t_i32) (other : t_i32)=> Build_t_i32 (Div_f_div (i32_0 self) (i32_0 other)); }. -Instance t_Div_551701934 : t_Div ((t_i64)) ((t_i64)) := +#[global] Instance t_Div_551701934 : t_Div ((t_i64)) ((t_i64)) := { Div_f_Output := t_i64; Div_f_div := fun (self : t_i64) (other : t_i64)=> Build_t_i64 (Div_f_div (i64_0 self) (i64_0 other)); }. -Instance t_Div_650346214 : t_Div ((t_i128)) ((t_i128)) := +#[global] Instance t_Div_650346214 : t_Div ((t_i128)) ((t_i128)) := { Div_f_Output := t_i128; Div_f_div := fun (self : t_i128) (other : t_i128)=> Build_t_i128 (Div_f_div (i128_0 self) (i128_0 other)); }. -Instance t_Div_911978922 : t_Div ((t_isize)) ((t_isize)) := +#[global] Instance t_Div_911978922 : t_Div ((t_isize)) ((t_isize)) := { Div_f_Output := t_isize; Div_f_div := fun (self : t_isize) (other : t_isize)=> Build_t_isize (Div_f_div (isize_0 self) (isize_0 other)); }. -Instance t_Rem_580678374 : t_Rem ((t_i8)) ((t_i8)) := +#[global] Instance t_Rem_580678374 : t_Rem ((t_i8)) ((t_i8)) := { Rem_f_Output := t_i8; Rem_f_rem := fun (self : t_i8) (other : t_i8)=> @@ -3834,7 +3834,7 @@ Definition rem_euclid622298453 (self : t_i8) (rhs : t_i8) : t_i8 := else r. -Instance t_Rem_532407972 : t_Rem ((t_i16)) ((t_i16)) := +#[global] Instance t_Rem_532407972 : t_Rem ((t_i16)) ((t_i16)) := { Rem_f_Output := t_i16; Rem_f_rem := fun (self : t_i16) (other : t_i16)=> @@ -3850,7 +3850,7 @@ Definition rem_euclid158017644 (self : t_i16) (rhs : t_i16) : t_i16 := else r. -Instance t_Rem_406274620 : t_Rem ((t_i32)) ((t_i32)) := +#[global] Instance t_Rem_406274620 : t_Rem ((t_i32)) ((t_i32)) := { Rem_f_Output := t_i32; Rem_f_rem := fun (self : t_i32) (other : t_i32)=> @@ -3866,7 +3866,7 @@ Definition rem_euclid881249982 (self : t_i32) (rhs : t_i32) : t_i32 := else r. -Instance t_Rem_296096507 : t_Rem ((t_i64)) ((t_i64)) := +#[global] Instance t_Rem_296096507 : t_Rem ((t_i64)) ((t_i64)) := { Rem_f_Output := t_i64; Rem_f_rem := fun (self : t_i64) (other : t_i64)=> @@ -3882,7 +3882,7 @@ Definition rem_euclid1057082210 (self : t_i64) (rhs : t_i64) : t_i64 := else r. -Instance t_Rem_773614977 : t_Rem ((t_i128)) ((t_i128)) := +#[global] Instance t_Rem_773614977 : t_Rem ((t_i128)) ((t_i128)) := { Rem_f_Output := t_i128; Rem_f_rem := fun (self : t_i128) (other : t_i128)=> @@ -3898,7 +3898,7 @@ Definition rem_euclid254910751 (self : t_i128) (rhs : t_i128) : t_i128 := else r. -Instance t_Rem_136872616 : t_Rem ((t_isize)) ((t_isize)) := +#[global] Instance t_Rem_136872616 : t_Rem ((t_isize)) ((t_isize)) := { Rem_f_Output := t_isize; Rem_f_rem := fun (self : t_isize) (other : t_isize)=> @@ -3914,7 +3914,7 @@ Definition rem_euclid828379367 (self : t_isize) (rhs : t_isize) : t_isize := else r. -Instance t_Not_500984294 : t_Not ((t_u8)) := +#[global] Instance t_Not_500984294 : t_Not ((t_u8)) := { Not_f_Output := t_u8; Not_f_not := fun (self : t_u8)=> @@ -3930,7 +3930,7 @@ Instance t_Not_500984294 : t_Not ((t_u8)) := (* Definition trailing_ones359778731 (self : t_u8) : t_u32 := *) (* trailing_zeros572929871 (Not_f_not (self)). *) -Instance t_Not_560691647 : t_Not ((t_u16)) := +#[global] Instance t_Not_560691647 : t_Not ((t_u16)) := { Not_f_Output := t_u16; Not_f_not := fun (self : t_u16)=> @@ -3946,7 +3946,7 @@ Instance t_Not_560691647 : t_Not ((t_u16)) := (* Definition trailing_ones903944727 (self : t_u16) : t_u32 := *) (* trailing_zeros421474733 (Not_f_not (self)). *) -Instance t_Not_220208504 : t_Not ((t_u32)) := +#[global] Instance t_Not_220208504 : t_Not ((t_u32)) := { Not_f_Output := t_u32; Not_f_not := fun (self : t_u32)=> @@ -3962,7 +3962,7 @@ Instance t_Not_220208504 : t_Not ((t_u32)) := (* Definition trailing_ones223371510 (self : t_u32) : t_u32 := *) (* trailing_zeros1061560720 (Not_f_not (self)). *) -Instance t_Not_655044209 : t_Not ((t_u64)) := +#[global] Instance t_Not_655044209 : t_Not ((t_u64)) := { Not_f_Output := t_u64; Not_f_not := fun (self : t_u64)=> @@ -3978,7 +3978,7 @@ Instance t_Not_655044209 : t_Not ((t_u64)) := (* Definition trailing_ones601201120 (self : t_u64) : t_u32 := *) (* trailing_zeros188346231 (Not_f_not (self)). *) -Instance t_Not_851738617 : t_Not ((t_u128)) := +#[global] Instance t_Not_851738617 : t_Not ((t_u128)) := { Not_f_Output := t_u128; Not_f_not := fun (self : t_u128)=> @@ -3994,7 +3994,7 @@ Instance t_Not_851738617 : t_Not ((t_u128)) := (* Definition trailing_ones705845381 (self : t_u128) : t_u32 := *) (* trailing_zeros821715250 (Not_f_not (self)). *) -Instance t_Not_677551814 : t_Not ((t_usize)) := +#[global] Instance t_Not_677551814 : t_Not ((t_usize)) := { Not_f_Output := t_usize; Not_f_not := fun (self : t_usize)=> @@ -4022,7 +4022,7 @@ Notation "'TryFromSliceError'" := Build_t_TryFromSliceError. Definition t_Seq (v_T : Type) `{t_Sized (v_T)} : Type := list v_T. -Instance t_Clone_640571940 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Seq ((v_T)))) := +#[global] Instance t_Clone_640571940 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Seq ((v_T)))) := { Clone_f_clone := fun (self : t_Seq ((v_T)))=> self; @@ -4058,7 +4058,7 @@ Arguments Array_f_v {_} {_} {_}. #[export] Instance settable_t_Array `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} : Settable _ := settable! (@Build_t_Array v_T v_N _) . -Instance t_Clone_962303223 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Array ((v_T)) (v_N))) := +#[global] Instance t_Clone_962303223 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Array ((v_T)) (v_N))) := { Clone_f_clone := fun (self : t_Array ((v_T)) (v_N))=> Build_t_Array (Clone_f_clone (Array_f_v self)); @@ -4067,12 +4067,14 @@ Instance t_Clone_962303223 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_C Definition cast `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} (self : t_Array ((v_T)) (v_N)) : t_Slice ((v_T)) := Array_f_v self. -(* Instance t_Index_927562605 `{v_T : Type} `{v_I : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Sized (v_I)} `{t_Clone (v_T)} `{t_Index (t_Slice ((v_T))) (v_I)} : t_Index ((t_Array ((v_T)) (v_N))) ((v_I)) := *) -(* { *) -(* Index_f_Output := Index_f_Output; *) -(* Index_f_index := fun (self : t_Array ((v_T)) (v_N)) (index : v_I)=> *) -(* Index_f_index (cast (self)) (index); *) -(* }. *) +From Core Require Import Core_Ops_Index. + +Instance t_Index_927562605 `{v_T : Type} `{v_I : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Sized (v_I)} `{t_Clone (v_T)} `{t_Index (t_Slice ((v_T))) (v_I)} : t_Index ((t_Array ((v_T)) (v_N))) ((v_I)) := + { + Index_f_Output := Index_f_Output; + Index_f_index := fun (self : t_Array ((v_T)) (v_N)) (index : v_I)=> + Index_f_index (cast (self)) (index); + }. (* Instance t_From_684363179 `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_From ((t_Array (v_T) (v_N))) ((t_Array ((v_T)) (v_N))) := *) (* { *) @@ -4085,7 +4087,7 @@ Definition cast `{v_T : Type} `{v_N : t_usize} `{t_Sized (v_T)} `{t_Clone (v_T)} (* end; *) (* }. *) -Instance t_Index_324031838 `{v_T : Type} `{v_I : Type} `{t_Sized (v_T)} `{t_Sized (v_I)} `{v_SliceIndex (v_I) (t_Slice ((v_T)))} : t_Index ((t_Slice ((v_T)))) ((v_I)) := +#[global] Instance t_Index_324031838 `{v_T : Type} `{v_I : Type} `{t_Sized (v_T)} `{t_Sized (v_I)} `{v_SliceIndex (v_I) (t_Slice ((v_T)))} : t_Index ((t_Slice ((v_T)))) ((v_I)) := { Index_f_Output := SliceIndex_f_Output; Index_f_index := fun (self : t_Slice ((v_T))) (index : v_I)=> @@ -4542,10 +4544,24 @@ Definition match_list `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq (* end; *) (* }. *) -(* Instance v_SliceIndex_622480125 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : v_SliceIndex ((t_usize)) ((t_Slice ((v_T)))) := *) -(* { *) -(* SliceIndex_f_Output := v_T; *) -(* SliceIndex_f_index := fun (self : t_usize) (slice : t_Slice ((v_T)))=> *) -(* let x : t_usize := Into_f_into (U64_f_v usize_0 self) in *) -(* Index_f_index (Seq_f_v Slice_f_v slice) (x); *) -(* }. *) + +Check t_Index. +Check (t_Index_324031838 (v_T := nat) (v_I := t_usize)). +Instance v_SliceIndex_622480125 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : v_SliceIndex ((t_usize)) ((t_Slice ((v_T)))). +econstructor. +Unshelve. +2: exact v_T. +refine (let x : t_usize := Into_f_into (U64_f_v (usize_0 self)) in _). +refine ( + SliceIndex_f_Output := v_T; + SliceIndex_f_index := fun (self : t_usize) (slice : t_Slice ((v_T)))=> + let x : t_usize := Into_f_into (U64_f_v (usize_0 self)) in + Index_f_index (t_Index := _) (slice) (x); + }). + + { + SliceIndex_f_Output := v_T; + SliceIndex_f_index := fun (self : t_usize) (slice : t_Slice ((v_T)))=> + let x : t_usize := Into_f_into (U64_f_v (usize_0 self)) in + Index_f_index (t_Index := _) (slice) (x); + }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Convert.v b/proof-libs/coq/coq/generated-core/src/Core_Convert.v index 657b96ee6..831daa404 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Convert.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Convert.v @@ -15,25 +15,25 @@ Import RecordSetNotations. From Core Require Import Core_Marker. Export Core_Marker. -Class t_From (v_Self : Type) (v_T : Type) `{t_Sized (v_Self)} `{t_Sized (v_T)} : Type := +Class t_From (v_Self : Type) (v_T : Type) (* `{t_Sized (v_Self)} `{t_Sized (v_T)} *) : Type := { From_f_from : v_T -> v_Self; }. -Arguments t_From (_) (_) {_} {_}. +Arguments t_From (_) (_) (* {_} {_} *). -Instance t_From_46353410 `{v_T : Type} `{t_Sized (v_T)} : t_From ((v_T)) ((v_T)) := +#[global] Instance t_From_46353410 `{v_T : Type} (* `{t_Sized (v_T)} *) : t_From ((v_T)) ((v_T)) := { From_f_from := fun (t : v_T)=> t; }. -Class t_Into (v_Self : Type) (v_T : Type) `{t_Sized (v_Self)} `{t_Sized (v_T)} : Type := +Class t_Into (v_Self : Type) (v_T : Type) (* `{t_Sized (v_Self)} `{t_Sized (v_T)} *) : Type := { Into_f_into : v_Self -> v_T; }. -Arguments t_Into (_) (_) {_} {_}. +Arguments t_Into (_) (_) (* {_} {_} *). -#[global] Instance t_Into_730689925 `{v_T : Type} `{v_U : Type} `{t_Sized (v_T)} `{t_Sized (v_U)} `{t_From (v_U) (v_T)} : t_Into ((v_T)) ((v_U)) := +#[global] Instance t_Into_730689925 `{v_T : Type} `{v_U : Type} (* `{t_Sized (v_T)} `{t_Sized (v_U)} *) `{t_From (v_U) (v_T)} : t_Into ((v_T)) ((v_U)) := { Into_f_into := fun (self : v_T)=> From_f_from (self); diff --git a/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v b/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v index ae268df66..71c9c44d7 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v @@ -12,68 +12,24 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core (t_primitive). -Export Core (t_primitive). - - - -From Core Require Import Core_Base_interface (t_int). -Export Core_Base_interface (t_int). - -From Core Require Import Core_Base_interface (t_coerce). -Export Core_Base_interface (t_coerce). - -From Core Require Import Core (t_base). -Export Core (t_base). - - - -From Core Require Import Core_Ops (t_Add). -Export Core_Ops (t_Add). +From Core Require Import Core_Primitive. +Export Core_Primitive. + + + +From Core Require Import Core_Base_interface. +Export Core_Base_interface. + +From Core Require Import Core_Base_interface_Coerce. +Export Core_Base_interface_Coerce. + +From Core Require Import Core_Base. +Export Core_Base. + + + +From Core Require Import Core_Ops. +Export Core_Ops. (* NotImplementedYet *) @@ -247,50 +203,50 @@ Notation "'rotate_right_u8'" := (rotate_right_u8). Notation "'rotate_right_usize'" := (rotate_right_usize). -Notation "'bswap_u128'" := (bswap_u128). +(* Notation "'bswap_u128'" := (bswap_u128). *) -Notation "'bswap_u16'" := (bswap_u16). +(* Notation "'bswap_u16'" := (bswap_u16). *) -Notation "'bswap_u32'" := (bswap_u32). +(* Notation "'bswap_u32'" := (bswap_u32). *) -Notation "'bswap_u64'" := (bswap_u64). +(* Notation "'bswap_u64'" := (bswap_u64). *) -Notation "'bswap_u8'" := (bswap_u8). +(* Notation "'bswap_u8'" := (bswap_u8). *) -Notation "'bswap_usize'" := (bswap_usize). +(* Notation "'bswap_usize'" := (bswap_usize). *) -Notation "'ctlz_u128'" := (ctlz_u128). +(* Notation "'ctlz_u128'" := (ctlz_u128). *) -Notation "'ctlz_u16'" := (ctlz_u16). +(* Notation "'ctlz_u16'" := (ctlz_u16). *) -Notation "'ctlz_u32'" := (ctlz_u32). +(* Notation "'ctlz_u32'" := (ctlz_u32). *) -Notation "'ctlz_u64'" := (ctlz_u64). +(* Notation "'ctlz_u64'" := (ctlz_u64). *) -Notation "'ctlz_u8'" := (ctlz_u8). +(* Notation "'ctlz_u8'" := (ctlz_u8). *) -Notation "'ctlz_usize'" := (ctlz_usize). +(* Notation "'ctlz_usize'" := (ctlz_usize). *) -Notation "'ctpop_u128'" := (ctpop_u128). +(* Notation "'ctpop_u128'" := (ctpop_u128). *) -Notation "'ctpop_u16'" := (ctpop_u16). +(* Notation "'ctpop_u16'" := (ctpop_u16). *) -Notation "'ctpop_u32'" := (ctpop_u32). +(* Notation "'ctpop_u32'" := (ctpop_u32). *) -Notation "'ctpop_u64'" := (ctpop_u64). +(* Notation "'ctpop_u64'" := (ctpop_u64). *) -Notation "'ctpop_u8'" := (ctpop_u8). +(* Notation "'ctpop_u8'" := (ctpop_u8). *) -Notation "'ctpop_usize'" := (ctpop_usize). +(* Notation "'ctpop_usize'" := (ctpop_usize). *) -Notation "'cttz_u128'" := (cttz_u128). +(* Notation "'cttz_u128'" := (cttz_u128). *) -Notation "'cttz_u16'" := (cttz_u16). +(* Notation "'cttz_u16'" := (cttz_u16). *) -Notation "'cttz_u32'" := (cttz_u32). +(* Notation "'cttz_u32'" := (cttz_u32). *) -Notation "'cttz_u64'" := (cttz_u64). +(* Notation "'cttz_u64'" := (cttz_u64). *) -Notation "'cttz_u8'" := (cttz_u8). +(* Notation "'cttz_u8'" := (cttz_u8). *) -Notation "'cttz_usize'" := (cttz_usize). +(* Notation "'cttz_usize'" := (cttz_usize). *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v index 79579c534..2cef98822 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.v @@ -1,3 +1,4 @@ + (* File automatically generated by Hacspec *) From Coq Require Import ZArith. Require Import List. @@ -12,68 +13,24 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -From Core Require Import Core (t_marker). -Export Core (t_marker). +From Core Require Import Core_Marker. +Export Core_Marker. -From Core Require Import Core (t_option). -Export Core (t_option). +From Core Require Import Core_Option. +Export Core_Option. -From Core Require Import Core (t_primitive). -Export Core (t_primitive). +From Core Require Import Core_Primitive. +Export Core_Primitive. -From Core Require Import Core_Ops (t_FnMut). -Export Core_Ops (t_FnMut). +From Core Require Import Core_Ops_Function. +Export Core_Ops_Function. Class t_Iterator (v_Self : Type) : Type := { Iterator_f_Item : Type; - _ :: `{t_Sized (Iterator_f_Item)}; + _H_Sized :: `{t_Sized (Iterator_f_Item)}; Iterator_f_next : v_Self -> (v_Self*t_Option ((Iterator_f_Item))); Iterator_f_size_hint : v_Self -> (t_usize*t_Option ((t_usize))); - Iterator_f_fold v_B : Type v_F : Type `{t_Sized (v_B)} `{t_Sized (v_F)} `{t_Sized (v_Self)} `{t_FnMut (v_F) ((v_B*Iterator_f_Item))} `{_.(FnOnce_f_Output) = v_B} : v_Self -> v_B -> v_F -> v_B; + Iterator_f_fold (v_B : Type) (v_F : Type) `{t_Sized (v_B)} `{t_Sized (v_F)} `{t_Sized (v_Self)} `{t_FnMut (v_F) ((v_B*Iterator_f_Item))} `{_.(FnOnce_f_Output) = v_B} : v_Self -> v_B -> v_F -> v_B; }. Arguments t_Iterator (_). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Marker.v b/proof-libs/coq/coq/generated-core/src/Core_Marker.v index 4316e2fb9..49ff0e074 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Marker.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Marker.v @@ -31,6 +31,13 @@ Class t_Sized (v_Self : Type) : Type := }. Arguments t_Sized (_). +Record t_PhantomData (v_T : Type) `{t_Sized (v_T)} : Type := + { + }. +Arguments Build_t_PhantomData {_} {_}. +#[export] +Notation "'PhantomData'" := Build_t_PhantomData. + Class t_Tuple (v_Self : Type) : Type := { }. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Num.v b/proof-libs/coq/coq/generated-core/src/Core_Num.v index d06a6c592..fcb768d78 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Num.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Num.v @@ -1,3 +1,4 @@ + (* File automatically generated by Hacspec *) From Coq Require Import ZArith. Require Import List. @@ -12,20 +13,17 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -From Core Require Import Core_Base_interface (t_int). -Export Core_Base_interface (t_int). - -From Core Require Import Core (t_primitive). -Export Core (t_primitive). +From Core Require Import Core_Base_interface. +Export Core_Base_interface. -From Core Require Import Core (t_intrinsics). -Export Core (t_intrinsics). +From Core Require Import Core_Primitive. +Export Core_Primitive. -From Core Require Import Core_Ops (t_Index). -Export Core_Ops (t_Index). +From Core Require Import Core_Intrinsics. +Export Core_Intrinsics. -From Core Require Import Core_Base (t_seq). -Export Core_Base (t_seq). +From Core Require Import Core_Ops_Index. +Export Core_Ops_Index. (* NotImplementedYet *) @@ -379,77 +377,77 @@ Notation "'impl_11__rotate_left'" := (rotate_left996672710). Notation "'impl_11__rotate_right'" := (rotate_right442734174). -Notation "'impl_6__count_ones'" := (count_ones202509899). +(* Notation "'impl_6__count_ones'" := (count_ones202509899). *) -Notation "'impl_6__leading_zeros'" := (leading_zeros75047366). +(* Notation "'impl_6__leading_zeros'" := (leading_zeros75047366). *) -Notation "'impl_6__swap_bytes'" := (swap_bytes657156997). +(* Notation "'impl_6__swap_bytes'" := (swap_bytes657156997). *) -Notation "'impl_6__from_be'" := (from_be746282521). +(* Notation "'impl_6__from_be'" := (from_be746282521). *) -Notation "'impl_6__to_be'" := (to_be972448780). +(* Notation "'impl_6__to_be'" := (to_be972448780). *) -Notation "'impl_6__trailing_zeros'" := (trailing_zeros572929871). +(* Notation "'impl_6__trailing_zeros'" := (trailing_zeros572929871). *) -Notation "'impl_7__count_ones'" := (count_ones91875752). +(* Notation "'impl_7__count_ones'" := (count_ones91875752). *) -Notation "'impl_7__leading_zeros'" := (leading_zeros462412478). +(* Notation "'impl_7__leading_zeros'" := (leading_zeros462412478). *) -Notation "'impl_7__swap_bytes'" := (swap_bytes926722059). +(* Notation "'impl_7__swap_bytes'" := (swap_bytes926722059). *) -Notation "'impl_7__from_be'" := (from_be510959665). +(* Notation "'impl_7__from_be'" := (from_be510959665). *) -Notation "'impl_7__to_be'" := (to_be551590602). +(* Notation "'impl_7__to_be'" := (to_be551590602). *) -Notation "'impl_7__trailing_zeros'" := (trailing_zeros421474733). +(* Notation "'impl_7__trailing_zeros'" := (trailing_zeros421474733). *) -Notation "'impl_8__count_ones'" := (count_ones776185738). +(* Notation "'impl_8__count_ones'" := (count_ones776185738). *) -Notation "'impl_8__leading_zeros'" := (leading_zeros698221972). +(* Notation "'impl_8__leading_zeros'" := (leading_zeros698221972). *) -Notation "'impl_8__swap_bytes'" := (swap_bytes320480126). +(* Notation "'impl_8__swap_bytes'" := (swap_bytes320480126). *) -Notation "'impl_8__from_be'" := (from_be664756649). +(* Notation "'impl_8__from_be'" := (from_be664756649). *) -Notation "'impl_8__to_be'" := (to_be82825962). +(* Notation "'impl_8__to_be'" := (to_be82825962). *) -Notation "'impl_8__trailing_zeros'" := (trailing_zeros1061560720). +(* Notation "'impl_8__trailing_zeros'" := (trailing_zeros1061560720). *) -Notation "'impl_9__count_ones'" := (count_ones235885653). +(* Notation "'impl_9__count_ones'" := (count_ones235885653). *) -Notation "'impl_9__leading_zeros'" := (leading_zeros338302110). +(* Notation "'impl_9__leading_zeros'" := (leading_zeros338302110). *) -Notation "'impl_9__swap_bytes'" := (swap_bytes722254271). +(* Notation "'impl_9__swap_bytes'" := (swap_bytes722254271). *) -Notation "'impl_9__from_be'" := (from_be16013635). +(* Notation "'impl_9__from_be'" := (from_be16013635). *) -Notation "'impl_9__to_be'" := (to_be376714729). +(* Notation "'impl_9__to_be'" := (to_be376714729). *) -Notation "'impl_9__trailing_zeros'" := (trailing_zeros188346231). +(* Notation "'impl_9__trailing_zeros'" := (trailing_zeros188346231). *) -Notation "'impl_10__count_ones'" := (count_ones926736261). +(* Notation "'impl_10__count_ones'" := (count_ones926736261). *) -Notation "'impl_10__leading_zeros'" := (leading_zeros19644612). +(* Notation "'impl_10__leading_zeros'" := (leading_zeros19644612). *) -Notation "'impl_10__swap_bytes'" := (swap_bytes420879368). +(* Notation "'impl_10__swap_bytes'" := (swap_bytes420879368). *) -Notation "'impl_10__from_be'" := (from_be191085771). +(* Notation "'impl_10__from_be'" := (from_be191085771). *) -Notation "'impl_10__to_be'" := (to_be555075987). +(* Notation "'impl_10__to_be'" := (to_be555075987). *) -Notation "'impl_10__trailing_zeros'" := (trailing_zeros821715250). +(* Notation "'impl_10__trailing_zeros'" := (trailing_zeros821715250). *) -Notation "'impl_11__count_ones'" := (count_ones441645762). +(* Notation "'impl_11__count_ones'" := (count_ones441645762). *) -Notation "'impl_11__leading_zeros'" := (leading_zeros905233489). +(* Notation "'impl_11__leading_zeros'" := (leading_zeros905233489). *) -Notation "'impl_11__swap_bytes'" := (swap_bytes268673424). +(* Notation "'impl_11__swap_bytes'" := (swap_bytes268673424). *) -Notation "'impl_11__from_be'" := (from_be607978059). +(* Notation "'impl_11__from_be'" := (from_be607978059). *) -Notation "'impl_11__to_be'" := (to_be561847134). +(* Notation "'impl_11__to_be'" := (to_be561847134). *) -Notation "'impl_11__trailing_zeros'" := (trailing_zeros42066260). +(* Notation "'impl_11__trailing_zeros'" := (trailing_zeros42066260). *) Notation "'impl__rem_euclid'" := (rem_euclid622298453). @@ -463,38 +461,38 @@ Notation "'impl__i128__rem_euclid'" := (rem_euclid254910751). Notation "'impl__isize__rem_euclid'" := (rem_euclid828379367). -Notation "'impl_6__count_zeros'" := (count_zeros558337492). +(* Notation "'impl_6__count_zeros'" := (count_zeros558337492). *) -Notation "'impl_6__leading_ones'" := (leading_ones55148479). +(* Notation "'impl_6__leading_ones'" := (leading_ones55148479). *) -Notation "'impl_6__trailing_ones'" := (trailing_ones359778731). +(* Notation "'impl_6__trailing_ones'" := (trailing_ones359778731). *) -Notation "'impl_7__count_zeros'" := (count_zeros199825317). +(* Notation "'impl_7__count_zeros'" := (count_zeros199825317). *) -Notation "'impl_7__leading_ones'" := (leading_ones164277656). +(* Notation "'impl_7__leading_ones'" := (leading_ones164277656). *) -Notation "'impl_7__trailing_ones'" := (trailing_ones903944727). +(* Notation "'impl_7__trailing_ones'" := (trailing_ones903944727). *) -Notation "'impl_8__count_zeros'" := (count_zeros942566041). +(* Notation "'impl_8__count_zeros'" := (count_zeros942566041). *) -Notation "'impl_8__leading_ones'" := (leading_ones766486760). +(* Notation "'impl_8__leading_ones'" := (leading_ones766486760). *) -Notation "'impl_8__trailing_ones'" := (trailing_ones223371510). +(* Notation "'impl_8__trailing_ones'" := (trailing_ones223371510). *) -Notation "'impl_9__count_zeros'" := (count_zeros60346158). +(* Notation "'impl_9__count_zeros'" := (count_zeros60346158). *) -Notation "'impl_9__leading_ones'" := (leading_ones404666910). +(* Notation "'impl_9__leading_ones'" := (leading_ones404666910). *) -Notation "'impl_9__trailing_ones'" := (trailing_ones601201120). +(* Notation "'impl_9__trailing_ones'" := (trailing_ones601201120). *) -Notation "'impl_10__count_zeros'" := (count_zeros824862815). +(* Notation "'impl_10__count_zeros'" := (count_zeros824862815). *) -Notation "'impl_10__leading_ones'" := (leading_ones475503572). +(* Notation "'impl_10__leading_ones'" := (leading_ones475503572). *) -Notation "'impl_10__trailing_ones'" := (trailing_ones705845381). +(* Notation "'impl_10__trailing_ones'" := (trailing_ones705845381). *) -Notation "'impl_11__count_zeros'" := (count_zeros73479642). +(* Notation "'impl_11__count_zeros'" := (count_zeros73479642). *) -Notation "'impl_11__leading_ones'" := (leading_ones667660708). +(* Notation "'impl_11__leading_ones'" := (leading_ones667660708). *) -Notation "'impl_11__trailing_ones'" := (trailing_ones979548463). +(* Notation "'impl_11__trailing_ones'" := (trailing_ones979548463). *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops.v b/proof-libs/coq/coq/generated-core/src/Core_Ops.v index 36a0f6925..753112299 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops.v @@ -58,8 +58,8 @@ Export Core_Ops_Bit. -From Core Require Import Core_Ops_Index (t_Index). -Export Core_Ops_Index (t_Index). +From Core Require Import Core_Ops_Index. +Export Core_Ops_Index. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v index 26cb3abac..e43ff9e4b 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v @@ -15,8 +15,8 @@ Import RecordSetNotations. From Core Require Import Core_Primitive. Export Core_Primitive. -From Core Require Import Core_Iter (t_Iterator). -Export Core_Iter (t_Iterator). +From Core Require Import Core_Iter_Traits_Iterator. +Export Core_Iter_Traits_Iterator. Record t_IndexRange : Type := { @@ -30,32 +30,34 @@ Arguments IndexRange_f_end. settable! (Build_t_IndexRange) . Definition impl__IndexRange__zero_to (v_end : t_usize) : t_IndexRange := - Build_t_IndexRange (0) (v_end). + Build_t_IndexRange (Build_t_usize (Build_t_U64 0%N)) (v_end). Definition impl__IndexRange__next_unchecked (self : t_IndexRange) : (t_IndexRange*t_usize) := let value := IndexRange_f_start self in - let self := self <|IndexRange_f_start := t_Add_f_add (value) (1) |> in + let self := self <|IndexRange_f_start := Add_f_add (value) (Build_t_usize (Build_t_U64 1%N) : t_usize) |> in let hax_temp_output := value in (self,hax_temp_output). Definition impl__IndexRange__len (self : t_IndexRange) : t_usize := - sub (IndexRange_f_end self) (IndexRange_f_start self). + Sub_f_sub (IndexRange_f_end self) (IndexRange_f_start self). -Instance t_Iterator_538767852 : t_Iterator ((t_IndexRange)) := +Program Instance t_Iterator_538767852 : t_Iterator ((t_IndexRange)) := { - Iterator_impl_1_f_Item := t_usize; - Iterator_impl_1_f_next := fun (self : t_IndexRange)=> - let hax_temp_output := never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))) in - (self,hax_temp_output); - Iterator_impl_1_f_size_hint := fun (self : t_IndexRange)=> + Iterator_f_Item := t_usize; + Iterator_f_next := fun (self : t_IndexRange)=> + (* let hax_temp_output := never_to_any (panic ("not yet implemented: specification needed"%string)) in *) + (self,Option_Some (self.(IndexRange_f_start))); + Iterator_f_size_hint := fun (self : t_IndexRange)=> let len := impl__IndexRange__len (self) in (len,Option_Some (len)); - Iterator_impl_1_f_fold := fun (self : t_IndexRange) (init : v_B) (f : v_F)=> - never_to_any (panic_fmt (impl_2__new_v1 (["not yet implemented: specification needed"%string]) (impl_1__none (tt)))); - }. - -Instance t_ExactSizeIterator_661616782 : t_ExactSizeIterator ((t_IndexRange)) := - { - ExactSizeIterator_impl_2_f_len := fun (self : t_IndexRange)=> - impl__IndexRange__len (self); + Iterator_f_fold := fun {v_B : Type} {v_F : Type} `{t_Sized v_B} `{t_Sized v_F} `{t_Sized t_IndexRange} (_ : t_FnOnce v_F (v_B * t_usize)) (_ : t_FnMut v_F (v_B * t_usize)) `{_ : FnOnce_f_Output = v_B} (self : t_IndexRange) (init : v_B) (f : v_F)=> + never_to_any (panic "not yet implemented: specification needed"%string); }. +Next Obligation. +Admitted. + +(* Instance t_ExactSizeIterator_661616782 : t_ExactSizeIterator ((t_IndexRange)) := *) +(* { *) +(* ExactSizeIterator_impl_2_f_len := fun (self : t_IndexRange)=> *) +(* impl__IndexRange__len (self); *) +(* }. *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v index b8b3f8aad..86e23f37b 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v @@ -12,146 +12,99 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - From Core Require Import Core_Primitive. Export Core_Primitive. -From Core Require Import Core (t_primitive). -Export Core (t_primitive). - -From Core Require Import Core (t_cmp). -Export Core (t_cmp). +From Core Require Import Core_Cmp. +Export Core_Cmp. -From Core Require Import Core (t_convert). -Export Core (t_convert). +From Core Require Import Core_Convert. +Export Core_Convert. (* NotImplementedYet *) (* NotImplementedYet *) -Notation "'impl_31'" := (impl_31). +(* Notation "'impl_31'" := (impl_31). *) -Notation "'impl_40'" := (impl_40). +(* Notation "'impl_40'" := (impl_40). *) -Notation "'impl'" := (impl). +(* Notation "'impl'" := (impl). *) -Notation "'impl_1'" := (impl_1). +(* Notation "'impl_1'" := (impl_1). *) -Notation "'impl_2'" := (impl_2). +(* Notation "'impl_2'" := (impl_2). *) -Notation "'impl_3'" := (impl_3). +(* Notation "'impl_3'" := (impl_3). *) -Notation "'impl_4'" := (impl_4). +(* Notation "'impl_4'" := (impl_4). *) -Notation "'impl_5'" := (impl_5). +(* Notation "'impl_5'" := (impl_5). *) -Notation "'impl_6'" := (impl_6). +(* Notation "'impl_6'" := (impl_6). *) -Notation "'impl_7'" := (impl_7). +(* Notation "'impl_7'" := (impl_7). *) -Notation "'impl_8'" := (impl_8). +(* Notation "'impl_8'" := (impl_8). *) -Notation "'impl_9'" := (impl_9). +(* Notation "'impl_9'" := (impl_9). *) -Notation "'impl_10'" := (impl_10). +(* Notation "'impl_10'" := (impl_10). *) -Notation "'impl_11'" := (impl_11). +(* Notation "'impl_11'" := (impl_11). *) -Notation "'impl_12'" := (impl_12). +(* Notation "'impl_12'" := (impl_12). *) -Notation "'impl_13'" := (impl_13). +(* Notation "'impl_13'" := (impl_13). *) -Notation "'impl_14'" := (impl_14). +(* Notation "'impl_14'" := (impl_14). *) -Notation "'impl_15'" := (impl_15). +(* Notation "'impl_15'" := (impl_15). *) -Notation "'impl_16'" := (impl_16). +(* Notation "'impl_16'" := (impl_16). *) -Notation "'impl_17'" := (impl_17). +(* Notation "'impl_17'" := (impl_17). *) -Notation "'impl_18'" := (impl_18). +(* Notation "'impl_18'" := (impl_18). *) -Notation "'impl_19'" := (impl_19). +(* Notation "'impl_19'" := (impl_19). *) -Notation "'impl_20'" := (impl_20). +(* Notation "'impl_20'" := (impl_20). *) -Notation "'impl_21'" := (impl_21). +(* Notation "'impl_21'" := (impl_21). *) -Notation "'impl_22'" := (impl_22). +(* Notation "'impl_22'" := (impl_22). *) -Notation "'impl_23'" := (impl_23). +(* Notation "'impl_23'" := (impl_23). *) -Notation "'impl_24'" := (impl_24). +(* Notation "'impl_24'" := (impl_24). *) -Notation "'impl_25'" := (impl_25). +(* Notation "'impl_25'" := (impl_25). *) -Notation "'impl_26'" := (impl_26). +(* Notation "'impl_26'" := (impl_26). *) -Notation "'impl_27'" := (impl_27). +(* Notation "'impl_27'" := (impl_27). *) -Notation "'impl_28'" := (impl_28). +(* Notation "'impl_28'" := (impl_28). *) -Notation "'impl_29'" := (impl_29). +(* Notation "'impl_29'" := (impl_29). *) -Notation "'impl_30'" := (impl_30). +(* Notation "'impl_30'" := (impl_30). *) -Notation "'impl_32'" := (impl_32). +(* Notation "'impl_32'" := (impl_32). *) -Notation "'impl_33'" := (impl_33). +(* Notation "'impl_33'" := (impl_33). *) -Notation "'impl_34'" := (impl_34). +(* Notation "'impl_34'" := (impl_34). *) -Notation "'impl_35'" := (impl_35). +(* Notation "'impl_35'" := (impl_35). *) -Notation "'impl_36'" := (impl_36). +(* Notation "'impl_36'" := (impl_36). *) -Notation "'impl_37'" := (impl_37). +(* Notation "'impl_37'" := (impl_37). *) -Notation "'impl_38'" := (impl_38). +(* Notation "'impl_38'" := (impl_38). *) -Notation "'impl_39'" := (impl_39). +(* Notation "'impl_39'" := (impl_39). *) -Notation "'impl_41'" := (impl_41). +(* Notation "'impl_41'" := (impl_41). *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v index 95f35d1d6..3fb3d3925 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v @@ -12,146 +12,99 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) - -Notation "'impl_31'" := (impl_31). - -Notation "'impl_40'" := (impl_40). +(* Notation "'impl_31'" := (impl_31). *) + +(* Notation "'impl_40'" := (impl_40). *) From Core Require Import Core_Primitive. Export Core_Primitive. -From Core Require Import Core (t_primitive). -Export Core (t_primitive). - -From Core Require Import Core (t_cmp). -Export Core (t_cmp). +From Core Require Import Core_Cmp. +Export Core_Cmp. -From Core Require Import Core (t_convert). -Export Core (t_convert). +From Core Require Import Core_Convert. +Export Core_Convert. (* NotImplementedYet *) (* NotImplementedYet *) -Notation "'impl'" := (impl). +(* Notation "'impl'" := (impl). *) -Notation "'impl_1'" := (impl_1). +(* Notation "'impl_1'" := (impl_1). *) -Notation "'impl_2'" := (impl_2). +(* Notation "'impl_2'" := (impl_2). *) -Notation "'impl_3'" := (impl_3). +(* Notation "'impl_3'" := (impl_3). *) -Notation "'impl_4'" := (impl_4). +(* Notation "'impl_4'" := (impl_4). *) -Notation "'impl_5'" := (impl_5). +(* Notation "'impl_5'" := (impl_5). *) -Notation "'impl_6'" := (impl_6). +(* Notation "'impl_6'" := (impl_6). *) -Notation "'impl_7'" := (impl_7). +(* Notation "'impl_7'" := (impl_7). *) -Notation "'impl_8'" := (impl_8). +(* Notation "'impl_8'" := (impl_8). *) -Notation "'impl_9'" := (impl_9). +(* Notation "'impl_9'" := (impl_9). *) -Notation "'impl_10'" := (impl_10). +(* Notation "'impl_10'" := (impl_10). *) -Notation "'impl_11'" := (impl_11). +(* Notation "'impl_11'" := (impl_11). *) -Notation "'impl_12'" := (impl_12). +(* Notation "'impl_12'" := (impl_12). *) -Notation "'impl_13'" := (impl_13). +(* Notation "'impl_13'" := (impl_13). *) -Notation "'impl_14'" := (impl_14). +(* Notation "'impl_14'" := (impl_14). *) -Notation "'impl_15'" := (impl_15). +(* Notation "'impl_15'" := (impl_15). *) -Notation "'impl_16'" := (impl_16). +(* Notation "'impl_16'" := (impl_16). *) -Notation "'impl_17'" := (impl_17). +(* Notation "'impl_17'" := (impl_17). *) -Notation "'impl_18'" := (impl_18). +(* Notation "'impl_18'" := (impl_18). *) -Notation "'impl_19'" := (impl_19). +(* Notation "'impl_19'" := (impl_19). *) -Notation "'impl_20'" := (impl_20). +(* Notation "'impl_20'" := (impl_20). *) -Notation "'impl_21'" := (impl_21). +(* Notation "'impl_21'" := (impl_21). *) -Notation "'impl_22'" := (impl_22). +(* Notation "'impl_22'" := (impl_22). *) -Notation "'impl_23'" := (impl_23). +(* Notation "'impl_23'" := (impl_23). *) -Notation "'impl_24'" := (impl_24). +(* Notation "'impl_24'" := (impl_24). *) -Notation "'impl_25'" := (impl_25). +(* Notation "'impl_25'" := (impl_25). *) -Notation "'impl_26'" := (impl_26). +(* Notation "'impl_26'" := (impl_26). *) -Notation "'impl_27'" := (impl_27). +(* Notation "'impl_27'" := (impl_27). *) -Notation "'impl_28'" := (impl_28). +(* Notation "'impl_28'" := (impl_28). *) -Notation "'impl_29'" := (impl_29). +(* Notation "'impl_29'" := (impl_29). *) -Notation "'impl_30'" := (impl_30). +(* Notation "'impl_30'" := (impl_30). *) -Notation "'impl_32'" := (impl_32). +(* Notation "'impl_32'" := (impl_32). *) -Notation "'impl_33'" := (impl_33). +(* Notation "'impl_33'" := (impl_33). *) -Notation "'impl_34'" := (impl_34). +(* Notation "'impl_34'" := (impl_34). *) -Notation "'impl_35'" := (impl_35). +(* Notation "'impl_35'" := (impl_35). *) -Notation "'impl_36'" := (impl_36). +(* Notation "'impl_36'" := (impl_36). *) -Notation "'impl_37'" := (impl_37). +(* Notation "'impl_37'" := (impl_37). *) -Notation "'impl_38'" := (impl_38). +(* Notation "'impl_38'" := (impl_38). *) -Notation "'impl_39'" := (impl_39). +(* Notation "'impl_39'" := (impl_39). *) -Notation "'impl_41'" := (impl_41). +(* Notation "'impl_41'" := (impl_41). *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice.v b/proof-libs/coq/coq/generated-core/src/Core_Slice.v index 62fa0c6f1..8869d4239 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Slice.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice.v @@ -12,57 +12,16 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Primitive. +Export Core_Primitive. -From Core Require Import Core_Primitive (t_Slice). -Export Core_Primitive (t_Slice). +From Core Require Import Core_Slice_Iter. +Export Core_Slice_Iter. -From Core Require Import Iter (t_Iter). -Export Iter (t_Iter). +From Core Require Import Core_Convert. +Export Core_Convert. (* NotImplementedYet *) @@ -75,4 +34,4 @@ Definition impl__len `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (self : t_S From_f_from (len (Clone_f_clone (Slice_f_v self))). Definition impl__is_empty `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (self : t_Slice ((v_T))) : bool := - t_PartialEq_f_eq (impl__len (self)) (0). + PartialEq_f_eq (impl__len (self)) (Build_t_usize (Build_t_U64 0%N)). diff --git a/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v index 5bc47cc05..e294a39bb 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v @@ -12,73 +12,29 @@ Import RecordSetNotations. (* From Core Require Import Core. *) -(* TODO: Replace this dummy lib with core lib *) -Class t_Sized (T : Type) := { }. -Definition t_u8 := Z. -Definition t_u16 := Z. -Definition t_u32 := Z. -Definition t_u64 := Z. -Definition t_u128 := Z. -Definition t_usize := Z. -Definition t_i8 := Z. -Definition t_i16 := Z. -Definition t_i32 := Z. -Definition t_i64 := Z. -Definition t_i128 := Z. -Definition t_isize := Z. -Definition t_Array T (x : t_usize) := list T. -Definition t_String := string. -Definition ToString_f_to_string (x : string) := x. -Instance Sized_any : forall {t_A}, t_Sized t_A := {}. -Class t_Clone (T : Type) := { Clone_f_clone : T -> T }. -Instance Clone_any : forall {t_A}, t_Clone t_A := {Clone_f_clone := fun x => x}. -Definition t_Slice (T : Type) := list T. -Definition unsize {T : Type} : list T -> t_Slice T := id. -Definition t_PartialEq_f_eq x y := x =? y. -Definition t_Rem_f_rem (x y : Z) := x mod y. -Definition assert (b : bool) (* `{H_assert : b = true} *) : unit := tt. -Inductive globality := | t_Global. -Definition t_Vec T (_ : globality) : Type := list T. -Definition impl_1__append {T} l1 l2 : list T * list T := (app l1 l2, l2). -Definition impl_1__len {A} (l : list A) := Z.of_nat (List.length l). -Definition impl__new {A} (_ : Datatypes.unit) : list A := nil. -Definition impl__with_capacity {A} (_ : Z) : list A := nil. -Definition impl_1__push {A} l (x : A) := cons x l. -Class t_From (A B : Type) := { From_f_from : B -> A }. -Definition impl__to_vec {T} (x : t_Slice T) : t_Vec T t_Global := x. -Class t_Into (A B : Type) := { Into_f_into : A -> B }. -Instance t_Into_from_t_From {A B : Type} `{H : t_From B A} : t_Into A B := { Into_f_into x := @From_f_from B A H x }. -Definition from_elem {A} (x : A) (l : Z) := repeat x (Z.to_nat l). -Definition t_Option := option. -Definition impl__map {A B} (x : t_Option A) (f : A -> B) : t_Option B := match x with | Some x => Some (f x) | None => None end. -Definition t_Add_f_add x y := x + y. -Class Cast A B := { cast : A -> B }. -Instance cast_t_u8_t_u32 : Cast t_u8 t_u32 := {| cast x := x |}. -(* / dummy lib *) +From Core Require Import Core_Marker. +Export Core_Marker. -From Core Require Import Core_Marker (t_PhantomData). -Export Core_Marker (t_PhantomData). - -From Core Require Import Core_Primitive (t_Slice). -Export Core_Primitive (t_Slice). +From Core Require Import Core_Primitive. +Export Core_Primitive. Record t_Iter (v_T : Type) `{t_Sized (v_T)} : Type := { Iter_f_data : t_Slice ((v_T)); Iter_f__marker : t_PhantomData ((v_T)); }. -Arguments Build_t_Iter (_) {_}. +Arguments Build_t_Iter {_} {_}. Arguments Iter_f_data {_} {_}. Arguments Iter_f__marker {_} {_}. #[export] Instance settable_t_Iter `{v_T : Type} `{t_Sized (v_T)} : Settable _ := - settable! (Build_t_Iter v_T) . + settable! (Build_t_Iter) . Definition impl__new `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (slice : t_Slice ((v_T))) : t_Iter ((v_T)) := Build_t_Iter (Clone_f_clone (slice)) (Build_t_PhantomData). Instance t_Clone_313886898 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : t_Clone ((t_Iter ((v_T)))) := { - Clone_impl_1_f_clone := fun (self : t_Iter ((v_T)))=> + Clone_f_clone := fun (self : t_Iter ((v_T)))=> Build_t_Iter (Clone_f_clone (Iter_f_data self)) (Iter_f__marker self); }. diff --git a/proof-libs/fstar/handwritten-core/core/Alloc.Alloc.fst b/proof-libs/fstar/core/Alloc.Alloc.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Alloc.Alloc.fst rename to proof-libs/fstar/core/Alloc.Alloc.fst diff --git a/proof-libs/fstar/handwritten-core/core/Alloc.Collections.Binary_heap.fsti b/proof-libs/fstar/core/Alloc.Collections.Binary_heap.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Alloc.Collections.Binary_heap.fsti rename to proof-libs/fstar/core/Alloc.Collections.Binary_heap.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Alloc.Fmt.fsti b/proof-libs/fstar/core/Alloc.Fmt.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Alloc.Fmt.fsti rename to proof-libs/fstar/core/Alloc.Fmt.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Alloc.Slice.fst b/proof-libs/fstar/core/Alloc.Slice.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Alloc.Slice.fst rename to proof-libs/fstar/core/Alloc.Slice.fst diff --git a/proof-libs/fstar/handwritten-core/core/Alloc.String.fst b/proof-libs/fstar/core/Alloc.String.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Alloc.String.fst rename to proof-libs/fstar/core/Alloc.String.fst diff --git a/proof-libs/fstar/handwritten-core/core/Alloc.Vec.fst b/proof-libs/fstar/core/Alloc.Vec.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Alloc.Vec.fst rename to proof-libs/fstar/core/Alloc.Vec.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Array.Iter.fsti b/proof-libs/fstar/core/Core.Array.Iter.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Array.Iter.fsti rename to proof-libs/fstar/core/Core.Array.Iter.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Array.fst b/proof-libs/fstar/core/Core.Array.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Array.fst rename to proof-libs/fstar/core/Core.Array.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Clone.fst b/proof-libs/fstar/core/Core.Clone.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Clone.fst rename to proof-libs/fstar/core/Core.Clone.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Cmp.fsti b/proof-libs/fstar/core/Core.Cmp.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Cmp.fsti rename to proof-libs/fstar/core/Core.Cmp.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Convert.fst b/proof-libs/fstar/core/Core.Convert.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Convert.fst rename to proof-libs/fstar/core/Core.Convert.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Core_arch.Arm_shared.Neon.fsti b/proof-libs/fstar/core/Core.Core_arch.Arm_shared.Neon.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Core_arch.Arm_shared.Neon.fsti rename to proof-libs/fstar/core/Core.Core_arch.Arm_shared.Neon.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Core_arch.X86.fsti b/proof-libs/fstar/core/Core.Core_arch.X86.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Core_arch.X86.fsti rename to proof-libs/fstar/core/Core.Core_arch.X86.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Core_arch.fsti b/proof-libs/fstar/core/Core.Core_arch.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Core_arch.fsti rename to proof-libs/fstar/core/Core.Core_arch.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Default.fsti b/proof-libs/fstar/core/Core.Default.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Default.fsti rename to proof-libs/fstar/core/Core.Default.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Fmt.Rt.fsti b/proof-libs/fstar/core/Core.Fmt.Rt.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Fmt.Rt.fsti rename to proof-libs/fstar/core/Core.Fmt.Rt.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Fmt.fsti b/proof-libs/fstar/core/Core.Fmt.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Fmt.fsti rename to proof-libs/fstar/core/Core.Fmt.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Hint.fsti b/proof-libs/fstar/core/Core.Hint.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Hint.fsti rename to proof-libs/fstar/core/Core.Hint.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Iter.Adapters.Enumerate.fst b/proof-libs/fstar/core/Core.Iter.Adapters.Enumerate.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Iter.Adapters.Enumerate.fst rename to proof-libs/fstar/core/Core.Iter.Adapters.Enumerate.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Iter.Adapters.Step_by.fst b/proof-libs/fstar/core/Core.Iter.Adapters.Step_by.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Iter.Adapters.Step_by.fst rename to proof-libs/fstar/core/Core.Iter.Adapters.Step_by.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Iter.Traits.Collect.fst b/proof-libs/fstar/core/Core.Iter.Traits.Collect.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Iter.Traits.Collect.fst rename to proof-libs/fstar/core/Core.Iter.Traits.Collect.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Iter.Traits.Iterator.fst b/proof-libs/fstar/core/Core.Iter.Traits.Iterator.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Iter.Traits.Iterator.fst rename to proof-libs/fstar/core/Core.Iter.Traits.Iterator.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Iter.fsti b/proof-libs/fstar/core/Core.Iter.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Iter.fsti rename to proof-libs/fstar/core/Core.Iter.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Marker.fst b/proof-libs/fstar/core/Core.Marker.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Marker.fst rename to proof-libs/fstar/core/Core.Marker.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Mem.fsti b/proof-libs/fstar/core/Core.Mem.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Mem.fsti rename to proof-libs/fstar/core/Core.Mem.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Num.Error.fsti b/proof-libs/fstar/core/Core.Num.Error.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Num.Error.fsti rename to proof-libs/fstar/core/Core.Num.Error.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Num.fsti b/proof-libs/fstar/core/Core.Num.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Num.fsti rename to proof-libs/fstar/core/Core.Num.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Ops.Arith.Neg.fsti b/proof-libs/fstar/core/Core.Ops.Arith.Neg.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Ops.Arith.Neg.fsti rename to proof-libs/fstar/core/Core.Ops.Arith.Neg.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Ops.Arith.fsti b/proof-libs/fstar/core/Core.Ops.Arith.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Ops.Arith.fsti rename to proof-libs/fstar/core/Core.Ops.Arith.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Ops.Control_flow.fst b/proof-libs/fstar/core/Core.Ops.Control_flow.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Ops.Control_flow.fst rename to proof-libs/fstar/core/Core.Ops.Control_flow.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Ops.Deref.fst b/proof-libs/fstar/core/Core.Ops.Deref.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Ops.Deref.fst rename to proof-libs/fstar/core/Core.Ops.Deref.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Ops.Index.IndexMut.fst b/proof-libs/fstar/core/Core.Ops.Index.IndexMut.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Ops.Index.IndexMut.fst rename to proof-libs/fstar/core/Core.Ops.Index.IndexMut.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Ops.Index.fst b/proof-libs/fstar/core/Core.Ops.Index.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Ops.Index.fst rename to proof-libs/fstar/core/Core.Ops.Index.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Ops.Range.fsti b/proof-libs/fstar/core/Core.Ops.Range.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Ops.Range.fsti rename to proof-libs/fstar/core/Core.Ops.Range.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Ops.Try_trait.fst b/proof-libs/fstar/core/Core.Ops.Try_trait.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Ops.Try_trait.fst rename to proof-libs/fstar/core/Core.Ops.Try_trait.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Ops.fst b/proof-libs/fstar/core/Core.Ops.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Ops.fst rename to proof-libs/fstar/core/Core.Ops.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Option.fst b/proof-libs/fstar/core/Core.Option.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Option.fst rename to proof-libs/fstar/core/Core.Option.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Panicking.fst b/proof-libs/fstar/core/Core.Panicking.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Panicking.fst rename to proof-libs/fstar/core/Core.Panicking.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Result.fst b/proof-libs/fstar/core/Core.Result.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Result.fst rename to proof-libs/fstar/core/Core.Result.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Slice.Iter.fst b/proof-libs/fstar/core/Core.Slice.Iter.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Slice.Iter.fst rename to proof-libs/fstar/core/Core.Slice.Iter.fst diff --git a/proof-libs/fstar/handwritten-core/core/Core.Slice.fsti b/proof-libs/fstar/core/Core.Slice.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Slice.fsti rename to proof-libs/fstar/core/Core.Slice.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Str.Converts.fsti b/proof-libs/fstar/core/Core.Str.Converts.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Str.Converts.fsti rename to proof-libs/fstar/core/Core.Str.Converts.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Str.Error.fsti b/proof-libs/fstar/core/Core.Str.Error.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Str.Error.fsti rename to proof-libs/fstar/core/Core.Str.Error.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.Str.fsti b/proof-libs/fstar/core/Core.Str.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.Str.fsti rename to proof-libs/fstar/core/Core.Str.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Core.fst b/proof-libs/fstar/core/Core.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Core.fst rename to proof-libs/fstar/core/Core.fst diff --git a/proof-libs/fstar/handwritten-core/core/Makefile b/proof-libs/fstar/core/Makefile similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Makefile rename to proof-libs/fstar/core/Makefile diff --git a/proof-libs/fstar/handwritten-core/core/README.md b/proof-libs/fstar/core/README.md similarity index 100% rename from proof-libs/fstar/handwritten-core/core/README.md rename to proof-libs/fstar/core/README.md diff --git a/proof-libs/fstar/handwritten-core/core/Rand_core.fsti b/proof-libs/fstar/core/Rand_core.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Rand_core.fsti rename to proof-libs/fstar/core/Rand_core.fsti diff --git a/proof-libs/fstar/handwritten-core/core/Std.Io.Stdio.fsti b/proof-libs/fstar/core/Std.Io.Stdio.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/core/Std.Io.Stdio.fsti rename to proof-libs/fstar/core/Std.Io.Stdio.fsti diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Makefile b/proof-libs/fstar/rust_primitives/Makefile similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Makefile rename to proof-libs/fstar/rust_primitives/Makefile diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Arrays.fst b/proof-libs/fstar/rust_primitives/Rust_primitives.Arrays.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Arrays.fst rename to proof-libs/fstar/rust_primitives/Rust_primitives.Arrays.fst diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Arrays.fsti b/proof-libs/fstar/rust_primitives/Rust_primitives.Arrays.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Arrays.fsti rename to proof-libs/fstar/rust_primitives/Rust_primitives.Arrays.fsti diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.BitVectors.fst b/proof-libs/fstar/rust_primitives/Rust_primitives.BitVectors.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.BitVectors.fst rename to proof-libs/fstar/rust_primitives/Rust_primitives.BitVectors.fst diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.BitVectors.fsti b/proof-libs/fstar/rust_primitives/Rust_primitives.BitVectors.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.BitVectors.fsti rename to proof-libs/fstar/rust_primitives/Rust_primitives.BitVectors.fsti diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mexception.fst b/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mexception.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mexception.fst rename to proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mexception.fst diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Moption.fst b/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Moption.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Moption.fst rename to proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Moption.fst diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mresult.fst b/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mresult.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mresult.fst rename to proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Control_flow_monad.Mresult.fst diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Folds.fsti b/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Folds.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Folds.fsti rename to proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Folds.fsti diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Int.fst b/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Int.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Int.fst rename to proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Int.fst diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst b/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst rename to proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fsti b/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fsti rename to proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fsti diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.fst b/proof-libs/fstar/rust_primitives/Rust_primitives.Hax.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Hax.fst rename to proof-libs/fstar/rust_primitives/Rust_primitives.Hax.fst diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Integers.fst b/proof-libs/fstar/rust_primitives/Rust_primitives.Integers.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Integers.fst rename to proof-libs/fstar/rust_primitives/Rust_primitives.Integers.fst diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Integers.fsti b/proof-libs/fstar/rust_primitives/Rust_primitives.Integers.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Integers.fsti rename to proof-libs/fstar/rust_primitives/Rust_primitives.Integers.fsti diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Iterators.fsti b/proof-libs/fstar/rust_primitives/Rust_primitives.Iterators.fsti similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.Iterators.fsti rename to proof-libs/fstar/rust_primitives/Rust_primitives.Iterators.fsti diff --git a/proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.fst b/proof-libs/fstar/rust_primitives/Rust_primitives.fst similarity index 100% rename from proof-libs/fstar/handwritten-core/rust_primitives/Rust_primitives.fst rename to proof-libs/fstar/rust_primitives/Rust_primitives.fst From e0370d775bdb1fce4296983e5023f9eab13e97ea Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Tue, 26 Nov 2024 16:00:47 +0100 Subject: [PATCH 30/59] Cleanup --- .../src/Core_Array_Rec_bundle_579704328.v | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v b/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v index 8c8e830e8..da8881a39 100644 --- a/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v +++ b/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v @@ -4545,23 +4545,10 @@ Definition match_list `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} (s : t_Seq (* }. *) -Check t_Index. -Check (t_Index_324031838 (v_T := nat) (v_I := t_usize)). -Instance v_SliceIndex_622480125 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : v_SliceIndex ((t_usize)) ((t_Slice ((v_T)))). -econstructor. -Unshelve. -2: exact v_T. -refine (let x : t_usize := Into_f_into (U64_f_v (usize_0 self)) in _). -refine ( - SliceIndex_f_Output := v_T; - SliceIndex_f_index := fun (self : t_usize) (slice : t_Slice ((v_T)))=> - let x : t_usize := Into_f_into (U64_f_v (usize_0 self)) in - Index_f_index (t_Index := _) (slice) (x); - }). - - { - SliceIndex_f_Output := v_T; - SliceIndex_f_index := fun (self : t_usize) (slice : t_Slice ((v_T)))=> - let x : t_usize := Into_f_into (U64_f_v (usize_0 self)) in - Index_f_index (t_Index := _) (slice) (x); - }. +(* Instance v_SliceIndex_622480125 `{v_T : Type} `{t_Sized (v_T)} `{t_Clone (v_T)} : v_SliceIndex ((t_usize)) ((t_Slice ((v_T)))) := *) +(* { *) +(* SliceIndex_f_Output := v_T; *) +(* SliceIndex_f_index := fun (self : t_usize) (slice : t_Slice ((v_T)))=> *) +(* let x : t_usize := Into_f_into (U64_f_v (usize_0 self)) in *) +(* Index_f_index (t_Index := _) (slice) (x); *) +(* }. *) From fc3d39bbfcf74116e65303ee9994046fe6d005d8 Mon Sep 17 00:00:00 2001 From: Lasse Letager Hansen Date: Tue, 26 Nov 2024 18:15:54 +0100 Subject: [PATCH 31/59] Revert fstar changes --- .../fstar/generated-core/Core.Array.Iter.fst | 9 - .../Core.Array.Rec_bundle_579704328.fst | 8018 ----------------- .../fstar/generated-core/Core.Array.fst | 14 - .../fstar/generated-core/Core.Base.Binary.fst | 168 - .../Core.Base.Number_conversion.fst | 76 - .../fstar/generated-core/Core.Base.Pos.fst | 447 - .../fstar/generated-core/Core.Base.Seq.fst | 221 - .../Core.Base.Spec.Binary.Pos.fst | 18 - .../Core.Base.Spec.Binary.Positive.fst | 127 - .../Core.Base.Spec.Constants.fst | 283 - .../generated-core/Core.Base.Spec.Haxint.fst | 98 - .../generated-core/Core.Base.Spec.Seq.fst | 22 - .../generated-core/Core.Base.Spec.Unary.fst | 70 - .../fstar/generated-core/Core.Base.Spec.Z.fst | 19 - .../fstar/generated-core/Core.Base.Z.fst | 400 - .../Core.Base_interface.Coerce.fst | 19 - .../Core.Base_interface.Int.I128_proofs.fst | 23 - .../Core.Base_interface.Int.I16_proofs.fst | 23 - .../Core.Base_interface.Int.I32_proofs.fst | 23 - .../Core.Base_interface.Int.I64_proofs.fst | 23 - .../Core.Base_interface.Int.I8_proofs.fst | 21 - .../Core.Base_interface.Int.U128_proofs.fst | 194 - .../Core.Base_interface.Int.U16_proofs.fst | 194 - .../Core.Base_interface.Int.U32_proofs.fst | 194 - .../Core.Base_interface.Int.U64_proofs.fst | 194 - .../Core.Base_interface.Int.U8_proofs.fst | 190 - .../Core.Base_interface.Int.fst | 5811 ------------ .../fstar/generated-core/Core.Clone.fst | 10 - proof-libs/fstar/generated-core/Core.Cmp.fst | 135 - .../fstar/generated-core/Core.Convert.fst | 33 - .../fstar/generated-core/Core.Intrinsics.fst | 220 - .../fstar/generated-core/Core.Iter.Range.fst | 457 - .../Core.Iter.Traits.Collect.fst | 37 - .../Core.Iter.Traits.Exact_size.fst | 16 - .../Core.Iter.Traits.Iterator.fst | 47 - .../Core.Iter.Traits.Marker.fst | 21 - .../fstar/generated-core/Core.Marker.fst | 14 - proof-libs/fstar/generated-core/Core.Num.fst | 472 - .../Core.Ops.Arith.Impls_for_prims.fst | 136 - .../fstar/generated-core/Core.Ops.Arith.fst | 51 - .../Core.Ops.Bit.Impls_for_prims.fst | 208 - .../fstar/generated-core/Core.Ops.Bit.fst | 51 - .../generated-core/Core.Ops.Function.fst | 31 - .../fstar/generated-core/Core.Ops.Index.fst | 12 - .../generated-core/Core.Ops.Index_range.fst | 118 - .../fstar/generated-core/Core.Ops.Range.fst | 9 - .../fstar/generated-core/Core.Option.fst | 61 - .../fstar/generated-core/Core.Panicking.fst | 51 - .../Core.Primitive.Number_conversion.fst | 88 - .../Core.Primitive.Number_conversion_i.fst | 88 - .../fstar/generated-core/Core.Primitive.fst | 140 - .../fstar/generated-core/Core.Result.fst | 13 - .../Core.Slice.Index.Private_slice_index.fst | 24 - .../fstar/generated-core/Core.Slice.Index.fst | 12 - .../fstar/generated-core/Core.Slice.Iter.fst | 42 - .../fstar/generated-core/Core.Slice.fst | 33 - 56 files changed, 19529 deletions(-) delete mode 100644 proof-libs/fstar/generated-core/Core.Array.Iter.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Array.Rec_bundle_579704328.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Array.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Binary.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Pos.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Seq.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Pos.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Constants.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Haxint.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Spec.Z.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base.Z.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.I128_proofs.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.I16_proofs.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.I32_proofs.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.I64_proofs.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.I8_proofs.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Base_interface.Int.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Clone.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Cmp.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Convert.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Intrinsics.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Iter.Range.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Iter.Traits.Exact_size.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Iter.Traits.Iterator.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Marker.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Num.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Ops.Arith.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Ops.Bit.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Ops.Function.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Ops.Index.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Ops.Index_range.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Ops.Range.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Option.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Panicking.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Primitive.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Result.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Slice.Index.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Slice.Iter.fst delete mode 100644 proof-libs/fstar/generated-core/Core.Slice.fst diff --git a/proof-libs/fstar/generated-core/Core.Array.Iter.fst b/proof-libs/fstar/generated-core/Core.Array.Iter.fst deleted file mode 100644 index 1dd1ec7ca..000000000 --- a/proof-libs/fstar/generated-core/Core.Array.Iter.fst +++ /dev/null @@ -1,9 +0,0 @@ -module Core.Array.Iter -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_IntoIter (v_T: Type0) (v_N: usize) = { - f_data:Core.Primitive.t_Array v_T v_N; - f_alive:Core.Ops.Index_range.t_IndexRange -} diff --git a/proof-libs/fstar/generated-core/Core.Array.Rec_bundle_579704328.fst b/proof-libs/fstar/generated-core/Core.Array.Rec_bundle_579704328.fst deleted file mode 100644 index 858a145a5..000000000 --- a/proof-libs/fstar/generated-core/Core.Array.Rec_bundle_579704328.fst +++ /dev/null @@ -1,8018 +0,0 @@ -module Core.Array.Rec_bundle_579704328 -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_TryFromSliceError = | TryFromSliceError : Prims.unit -> t_TryFromSliceError - -type t_Seq (v_T: Type0) = { f_v:Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Clone.t_Clone (t_Seq v_T) = - { - f_clone_pre = (fun (self: t_Seq v_T) -> true); - f_clone_post = (fun (self: t_Seq v_T) (out: t_Seq v_T) -> true); - f_clone - = - fun (self: t_Seq v_T) -> - { - f_v - = - Core.Clone.f_clone #(Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global) - #FStar.Tactics.Typeclasses.solve - self.f_v - } - <: - t_Seq v_T - } - -type t_LIST (v_T: Type0) = - | LIST_NIL : t_LIST v_T - | LIST_CONS : v_T -> t_Seq v_T -> t_LIST v_T - -let nil - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (_: Prims.unit) - : t_Seq v_T = { f_v = Alloc.Vec.impl__new #v_T () } <: t_Seq v_T - -type t_Slice (v_T: Type0) = { f_v:t_Seq v_T } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2 (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Convert.t_From (t_Slice v_T) (t_Slice v_T) = - { - f_from_pre = (fun (x: t_Slice v_T) -> true); - f_from_post = (fun (x: t_Slice v_T) (out: t_Slice v_T) -> true); - f_from - = - fun (x: t_Slice v_T) -> - { f_v = { f_v = Alloc.Slice.impl__to_vec #v_T x } <: t_Seq v_T } <: t_Slice v_T - } - -type t_Array (v_T: Type0) (v_N: usize) = { f_v:t_Slice v_T } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2 - (#v_T: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Clone.t_Clone (t_Array v_T v_N) = - { - f_clone_pre = (fun (self: t_Array v_T v_N) -> true); - f_clone_post = (fun (self: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); - f_clone - = - fun (self: t_Array v_T v_N) -> - { f_v = Core.Clone.f_clone #(t_Slice v_T) #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_Array v_T v_N - } - -let cast - (#v_T: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (self: t_Array v_T v_N) - : t_Slice v_T = self.f_v - -type t_i128 = | C_i128 : Core.Base_interface.Int.t_I128 -> t_i128 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Clone.t_Clone t_i128 = - { - f_clone_pre = (fun (self: t_i128) -> true); - f_clone_post = (fun (self: t_i128) (out: t_i128) -> true); - f_clone - = - fun (self: t_i128) -> - t_i128 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I128 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i128 - } - -type t_i16 = | C_i16 : Core.Base_interface.Int.t_I16 -> t_i16 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Clone.t_Clone t_i16 = - { - f_clone_pre = (fun (self: t_i16) -> true); - f_clone_post = (fun (self: t_i16) (out: t_i16) -> true); - f_clone - = - fun (self: t_i16) -> - t_i16 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I16 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i16 - } - -type t_i32 = | C_i32 : Core.Base_interface.Int.t_I32 -> t_i32 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Clone.t_Clone t_i32 = - { - f_clone_pre = (fun (self: t_i32) -> true); - f_clone_post = (fun (self: t_i32) (out: t_i32) -> true); - f_clone - = - fun (self: t_i32) -> - t_i32 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I32 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i32 - } - -type t_i64 = | C_i64 : Core.Base_interface.Int.t_I64 -> t_i64 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Clone.t_Clone t_i64 = - { - f_clone_pre = (fun (self: t_i64) -> true); - f_clone_post = (fun (self: t_i64) (out: t_i64) -> true); - f_clone - = - fun (self: t_i64) -> - t_i64 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i64 - } - -type t_i8 = | C_i8 : Core.Base_interface.Int.t_I8 -> t_i8 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Clone.t_Clone t_i8 = - { - f_clone_pre = (fun (self: t_i8) -> true); - f_clone_post = (fun (self: t_i8) (out: t_i8) -> true); - f_clone - = - fun (self: t_i8) -> - t_i8 - (Core.Clone.f_clone #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i8 - } - -type t_isize = | C_isize : Core.Base_interface.Int.t_I64 -> t_isize - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Clone.t_Clone t_isize = - { - f_clone_pre = (fun (self: t_isize) -> true); - f_clone_post = (fun (self: t_isize) (out: t_isize) -> true); - f_clone - = - fun (self: t_isize) -> - t_isize - (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Convert.t_From t_isize t_i64 = - { - f_from_pre = (fun (x: t_i64) -> true); - f_from_post = (fun (x: t_i64) (out: t_isize) -> true); - f_from - = - fun (x: t_i64) -> - t_isize - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Convert.t_From t_i64 t_isize = - { - f_from_pre = (fun (x: t_isize) -> true); - f_from_post = (fun (x: t_isize) (out: t_i64) -> true); - f_from - = - fun (x: t_isize) -> - t_i64 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i64 - } - -type t_u128 = | C_u128 : Core.Base_interface.Int.t_U128 -> t_u128 - -let from_le715594649 (x: t_u128) : t_u128 = x - -let to_le902648378 (self: t_u128) : t_u128 = self - -type t_u16 = | C_u16 : Core.Base_interface.Int.t_U16 -> t_u16 - -let from_le793045973 (x: t_u16) : t_u16 = x - -let to_le1012469456 (self: t_u16) : t_u16 = self - -type t_u32 = | C_u32 : Core.Base_interface.Int.t_U32 -> t_u32 - -let from_le706338679 (x: t_u32) : t_u32 = x - -let to_le724624277 (self: t_u32) : t_u32 = self - -type t_u64 = | C_u64 : Core.Base_interface.Int.t_U64 -> t_u64 - -let from_le435089922 (x: t_u64) : t_u64 = x - -let to_le2703875 (self: t_u64) : t_u64 = self - -type t_u8 = | C_u8 : Core.Base_interface.Int.t_U8 -> t_u8 - -let from_le529489651 (x: t_u8) : t_u8 = x - -let to_le523556665 (self: t_u8) : t_u8 = self - -type t_usize = | C_usize : Core.Base_interface.Int.t_U64 -> t_usize - -let from_le418743864 (x: t_usize) : t_usize = x - -let to_le946822077 (self: t_usize) : t_usize = self - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Convert.t_From t_usize t_u64 = - { - f_from_pre = (fun (x: t_u64) -> true); - f_from_post = (fun (x: t_u64) (out: t_usize) -> true); - f_from - = - fun (x: t_u64) -> - t_usize - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Convert.t_From t_u64 t_usize = - { - f_from_pre = (fun (x: t_usize) -> true); - f_from_post = (fun (x: t_usize) (out: t_u64) -> true); - f_from - = - fun (x: t_usize) -> - t_u64 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u64 - } - -class v_Sealed (v_Self: Type0) = { __marker_trait_v_Sealed:Prims.unit } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: v_Sealed t_usize = { __marker_trait = () } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: v_Sealed (Core.Ops.Range.t_Range usize) = { __marker_trait = () } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: v_Sealed (Core.Ops.Range.t_RangeTo usize) = { __marker_trait = () } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: v_Sealed (Core.Ops.Range.t_RangeFrom usize) = { __marker_trait = () } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: v_Sealed Core.Ops.Range.t_RangeFull = { __marker_trait = () } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: v_Sealed (Core.Ops.Range.t_RangeInclusive usize) = { __marker_trait = () } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: v_Sealed (Core.Ops.Range.t_RangeToInclusive usize) = { __marker_trait = () } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: v_Sealed (Core.Ops.Range.t_Bound usize & Core.Ops.Range.t_Bound usize) = - { __marker_trait = () } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: v_Sealed Core.Ops.Index_range.t_IndexRange = { __marker_trait = () } - -let v_BITS80497669: t_u32 = t_u32 Core.Base_interface.Int.impl_97__BITS <: t_u32 - -let v_MAX626626007: t_i8 = - t_i8 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_i8 - -let v_MIN19747349: t_i8 = - t_i8 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_i8 - -let v_BITS421056295: t_u32 = t_u32 Core.Base_interface.Int.impl_83__BITS <: t_u32 - -let v_MAX474501300: t_i16 = - t_i16 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_i16 - -let v_MIN776391606: t_i16 = - t_i16 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_i16 - -let v_BITS465526498: t_u32 = t_u32 Core.Base_interface.Int.impl_69__BITS <: t_u32 - -let v_MAX106630818: t_i32 = - t_i32 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_i32 - -let v_MIN682967538: t_i32 = - t_i32 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_i32 - -let v_BITS419886578: t_u32 = t_u32 Core.Base_interface.Int.impl_55__BITS <: t_u32 - -let v_MAX527043787: t_i64 = - t_i64 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_i64 - -let v_MIN654206259: t_i64 = - t_i64 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_i64 - -let v_BITS992667165: t_u32 = t_u32 Core.Base_interface.Int.impl_41__BITS <: t_u32 - -let v_MAX375377319: t_i128 = - t_i128 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_i128 - -let v_MIN79612531: t_i128 = - t_i128 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_i128 - -let v_BITS211584016: t_u32 = t_u32 Core.Base_interface.Int.impl_55__BITS <: t_u32 - -let v_MAX937003029: t_isize = - t_isize (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_isize - -let v_MIN1017039533: t_isize = - t_isize (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_isize - -let v_BITS690311813: t_u32 = t_u32 Core.Base_interface.Int.impl_219__BITS <: t_u32 - -let v_MAX310118176: t_u8 = - t_u8 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_u8 - -let v_MIN41851434: t_u8 = - t_u8 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_u8 - -let v_BITS277333551: t_u32 = t_u32 Core.Base_interface.Int.impl_192__BITS <: t_u32 - -let v_MAX487295910: t_u16 = - t_u16 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_u16 - -let v_MIN592300287: t_u16 = - t_u16 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_u16 - -let v_BITS473478051: t_u32 = t_u32 Core.Base_interface.Int.impl_165__BITS <: t_u32 - -let v_MAX826434525: t_u32 = - t_u32 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_u32 - -let v_MIN932777089: t_u32 = - t_u32 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_u32 - -let v_BITS177666292: t_u32 = t_u32 Core.Base_interface.Int.impl_138__BITS <: t_u32 - -let v_MAX815180633: t_u64 = - t_u64 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_u64 - -let v_MIN631333594: t_u64 = - t_u64 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_u64 - -let v_BITS136999051: t_u32 = t_u32 Core.Base_interface.Int.impl_111__BITS <: t_u32 - -let v_MAX404543799: t_u128 = - t_u128 (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_u128 - -let v_MIN668621698: t_u128 = - t_u128 (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_u128 - -let v_BITS229952196: t_u32 = t_u32 Core.Base_interface.Int.impl_138__BITS <: t_u32 - -let v_MAX750570916: t_usize = - t_usize (Core.Base_interface.Int.f_MAX #FStar.Tactics.Typeclasses.solve) <: t_usize - -let v_MIN861571008: t_usize = - t_usize (Core.Base_interface.Int.f_MIN #FStar.Tactics.Typeclasses.solve) <: t_usize - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1 - (#v_T #v_I: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i3: Core.Ops.Index.t_Index (t_Slice v_T) v_I) - : Core.Ops.Index.t_Index (t_Array v_T v_N) v_I = - { - f_Output = i3.f_Output; - f_index_pre = (fun (self: t_Array v_T v_N) (index: v_I) -> true); - f_index_post = (fun (self: t_Array v_T v_N) (index: v_I) (out: i3.f_Output) -> true); - f_index - = - fun (self: t_Array v_T v_N) (index: v_I) -> (cast #v_T v_N self <: t_Slice v_T).[ index ] - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1 - (#v_T: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Convert.t_From (t_Array v_T v_N) (t_Array v_T v_N) = - { - f_from_pre = (fun (x: t_Array v_T v_N) -> true); - f_from_post = (fun (x: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); - f_from - = - fun (x: t_Array v_T v_N) -> - match - Core.Convert.f_try_into #(Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global) - #(t_Array v_T v_N) - #FStar.Tactics.Typeclasses.solve - x.f_v.f_v.f_v - with - | Core.Result.Result_Ok x -> x - | _ -> - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_const (sz 1 - ) - (let list = ["some error?"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Clone.t_Clone t_u8 = - { - f_clone_pre = (fun (self: t_u8) -> true); - f_clone_post = (fun (self: t_u8) (out: t_u8) -> true); - f_clone - = - fun (self: t_u8) -> - t_u8 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Clone.t_Clone t_u16 = - { - f_clone_pre = (fun (self: t_u16) -> true); - f_clone_post = (fun (self: t_u16) (out: t_u16) -> true); - f_clone - = - fun (self: t_u16) -> - t_u16 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Clone.t_Clone t_u32 = - { - f_clone_pre = (fun (self: t_u32) -> true); - f_clone_post = (fun (self: t_u32) (out: t_u32) -> true); - f_clone - = - fun (self: t_u32) -> - t_u32 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Clone.t_Clone t_u64 = - { - f_clone_pre = (fun (self: t_u64) -> true); - f_clone_post = (fun (self: t_u64) (out: t_u64) -> true); - f_clone - = - fun (self: t_u64) -> - t_u64 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Clone.t_Clone t_u128 = - { - f_clone_pre = (fun (self: t_u128) -> true); - f_clone_post = (fun (self: t_u128) (out: t_u128) -> true); - f_clone - = - fun (self: t_u128) -> - t_u128 - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Clone.t_Clone t_usize = - { - f_clone_pre = (fun (self: t_usize) -> true); - f_clone_post = (fun (self: t_usize) (out: t_usize) -> true); - f_clone - = - fun (self: t_usize) -> - t_usize - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_usize - } - -class v_SliceIndex (v_Self: Type0) (v_T: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_9346575357466912174:v_Sealed v_Self; - f_Output:Type0; - f_index_pre:v_Self -> v_T -> Type0; - f_index_post:v_Self -> v_T -> f_Output -> Type0; - f_index:x0: v_Self -> x1: v_T - -> Prims.Pure f_Output (f_index_pre x0 x1) (fun result -> f_index_post x0 x1 result) -} - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl - (#v_T #v_I: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: v_SliceIndex v_I (t_Slice v_T)) - : Core.Ops.Index.t_Index (t_Slice v_T) v_I = - { - f_Output = i2.f_Output; - f_index_pre = (fun (self: t_Slice v_T) (index: v_I) -> true); - f_index_post = (fun (self: t_Slice v_T) (index: v_I) (out: i2.f_Output) -> true); - f_index - = - fun (self: t_Slice v_T) (index: v_I) -> - Core.Slice.Index.f_index #v_I #(t_Slice v_T) #FStar.Tactics.Typeclasses.solve index self - } - -let cons - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: t_Seq v_T) - (t: v_T) - : t_Seq v_T = - { - f_v - = - Alloc.Slice.impl__concat #(t_Slice v_T) - #v_T - ((let list = - [ - (let list = [t] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list).[ Core.Ops.Range.RangeFull - <: - Core.Ops.Range.t_RangeFull ]; - s.f_v.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] - ] - in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); - Rust_primitives.Hax.array_of_list 2 list) - <: - t_Slice (t_Slice v_T)) - } - <: - t_Seq v_T - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl - (#v_T: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Convert.t_From (t_Array v_T v_N) (t_Array v_T v_N) = - { - f_from_pre = (fun (x: t_Array v_T v_N) -> true); - f_from_post = (fun (x: t_Array v_T v_N) (out: t_Array v_T v_N) -> true); - f_from - = - fun (x: t_Array v_T v_N) -> - { - f_v - = - { - f_v - = - { - f_v - = - Alloc.Slice.impl__to_vec #v_T - (x.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] <: t_Slice v_T) - } - <: - t_Seq v_T - } - <: - t_Slice v_T - } - <: - t_Array v_T v_N - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2 (#v_T: Type0) : v_SliceIndex Core.Ops.Range.t_RangeFull (t_Slice v_T) = - { - _super_9346575357466912174 = FStar.Tactics.Typeclasses.solve; - f_Output = t_Slice v_T; - f_index_pre = (fun (self: Core.Ops.Range.t_RangeFull) (slice: t_Slice v_T) -> true); - f_index_post - = - (fun (self: Core.Ops.Range.t_RangeFull) (slice: t_Slice v_T) (out: t_Slice v_T) -> true); - f_index = fun (self: Core.Ops.Range.t_RangeFull) (slice: t_Slice v_T) -> slice - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl - (#v_T: Type0) - (v_N: usize) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Convert.t_AsRef (t_Array v_T v_N) (t_Slice v_T) = - { - f_as_ref_pre = (fun (self: t_Array v_T v_N) -> true); - f_as_ref_post = (fun (self: t_Array v_T v_N) (out: t_Slice v_T) -> true); - f_as_ref - = - fun (self: t_Array v_T v_N) -> self.[ Core.Ops.Range.RangeFull <: Core.Ops.Range.t_RangeFull ] - } - -let match_list - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: t_Seq v_T) - : t_LIST v_T = - if - Rust_primitives.Usize.eq (Alloc.Vec.impl_1__len #v_T #Alloc.Alloc.t_Global s.f_v <: usize) - (sz 0) - then LIST_NIL <: t_LIST v_T - else - LIST_CONS (Core.Clone.f_clone #v_T #FStar.Tactics.Typeclasses.solve (s.f_v.[ sz 0 ] <: v_T)) - ({ - f_v - = - Alloc.Slice.impl__concat #(t_Slice v_T) - #v_T - ((let list = - [s.f_v.[ { Core.Ops.Range.f_start = sz 1 } <: Core.Ops.Range.t_RangeFrom usize ]] - in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice (t_Slice v_T)) - } - <: - t_Seq v_T) - <: - t_LIST v_T - -let rec from_u128_binary (x: u128) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.U128.ne x (pub_u128 0)) - (fun _ -> Prims.l_True) = - if Rust_primitives.U128.eq x (pub_u128 1) - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.U128.eq (Rust_primitives.U128.rem x (pub_u128 2) <: u128) (pub_u128 0) - then - Core.Base.Spec.Binary.Positive.xO (from_u128_binary (Rust_primitives.U128.div x (pub_u128 2) - <: - u128) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (from_u128_binary (Rust_primitives.U128.div x (pub_u128 2) - <: - u128) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u128 = - { - f_from_pre = (fun (x: u128) -> true); - f_from_post = (fun (x: u128) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: u128) -> - if Rust_primitives.U128.eq x (pub_u128 0) - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (from_u128_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Convert.t_From Core.Base.Spec.Z.t_Z i128 = - { - f_from_pre = (fun (x: i128) -> true); - f_from_post = (fun (x: i128) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: i128) -> - match Core.Cmp.f_cmp #i128 #FStar.Tactics.Typeclasses.solve x (pub_i128 0) with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG (from_u128_binary (Core.Num.impl__i128__unsigned_abs x <: u128)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS (from_u128_binary (Core.Num.impl__i128__unsigned_abs x <: u128)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec from_u16_binary (x: u16) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.U16.ne x 0us) - (fun _ -> Prims.l_True) = - if Rust_primitives.U16.eq x 1us - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.U16.eq (Rust_primitives.U16.rem x 2us <: u16) 0us - then - Core.Base.Spec.Binary.Positive.xO (from_u16_binary (Rust_primitives.U16.div x 2us <: u16) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (from_u16_binary (Rust_primitives.U16.div x 2us <: u16) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u16 = - { - f_from_pre = (fun (x: u16) -> true); - f_from_post = (fun (x: u16) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: u16) -> - if Rust_primitives.U16.eq x 0us - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (from_u16_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Convert.t_From Core.Base.Spec.Z.t_Z i16 = - { - f_from_pre = (fun (x: i16) -> true); - f_from_post = (fun (x: i16) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: i16) -> - match Core.Cmp.f_cmp #i16 #FStar.Tactics.Typeclasses.solve x 0s with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG (from_u16_binary (Core.Num.impl__i16__unsigned_abs x <: u16)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS (from_u16_binary (Core.Num.impl__i16__unsigned_abs x <: u16)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec from_u32_binary (x: u32) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.U32.ne x 0ul) - (fun _ -> Prims.l_True) = - if Rust_primitives.U32.eq x 1ul - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.U32.eq (Rust_primitives.U32.rem x 2ul <: u32) 0ul - then - Core.Base.Spec.Binary.Positive.xO (from_u32_binary (Rust_primitives.U32.div x 2ul <: u32) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (from_u32_binary (Rust_primitives.U32.div x 2ul <: u32) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u32 = - { - f_from_pre = (fun (x: u32) -> true); - f_from_post = (fun (x: u32) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: u32) -> - if Rust_primitives.U32.eq x 0ul - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (from_u32_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Convert.t_From Core.Base.Spec.Z.t_Z i32 = - { - f_from_pre = (fun (x: i32) -> true); - f_from_post = (fun (x: i32) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: i32) -> - match Core.Cmp.f_cmp #i32 #FStar.Tactics.Typeclasses.solve x 0l with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG (from_u32_binary (Core.Num.impl_2__unsigned_abs x <: u32)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS (from_u32_binary (Core.Num.impl_2__unsigned_abs x <: u32)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec from_u64_binary (x: u64) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.U64.ne x 0uL) - (fun _ -> Prims.l_True) = - if Rust_primitives.U64.eq x 1uL - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.U64.eq (Rust_primitives.U64.rem x 2uL <: u64) 0uL - then - Core.Base.Spec.Binary.Positive.xO (from_u64_binary (Rust_primitives.U64.div x 2uL <: u64) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (from_u64_binary (Rust_primitives.U64.div x 2uL <: u64) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u64 = - { - f_from_pre = (fun (x: u64) -> true); - f_from_post = (fun (x: u64) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: u64) -> - if Rust_primitives.U64.eq x 0uL - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (from_u64_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Convert.t_From Core.Base.Spec.Z.t_Z i64 = - { - f_from_pre = (fun (x: i64) -> true); - f_from_post = (fun (x: i64) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: i64) -> - match Core.Cmp.f_cmp #i64 #FStar.Tactics.Typeclasses.solve x 0L with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG (from_u64_binary (Core.Num.impl__i64__unsigned_abs x <: u64)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS (from_u64_binary (Core.Num.impl__i64__unsigned_abs x <: u64)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec from_u8_binary (x: u8) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.U8.ne x 0uy) - (fun _ -> Prims.l_True) = - if Rust_primitives.U8.eq x 1uy - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.U8.eq (Rust_primitives.U8.rem x 2uy <: u8) 0uy - then - Core.Base.Spec.Binary.Positive.xO (from_u8_binary (Rust_primitives.U8.div x 2uy <: u8) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (from_u8_binary (Rust_primitives.U8.div x 2uy <: u8) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt u8 = - { - f_from_pre = (fun (x: u8) -> true); - f_from_post = (fun (x: u8) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: u8) -> - if Rust_primitives.U8.eq x 0uy - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (from_u8_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Convert.t_From Core.Base.Spec.Z.t_Z i8 = - { - f_from_pre = (fun (x: i8) -> true); - f_from_post = (fun (x: i8) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: i8) -> - match Core.Cmp.f_cmp #i8 #FStar.Tactics.Typeclasses.solve x 0y with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG (from_u8_binary (Core.Num.impl__i8__unsigned_abs x <: u8)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS (from_u8_binary (Core.Num.impl__i8__unsigned_abs x <: u8)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec from_usize_binary (x: usize) - : Prims.Pure Core.Base.Spec.Binary.Positive.t_Positive - (requires Rust_primitives.Usize.ne x (sz 0)) - (fun _ -> Prims.l_True) = - if Rust_primitives.Usize.eq x (sz 1) - then Core.Base.Spec.Binary.Positive.xH - else - if Rust_primitives.Usize.eq (Rust_primitives.Usize.rem x (sz 2) <: usize) (sz 0) - then - Core.Base.Spec.Binary.Positive.xO (from_usize_binary (Rust_primitives.Usize.div x (sz 2) - <: - usize) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - else - Core.Base.Spec.Binary.Positive.xI (from_usize_binary (Rust_primitives.Usize.div x (sz 2) - <: - usize) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Convert.t_From Core.Base.Spec.Haxint.t_HaxInt usize = - { - f_from_pre = (fun (x: usize) -> true); - f_from_post = (fun (x: usize) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from - = - fun (x: usize) -> - if Rust_primitives.Usize.eq x (sz 0) - then Core.Base.Spec.Haxint.v_HaxInt_ZERO - else - Core.Base.Spec.Binary.Positive.positive_to_int (from_usize_binary x - <: - Core.Base.Spec.Binary.Positive.t_Positive) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Convert.t_From Core.Base.Spec.Z.t_Z isize = - { - f_from_pre = (fun (x: isize) -> true); - f_from_post = (fun (x: isize) (out: Core.Base.Spec.Z.t_Z) -> true); - f_from - = - fun (x: isize) -> - match Core.Cmp.f_cmp #isize #FStar.Tactics.Typeclasses.solve x (isz 0) with - | Core.Cmp.Ordering_Equal -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Less -> - Core.Base.Spec.Z.Z_NEG (from_usize_binary (Core.Num.impl__isize__unsigned_abs x <: usize)) - <: - Core.Base.Spec.Z.t_Z - | Core.Cmp.Ordering_Greater -> - Core.Base.Spec.Z.Z_POS (from_usize_binary (Core.Num.impl__isize__unsigned_abs x <: usize)) - <: - Core.Base.Spec.Z.t_Z - } - -let rec to_u128_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u128 = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> pub_u128 1 - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.U128.mul (to_u128_binary p <: u128) (pub_u128 2) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.U128.add (Rust_primitives.U128.mul (to_u128_binary p <: u128) (pub_u128 2) - <: - u128) - (pub_u128 1) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Convert.t_From u128 Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u128) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> pub_u128 0 - | Core.Base.Spec.Binary.Pos.POS_POS p -> to_u128_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Convert.t_From i128 Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i128) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.I128.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U128.sub (to_u128_binary - x - <: - u128) - (pub_u128 1) - <: - u128) - <: - i128) - <: - i128) - (pub_i128 1) - | Core.Base.Spec.Z.Z_ZERO -> pub_i128 0 - | Core.Base.Spec.Z.Z_POS x -> cast (to_u128_binary x <: u128) <: i128 - } - -let rec to_u16_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u16 = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1us - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.U16.mul (to_u16_binary p <: u16) 2us - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.U16.add (Rust_primitives.U16.mul (to_u16_binary p <: u16) 2us <: u16) 1us - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Convert.t_From u16 Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u16) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0us - | Core.Base.Spec.Binary.Pos.POS_POS p -> to_u16_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Convert.t_From i16 Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i16) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.I16.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U16.sub (to_u16_binary - x - <: - u16) - 1us - <: - u16) - <: - i16) - <: - i16) - 1s - | Core.Base.Spec.Z.Z_ZERO -> 0s - | Core.Base.Spec.Z.Z_POS x -> cast (to_u16_binary x <: u16) <: i16 - } - -let rec to_u32_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u32 = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1ul - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.U32.mul (to_u32_binary p <: u32) 2ul - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.U32.add (Rust_primitives.U32.mul (to_u32_binary p <: u32) 2ul <: u32) 1ul - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Convert.t_From u32 Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u32) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0ul - | Core.Base.Spec.Binary.Pos.POS_POS p -> to_u32_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Convert.t_From i32 Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i32) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.I32.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U32.sub (to_u32_binary - x - <: - u32) - 1ul - <: - u32) - <: - i32) - <: - i32) - 1l - | Core.Base.Spec.Z.Z_ZERO -> 0l - | Core.Base.Spec.Z.Z_POS x -> cast (to_u32_binary x <: u32) <: i32 - } - -let rec to_u64_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u64 = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1uL - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.U64.mul (to_u64_binary p <: u64) 2uL - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.U64.add (Rust_primitives.U64.mul (to_u64_binary p <: u64) 2uL <: u64) 1uL - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Convert.t_From u64 Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u64) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0uL - | Core.Base.Spec.Binary.Pos.POS_POS p -> to_u64_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Convert.t_From i64 Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i64) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.I64.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U64.sub (to_u64_binary - x - <: - u64) - 1uL - <: - u64) - <: - i64) - <: - i64) - 1L - | Core.Base.Spec.Z.Z_ZERO -> 0L - | Core.Base.Spec.Z.Z_POS x -> cast (to_u64_binary x <: u64) <: i64 - } - -let rec to_u8_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : u8 = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> 1uy - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.U8.mul (to_u8_binary p <: u8) 2uy - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.U8.add (Rust_primitives.U8.mul (to_u8_binary p <: u8) 2uy <: u8) 1uy - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Convert.t_From u8 Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: u8) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> 0uy - | Core.Base.Spec.Binary.Pos.POS_POS p -> to_u8_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Convert.t_From i8 Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: i8) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.I8.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.U8.sub (to_u8_binary x - <: - u8) - 1uy - <: - u8) - <: - i8) - <: - i8) - 1y - | Core.Base.Spec.Z.Z_ZERO -> 0y - | Core.Base.Spec.Z.Z_POS x -> cast (to_u8_binary x <: u8) <: i8 - } - -let rec to_usize_binary (self: Core.Base.Spec.Binary.Positive.t_Positive) : usize = - match Core.Base.Spec.Binary.Positive.match_positive self with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> sz 1 - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Rust_primitives.Usize.mul (to_usize_binary p <: usize) (sz 2) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Rust_primitives.Usize.add (Rust_primitives.Usize.mul (to_usize_binary p <: usize) (sz 2) - <: - usize) - (sz 1) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Convert.t_From usize Core.Base.Spec.Haxint.t_HaxInt = - { - f_from_pre = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_from_post = (fun (x: Core.Base.Spec.Haxint.t_HaxInt) (out: usize) -> true); - f_from - = - fun (x: Core.Base.Spec.Haxint.t_HaxInt) -> - match Core.Base.Spec.Binary.Pos.match_pos x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> sz 0 - | Core.Base.Spec.Binary.Pos.POS_POS p -> to_usize_binary p - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Convert.t_From isize Core.Base.Spec.Z.t_Z = - { - f_from_pre = (fun (x: Core.Base.Spec.Z.t_Z) -> true); - f_from_post = (fun (x: Core.Base.Spec.Z.t_Z) (out: isize) -> true); - f_from - = - fun (x: Core.Base.Spec.Z.t_Z) -> - match x with - | Core.Base.Spec.Z.Z_NEG x -> - Rust_primitives.Isize.sub (Core.Ops.Arith.Neg.neg (cast (Rust_primitives.Usize.sub (to_usize_binary - x - <: - usize) - (sz 1) - <: - usize) - <: - isize) - <: - isize) - (isz 1) - | Core.Base.Spec.Z.Z_ZERO -> isz 0 - | Core.Base.Spec.Z.Z_POS x -> cast (to_usize_binary x <: usize) <: isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Cmp.t_PartialEq t_u8 t_u8 = - { - f_eq_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_eq_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_eq = (fun (self: t_u8) (rhs: t_u8) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_ne_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_ne = fun (self: t_u8) (rhs: t_u8) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Cmp.t_PartialOrd t_u8 t_u8 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_partial_cmp_post - = - (fun (self: t_u8) (rhs: t_u8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_u8) (rhs: t_u8) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_lt_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_lt - = - (fun (self: t_u8) (rhs: t_u8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_le_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_le - = - (fun (self: t_u8) (rhs: t_u8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_gt_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_gt - = - (fun (self: t_u8) (rhs: t_u8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_u8) (rhs: t_u8) -> true); - f_ge_post = (fun (self: t_u8) (rhs: t_u8) (out: bool) -> true); - f_ge - = - fun (self: t_u8) (rhs: t_u8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Cmp.t_PartialEq t_u16 t_u16 = - { - f_eq_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_eq_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_eq = (fun (self: t_u16) (rhs: t_u16) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_ne_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_ne = fun (self: t_u16) (rhs: t_u16) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Cmp.t_PartialOrd t_u16 t_u16 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_partial_cmp_post - = - (fun (self: t_u16) (rhs: t_u16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_u16) (rhs: t_u16) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_lt_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_lt - = - (fun (self: t_u16) (rhs: t_u16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_le_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_le - = - (fun (self: t_u16) (rhs: t_u16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_gt_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_gt - = - (fun (self: t_u16) (rhs: t_u16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_u16) (rhs: t_u16) -> true); - f_ge_post = (fun (self: t_u16) (rhs: t_u16) (out: bool) -> true); - f_ge - = - fun (self: t_u16) (rhs: t_u16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Cmp.t_PartialEq t_u32 t_u32 = - { - f_eq_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_eq_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_eq = (fun (self: t_u32) (rhs: t_u32) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_ne_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_ne = fun (self: t_u32) (rhs: t_u32) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Cmp.t_PartialOrd t_u32 t_u32 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_partial_cmp_post - = - (fun (self: t_u32) (rhs: t_u32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_u32) (rhs: t_u32) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_lt_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_lt - = - (fun (self: t_u32) (rhs: t_u32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_le_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_le - = - (fun (self: t_u32) (rhs: t_u32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_gt_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_gt - = - (fun (self: t_u32) (rhs: t_u32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_u32) (rhs: t_u32) -> true); - f_ge_post = (fun (self: t_u32) (rhs: t_u32) (out: bool) -> true); - f_ge - = - fun (self: t_u32) (rhs: t_u32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Cmp.t_PartialEq t_u64 t_u64 = - { - f_eq_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_eq_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_eq = (fun (self: t_u64) (rhs: t_u64) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_ne_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_ne = fun (self: t_u64) (rhs: t_u64) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Cmp.t_PartialOrd t_u64 t_u64 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_partial_cmp_post - = - (fun (self: t_u64) (rhs: t_u64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_u64) (rhs: t_u64) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_lt_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_lt - = - (fun (self: t_u64) (rhs: t_u64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_le_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_le - = - (fun (self: t_u64) (rhs: t_u64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_gt_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_gt - = - (fun (self: t_u64) (rhs: t_u64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_u64) (rhs: t_u64) -> true); - f_ge_post = (fun (self: t_u64) (rhs: t_u64) (out: bool) -> true); - f_ge - = - fun (self: t_u64) (rhs: t_u64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Cmp.t_PartialEq t_u128 t_u128 = - { - f_eq_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_eq_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_eq = (fun (self: t_u128) (rhs: t_u128) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_ne_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_ne = fun (self: t_u128) (rhs: t_u128) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Cmp.t_PartialOrd t_u128 t_u128 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_partial_cmp_post - = - (fun (self: t_u128) (rhs: t_u128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_u128) (rhs: t_u128) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_lt_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_lt - = - (fun (self: t_u128) (rhs: t_u128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_le_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_le - = - (fun (self: t_u128) (rhs: t_u128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_gt_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_gt - = - (fun (self: t_u128) (rhs: t_u128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_u128) (rhs: t_u128) -> true); - f_ge_post = (fun (self: t_u128) (rhs: t_u128) (out: bool) -> true); - f_ge - = - fun (self: t_u128) (rhs: t_u128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Cmp.t_PartialEq t_usize t_usize = - { - f_eq_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_eq_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_eq = (fun (self: t_usize) (rhs: t_usize) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_ne_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_ne = fun (self: t_usize) (rhs: t_usize) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Cmp.t_PartialOrd t_usize t_usize = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_partial_cmp_post - = - (fun (self: t_usize) (rhs: t_usize) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_usize) (rhs: t_usize) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_lt_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_lt - = - (fun (self: t_usize) (rhs: t_usize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_le_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_le - = - (fun (self: t_usize) (rhs: t_usize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_gt_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_gt - = - (fun (self: t_usize) (rhs: t_usize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_usize) (rhs: t_usize) -> true); - f_ge_post = (fun (self: t_usize) (rhs: t_usize) (out: bool) -> true); - f_ge - = - fun (self: t_usize) (rhs: t_usize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Cmp.t_PartialEq t_i8 t_i8 = - { - f_eq_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_eq_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_eq = (fun (self: t_i8) (rhs: t_i8) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_ne_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_ne = fun (self: t_i8) (rhs: t_i8) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_42: Core.Cmp.t_PartialOrd t_i8 t_i8 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_partial_cmp_post - = - (fun (self: t_i8) (rhs: t_i8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_i8) (rhs: t_i8) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_lt_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_lt - = - (fun (self: t_i8) (rhs: t_i8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_le_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_le - = - (fun (self: t_i8) (rhs: t_i8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_gt_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_gt - = - (fun (self: t_i8) (rhs: t_i8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_i8) (rhs: t_i8) -> true); - f_ge_post = (fun (self: t_i8) (rhs: t_i8) (out: bool) -> true); - f_ge - = - fun (self: t_i8) (rhs: t_i8) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_43: Core.Cmp.t_PartialEq t_i16 t_i16 = - { - f_eq_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_eq_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_eq = (fun (self: t_i16) (rhs: t_i16) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_ne_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_ne = fun (self: t_i16) (rhs: t_i16) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_44: Core.Cmp.t_PartialOrd t_i16 t_i16 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_partial_cmp_post - = - (fun (self: t_i16) (rhs: t_i16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_i16) (rhs: t_i16) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_lt_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_lt - = - (fun (self: t_i16) (rhs: t_i16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_le_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_le - = - (fun (self: t_i16) (rhs: t_i16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_gt_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_gt - = - (fun (self: t_i16) (rhs: t_i16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_i16) (rhs: t_i16) -> true); - f_ge_post = (fun (self: t_i16) (rhs: t_i16) (out: bool) -> true); - f_ge - = - fun (self: t_i16) (rhs: t_i16) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_45: Core.Cmp.t_PartialEq t_i32 t_i32 = - { - f_eq_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_eq_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_eq = (fun (self: t_i32) (rhs: t_i32) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_ne_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_ne = fun (self: t_i32) (rhs: t_i32) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_46: Core.Cmp.t_PartialOrd t_i32 t_i32 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_partial_cmp_post - = - (fun (self: t_i32) (rhs: t_i32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_i32) (rhs: t_i32) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_lt_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_lt - = - (fun (self: t_i32) (rhs: t_i32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_le_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_le - = - (fun (self: t_i32) (rhs: t_i32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_gt_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_gt - = - (fun (self: t_i32) (rhs: t_i32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_i32) (rhs: t_i32) -> true); - f_ge_post = (fun (self: t_i32) (rhs: t_i32) (out: bool) -> true); - f_ge - = - fun (self: t_i32) (rhs: t_i32) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_47: Core.Cmp.t_PartialEq t_i64 t_i64 = - { - f_eq_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_eq_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_eq = (fun (self: t_i64) (rhs: t_i64) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_ne_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_ne = fun (self: t_i64) (rhs: t_i64) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_48: Core.Cmp.t_PartialOrd t_i64 t_i64 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_partial_cmp_post - = - (fun (self: t_i64) (rhs: t_i64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_i64) (rhs: t_i64) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_lt_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_lt - = - (fun (self: t_i64) (rhs: t_i64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_le_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_le - = - (fun (self: t_i64) (rhs: t_i64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_gt_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_gt - = - (fun (self: t_i64) (rhs: t_i64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_i64) (rhs: t_i64) -> true); - f_ge_post = (fun (self: t_i64) (rhs: t_i64) (out: bool) -> true); - f_ge - = - fun (self: t_i64) (rhs: t_i64) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_49: Core.Cmp.t_PartialEq t_i128 t_i128 = - { - f_eq_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_eq_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_eq = (fun (self: t_i128) (rhs: t_i128) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_ne_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_ne = fun (self: t_i128) (rhs: t_i128) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_50: Core.Cmp.t_PartialOrd t_i128 t_i128 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_partial_cmp_post - = - (fun (self: t_i128) (rhs: t_i128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_i128) (rhs: t_i128) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_lt_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_lt - = - (fun (self: t_i128) (rhs: t_i128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_le_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_le - = - (fun (self: t_i128) (rhs: t_i128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_gt_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_gt - = - (fun (self: t_i128) (rhs: t_i128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_i128) (rhs: t_i128) -> true); - f_ge_post = (fun (self: t_i128) (rhs: t_i128) (out: bool) -> true); - f_ge - = - fun (self: t_i128) (rhs: t_i128) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_51: Core.Cmp.t_PartialEq t_isize t_isize = - { - f_eq_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_eq_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_eq = (fun (self: t_isize) (rhs: t_isize) -> self._0 =. rhs._0); - f_ne_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_ne_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_ne = fun (self: t_isize) (rhs: t_isize) -> ~.(self._0 =. rhs._0 <: bool) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_52: Core.Cmp.t_PartialOrd t_isize t_isize = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_partial_cmp_post - = - (fun (self: t_isize) (rhs: t_isize) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_isize) (rhs: t_isize) -> - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0); - f_lt_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_lt_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_lt - = - (fun (self: t_isize) (rhs: t_isize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false); - f_le_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_le_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_le - = - (fun (self: t_isize) (rhs: t_isize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false); - f_gt_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_gt_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_gt - = - (fun (self: t_isize) (rhs: t_isize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) -> true - | _ -> false); - f_ge_pre = (fun (self: t_isize) (rhs: t_isize) -> true); - f_ge_post = (fun (self: t_isize) (rhs: t_isize) (out: bool) -> true); - f_ge - = - fun (self: t_isize) (rhs: t_isize) -> - match - Core.Cmp.f_partial_cmp #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - self._0 - rhs._0 - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Greater ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Convert.t_From t_u8 u8 = - { - f_from_pre = (fun (x: u8) -> true); - f_from_post = (fun (x: u8) (out: t_u8) -> true); - f_from - = - fun (x: u8) -> - t_u8 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #u8 #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_U8) - <: - t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Convert.t_From u8 t_u8 = - { - f_from_pre = (fun (x: t_u8) -> true); - f_from_post = (fun (x: t_u8) (out: u8) -> true); - f_from - = - fun (x: t_u8) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #u8 - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Convert.t_From t_u16 u16 = - { - f_from_pre = (fun (x: u16) -> true); - f_from_post = (fun (x: u16) (out: t_u16) -> true); - f_from - = - fun (x: u16) -> - t_u16 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #u16 - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - x - } - <: - Core.Base_interface.Int.t_U16) - <: - t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Convert.t_From u16 t_u16 = - { - f_from_pre = (fun (x: t_u16) -> true); - f_from_post = (fun (x: t_u16) (out: u16) -> true); - f_from - = - fun (x: t_u16) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #u16 - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Convert.t_From t_u32 u32 = - { - f_from_pre = (fun (x: u32) -> true); - f_from_post = (fun (x: u32) (out: t_u32) -> true); - f_from - = - fun (x: u32) -> - t_u32 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #u32 - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - x - } - <: - Core.Base_interface.Int.t_U32) - <: - t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Convert.t_From u32 t_u32 = - { - f_from_pre = (fun (x: t_u32) -> true); - f_from_post = (fun (x: t_u32) (out: u32) -> true); - f_from - = - fun (x: t_u32) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #u32 - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Convert.t_From t_u64 u64 = - { - f_from_pre = (fun (x: u64) -> true); - f_from_post = (fun (x: u64) (out: t_u64) -> true); - f_from - = - fun (x: u64) -> - t_u64 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #u64 - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - x - } - <: - Core.Base_interface.Int.t_U64) - <: - t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Convert.t_From u64 t_u64 = - { - f_from_pre = (fun (x: t_u64) -> true); - f_from_post = (fun (x: t_u64) (out: u64) -> true); - f_from - = - fun (x: t_u64) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #u64 - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Convert.t_From t_u128 u128 = - { - f_from_pre = (fun (x: u128) -> true); - f_from_post = (fun (x: u128) (out: t_u128) -> true); - f_from - = - fun (x: u128) -> - t_u128 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #u128 - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - x - } - <: - Core.Base_interface.Int.t_U128) - <: - t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Convert.t_From u128 t_u128 = - { - f_from_pre = (fun (x: t_u128) -> true); - f_from_post = (fun (x: t_u128) (out: u128) -> true); - f_from - = - fun (x: t_u128) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #u128 - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Convert.t_From t_usize usize = - { - f_from_pre = (fun (x: usize) -> true); - f_from_post = (fun (x: usize) (out: t_usize) -> true); - f_from - = - fun (x: usize) -> - t_usize - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #usize - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - x - } - <: - Core.Base_interface.Int.t_U64) - <: - t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Convert.t_From usize t_usize = - { - f_from_pre = (fun (x: t_usize) -> true); - f_from_post = (fun (x: t_usize) (out: usize) -> true); - f_from - = - fun (x: t_usize) -> - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #usize - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Convert.t_From t_i8 i8 = - { - f_from_pre = (fun (x: i8) -> true); - f_from_post = (fun (x: i8) (out: t_i8) -> true); - f_from - = - fun (x: i8) -> - t_i8 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #i8 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I8) - <: - t_i8 - } - -let is_negative350273175 (self: t_i8) : bool = - self <. (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) - -let is_positive286955196 (self: t_i8) : bool = - self >. (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) - -let signum721334203 (self: t_i8) : t_i8 = - if - (Core.Clone.f_clone #t_i8 #FStar.Tactics.Typeclasses.solve self <: t_i8) <. - (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) - then Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve (-1y) - else - if self =. (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) - then Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y - else Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 1y - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Convert.t_From i8 t_i8 = - { - f_from_pre = (fun (x: t_i8) -> true); - f_from_post = (fun (x: t_i8) (out: i8) -> true); - f_from - = - fun (x: t_i8) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #i8 - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Convert.t_From t_i16 i16 = - { - f_from_pre = (fun (x: i16) -> true); - f_from_post = (fun (x: i16) (out: t_i16) -> true); - f_from - = - fun (x: i16) -> - t_i16 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #i16 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I16) - <: - t_i16 - } - -let is_negative477067241 (self: t_i16) : bool = - self <. (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s <: t_i16) - -let is_positive821581438 (self: t_i16) : bool = - self >. (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s <: t_i16) - -let signum243706004 (self: t_i16) : t_i16 = - if - (Core.Clone.f_clone #t_i16 #FStar.Tactics.Typeclasses.solve self <: t_i16) <. - (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s <: t_i16) - then Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve (-1s) - else - if self =. (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s <: t_i16) - then Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s - else Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 1s - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Convert.t_From i16 t_i16 = - { - f_from_pre = (fun (x: t_i16) -> true); - f_from_post = (fun (x: t_i16) (out: i16) -> true); - f_from - = - fun (x: t_i16) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #i16 - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Convert.t_From t_i32 i32 = - { - f_from_pre = (fun (x: i32) -> true); - f_from_post = (fun (x: i32) (out: t_i32) -> true); - f_from - = - fun (x: i32) -> - t_i32 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #i32 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I32) - <: - t_i32 - } - -let is_negative1035644813 (self: t_i32) : bool = - self <. (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l <: t_i32) - -let is_positive401652342 (self: t_i32) : bool = - self >. (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l <: t_i32) - -let signum323641039 (self: t_i32) : t_i32 = - if - (Core.Clone.f_clone #t_i32 #FStar.Tactics.Typeclasses.solve self <: t_i32) <. - (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l <: t_i32) - then Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve (-1l) - else - if self =. (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l <: t_i32) - then Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l - else Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 1l - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Convert.t_From i32 t_i32 = - { - f_from_pre = (fun (x: t_i32) -> true); - f_from_post = (fun (x: t_i32) (out: i32) -> true); - f_from - = - fun (x: t_i32) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #i32 - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Convert.t_From t_i64 i64 = - { - f_from_pre = (fun (x: i64) -> true); - f_from_post = (fun (x: i64) (out: t_i64) -> true); - f_from - = - fun (x: i64) -> - t_i64 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #i64 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I64) - <: - t_i64 - } - -let is_negative1066124578 (self: t_i64) : bool = - self <. (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L <: t_i64) - -let is_positive16569358 (self: t_i64) : bool = - self >. (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L <: t_i64) - -let signum582963664 (self: t_i64) : t_i64 = - if - (Core.Clone.f_clone #t_i64 #FStar.Tactics.Typeclasses.solve self <: t_i64) <. - (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L <: t_i64) - then Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve (-1L) - else - if self =. (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L <: t_i64) - then Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L - else Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 1L - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Convert.t_From i64 t_i64 = - { - f_from_pre = (fun (x: t_i64) -> true); - f_from_post = (fun (x: t_i64) (out: i64) -> true); - f_from - = - fun (x: t_i64) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #i64 - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Convert.t_From t_i128 i128 = - { - f_from_pre = (fun (x: i128) -> true); - f_from_post = (fun (x: i128) (out: t_i128) -> true); - f_from - = - fun (x: i128) -> - t_i128 - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #i128 #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I128) - <: - t_i128 - } - -let is_negative221698470 (self: t_i128) : bool = - self <. - (Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) <: t_i128) - -let is_positive883218309 (self: t_i128) : bool = - self >. - (Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) <: t_i128) - -let signum408800799 (self: t_i128) : t_i128 = - if - (Core.Clone.f_clone #t_i128 #FStar.Tactics.Typeclasses.solve self <: t_i128) <. - (Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) <: t_i128) - then Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 (-1)) - else - if - self =. - (Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) <: t_i128) - then Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) - else Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 1) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Convert.t_From i128 t_i128 = - { - f_from_pre = (fun (x: t_i128) -> true); - f_from_post = (fun (x: t_i128) (out: i128) -> true); - f_from - = - fun (x: t_i128) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #i128 - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Convert.t_From t_isize isize = - { - f_from_pre = (fun (x: isize) -> true); - f_from_post = (fun (x: isize) (out: t_isize) -> true); - f_from - = - fun (x: isize) -> - t_isize - ({ - Core.Base_interface.Int.f_v - = - Core.Convert.f_into #isize #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve x - } - <: - Core.Base_interface.Int.t_I64) - <: - t_isize - } - -let is_negative693446369 (self: t_isize) : bool = - self <. (Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) <: t_isize) - -let is_positive169998680 (self: t_isize) : bool = - self >. (Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) <: t_isize) - -let signum91486536 (self: t_isize) : t_isize = - if - (Core.Clone.f_clone #t_isize #FStar.Tactics.Typeclasses.solve self <: t_isize) <. - (Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) <: t_isize) - then Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz (-1)) - else - if - self =. - (Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) <: t_isize) - then Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) - else Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 1) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Convert.t_From isize t_isize = - { - f_from_pre = (fun (x: t_isize) -> true); - f_from_post = (fun (x: t_isize) (out: isize) -> true); - f_from - = - fun (x: t_isize) -> - Core.Convert.f_into #Core.Base.Spec.Z.t_Z - #isize - #FStar.Tactics.Typeclasses.solve - x._0.Core.Base_interface.Int.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Convert.t_From t_i16 t_i8 = - { - f_from_pre = (fun (x: t_i8) -> true); - f_from_post = (fun (x: t_i8) (out: t_i16) -> true); - f_from - = - fun (x: t_i8) -> - t_i16 - (Core.Convert.f_into #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Convert.t_From t_i32 t_i8 = - { - f_from_pre = (fun (x: t_i8) -> true); - f_from_post = (fun (x: t_i8) (out: t_i32) -> true); - f_from - = - fun (x: t_i8) -> - t_i32 - (Core.Convert.f_into #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Convert.t_From t_i64 t_i8 = - { - f_from_pre = (fun (x: t_i8) -> true); - f_from_post = (fun (x: t_i8) (out: t_i64) -> true); - f_from - = - fun (x: t_i8) -> - t_i64 - (Core.Convert.f_into #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Convert.t_From t_i128 t_i8 = - { - f_from_pre = (fun (x: t_i8) -> true); - f_from_post = (fun (x: t_i8) (out: t_i128) -> true); - f_from - = - fun (x: t_i8) -> - t_i128 - (Core.Convert.f_into #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Convert.t_From t_isize t_i8 = - { - f_from_pre = (fun (x: t_i8) -> true); - f_from_post = (fun (x: t_i8) (out: t_isize) -> true); - f_from - = - fun (x: t_i8) -> - t_isize - (Core.Convert.f_into #Core.Base_interface.Int.t_I8 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Convert.t_From t_i8 t_i16 = - { - f_from_pre = (fun (x: t_i16) -> true); - f_from_post = (fun (x: t_i16) (out: t_i8) -> true); - f_from - = - fun (x: t_i16) -> - t_i8 - (Core.Convert.f_into #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Convert.t_From t_i32 t_i16 = - { - f_from_pre = (fun (x: t_i16) -> true); - f_from_post = (fun (x: t_i16) (out: t_i32) -> true); - f_from - = - fun (x: t_i16) -> - t_i32 - (Core.Convert.f_into #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Convert.t_From t_i64 t_i16 = - { - f_from_pre = (fun (x: t_i16) -> true); - f_from_post = (fun (x: t_i16) (out: t_i64) -> true); - f_from - = - fun (x: t_i16) -> - t_i64 - (Core.Convert.f_into #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Convert.t_From t_i128 t_i16 = - { - f_from_pre = (fun (x: t_i16) -> true); - f_from_post = (fun (x: t_i16) (out: t_i128) -> true); - f_from - = - fun (x: t_i16) -> - t_i128 - (Core.Convert.f_into #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Convert.t_From t_isize t_i16 = - { - f_from_pre = (fun (x: t_i16) -> true); - f_from_post = (fun (x: t_i16) (out: t_isize) -> true); - f_from - = - fun (x: t_i16) -> - t_isize - (Core.Convert.f_into #Core.Base_interface.Int.t_I16 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Convert.t_From t_i8 t_i32 = - { - f_from_pre = (fun (x: t_i32) -> true); - f_from_post = (fun (x: t_i32) (out: t_i8) -> true); - f_from - = - fun (x: t_i32) -> - t_i8 - (Core.Convert.f_into #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Convert.t_From t_i16 t_i32 = - { - f_from_pre = (fun (x: t_i32) -> true); - f_from_post = (fun (x: t_i32) (out: t_i16) -> true); - f_from - = - fun (x: t_i32) -> - t_i16 - (Core.Convert.f_into #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Convert.t_From t_i64 t_i32 = - { - f_from_pre = (fun (x: t_i32) -> true); - f_from_post = (fun (x: t_i32) (out: t_i64) -> true); - f_from - = - fun (x: t_i32) -> - t_i64 - (Core.Convert.f_into #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Convert.t_From t_i128 t_i32 = - { - f_from_pre = (fun (x: t_i32) -> true); - f_from_post = (fun (x: t_i32) (out: t_i128) -> true); - f_from - = - fun (x: t_i32) -> - t_i128 - (Core.Convert.f_into #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Convert.t_From t_isize t_i32 = - { - f_from_pre = (fun (x: t_i32) -> true); - f_from_post = (fun (x: t_i32) (out: t_isize) -> true); - f_from - = - fun (x: t_i32) -> - t_isize - (Core.Convert.f_into #Core.Base_interface.Int.t_I32 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Convert.t_From t_i8 t_i64 = - { - f_from_pre = (fun (x: t_i64) -> true); - f_from_post = (fun (x: t_i64) (out: t_i8) -> true); - f_from - = - fun (x: t_i64) -> - t_i8 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Convert.t_From t_i16 t_i64 = - { - f_from_pre = (fun (x: t_i64) -> true); - f_from_post = (fun (x: t_i64) (out: t_i16) -> true); - f_from - = - fun (x: t_i64) -> - t_i16 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Convert.t_From t_i32 t_i64 = - { - f_from_pre = (fun (x: t_i64) -> true); - f_from_post = (fun (x: t_i64) (out: t_i32) -> true); - f_from - = - fun (x: t_i64) -> - t_i32 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Convert.t_From t_i128 t_i64 = - { - f_from_pre = (fun (x: t_i64) -> true); - f_from_post = (fun (x: t_i64) (out: t_i128) -> true); - f_from - = - fun (x: t_i64) -> - t_i128 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Convert.t_From t_i8 t_i128 = - { - f_from_pre = (fun (x: t_i128) -> true); - f_from_post = (fun (x: t_i128) (out: t_i8) -> true); - f_from - = - fun (x: t_i128) -> - t_i8 - (Core.Convert.f_into #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Convert.t_From t_i16 t_i128 = - { - f_from_pre = (fun (x: t_i128) -> true); - f_from_post = (fun (x: t_i128) (out: t_i16) -> true); - f_from - = - fun (x: t_i128) -> - t_i16 - (Core.Convert.f_into #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Convert.t_From t_i32 t_i128 = - { - f_from_pre = (fun (x: t_i128) -> true); - f_from_post = (fun (x: t_i128) (out: t_i32) -> true); - f_from - = - fun (x: t_i128) -> - t_i32 - (Core.Convert.f_into #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Convert.t_From t_i64 t_i128 = - { - f_from_pre = (fun (x: t_i128) -> true); - f_from_post = (fun (x: t_i128) (out: t_i64) -> true); - f_from - = - fun (x: t_i128) -> - t_i64 - (Core.Convert.f_into #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Convert.t_From t_isize t_i128 = - { - f_from_pre = (fun (x: t_i128) -> true); - f_from_post = (fun (x: t_i128) (out: t_isize) -> true); - f_from - = - fun (x: t_i128) -> - t_isize - (Core.Convert.f_into #Core.Base_interface.Int.t_I128 - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Convert.t_From t_i8 t_isize = - { - f_from_pre = (fun (x: t_isize) -> true); - f_from_post = (fun (x: t_isize) (out: t_i8) -> true); - f_from - = - fun (x: t_isize) -> - t_i8 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Convert.t_From t_i16 t_isize = - { - f_from_pre = (fun (x: t_isize) -> true); - f_from_post = (fun (x: t_isize) (out: t_i16) -> true); - f_from - = - fun (x: t_isize) -> - t_i16 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Convert.t_From t_i32 t_isize = - { - f_from_pre = (fun (x: t_isize) -> true); - f_from_post = (fun (x: t_isize) (out: t_i32) -> true); - f_from - = - fun (x: t_isize) -> - t_i32 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Convert.t_From t_i128 t_isize = - { - f_from_pre = (fun (x: t_isize) -> true); - f_from_post = (fun (x: t_isize) (out: t_i128) -> true); - f_from - = - fun (x: t_isize) -> - t_i128 - (Core.Convert.f_into #Core.Base_interface.Int.t_I64 - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_i128 - } - -/// The methods `index` and `index_mut` panic if the index is out of bounds. -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1 (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : v_SliceIndex t_usize (t_Slice v_T) = - { - _super_9346575357466912174 = FStar.Tactics.Typeclasses.solve; - f_Output = v_T; - f_index_pre = (fun (self: t_usize) (slice: t_Slice v_T) -> true); - f_index_post = (fun (self: t_usize) (slice: t_Slice v_T) (out: v_T) -> true); - f_index - = - fun (self: t_usize) (slice: t_Slice v_T) -> - let (x: usize):usize = - Core.Convert.f_into #Core.Base.Spec.Haxint.t_HaxInt - #usize - #FStar.Tactics.Typeclasses.solve - self._0.Core.Base_interface.Int.f_v - in - slice.f_v.f_v.[ x ] - } - -let add_with_overflow_i128 (x y: t_i128) : (t_i128 & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I128):Core.Base_interface.Int.t_I128 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (t_i128 (Core.Clone.f_clone #Core.Base_interface.Int.t_I128 #FStar.Tactics.Typeclasses.solve res) - <: - t_i128), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (t_i128 & bool) - -let add_with_overflow_i16 (x y: t_i16) : (t_i16 & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I16):Core.Base_interface.Int.t_I16 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (t_i16 (Core.Clone.f_clone #Core.Base_interface.Int.t_I16 #FStar.Tactics.Typeclasses.solve res) - <: - t_i16), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (t_i16 & bool) - -let add_with_overflow_i32 (x y: t_i32) : (t_i32 & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I32):Core.Base_interface.Int.t_I32 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (t_i32 (Core.Clone.f_clone #Core.Base_interface.Int.t_I32 #FStar.Tactics.Typeclasses.solve res) - <: - t_i32), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (t_i32 & bool) - -let add_with_overflow_i64 (x y: t_i64) : (t_i64 & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I64):Core.Base_interface.Int.t_I64 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (t_i64 (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve res) - <: - t_i64), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (t_i64 & bool) - -let add_with_overflow_i8 (x y: t_i8) : (t_i8 & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I8):Core.Base_interface.Int.t_I8 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (t_i8 (Core.Clone.f_clone #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve res) - <: - t_i8), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (t_i8 & bool) - -let add_with_overflow_isize (x y: t_isize) : (t_isize & bool) = - let overflow:Core.Base.Spec.Z.t_Z = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - in - let (res: Core.Base_interface.Int.t_I64):Core.Base_interface.Int.t_I64 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Z.t_Z) - in - (t_isize (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve res) - <: - t_isize), - Core.Base.Z.z_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Z.t_Z) - overflow - <: - (t_isize & bool) - -let unchecked_add_i128 (x y: t_i128) : t_i128 = - t_i128 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I128) - <: - t_i128 - -let unchecked_add_i16 (x y: t_i16) : t_i16 = - t_i16 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I16) - <: - t_i16 - -let unchecked_add_i32 (x y: t_i32) : t_i32 = - t_i32 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I32) - <: - t_i32 - -let unchecked_add_i64 (x y: t_i64) : t_i64 = - t_i64 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I64) - <: - t_i64 - -let unchecked_add_i8 (x y: t_i8) : t_i8 = - t_i8 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I8) - <: - t_i8 - -let unchecked_add_isize (x y: t_isize) : t_isize = - t_isize - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I64) - <: - t_isize - -let unchecked_add_u128 (x y: t_u128) : t_u128 = - t_u128 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U128) - <: - t_u128 - -let unchecked_add_u16 (x y: t_u16) : t_u16 = - t_u16 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U16) - <: - t_u16 - -let unchecked_add_u32 (x y: t_u32) : t_u32 = - t_u32 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U32) - <: - t_u32 - -let unchecked_add_u64 (x y: t_u64) : t_u64 = - t_u64 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U64) - <: - t_u64 - -let unchecked_add_u8 (x y: t_u8) : t_u8 = - t_u8 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U8) - <: - t_u8 - -let unchecked_add_usize (x y: t_usize) : t_usize = - t_usize - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U64) - <: - t_usize - -let checked_add268751055 (self rhs: t_u8) : Core.Option.t_Option t_u8 = - Core.Option.Option_Some (unchecked_add_u8 self rhs) <: Core.Option.t_Option t_u8 - -let checked_add132377399 (self rhs: t_u16) : Core.Option.t_Option t_u16 = - Core.Option.Option_Some (unchecked_add_u16 self rhs) <: Core.Option.t_Option t_u16 - -let checked_add985437730 (self rhs: t_u32) : Core.Option.t_Option t_u32 = - Core.Option.Option_Some (unchecked_add_u32 self rhs) <: Core.Option.t_Option t_u32 - -let checked_add586246465 (self rhs: t_u64) : Core.Option.t_Option t_u64 = - Core.Option.Option_Some (unchecked_add_u64 self rhs) <: Core.Option.t_Option t_u64 - -let checked_add218978451 (self rhs: t_u128) : Core.Option.t_Option t_u128 = - Core.Option.Option_Some (unchecked_add_u128 self rhs) <: Core.Option.t_Option t_u128 - -let checked_add984013567 (self rhs: t_usize) : Core.Option.t_Option t_usize = - Core.Option.Option_Some (unchecked_add_usize self rhs) <: Core.Option.t_Option t_usize - -let add_with_overflow_u128 (x y: t_u128) : (t_u128 & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U128):Core.Base_interface.Int.t_U128 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (t_u128 (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve res) - <: - t_u128), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (t_u128 & bool) - -let add_with_overflow_u16 (x y: t_u16) : (t_u16 & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U16):Core.Base_interface.Int.t_U16 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (t_u16 (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve res) - <: - t_u16), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (t_u16 & bool) - -let add_with_overflow_u32 (x y: t_u32) : (t_u32 & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U32):Core.Base_interface.Int.t_U32 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (t_u32 (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve res) - <: - t_u32), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (t_u32 & bool) - -let add_with_overflow_u64 (x y: t_u64) : (t_u64 & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U64):Core.Base_interface.Int.t_U64 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (t_u64 (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) - <: - t_u64), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (t_u64 & bool) - -let add_with_overflow_u8 (x y: t_u8) : (t_u8 & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U8):Core.Base_interface.Int.t_U8 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (t_u8 (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve res) - <: - t_u8), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (t_u8 & bool) - -let add_with_overflow_usize (x y: t_usize) : (t_usize & bool) = - let overflow:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - let (res: Core.Base_interface.Int.t_U64):Core.Base_interface.Int.t_U64 = - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve overflow - <: - Core.Base.Spec.Haxint.t_HaxInt) - in - (t_usize (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve res) - <: - t_usize), - Core.Base.Pos.haxint_lt (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - res - <: - Core.Base.Spec.Haxint.t_HaxInt) - overflow - <: - (t_usize & bool) - -let unchecked_div_u128 (x y: t_u128) : t_u128 = - t_u128 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U128) - <: - t_u128 - -let unchecked_div_u16 (x y: t_u16) : t_u16 = - t_u16 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U16) - <: - t_u16 - -let unchecked_div_u32 (x y: t_u32) : t_u32 = - t_u32 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U32) - <: - t_u32 - -let unchecked_div_u64 (x y: t_u64) : t_u64 = - t_u64 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U64) - <: - t_u64 - -let unchecked_div_u8 (x y: t_u8) : t_u8 = - t_u8 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U8) - <: - t_u8 - -let unchecked_div_usize (x y: t_usize) : t_usize = - t_usize - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - <: - Core.Base_interface.Int.t_U64) - <: - t_usize - -let wrapping_add_i128 (a b: t_i128) : t_i128 = t_i128 (a._0 +! b._0) <: t_i128 - -let wrapping_add_i16 (a b: t_i16) : t_i16 = t_i16 (a._0 +! b._0) <: t_i16 - -let wrapping_add_i32 (a b: t_i32) : t_i32 = t_i32 (a._0 +! b._0) <: t_i32 - -let wrapping_add_i64 (a b: t_i64) : t_i64 = t_i64 (a._0 +! b._0) <: t_i64 - -let wrapping_add_i8 (a b: t_i8) : t_i8 = t_i8 (a._0 +! b._0) <: t_i8 - -let wrapping_add_isize (a b: t_isize) : t_isize = t_isize (a._0 +! b._0) <: t_isize - -let wrapping_sub_i128 (a b: t_i128) : t_i128 = t_i128 (a._0 -! b._0) <: t_i128 - -let wrapping_sub_i16 (a b: t_i16) : t_i16 = t_i16 (a._0 -! b._0) <: t_i16 - -let wrapping_sub_i32 (a b: t_i32) : t_i32 = t_i32 (a._0 -! b._0) <: t_i32 - -let wrapping_sub_i64 (a b: t_i64) : t_i64 = t_i64 (a._0 -! b._0) <: t_i64 - -let wrapping_sub_i8 (a b: t_i8) : t_i8 = t_i8 (a._0 -! b._0) <: t_i8 - -let wrapping_sub_isize (a b: t_isize) : t_isize = t_isize (a._0 -! b._0) <: t_isize - -let wrapping_add634491935 (self rhs: t_i8) : t_i8 = wrapping_add_i8 self rhs - -let wrapping_sub973428293 (self rhs: t_i8) : t_i8 = wrapping_sub_i8 self rhs - -let wrapping_neg400701205 (self: t_i8) : t_i8 = - wrapping_sub973428293 (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) - self - -let wrapping_abs400396545 (self: t_i8) : t_i8 = - if is_negative350273175 (Core.Clone.f_clone #t_i8 #FStar.Tactics.Typeclasses.solve self <: t_i8) - then wrapping_neg400701205 self - else self - -let wrapping_add868559108 (self rhs: t_i16) : t_i16 = wrapping_add_i16 self rhs - -let wrapping_sub189469152 (self rhs: t_i16) : t_i16 = wrapping_sub_i16 self rhs - -let wrapping_neg860505723 (self: t_i16) : t_i16 = - wrapping_sub189469152 (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s - <: - t_i16) - self - -let wrapping_abs229076826 (self: t_i16) : t_i16 = - if is_negative477067241 (Core.Clone.f_clone #t_i16 #FStar.Tactics.Typeclasses.solve self <: t_i16) - then wrapping_neg860505723 self - else self - -let wrapping_add475006616 (self rhs: t_i32) : t_i32 = wrapping_add_i32 self rhs - -let wrapping_sub298337071 (self rhs: t_i32) : t_i32 = wrapping_sub_i32 self rhs - -let wrapping_neg636433078 (self: t_i32) : t_i32 = - wrapping_sub298337071 (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l - <: - t_i32) - self - -let wrapping_abs729536875 (self: t_i32) : t_i32 = - if - is_negative1035644813 (Core.Clone.f_clone #t_i32 #FStar.Tactics.Typeclasses.solve self <: t_i32) - then wrapping_neg636433078 self - else self - -let wrapping_add590074241 (self rhs: t_i64) : t_i64 = wrapping_add_i64 self rhs - -let wrapping_sub334584751 (self rhs: t_i64) : t_i64 = wrapping_sub_i64 self rhs - -let wrapping_neg868282938 (self: t_i64) : t_i64 = - wrapping_sub334584751 (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L - <: - t_i64) - self - -let wrapping_abs285829312 (self: t_i64) : t_i64 = - if - is_negative1066124578 (Core.Clone.f_clone #t_i64 #FStar.Tactics.Typeclasses.solve self <: t_i64) - then wrapping_neg868282938 self - else self - -let wrapping_add251385439 (self rhs: t_i128) : t_i128 = wrapping_add_i128 self rhs - -let wrapping_sub681598071 (self rhs: t_i128) : t_i128 = wrapping_sub_i128 self rhs - -let wrapping_neg446546984 (self: t_i128) : t_i128 = - wrapping_sub681598071 (Core.Convert.f_into #i128 - #t_i128 - #FStar.Tactics.Typeclasses.solve - (pub_i128 0) - <: - t_i128) - self - -let wrapping_abs281925696 (self: t_i128) : t_i128 = - if - is_negative221698470 (Core.Clone.f_clone #t_i128 #FStar.Tactics.Typeclasses.solve self <: t_i128 - ) - then wrapping_neg446546984 self - else self - -let wrapping_add226040243 (self rhs: t_isize) : t_isize = wrapping_add_isize self rhs - -let wrapping_sub698035192 (self rhs: t_isize) : t_isize = wrapping_sub_isize self rhs - -let wrapping_neg912291768 (self: t_isize) : t_isize = - wrapping_sub698035192 (Core.Convert.f_into #isize - #t_isize - #FStar.Tactics.Typeclasses.solve - (isz 0) - <: - t_isize) - self - -let wrapping_abs347300819 (self: t_isize) : t_isize = - if - is_negative693446369 (Core.Clone.f_clone #t_isize #FStar.Tactics.Typeclasses.solve self - <: - t_isize) - then wrapping_neg912291768 self - else self - -let checked_div508301931 (self rhs: t_u8) : Core.Option.t_Option t_u8 = - if rhs =. (Core.Convert.f_into #u8 #t_u8 #FStar.Tactics.Typeclasses.solve 0uy <: t_u8) - then Core.Option.Option_None <: Core.Option.t_Option t_u8 - else Core.Option.Option_Some (unchecked_div_u8 self rhs) <: Core.Option.t_Option t_u8 - -let overflowing_add708890057 (self rhs: t_u8) : (t_u8 & bool) = add_with_overflow_u8 self rhs - -let checked_div614920780 (self rhs: t_u16) : Core.Option.t_Option t_u16 = - if rhs =. (Core.Convert.f_into #u16 #t_u16 #FStar.Tactics.Typeclasses.solve 0us <: t_u16) - then Core.Option.Option_None <: Core.Option.t_Option t_u16 - else Core.Option.Option_Some (unchecked_div_u16 self rhs) <: Core.Option.t_Option t_u16 - -let overflowing_add1023344178 (self rhs: t_u16) : (t_u16 & bool) = add_with_overflow_u16 self rhs - -let checked_div979383477 (self rhs: t_u32) : Core.Option.t_Option t_u32 = - if rhs =. (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul <: t_u32) - then Core.Option.Option_None <: Core.Option.t_Option t_u32 - else Core.Option.Option_Some (unchecked_div_u32 self rhs) <: Core.Option.t_Option t_u32 - -let overflowing_add905744292 (self rhs: t_u32) : (t_u32 & bool) = add_with_overflow_u32 self rhs - -let checked_div988689127 (self rhs: t_u64) : Core.Option.t_Option t_u64 = - if rhs =. (Core.Convert.f_into #u64 #t_u64 #FStar.Tactics.Typeclasses.solve 0uL <: t_u64) - then Core.Option.Option_None <: Core.Option.t_Option t_u64 - else Core.Option.Option_Some (unchecked_div_u64 self rhs) <: Core.Option.t_Option t_u64 - -let overflowing_add581983607 (self rhs: t_u64) : (t_u64 & bool) = add_with_overflow_u64 self rhs - -let checked_div344106746 (self rhs: t_u128) : Core.Option.t_Option t_u128 = - if - rhs =. - (Core.Convert.f_into #u128 #t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 0) <: t_u128) - then Core.Option.Option_None <: Core.Option.t_Option t_u128 - else Core.Option.Option_Some (unchecked_div_u128 self rhs) <: Core.Option.t_Option t_u128 - -let overflowing_add458293681 (self rhs: t_u128) : (t_u128 & bool) = add_with_overflow_u128 self rhs - -let checked_div80223906 (self rhs: t_usize) : Core.Option.t_Option t_usize = - if rhs =. (Core.Convert.f_into #usize #t_usize #FStar.Tactics.Typeclasses.solve (sz 0) <: t_usize) - then Core.Option.Option_None <: Core.Option.t_Option t_usize - else Core.Option.Option_Some (unchecked_div_usize self rhs) <: Core.Option.t_Option t_usize - -let overflowing_add682280407 (self rhs: t_usize) : (t_usize & bool) = - add_with_overflow_usize self rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Ops.Arith.t_Neg t_i8 = - { - f_Output = t_i8; - f_neg_pre = (fun (self: t_i8) -> true); - f_neg_post = (fun (self: t_i8) (out: t_i8) -> true); - f_neg - = - fun (self: t_i8) -> - t_i8 - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i8 - } - -let abs945505614 (self: t_i8) : t_i8 = - if is_negative350273175 (Core.Clone.f_clone #t_i8 #FStar.Tactics.Typeclasses.solve self <: t_i8) - then Core.Ops.Arith.f_neg #t_i8 #FStar.Tactics.Typeclasses.solve self - else self - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Ops.Arith.t_Neg t_i16 = - { - f_Output = t_i16; - f_neg_pre = (fun (self: t_i16) -> true); - f_neg_post = (fun (self: t_i16) (out: t_i16) -> true); - f_neg - = - fun (self: t_i16) -> - t_i16 - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I16 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i16 - } - -let abs581170970 (self: t_i16) : t_i16 = - if is_negative477067241 (Core.Clone.f_clone #t_i16 #FStar.Tactics.Typeclasses.solve self <: t_i16) - then Core.Ops.Arith.f_neg #t_i16 #FStar.Tactics.Typeclasses.solve self - else self - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Ops.Arith.t_Neg t_i32 = - { - f_Output = t_i32; - f_neg_pre = (fun (self: t_i32) -> true); - f_neg_post = (fun (self: t_i32) (out: t_i32) -> true); - f_neg - = - fun (self: t_i32) -> - t_i32 - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I32 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i32 - } - -let abs590464694 (self: t_i32) : t_i32 = - if - is_negative1035644813 (Core.Clone.f_clone #t_i32 #FStar.Tactics.Typeclasses.solve self <: t_i32) - then Core.Ops.Arith.f_neg #t_i32 #FStar.Tactics.Typeclasses.solve self - else self - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Ops.Arith.t_Neg t_i64 = - { - f_Output = t_i64; - f_neg_pre = (fun (self: t_i64) -> true); - f_neg_post = (fun (self: t_i64) (out: t_i64) -> true); - f_neg - = - fun (self: t_i64) -> - t_i64 - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_i64 - } - -let abs654781043 (self: t_i64) : t_i64 = - if - is_negative1066124578 (Core.Clone.f_clone #t_i64 #FStar.Tactics.Typeclasses.solve self <: t_i64) - then Core.Ops.Arith.f_neg #t_i64 #FStar.Tactics.Typeclasses.solve self - else self - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Ops.Arith.t_Neg t_i128 = - { - f_Output = t_i128; - f_neg_pre = (fun (self: t_i128) -> true); - f_neg_post = (fun (self: t_i128) (out: t_i128) -> true); - f_neg - = - fun (self: t_i128) -> - t_i128 - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I128 #FStar.Tactics.Typeclasses.solve self._0 - ) - <: - t_i128 - } - -let abs204417539 (self: t_i128) : t_i128 = - if - is_negative221698470 (Core.Clone.f_clone #t_i128 #FStar.Tactics.Typeclasses.solve self <: t_i128 - ) - then Core.Ops.Arith.f_neg #t_i128 #FStar.Tactics.Typeclasses.solve self - else self - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Ops.Arith.t_Neg t_isize = - { - f_Output = t_isize; - f_neg_pre = (fun (self: t_isize) -> true); - f_neg_post = (fun (self: t_isize) (out: t_isize) -> true); - f_neg - = - fun (self: t_isize) -> - t_isize - (Core.Ops.Arith.f_neg #Core.Base_interface.Int.t_I64 #FStar.Tactics.Typeclasses.solve self._0) - <: - t_isize - } - -let abs220926056 (self: t_isize) : t_isize = - if - is_negative693446369 (Core.Clone.f_clone #t_isize #FStar.Tactics.Typeclasses.solve self - <: - t_isize) - then Core.Ops.Arith.f_neg #t_isize #FStar.Tactics.Typeclasses.solve self - else self - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_84: Core.Ops.Bit.t_BitOr t_i8 t_i8 = - { - f_Output = t_i8; - f_bitor_pre = (fun (self: t_i8) (other: t_i8) -> true); - f_bitor_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); - f_bitor = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 |. other._0) <: t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_85: Core.Ops.Bit.t_BitOr t_i16 t_i16 = - { - f_Output = t_i16; - f_bitor_pre = (fun (self: t_i16) (other: t_i16) -> true); - f_bitor_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); - f_bitor = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 |. other._0) <: t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_86: Core.Ops.Bit.t_BitOr t_i32 t_i32 = - { - f_Output = t_i32; - f_bitor_pre = (fun (self: t_i32) (other: t_i32) -> true); - f_bitor_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); - f_bitor = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 |. other._0) <: t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_87: Core.Ops.Bit.t_BitOr t_i64 t_i64 = - { - f_Output = t_i64; - f_bitor_pre = (fun (self: t_i64) (other: t_i64) -> true); - f_bitor_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); - f_bitor = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 |. other._0) <: t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_88: Core.Ops.Bit.t_BitOr t_i128 t_i128 = - { - f_Output = t_i128; - f_bitor_pre = (fun (self: t_i128) (other: t_i128) -> true); - f_bitor_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); - f_bitor = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 |. other._0) <: t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_89: Core.Ops.Bit.t_BitOr t_isize t_isize = - { - f_Output = t_isize; - f_bitor_pre = (fun (self: t_isize) (other: t_isize) -> true); - f_bitor_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); - f_bitor = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 |. other._0) <: t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Convert.t_From t_u16 t_u8 = - { - f_from_pre = (fun (x: t_u8) -> true); - f_from_post = (fun (x: t_u8) (out: t_u16) -> true); - f_from - = - fun (x: t_u8) -> - t_u16 - (Core.Convert.f_into #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Convert.t_From t_u32 t_u8 = - { - f_from_pre = (fun (x: t_u8) -> true); - f_from_post = (fun (x: t_u8) (out: t_u32) -> true); - f_from - = - fun (x: t_u8) -> - t_u32 - (Core.Convert.f_into #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Convert.t_From t_u64 t_u8 = - { - f_from_pre = (fun (x: t_u8) -> true); - f_from_post = (fun (x: t_u8) (out: t_u64) -> true); - f_from - = - fun (x: t_u8) -> - t_u64 - (Core.Convert.f_into #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Convert.t_From t_u128 t_u8 = - { - f_from_pre = (fun (x: t_u8) -> true); - f_from_post = (fun (x: t_u8) (out: t_u128) -> true); - f_from - = - fun (x: t_u8) -> - t_u128 - (Core.Convert.f_into #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Convert.t_From t_usize t_u8 = - { - f_from_pre = (fun (x: t_u8) -> true); - f_from_post = (fun (x: t_u8) (out: t_usize) -> true); - f_from - = - fun (x: t_u8) -> - t_usize - (Core.Convert.f_into #Core.Base_interface.Int.t_U8 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Convert.t_From t_u8 t_u16 = - { - f_from_pre = (fun (x: t_u16) -> true); - f_from_post = (fun (x: t_u16) (out: t_u8) -> true); - f_from - = - fun (x: t_u16) -> - t_u8 - (Core.Convert.f_into #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Convert.t_From t_u32 t_u16 = - { - f_from_pre = (fun (x: t_u16) -> true); - f_from_post = (fun (x: t_u16) (out: t_u32) -> true); - f_from - = - fun (x: t_u16) -> - t_u32 - (Core.Convert.f_into #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Convert.t_From t_u64 t_u16 = - { - f_from_pre = (fun (x: t_u16) -> true); - f_from_post = (fun (x: t_u16) (out: t_u64) -> true); - f_from - = - fun (x: t_u16) -> - t_u64 - (Core.Convert.f_into #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Convert.t_From t_u128 t_u16 = - { - f_from_pre = (fun (x: t_u16) -> true); - f_from_post = (fun (x: t_u16) (out: t_u128) -> true); - f_from - = - fun (x: t_u16) -> - t_u128 - (Core.Convert.f_into #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Convert.t_From t_usize t_u16 = - { - f_from_pre = (fun (x: t_u16) -> true); - f_from_post = (fun (x: t_u16) (out: t_usize) -> true); - f_from - = - fun (x: t_u16) -> - t_usize - (Core.Convert.f_into #Core.Base_interface.Int.t_U16 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Convert.t_From t_u8 t_u32 = - { - f_from_pre = (fun (x: t_u32) -> true); - f_from_post = (fun (x: t_u32) (out: t_u8) -> true); - f_from - = - fun (x: t_u32) -> - t_u8 - (Core.Convert.f_into #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Convert.t_From t_u16 t_u32 = - { - f_from_pre = (fun (x: t_u32) -> true); - f_from_post = (fun (x: t_u32) (out: t_u16) -> true); - f_from - = - fun (x: t_u32) -> - t_u16 - (Core.Convert.f_into #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Convert.t_From t_u64 t_u32 = - { - f_from_pre = (fun (x: t_u32) -> true); - f_from_post = (fun (x: t_u32) (out: t_u64) -> true); - f_from - = - fun (x: t_u32) -> - t_u64 - (Core.Convert.f_into #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Convert.t_From t_u128 t_u32 = - { - f_from_pre = (fun (x: t_u32) -> true); - f_from_post = (fun (x: t_u32) (out: t_u128) -> true); - f_from - = - fun (x: t_u32) -> - t_u128 - (Core.Convert.f_into #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Convert.t_From t_usize t_u32 = - { - f_from_pre = (fun (x: t_u32) -> true); - f_from_post = (fun (x: t_u32) (out: t_usize) -> true); - f_from - = - fun (x: t_u32) -> - t_usize - (Core.Convert.f_into #Core.Base_interface.Int.t_U32 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Convert.t_From t_u8 t_u64 = - { - f_from_pre = (fun (x: t_u64) -> true); - f_from_post = (fun (x: t_u64) (out: t_u8) -> true); - f_from - = - fun (x: t_u64) -> - t_u8 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Convert.t_From t_u16 t_u64 = - { - f_from_pre = (fun (x: t_u64) -> true); - f_from_post = (fun (x: t_u64) (out: t_u16) -> true); - f_from - = - fun (x: t_u64) -> - t_u16 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Convert.t_From t_u32 t_u64 = - { - f_from_pre = (fun (x: t_u64) -> true); - f_from_post = (fun (x: t_u64) (out: t_u32) -> true); - f_from - = - fun (x: t_u64) -> - t_u32 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Convert.t_From t_u128 t_u64 = - { - f_from_pre = (fun (x: t_u64) -> true); - f_from_post = (fun (x: t_u64) (out: t_u128) -> true); - f_from - = - fun (x: t_u64) -> - t_u128 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Convert.t_From t_u8 t_u128 = - { - f_from_pre = (fun (x: t_u128) -> true); - f_from_post = (fun (x: t_u128) (out: t_u8) -> true); - f_from - = - fun (x: t_u128) -> - t_u8 - (Core.Convert.f_into #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Convert.t_From t_u16 t_u128 = - { - f_from_pre = (fun (x: t_u128) -> true); - f_from_post = (fun (x: t_u128) (out: t_u16) -> true); - f_from - = - fun (x: t_u128) -> - t_u16 - (Core.Convert.f_into #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Convert.t_From t_u32 t_u128 = - { - f_from_pre = (fun (x: t_u128) -> true); - f_from_post = (fun (x: t_u128) (out: t_u32) -> true); - f_from - = - fun (x: t_u128) -> - t_u32 - (Core.Convert.f_into #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Convert.t_From t_u64 t_u128 = - { - f_from_pre = (fun (x: t_u128) -> true); - f_from_post = (fun (x: t_u128) (out: t_u64) -> true); - f_from - = - fun (x: t_u128) -> - t_u64 - (Core.Convert.f_into #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Convert.t_From t_usize t_u128 = - { - f_from_pre = (fun (x: t_u128) -> true); - f_from_post = (fun (x: t_u128) (out: t_usize) -> true); - f_from - = - fun (x: t_u128) -> - t_usize - (Core.Convert.f_into #Core.Base_interface.Int.t_U128 - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Convert.t_From t_u8 t_usize = - { - f_from_pre = (fun (x: t_usize) -> true); - f_from_post = (fun (x: t_usize) (out: t_u8) -> true); - f_from - = - fun (x: t_usize) -> - t_u8 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Convert.t_From t_u16 t_usize = - { - f_from_pre = (fun (x: t_usize) -> true); - f_from_post = (fun (x: t_usize) (out: t_u16) -> true); - f_from - = - fun (x: t_usize) -> - t_u16 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Convert.t_From t_u32 t_usize = - { - f_from_pre = (fun (x: t_usize) -> true); - f_from_post = (fun (x: t_usize) (out: t_u32) -> true); - f_from - = - fun (x: t_usize) -> - t_u32 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Convert.t_From t_u128 t_usize = - { - f_from_pre = (fun (x: t_usize) -> true); - f_from_post = (fun (x: t_usize) (out: t_u128) -> true); - f_from - = - fun (x: t_usize) -> - t_u128 - (Core.Convert.f_into #Core.Base_interface.Int.t_U64 - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x._0) - <: - t_u128 - } - -let unchecked_div_i128 (x y: t_i128) : t_i128 = - t_i128 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I128) - <: - t_i128 - -let unchecked_div_i16 (x y: t_i16) : t_i16 = - t_i16 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I16) - <: - t_i16 - -let unchecked_div_i32 (x y: t_i32) : t_i32 = - t_i32 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I32) - <: - t_i32 - -let unchecked_div_i64 (x y: t_i64) : t_i64 = - t_i64 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I64) - <: - t_i64 - -let unchecked_div_i8 (x y: t_i8) : t_i8 = - t_i8 - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I8) - <: - t_i8 - -let unchecked_div_isize (x y: t_isize) : t_isize = - t_isize - ({ - Core.Base_interface.Int.f_v - = - Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x._0 - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - y._0 - <: - Core.Base.Spec.Z.t_Z) - } - <: - Core.Base_interface.Int.t_I64) - <: - t_isize - -let wrapping_add_u128 (a b: t_u128) : t_u128 = t_u128 (a._0 +! b._0) <: t_u128 - -let wrapping_add_u16 (a b: t_u16) : t_u16 = t_u16 (a._0 +! b._0) <: t_u16 - -let wrapping_add_u32 (a b: t_u32) : t_u32 = t_u32 (a._0 +! b._0) <: t_u32 - -let wrapping_add_u64 (a b: t_u64) : t_u64 = t_u64 (a._0 +! b._0) <: t_u64 - -let wrapping_add_u8 (a b: t_u8) : t_u8 = t_u8 (a._0 +! b._0) <: t_u8 - -let wrapping_add_usize (a b: t_usize) : t_usize = t_usize (a._0 +! b._0) <: t_usize - -let wrapping_mul_i128 (a b: t_i128) : t_i128 = t_i128 (a._0 *! b._0) <: t_i128 - -let wrapping_mul_i16 (a b: t_i16) : t_i16 = t_i16 (a._0 *! b._0) <: t_i16 - -let wrapping_mul_i32 (a b: t_i32) : t_i32 = t_i32 (a._0 *! b._0) <: t_i32 - -let wrapping_mul_i64 (a b: t_i64) : t_i64 = t_i64 (a._0 *! b._0) <: t_i64 - -let wrapping_mul_i8 (a b: t_i8) : t_i8 = t_i8 (a._0 *! b._0) <: t_i8 - -let wrapping_mul_isize (a b: t_isize) : t_isize = t_isize (a._0 *! b._0) <: t_isize - -let wrapping_mul_u128 (a b: t_u128) : t_u128 = t_u128 (a._0 *! b._0) <: t_u128 - -let wrapping_mul_u16 (a b: t_u16) : t_u16 = t_u16 (a._0 *! b._0) <: t_u16 - -let wrapping_mul_u32 (a b: t_u32) : t_u32 = t_u32 (a._0 *! b._0) <: t_u32 - -let wrapping_mul_u64 (a b: t_u64) : t_u64 = t_u64 (a._0 *! b._0) <: t_u64 - -let wrapping_mul_u8 (a b: t_u8) : t_u8 = t_u8 (a._0 *! b._0) <: t_u8 - -let wrapping_mul_usize (a b: t_usize) : t_usize = t_usize (a._0 *! b._0) <: t_usize - -let wrapping_add480603777 (self rhs: t_u8) : t_u8 = wrapping_add_u8 self rhs - -let wrapping_mul885216284 (self rhs: t_u8) : t_u8 = wrapping_mul_u8 self rhs - -let wrapping_add124432709 (self rhs: t_u16) : t_u16 = wrapping_add_u16 self rhs - -let wrapping_mul14465189 (self rhs: t_u16) : t_u16 = wrapping_mul_u16 self rhs - -let wrapping_add1049665857 (self rhs: t_u32) : t_u32 = wrapping_add_u32 self rhs - -let wrapping_mul203346768 (self rhs: t_u32) : t_u32 = wrapping_mul_u32 self rhs - -let wrapping_add865565639 (self rhs: t_u64) : t_u64 = wrapping_add_u64 self rhs - -let wrapping_mul742978873 (self rhs: t_u64) : t_u64 = wrapping_mul_u64 self rhs - -let wrapping_add40844100 (self rhs: t_u128) : t_u128 = wrapping_add_u128 self rhs - -let wrapping_mul294115024 (self rhs: t_u128) : t_u128 = wrapping_mul_u128 self rhs - -let wrapping_add427637036 (self rhs: t_usize) : t_usize = wrapping_add_usize self rhs - -let wrapping_mul680896953 (self rhs: t_usize) : t_usize = wrapping_mul_usize self rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Ops.Arith.t_Add t_i8 t_i8 = - { - f_Output = t_i8; - f_add_pre = (fun (self: t_i8) (other: t_i8) -> true); - f_add_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); - f_add = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 +! other._0) <: t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Ops.Arith.t_Add t_i16 t_i16 = - { - f_Output = t_i16; - f_add_pre = (fun (self: t_i16) (other: t_i16) -> true); - f_add_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); - f_add = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 +! other._0) <: t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Ops.Arith.t_Add t_i32 t_i32 = - { - f_Output = t_i32; - f_add_pre = (fun (self: t_i32) (other: t_i32) -> true); - f_add_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); - f_add = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 +! other._0) <: t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Ops.Arith.t_Add t_i64 t_i64 = - { - f_Output = t_i64; - f_add_pre = (fun (self: t_i64) (other: t_i64) -> true); - f_add_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); - f_add = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 +! other._0) <: t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Ops.Arith.t_Add t_i128 t_i128 = - { - f_Output = t_i128; - f_add_pre = (fun (self: t_i128) (other: t_i128) -> true); - f_add_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); - f_add = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 +! other._0) <: t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Ops.Arith.t_Add t_isize t_isize = - { - f_Output = t_isize; - f_add_pre = (fun (self: t_isize) (other: t_isize) -> true); - f_add_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); - f_add = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 +! other._0) <: t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Ops.Arith.t_Sub t_i8 t_i8 = - { - f_Output = t_i8; - f_sub_pre = (fun (self: t_i8) (other: t_i8) -> true); - f_sub_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); - f_sub = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 -! other._0) <: t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Ops.Arith.t_Sub t_i16 t_i16 = - { - f_Output = t_i16; - f_sub_pre = (fun (self: t_i16) (other: t_i16) -> true); - f_sub_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); - f_sub = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 -! other._0) <: t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Ops.Arith.t_Sub t_i32 t_i32 = - { - f_Output = t_i32; - f_sub_pre = (fun (self: t_i32) (other: t_i32) -> true); - f_sub_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); - f_sub = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 -! other._0) <: t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Ops.Arith.t_Sub t_i64 t_i64 = - { - f_Output = t_i64; - f_sub_pre = (fun (self: t_i64) (other: t_i64) -> true); - f_sub_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); - f_sub = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 -! other._0) <: t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Ops.Arith.t_Sub t_i128 t_i128 = - { - f_Output = t_i128; - f_sub_pre = (fun (self: t_i128) (other: t_i128) -> true); - f_sub_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); - f_sub = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 -! other._0) <: t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Ops.Arith.t_Sub t_isize t_isize = - { - f_Output = t_isize; - f_sub_pre = (fun (self: t_isize) (other: t_isize) -> true); - f_sub_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); - f_sub = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 -! other._0) <: t_isize - } - -let wrapping_sub_u128 (a b: t_u128) : t_u128 = t_u128 (a._0 -! b._0) <: t_u128 - -let wrapping_sub_u16 (a b: t_u16) : t_u16 = t_u16 (a._0 -! b._0) <: t_u16 - -let wrapping_sub_u32 (a b: t_u32) : t_u32 = t_u32 (a._0 -! b._0) <: t_u32 - -let wrapping_sub_u64 (a b: t_u64) : t_u64 = t_u64 (a._0 -! b._0) <: t_u64 - -let wrapping_sub_u8 (a b: t_u8) : t_u8 = t_u8 (a._0 -! b._0) <: t_u8 - -let wrapping_sub_usize (a b: t_usize) : t_usize = t_usize (a._0 -! b._0) <: t_usize - -let wrapping_sub403906422 (self rhs: t_u8) : t_u8 = wrapping_sub_u8 self rhs - -let wrapping_neg123212788 (self: t_u8) : t_u8 = - wrapping_sub403906422 (t_u8 - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U8) - <: - t_u8) - self - -let wrapping_sub811251034 (self rhs: t_u16) : t_u16 = wrapping_sub_u16 self rhs - -let wrapping_neg128555595 (self: t_u16) : t_u16 = - wrapping_sub811251034 (t_u16 - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U16) - <: - t_u16) - self - -let wrapping_sub708953500 (self rhs: t_u32) : t_u32 = wrapping_sub_u32 self rhs - -let wrapping_neg328220773 (self: t_u32) : t_u32 = - wrapping_sub708953500 (t_u32 - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U32) - <: - t_u32) - self - -let wrapping_sub762520851 (self rhs: t_u64) : t_u64 = wrapping_sub_u64 self rhs - -let wrapping_neg617136337 (self: t_u64) : t_u64 = - wrapping_sub762520851 (t_u64 - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U64) - <: - t_u64) - self - -let wrapping_sub409310259 (self rhs: t_u128) : t_u128 = wrapping_sub_u128 self rhs - -let wrapping_neg729451428 (self: t_u128) : t_u128 = - wrapping_sub409310259 (t_u128 - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U128) - <: - t_u128) - self - -let wrapping_sub813101882 (self rhs: t_usize) : t_usize = wrapping_sub_usize self rhs - -let wrapping_neg342773446 (self: t_usize) : t_usize = - wrapping_sub813101882 (t_usize - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U64) - <: - t_usize) - self - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Ops.Arith.t_Add t_u8 t_u8 = - { - f_Output = t_u8; - f_add_pre = (fun (self: t_u8) (other: t_u8) -> true); - f_add_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); - f_add = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 +! other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Ops.Arith.t_Add t_u16 t_u16 = - { - f_Output = t_u16; - f_add_pre = (fun (self: t_u16) (other: t_u16) -> true); - f_add_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); - f_add = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 +! other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Ops.Arith.t_Add t_u32 t_u32 = - { - f_Output = t_u32; - f_add_pre = (fun (self: t_u32) (other: t_u32) -> true); - f_add_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); - f_add = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 +! other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Ops.Arith.t_Add t_u64 t_u64 = - { - f_Output = t_u64; - f_add_pre = (fun (self: t_u64) (other: t_u64) -> true); - f_add_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); - f_add = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 +! other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Ops.Arith.t_Add t_u128 t_u128 = - { - f_Output = t_u128; - f_add_pre = (fun (self: t_u128) (other: t_u128) -> true); - f_add_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); - f_add = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 +! other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Ops.Arith.t_Add t_usize t_usize = - { - f_Output = t_usize; - f_add_pre = (fun (self: t_usize) (other: t_usize) -> true); - f_add_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); - f_add = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 +! other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Ops.Arith.t_Mul t_u8 t_u8 = - { - f_Output = t_u8; - f_mul_pre = (fun (self: t_u8) (other: t_u8) -> true); - f_mul_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); - f_mul = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 *! other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Ops.Arith.t_Mul t_u16 t_u16 = - { - f_Output = t_u16; - f_mul_pre = (fun (self: t_u16) (other: t_u16) -> true); - f_mul_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); - f_mul = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 *! other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Ops.Arith.t_Mul t_u32 t_u32 = - { - f_Output = t_u32; - f_mul_pre = (fun (self: t_u32) (other: t_u32) -> true); - f_mul_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); - f_mul = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 *! other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Ops.Arith.t_Mul t_u64 t_u64 = - { - f_Output = t_u64; - f_mul_pre = (fun (self: t_u64) (other: t_u64) -> true); - f_mul_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); - f_mul = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 *! other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Ops.Arith.t_Mul t_u128 t_u128 = - { - f_Output = t_u128; - f_mul_pre = (fun (self: t_u128) (other: t_u128) -> true); - f_mul_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); - f_mul = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 *! other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Ops.Arith.t_Mul t_usize t_usize = - { - f_Output = t_usize; - f_mul_pre = (fun (self: t_usize) (other: t_usize) -> true); - f_mul_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); - f_mul = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 *! other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Ops.Arith.t_Mul t_i8 t_i8 = - { - f_Output = t_i8; - f_mul_pre = (fun (self: t_i8) (other: t_i8) -> true); - f_mul_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); - f_mul = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 *! other._0) <: t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Ops.Arith.t_Mul t_i16 t_i16 = - { - f_Output = t_i16; - f_mul_pre = (fun (self: t_i16) (other: t_i16) -> true); - f_mul_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); - f_mul = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 *! other._0) <: t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Ops.Arith.t_Mul t_i32 t_i32 = - { - f_Output = t_i32; - f_mul_pre = (fun (self: t_i32) (other: t_i32) -> true); - f_mul_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); - f_mul = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 *! other._0) <: t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Ops.Arith.t_Mul t_i64 t_i64 = - { - f_Output = t_i64; - f_mul_pre = (fun (self: t_i64) (other: t_i64) -> true); - f_mul_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); - f_mul = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 *! other._0) <: t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Ops.Arith.t_Mul t_i128 t_i128 = - { - f_Output = t_i128; - f_mul_pre = (fun (self: t_i128) (other: t_i128) -> true); - f_mul_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); - f_mul = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 *! other._0) <: t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Ops.Arith.t_Mul t_isize t_isize = - { - f_Output = t_isize; - f_mul_pre = (fun (self: t_isize) (other: t_isize) -> true); - f_mul_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); - f_mul = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 *! other._0) <: t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_42: Core.Ops.Arith.t_Div t_u8 t_u8 = - { - f_Output = t_u8; - f_div_pre = (fun (self: t_u8) (other: t_u8) -> true); - f_div_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); - f_div = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 /! other._0) <: t_u8 - } - -let wrapping_div660080892 (self rhs: t_u8) : t_u8 = self /! rhs - -let wrapping_div_euclid481233436 (self rhs: t_u8) : t_u8 = self /! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_43: Core.Ops.Arith.t_Div t_u16 t_u16 = - { - f_Output = t_u16; - f_div_pre = (fun (self: t_u16) (other: t_u16) -> true); - f_div_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); - f_div = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 /! other._0) <: t_u16 - } - -let wrapping_div366977334 (self rhs: t_u16) : t_u16 = self /! rhs - -let wrapping_div_euclid22267888 (self rhs: t_u16) : t_u16 = self /! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_44: Core.Ops.Arith.t_Div t_u32 t_u32 = - { - f_Output = t_u32; - f_div_pre = (fun (self: t_u32) (other: t_u32) -> true); - f_div_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); - f_div = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 /! other._0) <: t_u32 - } - -let wrapping_div931150450 (self rhs: t_u32) : t_u32 = self /! rhs - -let wrapping_div_euclid606291997 (self rhs: t_u32) : t_u32 = self /! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_45: Core.Ops.Arith.t_Div t_u64 t_u64 = - { - f_Output = t_u64; - f_div_pre = (fun (self: t_u64) (other: t_u64) -> true); - f_div_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); - f_div = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 /! other._0) <: t_u64 - } - -let wrapping_div168427046 (self rhs: t_u64) : t_u64 = self /! rhs - -let wrapping_div_euclid321252086 (self rhs: t_u64) : t_u64 = self /! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_46: Core.Ops.Arith.t_Div t_u128 t_u128 = - { - f_Output = t_u128; - f_div_pre = (fun (self: t_u128) (other: t_u128) -> true); - f_div_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); - f_div = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 /! other._0) <: t_u128 - } - -let wrapping_div692427683 (self rhs: t_u128) : t_u128 = self /! rhs - -let wrapping_div_euclid926334515 (self rhs: t_u128) : t_u128 = self /! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_47: Core.Ops.Arith.t_Div t_usize t_usize = - { - f_Output = t_usize; - f_div_pre = (fun (self: t_usize) (other: t_usize) -> true); - f_div_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); - f_div = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 /! other._0) <: t_usize - } - -let wrapping_div905768546 (self rhs: t_usize) : t_usize = self /! rhs - -let wrapping_div_euclid90317722 (self rhs: t_usize) : t_usize = self /! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_54: Core.Ops.Arith.t_Rem t_u8 t_u8 = - { - f_Output = t_u8; - f_rem_pre = (fun (self: t_u8) (other: t_u8) -> true); - f_rem_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); - f_rem = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 %! other._0) <: t_u8 - } - -let wrapping_rem984569721 (self rhs: t_u8) : t_u8 = self %! rhs - -let wrapping_rem_euclid946579345 (self rhs: t_u8) : t_u8 = self %! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_55: Core.Ops.Arith.t_Rem t_u16 t_u16 = - { - f_Output = t_u16; - f_rem_pre = (fun (self: t_u16) (other: t_u16) -> true); - f_rem_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); - f_rem = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 %! other._0) <: t_u16 - } - -let wrapping_rem378598035 (self rhs: t_u16) : t_u16 = self %! rhs - -let wrapping_rem_euclid602402638 (self rhs: t_u16) : t_u16 = self %! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_56: Core.Ops.Arith.t_Rem t_u32 t_u32 = - { - f_Output = t_u32; - f_rem_pre = (fun (self: t_u32) (other: t_u32) -> true); - f_rem_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); - f_rem = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 %! other._0) <: t_u32 - } - -let wrapping_rem292009099 (self rhs: t_u32) : t_u32 = self %! rhs - -let wrapping_rem_euclid1020271291 (self rhs: t_u32) : t_u32 = self %! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_57: Core.Ops.Arith.t_Rem t_u64 t_u64 = - { - f_Output = t_u64; - f_rem_pre = (fun (self: t_u64) (other: t_u64) -> true); - f_rem_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); - f_rem = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 %! other._0) <: t_u64 - } - -let wrapping_rem390602260 (self rhs: t_u64) : t_u64 = self %! rhs - -let wrapping_rem_euclid839264546 (self rhs: t_u64) : t_u64 = self %! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_58: Core.Ops.Arith.t_Rem t_u128 t_u128 = - { - f_Output = t_u128; - f_rem_pre = (fun (self: t_u128) (other: t_u128) -> true); - f_rem_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); - f_rem = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 %! other._0) <: t_u128 - } - -let wrapping_rem332379920 (self rhs: t_u128) : t_u128 = self %! rhs - -let wrapping_rem_euclid646122423 (self rhs: t_u128) : t_u128 = self %! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_59: Core.Ops.Arith.t_Rem t_usize t_usize = - { - f_Output = t_usize; - f_rem_pre = (fun (self: t_usize) (other: t_usize) -> true); - f_rem_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); - f_rem = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 %! other._0) <: t_usize - } - -let wrapping_rem333089373 (self rhs: t_usize) : t_usize = self %! rhs - -let wrapping_rem_euclid769656504 (self rhs: t_usize) : t_usize = self %! rhs - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Ops.Bit.t_Shr t_u8 t_u8 = - { - f_Output = t_u8; - f_shr_pre = (fun (self: t_u8) (other: t_u8) -> true); - f_shr_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); - f_shr = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 >>! other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Ops.Bit.t_Shr t_u8 t_u16 = - { - f_Output = t_u8; - f_shr_pre = (fun (self: t_u8) (other: t_u16) -> true); - f_shr_post = (fun (self: t_u8) (other: t_u16) (out: t_u8) -> true); - f_shr = fun (self: t_u8) (other: t_u16) -> t_u8 (self._0 >>! other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Ops.Bit.t_Shr t_u8 t_u32 = - { - f_Output = t_u8; - f_shr_pre = (fun (self: t_u8) (other: t_u32) -> true); - f_shr_post = (fun (self: t_u8) (other: t_u32) (out: t_u8) -> true); - f_shr = fun (self: t_u8) (other: t_u32) -> t_u8 (self._0 >>! other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Ops.Bit.t_Shr t_u8 t_u64 = - { - f_Output = t_u8; - f_shr_pre = (fun (self: t_u8) (other: t_u64) -> true); - f_shr_post = (fun (self: t_u8) (other: t_u64) (out: t_u8) -> true); - f_shr = fun (self: t_u8) (other: t_u64) -> t_u8 (self._0 >>! other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Ops.Bit.t_Shr t_u8 t_u128 = - { - f_Output = t_u8; - f_shr_pre = (fun (self: t_u8) (other: t_u128) -> true); - f_shr_post = (fun (self: t_u8) (other: t_u128) (out: t_u8) -> true); - f_shr = fun (self: t_u8) (other: t_u128) -> t_u8 (self._0 >>! other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Ops.Bit.t_Shr t_u8 t_usize = - { - f_Output = t_u8; - f_shr_pre = (fun (self: t_u8) (other: t_usize) -> true); - f_shr_post = (fun (self: t_u8) (other: t_usize) (out: t_u8) -> true); - f_shr = fun (self: t_u8) (other: t_usize) -> t_u8 (self._0 >>! other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Ops.Bit.t_Shr t_u16 t_u8 = - { - f_Output = t_u16; - f_shr_pre = (fun (self: t_u16) (other: t_u8) -> true); - f_shr_post = (fun (self: t_u16) (other: t_u8) (out: t_u16) -> true); - f_shr = fun (self: t_u16) (other: t_u8) -> t_u16 (self._0 >>! other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Ops.Bit.t_Shr t_u16 t_u16 = - { - f_Output = t_u16; - f_shr_pre = (fun (self: t_u16) (other: t_u16) -> true); - f_shr_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); - f_shr = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 >>! other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Ops.Bit.t_Shr t_u16 t_u32 = - { - f_Output = t_u16; - f_shr_pre = (fun (self: t_u16) (other: t_u32) -> true); - f_shr_post = (fun (self: t_u16) (other: t_u32) (out: t_u16) -> true); - f_shr = fun (self: t_u16) (other: t_u32) -> t_u16 (self._0 >>! other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Ops.Bit.t_Shr t_u16 t_u64 = - { - f_Output = t_u16; - f_shr_pre = (fun (self: t_u16) (other: t_u64) -> true); - f_shr_post = (fun (self: t_u16) (other: t_u64) (out: t_u16) -> true); - f_shr = fun (self: t_u16) (other: t_u64) -> t_u16 (self._0 >>! other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Ops.Bit.t_Shr t_u16 t_u128 = - { - f_Output = t_u16; - f_shr_pre = (fun (self: t_u16) (other: t_u128) -> true); - f_shr_post = (fun (self: t_u16) (other: t_u128) (out: t_u16) -> true); - f_shr = fun (self: t_u16) (other: t_u128) -> t_u16 (self._0 >>! other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Ops.Bit.t_Shr t_u16 t_usize = - { - f_Output = t_u16; - f_shr_pre = (fun (self: t_u16) (other: t_usize) -> true); - f_shr_post = (fun (self: t_u16) (other: t_usize) (out: t_u16) -> true); - f_shr = fun (self: t_u16) (other: t_usize) -> t_u16 (self._0 >>! other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Ops.Bit.t_Shr t_u32 t_u8 = - { - f_Output = t_u32; - f_shr_pre = (fun (self: t_u32) (other: t_u8) -> true); - f_shr_post = (fun (self: t_u32) (other: t_u8) (out: t_u32) -> true); - f_shr = fun (self: t_u32) (other: t_u8) -> t_u32 (self._0 >>! other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Ops.Bit.t_Shr t_u32 t_u16 = - { - f_Output = t_u32; - f_shr_pre = (fun (self: t_u32) (other: t_u16) -> true); - f_shr_post = (fun (self: t_u32) (other: t_u16) (out: t_u32) -> true); - f_shr = fun (self: t_u32) (other: t_u16) -> t_u32 (self._0 >>! other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Ops.Bit.t_Shr t_u32 t_u32 = - { - f_Output = t_u32; - f_shr_pre = (fun (self: t_u32) (other: t_u32) -> true); - f_shr_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); - f_shr = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 >>! other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Ops.Bit.t_Shr t_u32 t_u64 = - { - f_Output = t_u32; - f_shr_pre = (fun (self: t_u32) (other: t_u64) -> true); - f_shr_post = (fun (self: t_u32) (other: t_u64) (out: t_u32) -> true); - f_shr = fun (self: t_u32) (other: t_u64) -> t_u32 (self._0 >>! other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Ops.Bit.t_Shr t_u32 t_u128 = - { - f_Output = t_u32; - f_shr_pre = (fun (self: t_u32) (other: t_u128) -> true); - f_shr_post = (fun (self: t_u32) (other: t_u128) (out: t_u32) -> true); - f_shr = fun (self: t_u32) (other: t_u128) -> t_u32 (self._0 >>! other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Ops.Bit.t_Shr t_u32 t_usize = - { - f_Output = t_u32; - f_shr_pre = (fun (self: t_u32) (other: t_usize) -> true); - f_shr_post = (fun (self: t_u32) (other: t_usize) (out: t_u32) -> true); - f_shr = fun (self: t_u32) (other: t_usize) -> t_u32 (self._0 >>! other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Ops.Bit.t_Shr t_u64 t_u8 = - { - f_Output = t_u64; - f_shr_pre = (fun (self: t_u64) (other: t_u8) -> true); - f_shr_post = (fun (self: t_u64) (other: t_u8) (out: t_u64) -> true); - f_shr = fun (self: t_u64) (other: t_u8) -> t_u64 (self._0 >>! other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Ops.Bit.t_Shr t_u64 t_u16 = - { - f_Output = t_u64; - f_shr_pre = (fun (self: t_u64) (other: t_u16) -> true); - f_shr_post = (fun (self: t_u64) (other: t_u16) (out: t_u64) -> true); - f_shr = fun (self: t_u64) (other: t_u16) -> t_u64 (self._0 >>! other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Ops.Bit.t_Shr t_u64 t_u32 = - { - f_Output = t_u64; - f_shr_pre = (fun (self: t_u64) (other: t_u32) -> true); - f_shr_post = (fun (self: t_u64) (other: t_u32) (out: t_u64) -> true); - f_shr = fun (self: t_u64) (other: t_u32) -> t_u64 (self._0 >>! other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Ops.Bit.t_Shr t_u64 t_u64 = - { - f_Output = t_u64; - f_shr_pre = (fun (self: t_u64) (other: t_u64) -> true); - f_shr_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); - f_shr = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 >>! other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Ops.Bit.t_Shr t_u64 t_u128 = - { - f_Output = t_u64; - f_shr_pre = (fun (self: t_u64) (other: t_u128) -> true); - f_shr_post = (fun (self: t_u64) (other: t_u128) (out: t_u64) -> true); - f_shr = fun (self: t_u64) (other: t_u128) -> t_u64 (self._0 >>! other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Ops.Bit.t_Shr t_u64 t_usize = - { - f_Output = t_u64; - f_shr_pre = (fun (self: t_u64) (other: t_usize) -> true); - f_shr_post = (fun (self: t_u64) (other: t_usize) (out: t_u64) -> true); - f_shr = fun (self: t_u64) (other: t_usize) -> t_u64 (self._0 >>! other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Ops.Bit.t_Shr t_u128 t_u8 = - { - f_Output = t_u128; - f_shr_pre = (fun (self: t_u128) (other: t_u8) -> true); - f_shr_post = (fun (self: t_u128) (other: t_u8) (out: t_u128) -> true); - f_shr = fun (self: t_u128) (other: t_u8) -> t_u128 (self._0 >>! other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Ops.Bit.t_Shr t_u128 t_u16 = - { - f_Output = t_u128; - f_shr_pre = (fun (self: t_u128) (other: t_u16) -> true); - f_shr_post = (fun (self: t_u128) (other: t_u16) (out: t_u128) -> true); - f_shr = fun (self: t_u128) (other: t_u16) -> t_u128 (self._0 >>! other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Ops.Bit.t_Shr t_u128 t_u32 = - { - f_Output = t_u128; - f_shr_pre = (fun (self: t_u128) (other: t_u32) -> true); - f_shr_post = (fun (self: t_u128) (other: t_u32) (out: t_u128) -> true); - f_shr = fun (self: t_u128) (other: t_u32) -> t_u128 (self._0 >>! other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Ops.Bit.t_Shr t_u128 t_u64 = - { - f_Output = t_u128; - f_shr_pre = (fun (self: t_u128) (other: t_u64) -> true); - f_shr_post = (fun (self: t_u128) (other: t_u64) (out: t_u128) -> true); - f_shr = fun (self: t_u128) (other: t_u64) -> t_u128 (self._0 >>! other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Ops.Bit.t_Shr t_u128 t_u128 = - { - f_Output = t_u128; - f_shr_pre = (fun (self: t_u128) (other: t_u128) -> true); - f_shr_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); - f_shr = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 >>! other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Ops.Bit.t_Shr t_u128 t_usize = - { - f_Output = t_u128; - f_shr_pre = (fun (self: t_u128) (other: t_usize) -> true); - f_shr_post = (fun (self: t_u128) (other: t_usize) (out: t_u128) -> true); - f_shr = fun (self: t_u128) (other: t_usize) -> t_u128 (self._0 >>! other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Ops.Bit.t_Shr t_usize t_u8 = - { - f_Output = t_usize; - f_shr_pre = (fun (self: t_usize) (other: t_u8) -> true); - f_shr_post = (fun (self: t_usize) (other: t_u8) (out: t_usize) -> true); - f_shr = fun (self: t_usize) (other: t_u8) -> t_usize (self._0 >>! other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Ops.Bit.t_Shr t_usize t_u16 = - { - f_Output = t_usize; - f_shr_pre = (fun (self: t_usize) (other: t_u16) -> true); - f_shr_post = (fun (self: t_usize) (other: t_u16) (out: t_usize) -> true); - f_shr = fun (self: t_usize) (other: t_u16) -> t_usize (self._0 >>! other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Ops.Bit.t_Shr t_usize t_u32 = - { - f_Output = t_usize; - f_shr_pre = (fun (self: t_usize) (other: t_u32) -> true); - f_shr_post = (fun (self: t_usize) (other: t_u32) (out: t_usize) -> true); - f_shr = fun (self: t_usize) (other: t_u32) -> t_usize (self._0 >>! other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Ops.Bit.t_Shr t_usize t_u64 = - { - f_Output = t_usize; - f_shr_pre = (fun (self: t_usize) (other: t_u64) -> true); - f_shr_post = (fun (self: t_usize) (other: t_u64) (out: t_usize) -> true); - f_shr = fun (self: t_usize) (other: t_u64) -> t_usize (self._0 >>! other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: Core.Ops.Bit.t_Shr t_usize t_u128 = - { - f_Output = t_usize; - f_shr_pre = (fun (self: t_usize) (other: t_u128) -> true); - f_shr_post = (fun (self: t_usize) (other: t_u128) (out: t_usize) -> true); - f_shr = fun (self: t_usize) (other: t_u128) -> t_usize (self._0 >>! other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_41: Core.Ops.Bit.t_Shr t_usize t_usize = - { - f_Output = t_usize; - f_shr_pre = (fun (self: t_usize) (other: t_usize) -> true); - f_shr_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); - f_shr = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 >>! other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_42: Core.Ops.Bit.t_Shl t_u8 t_u8 = - { - f_Output = t_u8; - f_shl_pre = (fun (self: t_u8) (other: t_u8) -> true); - f_shl_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); - f_shl = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 < true); - f_shl_post = (fun (self: t_u8) (other: t_u16) (out: t_u8) -> true); - f_shl = fun (self: t_u8) (other: t_u16) -> t_u8 (self._0 < true); - f_shl_post = (fun (self: t_u8) (other: t_u32) (out: t_u8) -> true); - f_shl = fun (self: t_u8) (other: t_u32) -> t_u8 (self._0 < true); - f_shl_post = (fun (self: t_u8) (other: t_u64) (out: t_u8) -> true); - f_shl = fun (self: t_u8) (other: t_u64) -> t_u8 (self._0 < true); - f_shl_post = (fun (self: t_u8) (other: t_u128) (out: t_u8) -> true); - f_shl = fun (self: t_u8) (other: t_u128) -> t_u8 (self._0 < true); - f_shl_post = (fun (self: t_u8) (other: t_usize) (out: t_u8) -> true); - f_shl = fun (self: t_u8) (other: t_usize) -> t_u8 (self._0 < true); - f_shl_post = (fun (self: t_u16) (other: t_u8) (out: t_u16) -> true); - f_shl = fun (self: t_u16) (other: t_u8) -> t_u16 (self._0 < true); - f_shl_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); - f_shl = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 < true); - f_shl_post = (fun (self: t_u16) (other: t_u32) (out: t_u16) -> true); - f_shl = fun (self: t_u16) (other: t_u32) -> t_u16 (self._0 < true); - f_shl_post = (fun (self: t_u16) (other: t_u64) (out: t_u16) -> true); - f_shl = fun (self: t_u16) (other: t_u64) -> t_u16 (self._0 < true); - f_shl_post = (fun (self: t_u16) (other: t_u128) (out: t_u16) -> true); - f_shl = fun (self: t_u16) (other: t_u128) -> t_u16 (self._0 < true); - f_shl_post = (fun (self: t_u16) (other: t_usize) (out: t_u16) -> true); - f_shl = fun (self: t_u16) (other: t_usize) -> t_u16 (self._0 < true); - f_shl_post = (fun (self: t_u32) (other: t_u8) (out: t_u32) -> true); - f_shl = fun (self: t_u32) (other: t_u8) -> t_u32 (self._0 < true); - f_shl_post = (fun (self: t_u32) (other: t_u16) (out: t_u32) -> true); - f_shl = fun (self: t_u32) (other: t_u16) -> t_u32 (self._0 < true); - f_shl_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); - f_shl = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 < true); - f_shl_post = (fun (self: t_u32) (other: t_u64) (out: t_u32) -> true); - f_shl = fun (self: t_u32) (other: t_u64) -> t_u32 (self._0 < true); - f_shl_post = (fun (self: t_u32) (other: t_u128) (out: t_u32) -> true); - f_shl = fun (self: t_u32) (other: t_u128) -> t_u32 (self._0 < true); - f_shl_post = (fun (self: t_u32) (other: t_usize) (out: t_u32) -> true); - f_shl = fun (self: t_u32) (other: t_usize) -> t_u32 (self._0 < true); - f_shl_post = (fun (self: t_u64) (other: t_u8) (out: t_u64) -> true); - f_shl = fun (self: t_u64) (other: t_u8) -> t_u64 (self._0 < true); - f_shl_post = (fun (self: t_u64) (other: t_u16) (out: t_u64) -> true); - f_shl = fun (self: t_u64) (other: t_u16) -> t_u64 (self._0 < true); - f_shl_post = (fun (self: t_u64) (other: t_u32) (out: t_u64) -> true); - f_shl = fun (self: t_u64) (other: t_u32) -> t_u64 (self._0 < true); - f_shl_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); - f_shl = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 < true); - f_shl_post = (fun (self: t_u64) (other: t_u128) (out: t_u64) -> true); - f_shl = fun (self: t_u64) (other: t_u128) -> t_u64 (self._0 < true); - f_shl_post = (fun (self: t_u64) (other: t_usize) (out: t_u64) -> true); - f_shl = fun (self: t_u64) (other: t_usize) -> t_u64 (self._0 < true); - f_shl_post = (fun (self: t_u128) (other: t_u8) (out: t_u128) -> true); - f_shl = fun (self: t_u128) (other: t_u8) -> t_u128 (self._0 < true); - f_shl_post = (fun (self: t_u128) (other: t_u16) (out: t_u128) -> true); - f_shl = fun (self: t_u128) (other: t_u16) -> t_u128 (self._0 < true); - f_shl_post = (fun (self: t_u128) (other: t_u32) (out: t_u128) -> true); - f_shl = fun (self: t_u128) (other: t_u32) -> t_u128 (self._0 < true); - f_shl_post = (fun (self: t_u128) (other: t_u64) (out: t_u128) -> true); - f_shl = fun (self: t_u128) (other: t_u64) -> t_u128 (self._0 < true); - f_shl_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); - f_shl = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 < true); - f_shl_post = (fun (self: t_u128) (other: t_usize) (out: t_u128) -> true); - f_shl = fun (self: t_u128) (other: t_usize) -> t_u128 (self._0 < true); - f_shl_post = (fun (self: t_usize) (other: t_u8) (out: t_usize) -> true); - f_shl = fun (self: t_usize) (other: t_u8) -> t_usize (self._0 < true); - f_shl_post = (fun (self: t_usize) (other: t_u16) (out: t_usize) -> true); - f_shl = fun (self: t_usize) (other: t_u16) -> t_usize (self._0 < true); - f_shl_post = (fun (self: t_usize) (other: t_u32) (out: t_usize) -> true); - f_shl = fun (self: t_usize) (other: t_u32) -> t_usize (self._0 < true); - f_shl_post = (fun (self: t_usize) (other: t_u64) (out: t_usize) -> true); - f_shl = fun (self: t_usize) (other: t_u64) -> t_usize (self._0 < true); - f_shl_post = (fun (self: t_usize) (other: t_u128) (out: t_usize) -> true); - f_shl = fun (self: t_usize) (other: t_u128) -> t_usize (self._0 < true); - f_shl_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); - f_shl = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 < true); - f_bitor_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); - f_bitor = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 |. other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_79: Core.Ops.Bit.t_BitOr t_u16 t_u16 = - { - f_Output = t_u16; - f_bitor_pre = (fun (self: t_u16) (other: t_u16) -> true); - f_bitor_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); - f_bitor = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 |. other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_80: Core.Ops.Bit.t_BitOr t_u32 t_u32 = - { - f_Output = t_u32; - f_bitor_pre = (fun (self: t_u32) (other: t_u32) -> true); - f_bitor_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); - f_bitor = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 |. other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_81: Core.Ops.Bit.t_BitOr t_u64 t_u64 = - { - f_Output = t_u64; - f_bitor_pre = (fun (self: t_u64) (other: t_u64) -> true); - f_bitor_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); - f_bitor = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 |. other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_82: Core.Ops.Bit.t_BitOr t_u128 t_u128 = - { - f_Output = t_u128; - f_bitor_pre = (fun (self: t_u128) (other: t_u128) -> true); - f_bitor_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); - f_bitor = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 |. other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_83: Core.Ops.Bit.t_BitOr t_usize t_usize = - { - f_Output = t_usize; - f_bitor_pre = (fun (self: t_usize) (other: t_usize) -> true); - f_bitor_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); - f_bitor = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 |. other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_90: Core.Ops.Bit.t_BitXor t_u8 t_u8 = - { - f_Output = t_u8; - f_bitxor_pre = (fun (self: t_u8) (other: t_u8) -> true); - f_bitxor_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); - f_bitxor = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 ^. other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_91: Core.Ops.Bit.t_BitXor t_u16 t_u16 = - { - f_Output = t_u16; - f_bitxor_pre = (fun (self: t_u16) (other: t_u16) -> true); - f_bitxor_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); - f_bitxor = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 ^. other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_92: Core.Ops.Bit.t_BitXor t_u32 t_u32 = - { - f_Output = t_u32; - f_bitxor_pre = (fun (self: t_u32) (other: t_u32) -> true); - f_bitxor_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); - f_bitxor = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 ^. other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_93: Core.Ops.Bit.t_BitXor t_u64 t_u64 = - { - f_Output = t_u64; - f_bitxor_pre = (fun (self: t_u64) (other: t_u64) -> true); - f_bitxor_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); - f_bitxor = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 ^. other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_94: Core.Ops.Bit.t_BitXor t_u128 t_u128 = - { - f_Output = t_u128; - f_bitxor_pre = (fun (self: t_u128) (other: t_u128) -> true); - f_bitxor_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); - f_bitxor = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 ^. other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_95: Core.Ops.Bit.t_BitXor t_usize t_usize = - { - f_Output = t_usize; - f_bitxor_pre = (fun (self: t_usize) (other: t_usize) -> true); - f_bitxor_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); - f_bitxor = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 ^. other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_96: Core.Ops.Bit.t_BitAnd t_u8 t_u8 = - { - f_Output = t_u8; - f_bitand_pre = (fun (self: t_u8) (other: t_u8) -> true); - f_bitand_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); - f_bitand = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 &. other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_97: Core.Ops.Bit.t_BitAnd t_u16 t_u16 = - { - f_Output = t_u16; - f_bitand_pre = (fun (self: t_u16) (other: t_u16) -> true); - f_bitand_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); - f_bitand = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 &. other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_98: Core.Ops.Bit.t_BitAnd t_u32 t_u32 = - { - f_Output = t_u32; - f_bitand_pre = (fun (self: t_u32) (other: t_u32) -> true); - f_bitand_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); - f_bitand = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 &. other._0) <: t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_99: Core.Ops.Bit.t_BitAnd t_u64 t_u64 = - { - f_Output = t_u64; - f_bitand_pre = (fun (self: t_u64) (other: t_u64) -> true); - f_bitand_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); - f_bitand = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 &. other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_100: Core.Ops.Bit.t_BitAnd t_u128 t_u128 = - { - f_Output = t_u128; - f_bitand_pre = (fun (self: t_u128) (other: t_u128) -> true); - f_bitand_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); - f_bitand = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 &. other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_101: Core.Ops.Bit.t_BitAnd t_usize t_usize = - { - f_Output = t_usize; - f_bitand_pre = (fun (self: t_usize) (other: t_usize) -> true); - f_bitand_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); - f_bitand = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 &. other._0) <: t_usize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Ops.Arith.t_Sub t_u8 t_u8 = - { - f_Output = t_u8; - f_sub_pre = (fun (self: t_u8) (other: t_u8) -> true); - f_sub_post = (fun (self: t_u8) (other: t_u8) (out: t_u8) -> true); - f_sub = fun (self: t_u8) (other: t_u8) -> t_u8 (self._0 -! other._0) <: t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Ops.Arith.t_Sub t_u16 t_u16 = - { - f_Output = t_u16; - f_sub_pre = (fun (self: t_u16) (other: t_u16) -> true); - f_sub_post = (fun (self: t_u16) (other: t_u16) (out: t_u16) -> true); - f_sub = fun (self: t_u16) (other: t_u16) -> t_u16 (self._0 -! other._0) <: t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Ops.Arith.t_Sub t_u32 t_u32 = - { - f_Output = t_u32; - f_sub_pre = (fun (self: t_u32) (other: t_u32) -> true); - f_sub_post = (fun (self: t_u32) (other: t_u32) (out: t_u32) -> true); - f_sub = fun (self: t_u32) (other: t_u32) -> t_u32 (self._0 -! other._0) <: t_u32 - } - -let rotate_left_u128 (x: t_u128) (shift: t_u32) : t_u128 = - let (shift: t_u32):t_u32 = shift %! v_BITS136999051 in - let (left: t_u128):t_u128 = - (Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) <>! - (v_BITS136999051 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - <: - t_u32) - in - left |. right - -let rotate_left_u16 (x: t_u16) (shift: t_u32) : t_u16 = - let (shift: t_u32):t_u32 = shift %! v_BITS277333551 in - let (left: t_u16):t_u16 = - (Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) <>! - (v_BITS277333551 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - <: - t_u32) - in - left |. right - -let rotate_left_u32 (x shift: t_u32) : t_u32 = - let (shift: t_u32):t_u32 = shift %! v_BITS473478051 in - let (left: t_u32):t_u32 = - (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) <>! - (v_BITS473478051 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - <: - t_u32) - in - left |. right - -let rotate_left_u64 (x: t_u64) (shift: t_u32) : t_u64 = - let (shift: t_u32):t_u32 = shift %! v_BITS177666292 in - let (left: t_u64):t_u64 = - (Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) <>! - (v_BITS177666292 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - <: - t_u32) - in - left |. right - -let rotate_left_u8 (x: t_u8) (shift: t_u32) : t_u8 = - let (shift: t_u32):t_u32 = shift %! v_BITS690311813 in - let (left: t_u8):t_u8 = - (Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) <>! - (v_BITS690311813 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - <: - t_u32) - in - left |. right - -let rotate_left_usize (x: t_usize) (shift: t_u32) : t_usize = - let (shift: t_u32):t_u32 = shift %! v_BITS229952196 in - let (left: t_usize):t_usize = - (Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) <>! - (v_BITS229952196 -! (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - <: - t_u32) - in - left |. right - -let rotate_right_u128 (x: t_u128) (shift: t_u32) : t_u128 = - let (shift: t_u32):t_u32 = shift %! v_BITS136999051 in - let (left: t_u128):t_u128 = - (Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) >>! - (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - in - let (right: t_u128):t_u128 = - (Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) <>! - (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - in - let (right: t_u16):t_u16 = - (Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) <>! - (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - in - let (right: t_u32):t_u32 = - (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) <>! - (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - in - let (right: t_u64):t_u64 = - (Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) <>! - (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - in - let (right: t_u8):t_u8 = - (Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) <>! - (Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve shift <: t_u32) - in - let (right: t_usize):t_usize = - (Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) < true); - f_sub_post = (fun (self: t_u64) (other: t_u64) (out: t_u64) -> true); - f_sub = fun (self: t_u64) (other: t_u64) -> t_u64 (self._0 -! other._0) <: t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Ops.Arith.t_Sub t_u128 t_u128 = - { - f_Output = t_u128; - f_sub_pre = (fun (self: t_u128) (other: t_u128) -> true); - f_sub_post = (fun (self: t_u128) (other: t_u128) (out: t_u128) -> true); - f_sub = fun (self: t_u128) (other: t_u128) -> t_u128 (self._0 -! other._0) <: t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Ops.Arith.t_Sub t_usize t_usize = - { - f_Output = t_usize; - f_sub_pre = (fun (self: t_usize) (other: t_usize) -> true); - f_sub_post = (fun (self: t_usize) (other: t_usize) (out: t_usize) -> true); - f_sub = fun (self: t_usize) (other: t_usize) -> t_usize (self._0 -! other._0) <: t_usize - } - -let bswap_u128 (x: t_u128) : t_u128 = - let (count: t_u128):t_u128 = - Core.Convert.f_into #u128 #t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 0) - in - let count:t_u128 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS136999051 <: u32) - (fun count temp_1_ -> - let count:t_u128 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u128 = count in - let i:u32 = i in - let (low_bit: t_u128):t_u128 = - Core.Convert.f_into #t_u128 - #t_u128 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u128) &. - (Core.Convert.f_into #u128 #t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 1) - <: - t_u128) - <: - t_u128) - in - let count:t_u128 = - (count < - let count:t_u16 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u16 = count in - let i:u32 = i in - let (low_bit: t_u16):t_u16 = - Core.Convert.f_into #t_u16 - #t_u16 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u16) &. - (Core.Convert.f_into #u16 #t_u16 #FStar.Tactics.Typeclasses.solve 1us <: t_u16) - <: - t_u16) - in - let count:t_u16 = - (count < - let count:t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u32 = count in - let i:u32 = i in - let (low_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u32 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u32) &. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - <: - t_u32) - in - let count:t_u32 = - (count < - let count:t_u64 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u64 = count in - let i:u32 = i in - let (low_bit: t_u64):t_u64 = - Core.Convert.f_into #t_u64 - #t_u64 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u64) &. - (Core.Convert.f_into #u64 #t_u64 #FStar.Tactics.Typeclasses.solve 1uL <: t_u64) - <: - t_u64) - in - let count:t_u64 = - (count < - let count:t_u8 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u8 = count in - let i:u32 = i in - let (low_bit: t_u8):t_u8 = - Core.Convert.f_into #t_u8 - #t_u8 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u8) &. - (Core.Convert.f_into #u8 #t_u8 #FStar.Tactics.Typeclasses.solve 1uy <: t_u8) - <: - t_u8) - in - let count:t_u8 = - (count < - let count:t_usize = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_usize = count in - let i:u32 = i in - let (low_bit: t_usize):t_usize = - Core.Convert.f_into #t_usize - #t_usize - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_usize) &. - (Core.Convert.f_into #usize #t_usize #FStar.Tactics.Typeclasses.solve (sz 1) - <: - t_usize) - <: - t_usize) - in - let count:t_usize = - (count < - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u128 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) <>! - (Core.Convert.f_into #t_u32 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (v_BITS136999051 -! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 - ) - <: - t_u32) - <: - t_u32) - <: - t_u128) - in - if - high_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let ctlz_u16 (x: t_u16) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS277333551 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u16 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) <>! - (Core.Convert.f_into #t_u32 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (v_BITS277333551 -! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 - ) - <: - t_u32) - <: - t_u32) - <: - t_u16) - in - if - high_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let ctlz_u32 (x: t_u32) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS473478051 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u32 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) <>! - (Core.Convert.f_into #t_u32 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (v_BITS473478051 -! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 - ) - <: - t_u32) - <: - t_u32) - <: - t_u32) - in - if - high_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let ctlz_u64 (x: t_u64) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS177666292 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u64 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) <>! - (Core.Convert.f_into #t_u32 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (v_BITS177666292 -! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 - ) - <: - t_u32) - <: - t_u32) - <: - t_u64) - in - if - high_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let ctlz_u8 (x: t_u8) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS690311813 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u8 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) <>! - (Core.Convert.f_into #t_u32 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (v_BITS690311813 -! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 - ) - <: - t_u32) - <: - t_u32) - <: - t_u8) - in - if - high_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let ctlz_usize (x: t_usize) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS229952196 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (high_bit: t_u32):t_u32 = - Core.Convert.f_into #t_usize - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) <>! - (Core.Convert.f_into #t_u32 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (v_BITS229952196 -! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32 - ) - <: - t_u32) - <: - t_u32) - <: - t_usize) - in - if - high_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let ctpop_u128 (x: t_u128) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let count:t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS136999051 <: u32) - (fun count temp_1_ -> - let count:t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #t_u128 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u128) &. - (Core.Convert.f_into #u128 #t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 1) - <: - t_u128) - <: - t_u128) - <: - t_u32) - <: - t_u32) - in - count - -let ctpop_u16 (x: t_u16) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let count:t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS277333551 <: u32) - (fun count temp_1_ -> - let count:t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #t_u16 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u16) &. - (Core.Convert.f_into #u16 #t_u16 #FStar.Tactics.Typeclasses.solve 1us <: t_u16) - <: - t_u16) - <: - t_u32) - <: - t_u32) - in - count - -let ctpop_u32 (x: t_u32) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let count:t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS473478051 <: u32) - (fun count temp_1_ -> - let count:t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #t_u32 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u32) &. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - <: - t_u32) - <: - t_u32) - <: - t_u32) - in - count - -let ctpop_u64 (x: t_u64) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let count:t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS177666292 <: u32) - (fun count temp_1_ -> - let count:t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #t_u64 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u64) &. - (Core.Convert.f_into #u64 #t_u64 #FStar.Tactics.Typeclasses.solve 1uL <: t_u64) - <: - t_u64) - <: - t_u32) - <: - t_u32) - in - count - -let ctpop_u8 (x: t_u8) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let count:t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS690311813 <: u32) - (fun count temp_1_ -> - let count:t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #t_u8 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u8) &. - (Core.Convert.f_into #u8 #t_u8 #FStar.Tactics.Typeclasses.solve 1uy <: t_u8) - <: - t_u8) - <: - t_u32) - <: - t_u32) - in - count - -let ctpop_usize (x: t_usize) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let count:t_u32 = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS229952196 <: u32) - (fun count temp_1_ -> - let count:t_u32 = count in - let _:u32 = temp_1_ in - true) - count - (fun count i -> - let count:t_u32 = count in - let i:u32 = i in - count +! - (Core.Convert.f_into #t_usize - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_usize) &. - (Core.Convert.f_into #usize #t_usize #FStar.Tactics.Typeclasses.solve (sz 1) - <: - t_usize) - <: - t_usize) - <: - t_u32) - <: - t_u32) - in - count - -let cttz_u128 (x: t_u128) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS136999051 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u128 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u128 #FStar.Tactics.Typeclasses.solve x <: t_u128) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u128) &. - (Core.Convert.f_into #u128 #t_u128 #FStar.Tactics.Typeclasses.solve (pub_u128 1) - <: - t_u128) - <: - t_u128) - in - if - low_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let cttz_u16 (x: t_u16) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS277333551 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u16 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u16 #FStar.Tactics.Typeclasses.solve x <: t_u16) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u16) &. - (Core.Convert.f_into #u16 #t_u16 #FStar.Tactics.Typeclasses.solve 1us <: t_u16) - <: - t_u16) - in - if - low_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let cttz_u32 (x: t_u32) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS473478051 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u32 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u32 #FStar.Tactics.Typeclasses.solve x <: t_u32) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u32) &. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - <: - t_u32) - in - if - low_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let cttz_u64 (x: t_u64) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS177666292 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u64 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u64 #FStar.Tactics.Typeclasses.solve x <: t_u64) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u64) &. - (Core.Convert.f_into #u64 #t_u64 #FStar.Tactics.Typeclasses.solve 1uL <: t_u64) - <: - t_u64) - in - if - low_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let cttz_u8 (x: t_u8) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS690311813 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: t_u32):t_u32 = - Core.Convert.f_into #t_u8 - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_u8 #FStar.Tactics.Typeclasses.solve x <: t_u8) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_u8) &. - (Core.Convert.f_into #u8 #t_u8 #FStar.Tactics.Typeclasses.solve 1uy <: t_u8) - <: - t_u8) - in - if - low_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let cttz_usize (x: t_usize) : t_u32 = - let (count: t_u32):t_u32 = Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 0ul in - let done:bool = false in - let count, done:(t_u32 & bool) = - Rust_primitives.Hax.Folds.fold_range 0ul - (Core.Convert.f_into #t_u32 #u32 #FStar.Tactics.Typeclasses.solve v_BITS229952196 <: u32) - (fun temp_0_ temp_1_ -> - let count, done:(t_u32 & bool) = temp_0_ in - let _:u32 = temp_1_ in - true) - (count, done <: (t_u32 & bool)) - (fun temp_0_ i -> - let count, done:(t_u32 & bool) = temp_0_ in - let i:u32 = i in - let (low_bit: t_u32):t_u32 = - Core.Convert.f_into #t_usize - #t_u32 - #FStar.Tactics.Typeclasses.solve - (((Core.Clone.f_clone #t_usize #FStar.Tactics.Typeclasses.solve x <: t_usize) >>! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve i <: t_u32) - <: - t_usize) &. - (Core.Convert.f_into #usize #t_usize #FStar.Tactics.Typeclasses.solve (sz 1) - <: - t_usize) - <: - t_usize) - in - if - low_bit =. - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) || - done - then - let done:bool = true in - count, done <: (t_u32 & bool) - else - let count:t_u32 = - count +! - (Core.Convert.f_into #u32 #t_u32 #FStar.Tactics.Typeclasses.solve 1ul <: t_u32) - in - count, done <: (t_u32 & bool)) - in - count - -let count_ones202509899 (self: t_u8) : t_u32 = ctpop_u8 self - -let leading_zeros75047366 (self: t_u8) : t_u32 = ctlz_u8 self - -let swap_bytes657156997 (self: t_u8) : t_u8 = - Core.Convert.f_into #t_u8 #t_u8 #FStar.Tactics.Typeclasses.solve (bswap_u8 self <: t_u8) - -let from_be746282521 (x: t_u8) : t_u8 = swap_bytes657156997 x - -let to_be972448780 (self: t_u8) : t_u8 = swap_bytes657156997 self - -let trailing_zeros572929871 (self: t_u8) : t_u32 = cttz_u8 self - -let count_ones91875752 (self: t_u16) : t_u32 = ctpop_u16 self - -let leading_zeros462412478 (self: t_u16) : t_u32 = ctlz_u16 self - -let swap_bytes926722059 (self: t_u16) : t_u16 = - Core.Convert.f_into #t_u16 #t_u16 #FStar.Tactics.Typeclasses.solve (bswap_u16 self <: t_u16) - -let from_be510959665 (x: t_u16) : t_u16 = swap_bytes926722059 x - -let to_be551590602 (self: t_u16) : t_u16 = swap_bytes926722059 self - -let trailing_zeros421474733 (self: t_u16) : t_u32 = cttz_u16 self - -let count_ones776185738 (self: t_u32) : t_u32 = ctpop_u32 self - -let leading_zeros698221972 (self: t_u32) : t_u32 = ctlz_u32 self - -let swap_bytes320480126 (self: t_u32) : t_u32 = - Core.Convert.f_into #t_u32 #t_u32 #FStar.Tactics.Typeclasses.solve (bswap_u32 self <: t_u32) - -let from_be664756649 (x: t_u32) : t_u32 = swap_bytes320480126 x - -let to_be82825962 (self: t_u32) : t_u32 = swap_bytes320480126 self - -let trailing_zeros1061560720 (self: t_u32) : t_u32 = cttz_u32 self - -let count_ones235885653 (self: t_u64) : t_u32 = ctpop_u64 self - -let leading_zeros338302110 (self: t_u64) : t_u32 = ctlz_u64 self - -let swap_bytes722254271 (self: t_u64) : t_u64 = - Core.Convert.f_into #t_u64 #t_u64 #FStar.Tactics.Typeclasses.solve (bswap_u64 self <: t_u64) - -let from_be16013635 (x: t_u64) : t_u64 = swap_bytes722254271 x - -let to_be376714729 (self: t_u64) : t_u64 = swap_bytes722254271 self - -let trailing_zeros188346231 (self: t_u64) : t_u32 = cttz_u64 self - -let count_ones926736261 (self: t_u128) : t_u32 = ctpop_u128 self - -let leading_zeros19644612 (self: t_u128) : t_u32 = ctlz_u128 self - -let swap_bytes420879368 (self: t_u128) : t_u128 = - Core.Convert.f_into #t_u128 #t_u128 #FStar.Tactics.Typeclasses.solve (bswap_u128 self <: t_u128) - -let from_be191085771 (x: t_u128) : t_u128 = swap_bytes420879368 x - -let to_be555075987 (self: t_u128) : t_u128 = swap_bytes420879368 self - -let trailing_zeros821715250 (self: t_u128) : t_u32 = cttz_u128 self - -let count_ones441645762 (self: t_usize) : t_u32 = ctpop_usize self - -let leading_zeros905233489 (self: t_usize) : t_u32 = ctlz_usize self - -let swap_bytes268673424 (self: t_usize) : t_usize = - Core.Convert.f_into #t_usize - #t_usize - #FStar.Tactics.Typeclasses.solve - (bswap_usize self <: t_usize) - -let from_be607978059 (x: t_usize) : t_usize = swap_bytes268673424 x - -let to_be561847134 (self: t_usize) : t_usize = swap_bytes268673424 self - -let trailing_zeros42066260 (self: t_usize) : t_u32 = cttz_usize self - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_48: Core.Ops.Arith.t_Div t_i8 t_i8 = - { - f_Output = t_i8; - f_div_pre = (fun (self: t_i8) (other: t_i8) -> true); - f_div_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); - f_div = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 /! other._0) <: t_i8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_49: Core.Ops.Arith.t_Div t_i16 t_i16 = - { - f_Output = t_i16; - f_div_pre = (fun (self: t_i16) (other: t_i16) -> true); - f_div_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); - f_div = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 /! other._0) <: t_i16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_50: Core.Ops.Arith.t_Div t_i32 t_i32 = - { - f_Output = t_i32; - f_div_pre = (fun (self: t_i32) (other: t_i32) -> true); - f_div_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); - f_div = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 /! other._0) <: t_i32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_51: Core.Ops.Arith.t_Div t_i64 t_i64 = - { - f_Output = t_i64; - f_div_pre = (fun (self: t_i64) (other: t_i64) -> true); - f_div_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); - f_div = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 /! other._0) <: t_i64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_52: Core.Ops.Arith.t_Div t_i128 t_i128 = - { - f_Output = t_i128; - f_div_pre = (fun (self: t_i128) (other: t_i128) -> true); - f_div_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); - f_div = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 /! other._0) <: t_i128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_53: Core.Ops.Arith.t_Div t_isize t_isize = - { - f_Output = t_isize; - f_div_pre = (fun (self: t_isize) (other: t_isize) -> true); - f_div_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); - f_div = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 /! other._0) <: t_isize - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_60: Core.Ops.Arith.t_Rem t_i8 t_i8 = - { - f_Output = t_i8; - f_rem_pre = (fun (self: t_i8) (other: t_i8) -> true); - f_rem_post = (fun (self: t_i8) (other: t_i8) (out: t_i8) -> true); - f_rem = fun (self: t_i8) (other: t_i8) -> t_i8 (self._0 %! other._0) <: t_i8 - } - -let rem_euclid622298453 (self rhs: t_i8) : t_i8 = - let r:t_i8 = self %! (Core.Clone.f_clone #t_i8 #FStar.Tactics.Typeclasses.solve rhs <: t_i8) in - if r <. (Core.Convert.f_into #i8 #t_i8 #FStar.Tactics.Typeclasses.solve 0y <: t_i8) - then wrapping_add634491935 r (wrapping_abs400396545 rhs <: t_i8) - else r - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_61: Core.Ops.Arith.t_Rem t_i16 t_i16 = - { - f_Output = t_i16; - f_rem_pre = (fun (self: t_i16) (other: t_i16) -> true); - f_rem_post = (fun (self: t_i16) (other: t_i16) (out: t_i16) -> true); - f_rem = fun (self: t_i16) (other: t_i16) -> t_i16 (self._0 %! other._0) <: t_i16 - } - -let rem_euclid158017644 (self rhs: t_i16) : t_i16 = - let r:t_i16 = self %! (Core.Clone.f_clone #t_i16 #FStar.Tactics.Typeclasses.solve rhs <: t_i16) in - if r <. (Core.Convert.f_into #i16 #t_i16 #FStar.Tactics.Typeclasses.solve 0s <: t_i16) - then wrapping_add868559108 r (wrapping_abs229076826 rhs <: t_i16) - else r - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_62: Core.Ops.Arith.t_Rem t_i32 t_i32 = - { - f_Output = t_i32; - f_rem_pre = (fun (self: t_i32) (other: t_i32) -> true); - f_rem_post = (fun (self: t_i32) (other: t_i32) (out: t_i32) -> true); - f_rem = fun (self: t_i32) (other: t_i32) -> t_i32 (self._0 %! other._0) <: t_i32 - } - -let rem_euclid881249982 (self rhs: t_i32) : t_i32 = - let r:t_i32 = self %! (Core.Clone.f_clone #t_i32 #FStar.Tactics.Typeclasses.solve rhs <: t_i32) in - if r <. (Core.Convert.f_into #i32 #t_i32 #FStar.Tactics.Typeclasses.solve 0l <: t_i32) - then wrapping_add475006616 r (wrapping_abs729536875 rhs <: t_i32) - else r - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_63: Core.Ops.Arith.t_Rem t_i64 t_i64 = - { - f_Output = t_i64; - f_rem_pre = (fun (self: t_i64) (other: t_i64) -> true); - f_rem_post = (fun (self: t_i64) (other: t_i64) (out: t_i64) -> true); - f_rem = fun (self: t_i64) (other: t_i64) -> t_i64 (self._0 %! other._0) <: t_i64 - } - -let rem_euclid1057082210 (self rhs: t_i64) : t_i64 = - let r:t_i64 = self %! (Core.Clone.f_clone #t_i64 #FStar.Tactics.Typeclasses.solve rhs <: t_i64) in - if r <. (Core.Convert.f_into #i64 #t_i64 #FStar.Tactics.Typeclasses.solve 0L <: t_i64) - then wrapping_add590074241 r (wrapping_abs285829312 rhs <: t_i64) - else r - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_64: Core.Ops.Arith.t_Rem t_i128 t_i128 = - { - f_Output = t_i128; - f_rem_pre = (fun (self: t_i128) (other: t_i128) -> true); - f_rem_post = (fun (self: t_i128) (other: t_i128) (out: t_i128) -> true); - f_rem = fun (self: t_i128) (other: t_i128) -> t_i128 (self._0 %! other._0) <: t_i128 - } - -let rem_euclid254910751 (self rhs: t_i128) : t_i128 = - let r:t_i128 = - self %! (Core.Clone.f_clone #t_i128 #FStar.Tactics.Typeclasses.solve rhs <: t_i128) - in - if - r <. (Core.Convert.f_into #i128 #t_i128 #FStar.Tactics.Typeclasses.solve (pub_i128 0) <: t_i128) - then wrapping_add251385439 r (wrapping_abs281925696 rhs <: t_i128) - else r - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_65: Core.Ops.Arith.t_Rem t_isize t_isize = - { - f_Output = t_isize; - f_rem_pre = (fun (self: t_isize) (other: t_isize) -> true); - f_rem_post = (fun (self: t_isize) (other: t_isize) (out: t_isize) -> true); - f_rem = fun (self: t_isize) (other: t_isize) -> t_isize (self._0 %! other._0) <: t_isize - } - -let rem_euclid828379367 (self rhs: t_isize) : t_isize = - let r:t_isize = - self %! (Core.Clone.f_clone #t_isize #FStar.Tactics.Typeclasses.solve rhs <: t_isize) - in - if r <. (Core.Convert.f_into #isize #t_isize #FStar.Tactics.Typeclasses.solve (isz 0) <: t_isize) - then wrapping_add226040243 r (wrapping_abs347300819 rhs <: t_isize) - else r - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Ops.Bit.t_Not t_u8 = - { - f_Output = t_u8; - f_not_pre = (fun (self: t_u8) -> true); - f_not_post = (fun (self: t_u8) (out: t_u8) -> true); - f_not = fun (self: t_u8) -> t_u8 ~.self._0 <: t_u8 - } - -let count_zeros558337492 (self: t_u8) : t_u32 = count_ones202509899 (~.self <: t_u8) - -let leading_ones55148479 (self: t_u8) : t_u32 = leading_zeros75047366 (~.self <: t_u8) - -let trailing_ones359778731 (self: t_u8) : t_u32 = trailing_zeros572929871 (~.self <: t_u8) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Ops.Bit.t_Not t_u16 = - { - f_Output = t_u16; - f_not_pre = (fun (self: t_u16) -> true); - f_not_post = (fun (self: t_u16) (out: t_u16) -> true); - f_not = fun (self: t_u16) -> t_u16 ~.self._0 <: t_u16 - } - -let count_zeros199825317 (self: t_u16) : t_u32 = count_ones91875752 (~.self <: t_u16) - -let leading_ones164277656 (self: t_u16) : t_u32 = leading_zeros462412478 (~.self <: t_u16) - -let trailing_ones903944727 (self: t_u16) : t_u32 = trailing_zeros421474733 (~.self <: t_u16) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Ops.Bit.t_Not t_u32 = - { - f_Output = t_u32; - f_not_pre = (fun (self: t_u32) -> true); - f_not_post = (fun (self: t_u32) (out: t_u32) -> true); - f_not = fun (self: t_u32) -> t_u32 ~.self._0 <: t_u32 - } - -let count_zeros942566041 (self: t_u32) : t_u32 = count_ones776185738 (~.self <: t_u32) - -let leading_ones766486760 (self: t_u32) : t_u32 = leading_zeros698221972 (~.self <: t_u32) - -let trailing_ones223371510 (self: t_u32) : t_u32 = trailing_zeros1061560720 (~.self <: t_u32) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Ops.Bit.t_Not t_u64 = - { - f_Output = t_u64; - f_not_pre = (fun (self: t_u64) -> true); - f_not_post = (fun (self: t_u64) (out: t_u64) -> true); - f_not = fun (self: t_u64) -> t_u64 ~.self._0 <: t_u64 - } - -let count_zeros60346158 (self: t_u64) : t_u32 = count_ones235885653 (~.self <: t_u64) - -let leading_ones404666910 (self: t_u64) : t_u32 = leading_zeros338302110 (~.self <: t_u64) - -let trailing_ones601201120 (self: t_u64) : t_u32 = trailing_zeros188346231 (~.self <: t_u64) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Ops.Bit.t_Not t_u128 = - { - f_Output = t_u128; - f_not_pre = (fun (self: t_u128) -> true); - f_not_post = (fun (self: t_u128) (out: t_u128) -> true); - f_not = fun (self: t_u128) -> t_u128 ~.self._0 <: t_u128 - } - -let count_zeros824862815 (self: t_u128) : t_u32 = count_ones926736261 (~.self <: t_u128) - -let leading_ones475503572 (self: t_u128) : t_u32 = leading_zeros19644612 (~.self <: t_u128) - -let trailing_ones705845381 (self: t_u128) : t_u32 = trailing_zeros821715250 (~.self <: t_u128) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Ops.Bit.t_Not t_usize = - { - f_Output = t_usize; - f_not_pre = (fun (self: t_usize) -> true); - f_not_post = (fun (self: t_usize) (out: t_usize) -> true); - f_not = fun (self: t_usize) -> t_usize ~.self._0 <: t_usize - } - -let count_zeros73479642 (self: t_usize) : t_u32 = count_ones441645762 (~.self <: t_usize) - -let leading_ones667660708 (self: t_usize) : t_u32 = leading_zeros905233489 (~.self <: t_usize) - -let trailing_ones979548463 (self: t_usize) : t_u32 = trailing_zeros42066260 (~.self <: t_usize) diff --git a/proof-libs/fstar/generated-core/Core.Array.fst b/proof-libs/fstar/generated-core/Core.Array.fst deleted file mode 100644 index 7528c5612..000000000 --- a/proof-libs/fstar/generated-core/Core.Array.fst +++ /dev/null @@ -1,14 +0,0 @@ -module Core.Array -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {t_TryFromSliceError as t_TryFromSliceError} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} - -include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} - -include Core.Array.Rec_bundle_579704328 {impl as impl} diff --git a/proof-libs/fstar/generated-core/Core.Base.Binary.fst b/proof-libs/fstar/generated-core/Core.Base.Binary.fst deleted file mode 100644 index b2599d7bd..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Binary.fst +++ /dev/null @@ -1,168 +0,0 @@ -module Core.Base.Binary -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let rec positive_cmp__cmp_binary_cont - (x y: Core.Base.Spec.Binary.Positive.t_Positive) - (r: Core.Cmp.t_Ordering) - : Core.Cmp.t_Ordering = - match Core.Base.Spec.Binary.Positive.match_positive x with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - (match Core.Base.Spec.Binary.Positive.match_positive y with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> r - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - (match Core.Base.Spec.Binary.Positive.match_positive y with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> positive_cmp__cmp_binary_cont p q r - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - positive_cmp__cmp_binary_cont p q (Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - match Core.Base.Spec.Binary.Positive.match_positive y with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - positive_cmp__cmp_binary_cont p q (Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> positive_cmp__cmp_binary_cont p q r - -let positive_cmp (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) : Core.Cmp.t_Ordering = - positive_cmp__cmp_binary_cont lhs rhs (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - -let positive_le (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) : bool = - match - Core.Option.Option_Some (positive_cmp lhs rhs) <: Core.Option.t_Option Core.Cmp.t_Ordering - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - -let rec positive_pred_double (s: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Binary.Positive.t_Positive = - match Core.Base.Spec.Binary.Positive.match_positive s with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Binary.Positive.xH - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Core.Base.Spec.Binary.Positive.xI (positive_pred_double p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Core.Base.Spec.Binary.Positive.xI (Core.Base.Spec.Binary.Positive.xO p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let rec positive_succ (s: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Binary.Positive.t_Positive = - match Core.Base.Spec.Binary.Positive.match_positive s with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.xO Core.Base.Spec.Binary.Positive.xH - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> Core.Base.Spec.Binary.Positive.xI q - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.xO (positive_succ q <: Core.Base.Spec.Binary.Positive.t_Positive) - -let positive_add (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Binary.Positive.t_Positive = positive_add__add lhs rhs - -let rec positive_mul (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Binary.Positive.t_Positive = - match Core.Base.Spec.Binary.Positive.match_positive lhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> rhs - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Core.Base.Spec.Binary.Positive.xO (positive_mul p rhs - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - positive_add (Core.Clone.f_clone #Core.Base.Spec.Binary.Positive.t_Positive - #FStar.Tactics.Typeclasses.solve - rhs - <: - Core.Base.Spec.Binary.Positive.t_Positive) - (Core.Base.Spec.Binary.Positive.xO (positive_mul p rhs - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let rec positive_add__add (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Binary.Positive.t_Positive = - match Core.Base.Spec.Binary.Positive.match_positive lhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.xO Core.Base.Spec.Binary.Positive.xH - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> Core.Base.Spec.Binary.Positive.xI q - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.xO (positive_succ q - <: - Core.Base.Spec.Binary.Positive.t_Positive)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Binary.Positive.xI p - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - Core.Base.Spec.Binary.Positive.xO (positive_add__add p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.xI (positive_add__add p q - <: - Core.Base.Spec.Binary.Positive.t_Positive)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.xO (positive_succ p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - Core.Base.Spec.Binary.Positive.xI (positive_add__add p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.xO (positive_add__add_carry p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -and positive_add__add_carry (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Binary.Positive.t_Positive = - match Core.Base.Spec.Binary.Positive.match_positive lhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.xI Core.Base.Spec.Binary.Positive.xH - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - Core.Base.Spec.Binary.Positive.xO (positive_succ q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.xI (positive_succ q - <: - Core.Base.Spec.Binary.Positive.t_Positive)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.xO (positive_succ p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - Core.Base.Spec.Binary.Positive.xI (positive_add__add p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.xO (positive_add__add_carry p q - <: - Core.Base.Spec.Binary.Positive.t_Positive)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.xI (positive_succ p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - Core.Base.Spec.Binary.Positive.xO (positive_add__add_carry p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.xI (positive_add__add_carry p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) diff --git a/proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst b/proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst deleted file mode 100644 index 6b8427f68..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Number_conversion.fst +++ /dev/null @@ -1,76 +0,0 @@ -module Core.Base.Number_conversion -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {from_u128_binary as impl_24__from_u128_binary} - -include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} - -include Core.Array.Rec_bundle_579704328 {impl_20 as impl_20} - -include Core.Array.Rec_bundle_579704328 {from_u16_binary as impl_24__from_u16_binary} - -include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} - -include Core.Array.Rec_bundle_579704328 {impl_14 as impl_14} - -include Core.Array.Rec_bundle_579704328 {from_u32_binary as impl_24__from_u32_binary} - -include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} - -include Core.Array.Rec_bundle_579704328 {impl_16 as impl_16} - -include Core.Array.Rec_bundle_579704328 {from_u64_binary as impl_24__from_u64_binary} - -include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} - -include Core.Array.Rec_bundle_579704328 {impl_18 as impl_18} - -include Core.Array.Rec_bundle_579704328 {from_u8_binary as impl_24__from_u8_binary} - -include Core.Array.Rec_bundle_579704328 {impl as impl} - -include Core.Array.Rec_bundle_579704328 {impl_12 as impl_12} - -include Core.Array.Rec_bundle_579704328 {from_usize_binary as impl_24__from_usize_binary} - -include Core.Array.Rec_bundle_579704328 {impl_10 as impl_10} - -include Core.Array.Rec_bundle_579704328 {impl_22 as impl_22} - -include Core.Array.Rec_bundle_579704328 {to_u128_binary as impl_24__to_u128_binary} - -include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} - -include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} - -include Core.Array.Rec_bundle_579704328 {to_u16_binary as impl_24__to_u16_binary} - -include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} - -include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} - -include Core.Array.Rec_bundle_579704328 {to_u32_binary as impl_24__to_u32_binary} - -include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} - -include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} - -include Core.Array.Rec_bundle_579704328 {to_u64_binary as impl_24__to_u64_binary} - -include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} - -include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} - -include Core.Array.Rec_bundle_579704328 {to_u8_binary as impl_24__to_u8_binary} - -include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} - -include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} - -include Core.Array.Rec_bundle_579704328 {to_usize_binary as impl_24__to_usize_binary} - -include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} - -include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} diff --git a/proof-libs/fstar/generated-core/Core.Base.Pos.fst b/proof-libs/fstar/generated-core/Core.Base.Pos.fst deleted file mode 100644 index 267337919..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Pos.fst +++ /dev/null @@ -1,447 +0,0 @@ -module Core.Base.Pos -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let haxint_double (s: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos s with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Pos.POS_POS p -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let haxint_shr__half (s: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos s with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Pos.POS_POS n -> - match Core.Base.Spec.Binary.Positive.match_positive n with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Core.Base.Spec.Binary.Positive.positive_to_int p - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Core.Base.Spec.Binary.Positive.positive_to_int p - -let haxint_sub__double_mask (lhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Pos.POS_POS p -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let haxint_sub__succ_double_mask (lhs: Core.Base.Spec.Haxint.t_HaxInt) - : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> - Core.Base.Spec.Binary.Positive.positive_to_int Core.Base.Spec.Binary.Positive.xH - | Core.Base.Spec.Binary.Pos.POS_POS p -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xI p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let haxint_succ_double (s: Core.Base.Spec.Haxint.t_HaxInt) - : Core.Base.Spec.Binary.Positive.t_Positive = - match Core.Base.Spec.Binary.Pos.match_pos s with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.xH - | Core.Base.Spec.Binary.Pos.POS_POS p -> Core.Base.Spec.Binary.Positive.xI p - -let rec bitand_binary (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Positive.match_positive lhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Positive.POSITIVE_XI _ - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ONE) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - haxint_double (bitand_binary p q <: Core.Base.Spec.Haxint.t_HaxInt)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ONE - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - haxint_double (bitand_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double (bitand_binary p q - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let rec bitor_binary (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Binary.Positive.t_Positive = - match Core.Base.Spec.Binary.Positive.match_positive lhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> Core.Base.Spec.Binary.Positive.xI q - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Binary.Positive.xH - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> Core.Base.Spec.Binary.Positive.xI q) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Binary.Positive.xI p - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - Core.Base.Spec.Binary.Positive.xO (bitor_binary p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.xI (bitor_binary p q - <: - Core.Base.Spec.Binary.Positive.t_Positive)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Binary.Positive.xI p - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.xI (bitor_binary p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let haxint_bitand (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Pos.POS_POS p -> - match Core.Base.Spec.Binary.Pos.match_pos rhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Pos.POS_POS q -> bitand_binary p q - -let haxint_bitor (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> rhs - | Core.Base.Spec.Binary.Pos.POS_POS p -> - match Core.Base.Spec.Binary.Pos.match_pos rhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.positive_to_int p - | Core.Base.Spec.Binary.Pos.POS_POS q -> - Core.Base.Spec.Binary.Positive.positive_to_int (bitor_binary p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let rec haxint_bitxor__bitxor_binary (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Positive.match_positive lhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xI q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO q - <: - Core.Base.Spec.Binary.Positive.t_Positive)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xI p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - haxint_double (haxint_bitxor__bitxor_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double (haxint_bitxor__bitxor_binary - p - q - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Binary.Positive.t_Positive)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double (haxint_bitxor__bitxor_binary - p - q - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - haxint_double (haxint_bitxor__bitxor_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) - -let haxint_bitxor (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> rhs - | Core.Base.Spec.Binary.Pos.POS_POS p -> - match Core.Base.Spec.Binary.Pos.match_pos rhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.positive_to_int p - | Core.Base.Spec.Binary.Pos.POS_POS q -> haxint_bitxor__bitxor_binary p q - -let haxint_cmp (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Cmp.t_Ordering = - match Core.Base.Spec.Binary.Pos.match_pos lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> - (match Core.Base.Spec.Binary.Pos.match_pos rhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering - | Core.Base.Spec.Binary.Pos.POS_POS q -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) - | Core.Base.Spec.Binary.Pos.POS_POS p -> - match Core.Base.Spec.Binary.Pos.match_pos rhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering - | Core.Base.Spec.Binary.Pos.POS_POS q -> Core.Base.Binary.positive_cmp p q - -let haxint_le (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : bool = - match - Core.Option.Option_Some (haxint_cmp lhs rhs) <: Core.Option.t_Option Core.Cmp.t_Ordering - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - -let haxint_lt (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : bool = - match - Core.Option.Option_Some (haxint_cmp lhs rhs) <: Core.Option.t_Option Core.Cmp.t_Ordering - with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false - -let rec haxint_shl__shl_helper (rhs: Core.Base.Spec.Unary.t_Unary) (lhs: Core.Base.Spec.Haxint.t_HaxInt) - : Core.Base.Spec.Haxint.t_HaxInt = - if - Core.Base.Spec.Haxint.is_zero (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - lhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - then lhs - else - match Core.Base.Spec.Unary.match_unary rhs with - | Core.Base.Spec.Unary.UNARY_ZERO -> lhs - | Core.Base.Spec.Unary.UNARY_SUCC n -> - haxint_shl__shl_helper n (haxint_double lhs <: Core.Base.Spec.Haxint.t_HaxInt) - -let haxint_shl (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - haxint_shl__shl_helper (Core.Base.Spec.Unary.unary_from_int rhs <: Core.Base.Spec.Unary.t_Unary) - lhs - -let rec haxint_shr__shr_helper (rhs: Core.Base.Spec.Unary.t_Unary) (lhs: Core.Base.Spec.Haxint.t_HaxInt) - : Core.Base.Spec.Haxint.t_HaxInt = - if - Core.Base.Spec.Haxint.is_zero (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - lhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - then lhs - else - match Core.Base.Spec.Unary.match_unary rhs with - | Core.Base.Spec.Unary.UNARY_ZERO -> lhs - | Core.Base.Spec.Unary.UNARY_SUCC n -> - haxint_shr__shr_helper n (haxint_shr__half lhs <: Core.Base.Spec.Haxint.t_HaxInt) - -let haxint_shr (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - haxint_shr__shr_helper (Core.Base.Spec.Unary.unary_from_int rhs <: Core.Base.Spec.Unary.t_Unary) - lhs - -let haxint_sub__double_pred_mask (lhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Positive.match_positive lhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO (Core.Base.Binary.positive_pred_double - p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO (Core.Base.Spec.Binary.Positive.xO - p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let rec power_of_two (s: Core.Base.Spec.Unary.t_Unary) : Core.Base.Spec.Binary.Positive.t_Positive = - match Core.Base.Spec.Unary.match_unary s with - | Core.Base.Spec.Unary.UNARY_ZERO -> Core.Base.Spec.Binary.Positive.xH - | Core.Base.Spec.Unary.UNARY_SUCC x -> - Core.Base.Spec.Binary.Positive.xO (power_of_two x <: Core.Base.Spec.Binary.Positive.t_Positive) - -let haxint_add (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> rhs - | Core.Base.Spec.Binary.Pos.POS_POS p -> - match Core.Base.Spec.Binary.Pos.match_pos rhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.positive_to_int p - | Core.Base.Spec.Binary.Pos.POS_POS q -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Binary.positive_add p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let haxint_sub (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Pos.POS_POS p -> - match Core.Base.Spec.Binary.Pos.match_pos rhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.positive_to_int p - | Core.Base.Spec.Binary.Pos.POS_POS q -> haxint_sub__sub_binary p q - -let rec haxint_divmod__divmod_binary (a b: Core.Base.Spec.Binary.Positive.t_Positive) - : (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = - match Core.Base.Spec.Binary.Positive.match_positive a with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - (match Core.Base.Spec.Binary.Positive.match_positive b with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Haxint.v_HaxInt_ONE, Core.Base.Spec.Haxint.v_HaxInt_ZERO - <: - (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Haxint.v_HaxInt_ZERO, Core.Base.Spec.Haxint.v_HaxInt_ONE - <: - (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO a___ -> - let q, r:(Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = - haxint_divmod__divmod_binary a___ - (Core.Clone.f_clone #Core.Base.Spec.Binary.Positive.t_Positive - #FStar.Tactics.Typeclasses.solve - b - <: - Core.Base.Spec.Binary.Positive.t_Positive) - in - let r___:Core.Base.Spec.Haxint.t_HaxInt = haxint_double r in - if - haxint_le (Core.Base.Spec.Binary.Positive.positive_to_int (Core.Clone.f_clone #Core.Base.Spec.Binary.Positive.t_Positive - #FStar.Tactics.Typeclasses.solve - b - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve r___ - <: - Core.Base.Spec.Haxint.t_HaxInt) - then - Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double q - <: - Core.Base.Spec.Binary.Positive.t_Positive), - haxint_sub r___ - (Core.Base.Spec.Binary.Positive.positive_to_int b <: Core.Base.Spec.Haxint.t_HaxInt) - <: - (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) - else haxint_double q, r___ <: (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI a___ -> - let q, r:(Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = - haxint_divmod__divmod_binary a___ - (Core.Clone.f_clone #Core.Base.Spec.Binary.Positive.t_Positive - #FStar.Tactics.Typeclasses.solve - b - <: - Core.Base.Spec.Binary.Positive.t_Positive) - in - let r___:Core.Base.Spec.Haxint.t_HaxInt = - Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double r - <: - Core.Base.Spec.Binary.Positive.t_Positive) - in - if - haxint_le (Core.Base.Spec.Binary.Positive.positive_to_int (Core.Clone.f_clone #Core.Base.Spec.Binary.Positive.t_Positive - #FStar.Tactics.Typeclasses.solve - b - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve r___ - <: - Core.Base.Spec.Haxint.t_HaxInt) - then - Core.Base.Spec.Binary.Positive.positive_to_int (haxint_succ_double q - <: - Core.Base.Spec.Binary.Positive.t_Positive), - haxint_sub r___ - (Core.Base.Spec.Binary.Positive.positive_to_int b <: Core.Base.Spec.Haxint.t_HaxInt) - <: - (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) - else haxint_double q, r___ <: (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) - -let haxint_divmod (a b: Core.Base.Spec.Haxint.t_HaxInt) - : (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = - match Core.Base.Spec.Binary.Pos.match_pos a with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> - Core.Base.Spec.Haxint.v_HaxInt_ZERO, Core.Base.Spec.Haxint.v_HaxInt_ZERO - <: - (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) - | Core.Base.Spec.Binary.Pos.POS_POS p -> - match Core.Base.Spec.Binary.Pos.match_pos b with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> - Core.Base.Spec.Haxint.v_HaxInt_ZERO, Core.Base.Spec.Binary.Positive.positive_to_int p - <: - (Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) - | Core.Base.Spec.Binary.Pos.POS_POS q -> haxint_divmod__divmod_binary p q - -let haxint_div (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - let q, _:(Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = - haxint_divmod lhs rhs - in - q - -let haxint_mul (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Pos.match_pos lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Pos.POS_POS p -> - match Core.Base.Spec.Binary.Pos.match_pos rhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Pos.POS_POS q -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Binary.positive_mul p q - <: - Core.Base.Spec.Binary.Positive.t_Positive) - -let haxint_rem (lhs rhs: Core.Base.Spec.Haxint.t_HaxInt) : Core.Base.Spec.Haxint.t_HaxInt = - let _, r:(Core.Base.Spec.Haxint.t_HaxInt & Core.Base.Spec.Haxint.t_HaxInt) = - haxint_divmod lhs rhs - in - r - -let rec haxint_sub__sub_binary (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Positive.match_positive lhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Binary.positive_pred_double p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - haxint_sub__double_mask (haxint_sub__sub_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - haxint_sub__succ_double_mask (haxint_sub__sub_carry p q <: Core.Base.Spec.Haxint.t_HaxInt)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Spec.Binary.Positive.xO p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - haxint_sub__succ_double_mask (haxint_sub__sub_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - haxint_sub__double_mask (haxint_sub__sub_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) - -and haxint_sub__sub_carry (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Binary.Positive.match_positive lhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> haxint_sub__double_pred_mask p - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - haxint_sub__succ_double_mask (haxint_sub__sub_carry p q <: Core.Base.Spec.Haxint.t_HaxInt) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - haxint_sub__double_mask (haxint_sub__sub_carry p q <: Core.Base.Spec.Haxint.t_HaxInt)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Positive.positive_to_int (Core.Base.Binary.positive_pred_double p - <: - Core.Base.Spec.Binary.Positive.t_Positive) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - haxint_sub__double_mask (haxint_sub__sub_binary p q <: Core.Base.Spec.Haxint.t_HaxInt) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - haxint_sub__succ_double_mask (haxint_sub__sub_carry p q <: Core.Base.Spec.Haxint.t_HaxInt) diff --git a/proof-libs/fstar/generated-core/Core.Base.Seq.fst b/proof-libs/fstar/generated-core/Core.Base.Seq.fst deleted file mode 100644 index 0b6d938eb..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Seq.fst +++ /dev/null @@ -1,221 +0,0 @@ -module Core.Base.Seq -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let hd__panic_cold_explicit (_: Prims.unit) : Rust_primitives.Hax.t_Never = - Core.Panicking.panic_explicit () - -let set_index__set_index_unary__panic_cold_explicit (_: Prims.unit) : Rust_primitives.Hax.t_Never = - Core.Panicking.panic_explicit () - -let is_empty - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: Core.Base.Spec.Seq.t_Seq v_T) - : bool = - match Core.Base.Spec.Seq.match_list #v_T s with - | Core.Base.Spec.Seq.LIST_NIL -> true - | Core.Base.Spec.Seq.LIST_CONS _ _ -> false - -let hd - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: Core.Base.Spec.Seq.t_Seq v_T) - : Prims.Pure v_T (requires ~.(is_empty #v_T s <: bool)) (fun _ -> Prims.l_True) = - match Core.Base.Spec.Seq.match_list #v_T s with - | Core.Base.Spec.Seq.LIST_NIL -> - Rust_primitives.Hax.never_to_any (hd__panic_cold_explicit () <: Rust_primitives.Hax.t_Never) - | Core.Base.Spec.Seq.LIST_CONS hd _ -> hd - -let tl - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: Core.Base.Spec.Seq.t_Seq v_T) - : Prims.Pure (Core.Base.Spec.Seq.t_Seq v_T) - (requires ~.(is_empty #v_T s <: bool)) - (fun _ -> Prims.l_True) = - match Core.Base.Spec.Seq.match_list #v_T s with - | Core.Base.Spec.Seq.LIST_NIL -> Core.Base.Spec.Seq.nil #v_T () - | Core.Base.Spec.Seq.LIST_CONS _ tl -> tl - -let rec eq_inner - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Cmp.t_PartialEq v_T v_T) - (s other: Core.Base.Spec.Seq.t_Seq v_T) - : bool = - match - Core.Base.Spec.Seq.match_list #v_T - (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve s - <: - Core.Base.Spec.Seq.t_Seq v_T) - with - | Core.Base.Spec.Seq.LIST_NIL -> - is_empty #v_T - (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Spec.Seq.t_Seq v_T) - | Core.Base.Spec.Seq.LIST_CONS x xs -> - match - Core.Base.Spec.Seq.match_list #v_T - (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Spec.Seq.t_Seq v_T) - with - | Core.Base.Spec.Seq.LIST_NIL -> false - | Core.Base.Spec.Seq.LIST_CONS y ys -> x =. y && eq_inner #v_T xs ys - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Cmp.t_PartialEq v_T v_T) - : Core.Cmp.t_PartialEq (Core.Base.Spec.Seq.t_Seq v_T) (Core.Base.Spec.Seq.t_Seq v_T) = - { - f_eq_pre - = - (fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) -> true); - f_eq_post - = - (fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) (out: bool) -> - true); - f_eq - = - (fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) -> - eq_inner #v_T - (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve self - <: - Core.Base.Spec.Seq.t_Seq v_T) - (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Spec.Seq.t_Seq v_T)); - f_ne_pre - = - (fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) -> true); - f_ne_post - = - (fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) (out: bool) -> - true); - f_ne - = - fun (self: Core.Base.Spec.Seq.t_Seq v_T) (other: Core.Base.Spec.Seq.t_Seq v_T) -> - ~.(eq_inner #v_T - (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve self - <: - Core.Base.Spec.Seq.t_Seq v_T) - (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) #FStar.Tactics.Typeclasses.solve other - <: - Core.Base.Spec.Seq.t_Seq v_T) - <: - bool) - } - -let rec get_index__get_index_unary - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (l: Core.Base.Spec.Seq.t_Seq v_T) - (i: Core.Base.Spec.Unary.t_Unary) - : v_T = - match Core.Base.Spec.Unary.match_unary i with - | Core.Base.Spec.Unary.UNARY_ZERO -> hd #v_T l - | Core.Base.Spec.Unary.UNARY_SUCC n -> - get_index__get_index_unary #v_T (tl #v_T l <: Core.Base.Spec.Seq.t_Seq v_T) n - -let get_index - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: Core.Base.Spec.Seq.t_Seq v_T) - (i: Core.Base.Spec.Haxint.t_HaxInt) - : v_T = - get_index__get_index_unary #v_T - s - (Core.Base.Spec.Unary.unary_from_int i <: Core.Base.Spec.Unary.t_Unary) - -let rec len - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: Core.Base.Spec.Seq.t_Seq v_T) - : Core.Base.Spec.Haxint.t_HaxInt = - match Core.Base.Spec.Seq.match_list #v_T s with - | Core.Base.Spec.Seq.LIST_NIL -> Core.Base.Spec.Haxint.v_HaxInt_ZERO - | Core.Base.Spec.Seq.LIST_CONS _ tl -> - Core.Base.Spec.Haxint.succ (len #v_T tl <: Core.Base.Spec.Haxint.t_HaxInt) - -let rec repeat__repeat_unary - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (n: Core.Base.Spec.Unary.t_Unary) - (v: v_T) - : Core.Base.Spec.Seq.t_Seq v_T = - match Core.Base.Spec.Unary.match_unary n with - | Core.Base.Spec.Unary.UNARY_ZERO -> Core.Base.Spec.Seq.nil #v_T () - | Core.Base.Spec.Unary.UNARY_SUCC m -> - Core.Base.Spec.Seq.cons #v_T - (repeat__repeat_unary #v_T - m - (Core.Clone.f_clone #v_T #FStar.Tactics.Typeclasses.solve v <: v_T) - <: - Core.Base.Spec.Seq.t_Seq v_T) - v - -let repeat - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (n: Core.Base.Spec.Haxint.t_HaxInt) - (v: v_T) - : Core.Base.Spec.Seq.t_Seq v_T = - repeat__repeat_unary #v_T - (Core.Base.Spec.Unary.unary_from_int n <: Core.Base.Spec.Unary.t_Unary) - v - -let rec rev__rev_accum - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s accum: Core.Base.Spec.Seq.t_Seq v_T) - : Core.Base.Spec.Seq.t_Seq v_T = - match Core.Base.Spec.Seq.match_list #v_T s with - | Core.Base.Spec.Seq.LIST_NIL -> accum - | Core.Base.Spec.Seq.LIST_CONS hd tl -> - rev__rev_accum #v_T tl (Core.Base.Spec.Seq.cons #v_T accum hd <: Core.Base.Spec.Seq.t_Seq v_T) - -let rev - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: Core.Base.Spec.Seq.t_Seq v_T) - : Core.Base.Spec.Seq.t_Seq v_T = - rev__rev_accum #v_T s (Core.Base.Spec.Seq.nil #v_T () <: Core.Base.Spec.Seq.t_Seq v_T) - -let rec set_index__set_index_unary - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (x: Core.Base.Spec.Seq.t_Seq v_T) - (i: Core.Base.Spec.Unary.t_Unary) - (v: v_T) - : Core.Base.Spec.Seq.t_Seq v_T = - match Core.Base.Spec.Seq.match_list #v_T x with - | Core.Base.Spec.Seq.LIST_NIL -> - Rust_primitives.Hax.never_to_any (set_index__set_index_unary__panic_cold_explicit () - <: - Rust_primitives.Hax.t_Never) - | Core.Base.Spec.Seq.LIST_CONS hd tl -> - match Core.Base.Spec.Unary.match_unary i with - | Core.Base.Spec.Unary.UNARY_ZERO -> Core.Base.Spec.Seq.cons #v_T tl v - | Core.Base.Spec.Unary.UNARY_SUCC n -> - Core.Base.Spec.Seq.cons #v_T - (set_index__set_index_unary #v_T tl n v <: Core.Base.Spec.Seq.t_Seq v_T) - hd - -let set_index - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (s: Core.Base.Spec.Seq.t_Seq v_T) - (i: Core.Base.Spec.Haxint.t_HaxInt) - (v: v_T) - : Prims.Pure (Core.Base.Spec.Seq.t_Seq v_T) - (requires Core.Base.Pos.haxint_lt i (len #v_T s <: Core.Base.Spec.Haxint.t_HaxInt)) - (fun _ -> Prims.l_True) = - set_index__set_index_unary #v_T - s - (Core.Base.Spec.Unary.unary_from_int i <: Core.Base.Spec.Unary.t_Unary) - v diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Pos.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Pos.fst deleted file mode 100644 index 11e9e7ee6..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Pos.fst +++ /dev/null @@ -1,18 +0,0 @@ -module Core.Base.Spec.Binary.Pos -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_POS = - | POS_ZERO : t_POS - | POS_POS : Core.Base.Spec.Binary.Positive.t_Positive -> t_POS - -let match_pos (s: Core.Base.Spec.Haxint.t_HaxInt) : t_POS = - if - Core.Base.Spec.Haxint.is_zero (Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - s - <: - Core.Base.Spec.Haxint.t_HaxInt) - then POS_ZERO <: t_POS - else POS_POS (Core.Base.Spec.Binary.Positive.positive_from_int s) <: t_POS diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst deleted file mode 100644 index 7bb9bd61f..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Spec.Binary.Positive.fst +++ /dev/null @@ -1,127 +0,0 @@ -module Core.Base.Spec.Binary.Positive -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_Positive = | Positive : Core.Base.Spec.Haxint.t_HaxInt -> t_Positive - -type t_POSITIVE = - | POSITIVE_XH : t_POSITIVE - | POSITIVE_XO : t_Positive -> t_POSITIVE - | POSITIVE_XI : t_Positive -> t_POSITIVE - -let positive_from_int (x: Core.Base.Spec.Haxint.t_HaxInt) : t_Positive = Positive x <: t_Positive - -let positive_to_int (s: t_Positive) : Core.Base.Spec.Haxint.t_HaxInt = s._0 - -let xH: t_Positive = Positive Core.Base.Spec.Haxint.v_HaxInt_ONE <: t_Positive - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Clone.t_Clone t_Positive = - { - f_clone_pre = (fun (self: t_Positive) -> true); - f_clone_post = (fun (self: t_Positive) (out: t_Positive) -> true); - f_clone - = - fun (self: t_Positive) -> - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - } - -let match_positive__is_xH (s: t_Positive) : bool = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - -let match_positive__is_xI (s: t_Positive) : bool = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - -let match_positive__is_xO (s: t_Positive) : bool = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - -let xI (s: t_Positive) : t_Positive = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - -let xO (s: t_Positive) : t_Positive = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - -let match_positive (s: t_Positive) : t_POSITIVE = - if - match_positive__is_xH (Core.Clone.f_clone #t_Positive #FStar.Tactics.Typeclasses.solve s - <: - t_Positive) - then POSITIVE_XH <: t_POSITIVE - else - if - match_positive__is_xO (Core.Clone.f_clone #t_Positive #FStar.Tactics.Typeclasses.solve s - <: - t_Positive) - then - POSITIVE_XO - (positive_from_int (Core.Base.Spec.Haxint.div2 (positive_to_int s - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt)) - <: - t_POSITIVE - else - POSITIVE_XI - (positive_from_int (Core.Base.Spec.Haxint.div2 (positive_to_int s - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt)) - <: - t_POSITIVE diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Constants.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Constants.fst deleted file mode 100644 index acd066282..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Spec.Constants.fst +++ /dev/null @@ -1,283 +0,0 @@ -module Core.Base.Spec.Constants -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let v_BITS_128_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [128uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_BITS_16_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [16uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_BITS_32_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [32uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_BITS_64_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [64uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_BITS_8_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [8uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_128_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = - [0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 1uy] - in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 17); - Rust_primitives.Hax.array_of_list 17 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_128_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = - [ - 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; - 255uy; 255uy; 255uy; 255uy - ] - in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 16); - Rust_primitives.Hax.array_of_list 16 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_16_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [0uy; 0uy; 1uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 3); - Rust_primitives.Hax.array_of_list 3 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_16_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [255uy; 255uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); - Rust_primitives.Hax.array_of_list 2 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_32_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [0uy; 0uy; 0uy; 0uy; 1uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 5); - Rust_primitives.Hax.array_of_list 5 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_32_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [255uy; 255uy; 255uy; 255uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 4); - Rust_primitives.Hax.array_of_list 4 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_4_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [128uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_4_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [127uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_64_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 0uy; 1uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 9); - Rust_primitives.Hax.array_of_list 9 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_64_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy; 255uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 8); - Rust_primitives.Hax.array_of_list 8 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_8_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [0uy; 1uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); - Rust_primitives.Hax.array_of_list 2 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt - -let v_WORDSIZE_8_SUB_1_: Core.Base.Spec.Haxint.t_HaxInt = - { - Core.Base.Spec.Haxint.f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [255uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - Core.Base.Spec.Haxint.t_HaxInt diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Haxint.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Haxint.fst deleted file mode 100644 index 905782d89..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Spec.Haxint.fst +++ /dev/null @@ -1,98 +0,0 @@ -module Core.Base.Spec.Haxint -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_HaxInt = { f_v:Alloc.Borrow.t_Cow (t_Slice u8) } - -let v_HaxInt_ONE: t_HaxInt = - { - f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [1uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - t_HaxInt - -let v_HaxInt_TWO: t_HaxInt = - { - f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list = [2uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - t_HaxInt - -let v_HaxInt_ZERO: t_HaxInt = - { - f_v - = - Alloc.Borrow.Cow_Borrowed - ((let list:Prims.list u8 = [] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 0); - Rust_primitives.Hax.array_of_list 0 list) - <: - t_Slice u8) - <: - Alloc.Borrow.t_Cow (t_Slice u8) - } - <: - t_HaxInt - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Clone.t_Clone t_HaxInt = - { - f_clone_pre = (fun (self: t_HaxInt) -> true); - f_clone_post = (fun (self: t_HaxInt) (out: t_HaxInt) -> true); - f_clone - = - fun (self: t_HaxInt) -> - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - } - -let div2 (s: t_HaxInt) : t_HaxInt = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - -let is_zero (s: t_HaxInt) : bool = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst deleted file mode 100644 index 0912d71d0..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Spec.Seq.fst +++ /dev/null @@ -1,22 +0,0 @@ -module Core.Base.Spec.Seq -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {t_Seq as t_Seq} - -include Core.Array.Rec_bundle_579704328 {f_v as f_v} - -include Core.Array.Rec_bundle_579704328 {impl as impl} - -include Core.Array.Rec_bundle_579704328 {t_LIST as t_LIST} - -include Core.Array.Rec_bundle_579704328 {LIST_NIL as LIST_NIL} - -include Core.Array.Rec_bundle_579704328 {LIST_CONS as LIST_CONS} - -include Core.Array.Rec_bundle_579704328 {nil as nil} - -include Core.Array.Rec_bundle_579704328 {cons as cons} - -include Core.Array.Rec_bundle_579704328 {match_list as match_list} diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst deleted file mode 100644 index 9bae9d16a..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Spec.Unary.fst +++ /dev/null @@ -1,70 +0,0 @@ -module Core.Base.Spec.Unary -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_Unary = | Unary : Core.Base.Spec.Haxint.t_HaxInt -> t_Unary - -type t_UNARY = - | UNARY_ZERO : t_UNARY - | UNARY_SUCC : t_Unary -> t_UNARY - -let unary_from_int (x: Core.Base.Spec.Haxint.t_HaxInt) : t_Unary = Unary x <: t_Unary - -let unary_to_int (s: t_Unary) : Core.Base.Spec.Haxint.t_HaxInt = s._0 - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Clone.t_Clone t_Unary = - { - f_clone_pre = (fun (self: t_Unary) -> true); - f_clone_post = (fun (self: t_Unary) (out: t_Unary) -> true); - f_clone - = - fun (self: t_Unary) -> - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - } - -let pred (x: t_Unary) : t_Unary = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - -let match_unary (s: t_Unary) : t_UNARY = - if - Core.Base.Spec.Haxint.is_zero (unary_to_int (Core.Clone.f_clone #t_Unary - #FStar.Tactics.Typeclasses.solve - s - <: - t_Unary) - <: - Core.Base.Spec.Haxint.t_HaxInt) - then UNARY_ZERO <: t_UNARY - else UNARY_SUCC (pred s) <: t_UNARY - -let succ (x: t_Unary) : t_Unary = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) diff --git a/proof-libs/fstar/generated-core/Core.Base.Spec.Z.fst b/proof-libs/fstar/generated-core/Core.Base.Spec.Z.fst deleted file mode 100644 index c7c717bdf..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Spec.Z.fst +++ /dev/null @@ -1,19 +0,0 @@ -module Core.Base.Spec.Z -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_Z = - | Z_NEG : Core.Base.Spec.Binary.Positive.t_Positive -> t_Z - | Z_ZERO : t_Z - | Z_POS : Core.Base.Spec.Binary.Positive.t_Positive -> t_Z - -let v_Z_ONE: t_Z = Z_POS Core.Base.Spec.Binary.Positive.xH <: t_Z - -let v_Z_TWO: t_Z = - Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Haxint.v_HaxInt_TWO - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - t_Z diff --git a/proof-libs/fstar/generated-core/Core.Base.Z.fst b/proof-libs/fstar/generated-core/Core.Base.Z.fst deleted file mode 100644 index f8acae7a7..000000000 --- a/proof-libs/fstar/generated-core/Core.Base.Z.fst +++ /dev/null @@ -1,400 +0,0 @@ -module Core.Base.Z -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let z_neg (x: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - match x with - | Core.Base.Spec.Z.Z_NEG p -> Core.Base.Spec.Z.Z_POS p <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS p -> Core.Base.Spec.Z.Z_NEG p <: Core.Base.Spec.Z.t_Z - -let z_bitor__n_succ (x: Core.Base.Spec.Binary.Pos.t_POS) : Core.Base.Spec.Binary.Positive.t_Positive = - match x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> Core.Base.Spec.Binary.Positive.xH - | Core.Base.Spec.Binary.Pos.POS_POS p -> - Core.Base.Spec.Binary.Positive.positive_from_int (Core.Base.Spec.Haxint.succ (Core.Base.Spec.Binary.Positive.positive_to_int - p - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - -let z_add__z_double (s: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - match s with - | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS p -> - Core.Base.Spec.Z.Z_POS (Core.Base.Spec.Binary.Positive.xO p) <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_NEG p -> - Core.Base.Spec.Z.Z_NEG (Core.Base.Spec.Binary.Positive.xO p) <: Core.Base.Spec.Z.t_Z - -let z_bitor__haxint_ldiff__n_double (x: Core.Base.Spec.Binary.Pos.t_POS) - : Core.Base.Spec.Binary.Pos.t_POS = - match x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> - Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Pos.POS_POS p -> - Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Spec.Binary.Positive.xO p) - <: - Core.Base.Spec.Binary.Pos.t_POS - -let z_bitor__haxint_ldiff__n_succ_double (x: Core.Base.Spec.Binary.Pos.t_POS) - : Core.Base.Spec.Binary.Pos.t_POS = - match x with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> - Core.Base.Spec.Binary.Pos.POS_POS Core.Base.Spec.Binary.Positive.xH - <: - Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Pos.POS_POS p -> - Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Spec.Binary.Positive.xI p) - <: - Core.Base.Spec.Binary.Pos.t_POS - -let z_add__z_pred_double (s: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - match s with - | Core.Base.Spec.Z.Z_ZERO -> - Core.Base.Spec.Z.Z_NEG Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS p -> - Core.Base.Spec.Z.Z_POS (Core.Base.Binary.positive_pred_double p) <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_NEG p -> - Core.Base.Spec.Z.Z_NEG (Core.Base.Spec.Binary.Positive.xI p) <: Core.Base.Spec.Z.t_Z - -let z_add__z_succ_double (s: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - match s with - | Core.Base.Spec.Z.Z_ZERO -> - Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS p -> - Core.Base.Spec.Z.Z_POS (Core.Base.Spec.Binary.Positive.xI p) <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_NEG p -> - Core.Base.Spec.Z.Z_NEG (Core.Base.Binary.positive_pred_double p) <: Core.Base.Spec.Z.t_Z - -let rec z_bitor__haxint_ldiff__positive_ldiff (lhs rhs: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Binary.Pos.t_POS = - match Core.Base.Spec.Binary.Positive.match_positive lhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Positive.POSITIVE_XO _ -> - Core.Base.Spec.Binary.Pos.POS_POS Core.Base.Spec.Binary.Positive.xH - <: - Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Positive.POSITIVE_XI _ -> - Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - (match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Spec.Binary.Positive.xO p) - <: - Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q - <: - Core.Base.Spec.Binary.Pos.t_POS) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q - <: - Core.Base.Spec.Binary.Pos.t_POS)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - match Core.Base.Spec.Binary.Positive.match_positive rhs with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Spec.Binary.Positive.xO p) - <: - Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - z_bitor__haxint_ldiff__n_succ_double (z_bitor__haxint_ldiff__positive_ldiff p q - <: - Core.Base.Spec.Binary.Pos.t_POS) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - z_bitor__haxint_ldiff__n_double (z_bitor__haxint_ldiff__positive_ldiff p q - <: - Core.Base.Spec.Binary.Pos.t_POS) - -let z_bitor__haxint_ldiff (lhs rhs: Core.Base.Spec.Binary.Pos.t_POS) - : Core.Base.Spec.Binary.Pos.t_POS = - match lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> - Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Pos.POS_POS p -> - match rhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> - Core.Base.Spec.Binary.Pos.POS_POS p <: Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Pos.POS_POS q -> z_bitor__haxint_ldiff__positive_ldiff p q - -let z_bitor__n_and (lhs rhs: Core.Base.Spec.Binary.Pos.t_POS) : Core.Base.Spec.Binary.Pos.t_POS = - match lhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> - Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Pos.POS_POS p -> - match rhs with - | Core.Base.Spec.Binary.Pos.POS_ZERO -> - Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Pos.POS_POS q -> - Core.Base.Spec.Binary.Pos.POS_POS - (Core.Base.Spec.Binary.Positive.positive_from_int (Core.Base.Pos.bitand_binary p q - <: - Core.Base.Spec.Haxint.t_HaxInt)) - <: - Core.Base.Spec.Binary.Pos.t_POS - -let z_bitor__positive_pred_N (x: Core.Base.Spec.Binary.Positive.t_Positive) - : Core.Base.Spec.Binary.Pos.t_POS = - match Core.Base.Spec.Binary.Positive.match_positive x with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Binary.Pos.POS_ZERO <: Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Spec.Binary.Positive.xO p) - <: - Core.Base.Spec.Binary.Pos.t_POS - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - Core.Base.Spec.Binary.Pos.POS_POS (Core.Base.Binary.positive_pred_double p) - <: - Core.Base.Spec.Binary.Pos.t_POS - -let z_bitor (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - match lhs with - | Core.Base.Spec.Z.Z_ZERO -> rhs - | Core.Base.Spec.Z.Z_POS x -> - (match rhs with - | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_POS x <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS y -> - Core.Base.Spec.Z.Z_POS (Core.Base.Pos.bitor_binary x y) <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_NEG y -> - Core.Base.Spec.Z.Z_NEG - (z_bitor__n_succ (z_bitor__haxint_ldiff (z_bitor__positive_pred_N y - <: - Core.Base.Spec.Binary.Pos.t_POS) - (Core.Base.Spec.Binary.Pos.POS_POS x <: Core.Base.Spec.Binary.Pos.t_POS) - <: - Core.Base.Spec.Binary.Pos.t_POS)) - <: - Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Z.Z_NEG x -> - match rhs with - | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_NEG x <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS y -> - Core.Base.Spec.Z.Z_NEG - (z_bitor__n_succ (z_bitor__haxint_ldiff (z_bitor__positive_pred_N x - <: - Core.Base.Spec.Binary.Pos.t_POS) - (Core.Base.Spec.Binary.Pos.POS_POS y <: Core.Base.Spec.Binary.Pos.t_POS) - <: - Core.Base.Spec.Binary.Pos.t_POS)) - <: - Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_NEG y -> - Core.Base.Spec.Z.Z_NEG - (z_bitor__n_succ (z_bitor__n_and (z_bitor__positive_pred_N x - <: - Core.Base.Spec.Binary.Pos.t_POS) - (z_bitor__positive_pred_N y <: Core.Base.Spec.Binary.Pos.t_POS) - <: - Core.Base.Spec.Binary.Pos.t_POS)) - <: - Core.Base.Spec.Z.t_Z - -let z_cmp (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Cmp.t_Ordering = - match lhs with - | Core.Base.Spec.Z.Z_NEG p -> - (match rhs with - | Core.Base.Spec.Z.Z_NEG q -> - (match Core.Base.Binary.positive_cmp p q with - | Core.Cmp.Ordering_Equal -> Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering - | Core.Cmp.Ordering_Less -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering - | Core.Cmp.Ordering_Greater -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) - | _ -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering) - | Core.Base.Spec.Z.Z_ZERO -> - (match rhs with - | Core.Base.Spec.Z.Z_ZERO -> Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering - | Core.Base.Spec.Z.Z_POS _ -> Core.Cmp.Ordering_Less <: Core.Cmp.t_Ordering - | Core.Base.Spec.Z.Z_NEG _ -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering) - | Core.Base.Spec.Z.Z_POS p -> - match rhs with - | Core.Base.Spec.Z.Z_POS q -> Core.Base.Binary.positive_cmp p q - | _ -> Core.Cmp.Ordering_Greater <: Core.Cmp.t_Ordering - -let z_le (lhs rhs: Core.Base.Spec.Z.t_Z) : bool = - match Core.Option.Option_Some (z_cmp lhs rhs) <: Core.Option.t_Option Core.Cmp.t_Ordering with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) - | Core.Option.Option_Some (Core.Cmp.Ordering_Equal ) -> true - | _ -> false - -let z_lt (lhs rhs: Core.Base.Spec.Z.t_Z) : bool = - match Core.Option.Option_Some (z_cmp lhs rhs) <: Core.Option.t_Option Core.Cmp.t_Ordering with - | Core.Option.Option_Some (Core.Cmp.Ordering_Less ) -> true - | _ -> false - -let rec z_add__pos_z_sub (x y: Core.Base.Spec.Binary.Positive.t_Positive) : Core.Base.Spec.Z.t_Z = - match Core.Base.Spec.Binary.Positive.match_positive x with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - (match Core.Base.Spec.Binary.Positive.match_positive y with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - Core.Base.Spec.Z.Z_NEG (Core.Base.Binary.positive_pred_double q) <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - Core.Base.Spec.Z.Z_NEG (Core.Base.Spec.Binary.Positive.xO q) <: Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - (match Core.Base.Spec.Binary.Positive.match_positive y with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Z.Z_POS (Core.Base.Binary.positive_pred_double p) <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - z_add__z_double (z_add__pos_z_sub p q <: Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - z_add__z_pred_double (z_add__pos_z_sub p q <: Core.Base.Spec.Z.t_Z)) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - match Core.Base.Spec.Binary.Positive.match_positive y with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - Core.Base.Spec.Z.Z_POS (Core.Base.Spec.Binary.Positive.xO p) <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Binary.Positive.POSITIVE_XO q -> - z_add__z_succ_double (z_add__pos_z_sub p q <: Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI q -> - z_add__z_double (z_add__pos_z_sub p q <: Core.Base.Spec.Z.t_Z) - -let z_add (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - match lhs with - | Core.Base.Spec.Z.Z_NEG p -> - (match rhs with - | Core.Base.Spec.Z.Z_NEG q -> - Core.Base.Spec.Z.Z_NEG (Core.Base.Binary.positive_add p q) <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_NEG p <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS q -> z_add__pos_z_sub q p) - | Core.Base.Spec.Z.Z_ZERO -> rhs - | Core.Base.Spec.Z.Z_POS p -> - match rhs with - | Core.Base.Spec.Z.Z_NEG q -> z_add__pos_z_sub p q - | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_POS p <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS q -> - Core.Base.Spec.Z.Z_POS (Core.Base.Binary.positive_add p q) <: Core.Base.Spec.Z.t_Z - -let z_sub (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - z_add lhs (z_neg rhs <: Core.Base.Spec.Z.t_Z) - -let z_mul (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - match lhs with - | Core.Base.Spec.Z.Z_NEG p -> - (match rhs with - | Core.Base.Spec.Z.Z_NEG q -> - Core.Base.Spec.Z.Z_POS (Core.Base.Binary.positive_mul p q) <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS q -> - Core.Base.Spec.Z.Z_NEG (Core.Base.Binary.positive_mul p q) <: Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS p -> - match rhs with - | Core.Base.Spec.Z.Z_NEG q -> - Core.Base.Spec.Z.Z_NEG (Core.Base.Binary.positive_mul p q) <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_ZERO -> Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z - | Core.Base.Spec.Z.Z_POS q -> - Core.Base.Spec.Z.Z_POS (Core.Base.Binary.positive_mul p q) <: Core.Base.Spec.Z.t_Z - -let rec pos_div_eucl (a: Core.Base.Spec.Binary.Positive.t_Positive) (b: Core.Base.Spec.Z.t_Z) - : (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = - match Core.Base.Spec.Binary.Positive.match_positive a with - | Core.Base.Spec.Binary.Positive.POSITIVE_XH -> - if - z_le Core.Base.Spec.Z.v_Z_TWO - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b - <: - Core.Base.Spec.Z.t_Z) - then - (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z), Core.Base.Spec.Z.v_Z_ONE - <: - (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - else - Core.Base.Spec.Z.v_Z_ONE, (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z) - <: - (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Binary.Positive.POSITIVE_XO p -> - let q, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = - pos_div_eucl p - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b - <: - Core.Base.Spec.Z.t_Z) - in - let r___:Core.Base.Spec.Z.t_Z = z_mul Core.Base.Spec.Z.v_Z_TWO r in - if - z_lt (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve r___ - <: - Core.Base.Spec.Z.t_Z) - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b - <: - Core.Base.Spec.Z.t_Z) - then z_mul Core.Base.Spec.Z.v_Z_TWO q, r___ <: (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - else - z_add (z_mul Core.Base.Spec.Z.v_Z_TWO q <: Core.Base.Spec.Z.t_Z) Core.Base.Spec.Z.v_Z_ONE, - z_sub r___ b - <: - (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Binary.Positive.POSITIVE_XI p -> - let q, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = - pos_div_eucl p - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b - <: - Core.Base.Spec.Z.t_Z) - in - let r___:Core.Base.Spec.Z.t_Z = - z_add (z_mul Core.Base.Spec.Z.v_Z_TWO r <: Core.Base.Spec.Z.t_Z) Core.Base.Spec.Z.v_Z_ONE - in - if - z_lt (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve r___ - <: - Core.Base.Spec.Z.t_Z) - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b - <: - Core.Base.Spec.Z.t_Z) - then z_mul Core.Base.Spec.Z.v_Z_TWO q, r___ <: (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - else - z_add (z_mul Core.Base.Spec.Z.v_Z_TWO q <: Core.Base.Spec.Z.t_Z) Core.Base.Spec.Z.v_Z_ONE, - z_sub r___ b - <: - (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - -let z_divmod (a b: Core.Base.Spec.Z.t_Z) : (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = - match a with - | Core.Base.Spec.Z.Z_ZERO -> - (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z), - (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z) - <: - (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Z.Z_POS a___ -> - (match Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b with - | Core.Base.Spec.Z.Z_ZERO -> - (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z), - (Core.Base.Spec.Z.Z_POS a___ <: Core.Base.Spec.Z.t_Z) - <: - (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Z.Z_POS b___ -> pos_div_eucl a___ b - | Core.Base.Spec.Z.Z_NEG b___ -> - let q, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = - pos_div_eucl a___ (Core.Base.Spec.Z.Z_POS b___ <: Core.Base.Spec.Z.t_Z) - in - z_neg q, r <: (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z)) - | Core.Base.Spec.Z.Z_NEG a___ -> - match Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b with - | Core.Base.Spec.Z.Z_ZERO -> - (Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z), - (Core.Base.Spec.Z.Z_NEG a___ <: Core.Base.Spec.Z.t_Z) - <: - (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Z.Z_POS _ -> - let q, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = - pos_div_eucl a___ - (Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve b - <: - Core.Base.Spec.Z.t_Z) - in - z_neg q, z_neg r <: (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - | Core.Base.Spec.Z.Z_NEG b___ -> - let q, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = - pos_div_eucl a___ (Core.Base.Spec.Z.Z_POS b___ <: Core.Base.Spec.Z.t_Z) - in - q, z_neg r <: (Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) - -let z_div (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - let q, _:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = z_divmod lhs rhs in - q - -let z_rem (lhs rhs: Core.Base.Spec.Z.t_Z) : Core.Base.Spec.Z.t_Z = - let _, r:(Core.Base.Spec.Z.t_Z & Core.Base.Spec.Z.t_Z) = z_divmod lhs rhs in - r diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst deleted file mode 100644 index c829e1248..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Coerce.fst +++ /dev/null @@ -1,19 +0,0 @@ -module Core.Base_interface.Coerce -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_Concretization (v_Self: Type0) (v_T: Type0) = { - f_concretize_pre:v_Self -> Type0; - f_concretize_post:v_Self -> v_T -> Type0; - f_concretize:x0: v_Self - -> Prims.Pure v_T (f_concretize_pre x0) (fun result -> f_concretize_post x0 result) -} - -class t_Abstraction (v_Self: Type0) = { - f_AbstractType:Type0; - f_lift_pre:v_Self -> Type0; - f_lift_post:v_Self -> f_AbstractType -> Type0; - f_lift:x0: v_Self - -> Prims.Pure f_AbstractType (f_lift_pre x0) (fun result -> f_lift_post x0 result) -} diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I128_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I128_proofs.fst deleted file mode 100644 index 344da15c6..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I128_proofs.fst +++ /dev/null @@ -1,23 +0,0 @@ -module Core.Base_interface.Int.I128_proofs -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let abstract_concretize_cancel (x: Core.Base_interface.Int.t_I128) - : Lemma Prims.l_True - (ensures - (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_I128 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_I128) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base_interface.Int.t_I128) =. - x) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I16_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I16_proofs.fst deleted file mode 100644 index 70d5516d0..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I16_proofs.fst +++ /dev/null @@ -1,23 +0,0 @@ -module Core.Base_interface.Int.I16_proofs -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let abstract_concretize_cancel (x: Core.Base_interface.Int.t_I16) - : Lemma Prims.l_True - (ensures - (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_I16 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_I16) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base_interface.Int.t_I16) =. - x) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I32_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I32_proofs.fst deleted file mode 100644 index 257939043..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I32_proofs.fst +++ /dev/null @@ -1,23 +0,0 @@ -module Core.Base_interface.Int.I32_proofs -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let abstract_concretize_cancel (x: Core.Base_interface.Int.t_I32) - : Lemma Prims.l_True - (ensures - (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_I32 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_I32) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base_interface.Int.t_I32) =. - x) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I64_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I64_proofs.fst deleted file mode 100644 index b7c952144..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I64_proofs.fst +++ /dev/null @@ -1,23 +0,0 @@ -module Core.Base_interface.Int.I64_proofs -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let abstract_concretize_cancel (x: Core.Base_interface.Int.t_I64) - : Lemma Prims.l_True - (ensures - (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_I64 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_I64) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base_interface.Int.t_I64) =. - x) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I8_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.I8_proofs.fst deleted file mode 100644 index 93f2caac1..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.I8_proofs.fst +++ /dev/null @@ -1,21 +0,0 @@ -module Core.Base_interface.Int.I8_proofs -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let abstract_concretize_cancel (x: Core.Base_interface.Int.t_I8) - : Lemma Prims.l_True - (ensures - (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_I8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_I8) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base_interface.Int.t_I8) =. - x) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst deleted file mode 100644 index 5eca1bab0..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U128_proofs.fst +++ /dev/null @@ -1,194 +0,0 @@ -module Core.Base_interface.Int.U128_proofs -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let abstract_concretize_cancel (x: Core.Base_interface.Int.t_U128) - : Lemma Prims.l_True - (ensures - (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base_interface.Int.t_U128) =. - x) = () - -let mod_add (x y z: Core.Base_interface.Int.t_U128) - : Lemma Prims.l_True - (ensures - Core.Base.Pos.haxint_le Core.Base.Spec.Constants.v_WORDSIZE_128_ - (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - y - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U128) +! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) =. - (((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) +! - (y %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) %! - z - <: - Core.Base_interface.Int.t_U128)) = () - -let mod_mul (x y z: Core.Base_interface.Int.t_U128) - : Lemma Prims.l_True - (ensures - Core.Base.Pos.haxint_lt Core.Base.Spec.Constants.v_WORDSIZE_128_ - (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - y - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U128) *! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) =. - ((((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 - #FStar.Tactics.Typeclasses.solve - z - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) *! - y - <: - Core.Base_interface.Int.t_U128) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) %! - z - <: - Core.Base_interface.Int.t_U128)) = () - -let mod_one (x: Core.Base_interface.Int.t_U128) - : Lemma Prims.l_True - (ensures - (x %! - (Core.Base_interface.Int.f_ONE #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) =. - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U128)) = () - -let mod_sub (x y z: Core.Base_interface.Int.t_U128) - : Lemma Prims.l_True - (ensures - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U128) <. - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U128) || - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U128) <=. - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U128) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U128) -! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) =. - (((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) -! - (y %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U128 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) - <: - Core.Base_interface.Int.t_U128) %! - z - <: - Core.Base_interface.Int.t_U128)) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst deleted file mode 100644 index 8e0153bb5..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U16_proofs.fst +++ /dev/null @@ -1,194 +0,0 @@ -module Core.Base_interface.Int.U16_proofs -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let abstract_concretize_cancel (x: Core.Base_interface.Int.t_U16) - : Lemma Prims.l_True - (ensures - (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base_interface.Int.t_U16) =. - x) = () - -let mod_add (x y z: Core.Base_interface.Int.t_U16) - : Lemma Prims.l_True - (ensures - Core.Base.Pos.haxint_le Core.Base.Spec.Constants.v_WORDSIZE_16_ - (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - y - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U16) +! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) =. - (((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) +! - (y %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) %! - z - <: - Core.Base_interface.Int.t_U16)) = () - -let mod_mul (x y z: Core.Base_interface.Int.t_U16) - : Lemma Prims.l_True - (ensures - Core.Base.Pos.haxint_lt Core.Base.Spec.Constants.v_WORDSIZE_16_ - (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - y - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U16) *! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) =. - ((((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 - #FStar.Tactics.Typeclasses.solve - z - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) *! - y - <: - Core.Base_interface.Int.t_U16) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) %! - z - <: - Core.Base_interface.Int.t_U16)) = () - -let mod_one (x: Core.Base_interface.Int.t_U16) - : Lemma Prims.l_True - (ensures - (x %! - (Core.Base_interface.Int.f_ONE #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) =. - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U16)) = () - -let mod_sub (x y z: Core.Base_interface.Int.t_U16) - : Lemma Prims.l_True - (ensures - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U16) <. - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U16) || - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U16) <=. - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U16) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U16) -! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) =. - (((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) -! - (y %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U16 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) - <: - Core.Base_interface.Int.t_U16) %! - z - <: - Core.Base_interface.Int.t_U16)) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst deleted file mode 100644 index 89f493b40..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U32_proofs.fst +++ /dev/null @@ -1,194 +0,0 @@ -module Core.Base_interface.Int.U32_proofs -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let abstract_concretize_cancel (x: Core.Base_interface.Int.t_U32) - : Lemma Prims.l_True - (ensures - (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base_interface.Int.t_U32) =. - x) = () - -let mod_add (x y z: Core.Base_interface.Int.t_U32) - : Lemma Prims.l_True - (ensures - Core.Base.Pos.haxint_le Core.Base.Spec.Constants.v_WORDSIZE_32_ - (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - y - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U32) +! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) =. - (((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) +! - (y %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) %! - z - <: - Core.Base_interface.Int.t_U32)) = () - -let mod_mul (x y z: Core.Base_interface.Int.t_U32) - : Lemma Prims.l_True - (ensures - Core.Base.Pos.haxint_lt Core.Base.Spec.Constants.v_WORDSIZE_32_ - (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - y - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U32) *! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) =. - ((((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 - #FStar.Tactics.Typeclasses.solve - z - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) *! - y - <: - Core.Base_interface.Int.t_U32) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) %! - z - <: - Core.Base_interface.Int.t_U32)) = () - -let mod_one (x: Core.Base_interface.Int.t_U32) - : Lemma Prims.l_True - (ensures - (x %! - (Core.Base_interface.Int.f_ONE #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) =. - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U32)) = () - -let mod_sub (x y z: Core.Base_interface.Int.t_U32) - : Lemma Prims.l_True - (ensures - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U32) <. - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U32) || - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U32) <=. - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U32) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U32) -! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) =. - (((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) -! - (y %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U32 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) - <: - Core.Base_interface.Int.t_U32) %! - z - <: - Core.Base_interface.Int.t_U32)) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst deleted file mode 100644 index 08f3dcc1b..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U64_proofs.fst +++ /dev/null @@ -1,194 +0,0 @@ -module Core.Base_interface.Int.U64_proofs -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let abstract_concretize_cancel (x: Core.Base_interface.Int.t_U64) - : Lemma Prims.l_True - (ensures - (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base_interface.Int.t_U64) =. - x) = () - -let mod_add (x y z: Core.Base_interface.Int.t_U64) - : Lemma Prims.l_True - (ensures - Core.Base.Pos.haxint_le Core.Base.Spec.Constants.v_WORDSIZE_64_ - (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U64) +! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) =. - (((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) +! - (y %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) %! - z - <: - Core.Base_interface.Int.t_U64)) = () - -let mod_mul (x y z: Core.Base_interface.Int.t_U64) - : Lemma Prims.l_True - (ensures - Core.Base.Pos.haxint_lt Core.Base.Spec.Constants.v_WORDSIZE_64_ - (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - y - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U64) *! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) =. - ((((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 - #FStar.Tactics.Typeclasses.solve - z - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) *! - y - <: - Core.Base_interface.Int.t_U64) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) %! - z - <: - Core.Base_interface.Int.t_U64)) = () - -let mod_one (x: Core.Base_interface.Int.t_U64) - : Lemma Prims.l_True - (ensures - (x %! - (Core.Base_interface.Int.f_ONE #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) =. - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U64)) = () - -let mod_sub (x y z: Core.Base_interface.Int.t_U64) - : Lemma Prims.l_True - (ensures - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U64) <. - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U64) || - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U64) <=. - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U64) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U64) -! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) =. - (((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) -! - (y %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U64 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) - <: - Core.Base_interface.Int.t_U64) %! - z - <: - Core.Base_interface.Int.t_U64)) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst deleted file mode 100644 index 98d6ce9d0..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.U8_proofs.fst +++ /dev/null @@ -1,190 +0,0 @@ -module Core.Base_interface.Int.U8_proofs -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let abstract_concretize_cancel (x: Core.Base_interface.Int.t_U8) - : Lemma Prims.l_True - (ensures - (Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base_interface.Int.t_U8) =. - x) = () - -let mod_add (x y z: Core.Base_interface.Int.t_U8) - : Lemma Prims.l_True - (ensures - Core.Base.Pos.haxint_le Core.Base.Spec.Constants.v_WORDSIZE_8_ - (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - y - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U8) +! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) =. - (((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) +! - (y %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) %! - z - <: - Core.Base_interface.Int.t_U8)) = () - -let mod_mul (x y z: Core.Base_interface.Int.t_U8) - : Lemma Prims.l_True - (ensures - Core.Base.Pos.haxint_lt Core.Base.Spec.Constants.v_WORDSIZE_8_ - (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - x - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 - #FStar.Tactics.Typeclasses.solve - y - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U8) *! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) =. - ((((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) *! - y - <: - Core.Base_interface.Int.t_U8) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) %! - z - <: - Core.Base_interface.Int.t_U8)) = () - -let mod_one (x: Core.Base_interface.Int.t_U8) - : Lemma Prims.l_True - (ensures - (x %! - (Core.Base_interface.Int.f_ONE #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) =. - (Core.Base_interface.Int.f_ZERO #FStar.Tactics.Typeclasses.solve - <: - Core.Base_interface.Int.t_U8)) = () - -let mod_sub (x y z: Core.Base_interface.Int.t_U8) - : Lemma Prims.l_True - (ensures - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U8) <. - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U8) || - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U8) <=. - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U8) || - (((Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base_interface.Int.t_U8) -! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve y - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) =. - (((x %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) -! - (y %! - (Core.Clone.f_clone #Core.Base_interface.Int.t_U8 #FStar.Tactics.Typeclasses.solve z - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) - <: - Core.Base_interface.Int.t_U8) %! - z - <: - Core.Base_interface.Int.t_U8)) = () diff --git a/proof-libs/fstar/generated-core/Core.Base_interface.Int.fst b/proof-libs/fstar/generated-core/Core.Base_interface.Int.fst deleted file mode 100644 index d2a8ebb92..000000000 --- a/proof-libs/fstar/generated-core/Core.Base_interface.Int.fst +++ /dev/null @@ -1,5811 +0,0 @@ -module Core.Base_interface.Int -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_Constants (v_Self: Type0) = { - f_ZERO:v_Self; - f_ONE:v_Self; - f_MIN:v_Self; - f_MAX:v_Self -} - -type t_I128 = { f_v:Core.Base.Spec.Z.t_Z } - -type t_I16 = { f_v:Core.Base.Spec.Z.t_Z } - -type t_I32 = { f_v:Core.Base.Spec.Z.t_Z } - -type t_I64 = { f_v:Core.Base.Spec.Z.t_Z } - -type t_I8 = { f_v:Core.Base.Spec.Z.t_Z } - -type t_U128 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } - -type t_U16 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } - -type t_U32 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } - -type t_U64 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } - -type t_U8 = { f_v:Core.Base.Spec.Haxint.t_HaxInt } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_43: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I128 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I128) -> true); - f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_51: Core.Clone.t_Clone t_I128 = - { - f_clone_pre = (fun (self: t_I128) -> true); - f_clone_post = (fun (self: t_I128) (out: t_I128) -> true); - f_clone - = - fun (self: t_I128) -> - { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_I128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_57: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I64 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I64) -> true); - f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_65: Core.Clone.t_Clone t_I64 = - { - f_clone_pre = (fun (self: t_I64) -> true); - f_clone_post = (fun (self: t_I64) (out: t_I64) -> true); - f_clone - = - fun (self: t_I64) -> - { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_I64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_71: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I32 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I32) -> true); - f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_79: Core.Clone.t_Clone t_I32 = - { - f_clone_pre = (fun (self: t_I32) -> true); - f_clone_post = (fun (self: t_I32) (out: t_I32) -> true); - f_clone - = - fun (self: t_I32) -> - { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_I32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_85: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I16 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I16) -> true); - f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_93: Core.Clone.t_Clone t_I16 = - { - f_clone_pre = (fun (self: t_I16) -> true); - f_clone_post = (fun (self: t_I16) (out: t_I16) -> true); - f_clone - = - fun (self: t_I16) -> - { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_I16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_99: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Z.t_Z t_I8 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Z.t_Z) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Z.t_Z) (out: t_I8) -> true); - f_concretize = fun (self: Core.Base.Spec.Z.t_Z) -> { f_v = self } <: t_I8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_107: Core.Clone.t_Clone t_I8 = - { - f_clone_pre = (fun (self: t_I8) -> true); - f_clone_post = (fun (self: t_I8) (out: t_I8) -> true); - f_clone - = - fun (self: t_I8) -> - { f_v = Core.Clone.f_clone #Core.Base.Spec.Z.t_Z #FStar.Tactics.Typeclasses.solve self.f_v } - <: - t_I8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_40: t_Constants t_I128 = - { - f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I128; - f_ONE - = - { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } - <: - t_I128; - f_MIN - = - { - f_v - = - Core.Base.Spec.Z.Z_NEG - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_64_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I128; - f_MAX - = - { - f_v - = - Core.Base.Spec.Z.Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_64_SUB_1_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I128 - } - -let impl_41__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_128_ } <: t_U32 - -let impl_41__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_128_ - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_54: t_Constants t_I64 = - { - f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I64; - f_ONE - = - { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } - <: - t_I64; - f_MIN - = - { - f_v - = - Core.Base.Spec.Z.Z_NEG - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_32_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I64; - f_MAX - = - { - f_v - = - Core.Base.Spec.Z.Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_32_SUB_1_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I64 - } - -let impl_55__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_64_ } <: t_U32 - -let impl_55__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_64_ - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_68: t_Constants t_I32 = - { - f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I32; - f_ONE - = - { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } - <: - t_I32; - f_MIN - = - { - f_v - = - Core.Base.Spec.Z.Z_NEG - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_16_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I32; - f_MAX - = - { - f_v - = - Core.Base.Spec.Z.Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_16_SUB_1_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I32 - } - -let impl_69__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_32_ } <: t_U32 - -let impl_69__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_32_ - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_82: t_Constants t_I16 = - { - f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I16; - f_ONE - = - { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } - <: - t_I16; - f_MIN - = - { - f_v - = - Core.Base.Spec.Z.Z_NEG - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_8_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I16; - f_MAX - = - { - f_v - = - Core.Base.Spec.Z.Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_8_SUB_1_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I16 - } - -let impl_83__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_16_ } <: t_U32 - -let impl_83__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_16_ - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_96: t_Constants t_I8 = - { - f_ZERO = { f_v = Core.Base.Spec.Z.Z_ZERO <: Core.Base.Spec.Z.t_Z } <: t_I8; - f_ONE - = - { f_v = Core.Base.Spec.Z.Z_POS Core.Base.Spec.Binary.Positive.xH <: Core.Base.Spec.Z.t_Z } - <: - t_I8; - f_MIN - = - { - f_v - = - Core.Base.Spec.Z.Z_NEG - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_4_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I8; - f_MAX - = - { - f_v - = - Core.Base.Spec.Z.Z_POS - (Core.Base.Spec.Binary.Positive.Positive Core.Base.Spec.Constants.v_WORDSIZE_4_SUB_1_ - <: - Core.Base.Spec.Binary.Positive.t_Positive) - <: - Core.Base.Spec.Z.t_Z - } - <: - t_I8 - } - -let impl_97__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_8_ } <: t_U32 - -let impl_97__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_8_ - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_110: t_Constants t_U128 = - { - f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U128; - f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U128; - f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U128; - f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_128_SUB_1_ } <: t_U128 - } - -let impl_111__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_128_ } <: t_U32 - -let impl_111__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_128_ - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_137: t_Constants t_U64 = - { - f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U64; - f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U64; - f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U64; - f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_64_SUB_1_ } <: t_U64 - } - -let impl_138__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_64_ } <: t_U32 - -let impl_138__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_64_ - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_164: t_Constants t_U32 = - { - f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U32; - f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U32; - f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U32; - f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_32_SUB_1_ } <: t_U32 - } - -let impl_165__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_32_ } <: t_U32 - -let impl_165__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_32_ - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_191: t_Constants t_U16 = - { - f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U16; - f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U16; - f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U16; - f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_16_SUB_1_ } <: t_U16 - } - -let impl_192__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_16_ } <: t_U32 - -let impl_192__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_16_ - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_218: t_Constants t_U8 = - { - f_ZERO = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U8; - f_ONE = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ONE } <: t_U8; - f_MIN = { f_v = Core.Base.Spec.Haxint.v_HaxInt_ZERO } <: t_U8; - f_MAX = { f_v = Core.Base.Spec.Constants.v_WORDSIZE_8_SUB_1_ } <: t_U8 - } - -let impl_219__BITS: t_U32 = { f_v = Core.Base.Spec.Constants.v_BITS_8_ } <: t_U32 - -let impl_219__WORDSIZE: Core.Base.Spec.Haxint.t_HaxInt = Core.Base.Spec.Constants.v_WORDSIZE_8_ - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_134: Core.Clone.t_Clone t_U128 = - { - f_clone_pre = (fun (self: t_U128) -> true); - f_clone_post = (fun (self: t_U128) (out: t_U128) -> true); - f_clone - = - fun (self: t_U128) -> - { - f_v - = - Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v - } - <: - t_U128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_161: Core.Clone.t_Clone t_U64 = - { - f_clone_pre = (fun (self: t_U64) -> true); - f_clone_post = (fun (self: t_U64) (out: t_U64) -> true); - f_clone - = - fun (self: t_U64) -> - { - f_v - = - Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v - } - <: - t_U64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_188: Core.Clone.t_Clone t_U32 = - { - f_clone_pre = (fun (self: t_U32) -> true); - f_clone_post = (fun (self: t_U32) (out: t_U32) -> true); - f_clone - = - fun (self: t_U32) -> - { - f_v - = - Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v - } - <: - t_U32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_215: Core.Clone.t_Clone t_U16 = - { - f_clone_pre = (fun (self: t_U16) -> true); - f_clone_post = (fun (self: t_U16) (out: t_U16) -> true); - f_clone - = - fun (self: t_U16) -> - { - f_v - = - Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v - } - <: - t_U16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_242: Core.Clone.t_Clone t_U8 = - { - f_clone_pre = (fun (self: t_U8) -> true); - f_clone_post = (fun (self: t_U8) (out: t_U8) -> true); - f_clone - = - fun (self: t_U8) -> - { - f_v - = - Core.Clone.f_clone #Core.Base.Spec.Haxint.t_HaxInt #FStar.Tactics.Typeclasses.solve self.f_v - } - <: - t_U8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_42: Core.Base_interface.Coerce.t_Abstraction t_I128 = - { - f_AbstractType = Core.Base.Spec.Z.t_Z; - f_lift_pre = (fun (self: t_I128) -> true); - f_lift_post = (fun (self: t_I128) (out: Core.Base.Spec.Z.t_Z) -> true); - f_lift = fun (self: t_I128) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_36: Core.Convert.t_From t_I8 t_I128 = - { - f_from_pre = (fun (x: t_I128) -> true); - f_from_post = (fun (x: t_I128) (out: t_I8) -> true); - f_from - = - fun (x: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_37: Core.Convert.t_From t_I16 t_I128 = - { - f_from_pre = (fun (x: t_I128) -> true); - f_from_post = (fun (x: t_I128) (out: t_I16) -> true); - f_from - = - fun (x: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_38: Core.Convert.t_From t_I32 t_I128 = - { - f_from_pre = (fun (x: t_I128) -> true); - f_from_post = (fun (x: t_I128) (out: t_I32) -> true); - f_from - = - fun (x: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_39: Core.Convert.t_From t_I64 t_I128 = - { - f_from_pre = (fun (x: t_I128) -> true); - f_from_post = (fun (x: t_I128) (out: t_I64) -> true); - f_from - = - fun (x: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_52: Core.Cmp.t_PartialEq t_I128 t_I128 = - { - f_eq_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_eq_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); - f_eq - = - (fun (self: t_I128) (rhs: t_I128) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_ne_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); - f_ne - = - fun (self: t_I128) (rhs: t_I128) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_53: Core.Cmp.t_PartialOrd t_I128 t_I128 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_partial_cmp_post - = - (fun (self: t_I128) (rhs: t_I128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_I128) (rhs: t_I128) -> - Core.Option.Option_Some - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) - <: - Core.Base.Spec.Z.t_Z)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_lt_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); - f_lt - = - (fun (self: t_I128) (rhs: t_I128) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_le_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); - f_le - = - (fun (self: t_I128) (rhs: t_I128) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_gt_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); - f_gt - = - (fun (self: t_I128) (rhs: t_I128) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_ge_post = (fun (self: t_I128) (rhs: t_I128) (out: bool) -> true); - f_ge - = - fun (self: t_I128) (rhs: t_I128) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve self <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I128 #FStar.Tactics.Typeclasses.solve rhs <: t_I128) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_56: Core.Base_interface.Coerce.t_Abstraction t_I64 = - { - f_AbstractType = Core.Base.Spec.Z.t_Z; - f_lift_pre = (fun (self: t_I64) -> true); - f_lift_post = (fun (self: t_I64) (out: Core.Base.Spec.Z.t_Z) -> true); - f_lift = fun (self: t_I64) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_32: Core.Convert.t_From t_I8 t_I64 = - { - f_from_pre = (fun (x: t_I64) -> true); - f_from_post = (fun (x: t_I64) (out: t_I8) -> true); - f_from - = - fun (x: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_33: Core.Convert.t_From t_I16 t_I64 = - { - f_from_pre = (fun (x: t_I64) -> true); - f_from_post = (fun (x: t_I64) (out: t_I16) -> true); - f_from - = - fun (x: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_34: Core.Convert.t_From t_I32 t_I64 = - { - f_from_pre = (fun (x: t_I64) -> true); - f_from_post = (fun (x: t_I64) (out: t_I32) -> true); - f_from - = - fun (x: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_35: Core.Convert.t_From t_I128 t_I64 = - { - f_from_pre = (fun (x: t_I64) -> true); - f_from_post = (fun (x: t_I64) (out: t_I128) -> true); - f_from - = - fun (x: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_66: Core.Cmp.t_PartialEq t_I64 t_I64 = - { - f_eq_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_eq_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); - f_eq - = - (fun (self: t_I64) (rhs: t_I64) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_ne_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); - f_ne - = - fun (self: t_I64) (rhs: t_I64) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_67: Core.Cmp.t_PartialOrd t_I64 t_I64 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_partial_cmp_post - = - (fun (self: t_I64) (rhs: t_I64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_I64) (rhs: t_I64) -> - Core.Option.Option_Some - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) - <: - Core.Base.Spec.Z.t_Z)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_lt_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); - f_lt - = - (fun (self: t_I64) (rhs: t_I64) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_le_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); - f_le - = - (fun (self: t_I64) (rhs: t_I64) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_gt_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); - f_gt - = - (fun (self: t_I64) (rhs: t_I64) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_ge_post = (fun (self: t_I64) (rhs: t_I64) (out: bool) -> true); - f_ge - = - fun (self: t_I64) (rhs: t_I64) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve self <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I64 #FStar.Tactics.Typeclasses.solve rhs <: t_I64) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_70: Core.Base_interface.Coerce.t_Abstraction t_I32 = - { - f_AbstractType = Core.Base.Spec.Z.t_Z; - f_lift_pre = (fun (self: t_I32) -> true); - f_lift_post = (fun (self: t_I32) (out: Core.Base.Spec.Z.t_Z) -> true); - f_lift = fun (self: t_I32) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_28: Core.Convert.t_From t_I8 t_I32 = - { - f_from_pre = (fun (x: t_I32) -> true); - f_from_post = (fun (x: t_I32) (out: t_I8) -> true); - f_from - = - fun (x: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_29: Core.Convert.t_From t_I16 t_I32 = - { - f_from_pre = (fun (x: t_I32) -> true); - f_from_post = (fun (x: t_I32) (out: t_I16) -> true); - f_from - = - fun (x: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_30: Core.Convert.t_From t_I64 t_I32 = - { - f_from_pre = (fun (x: t_I32) -> true); - f_from_post = (fun (x: t_I32) (out: t_I64) -> true); - f_from - = - fun (x: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_31: Core.Convert.t_From t_I128 t_I32 = - { - f_from_pre = (fun (x: t_I32) -> true); - f_from_post = (fun (x: t_I32) (out: t_I128) -> true); - f_from - = - fun (x: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_80: Core.Cmp.t_PartialEq t_I32 t_I32 = - { - f_eq_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_eq_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); - f_eq - = - (fun (self: t_I32) (rhs: t_I32) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_ne_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); - f_ne - = - fun (self: t_I32) (rhs: t_I32) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_81: Core.Cmp.t_PartialOrd t_I32 t_I32 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_partial_cmp_post - = - (fun (self: t_I32) (rhs: t_I32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_I32) (rhs: t_I32) -> - Core.Option.Option_Some - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) - <: - Core.Base.Spec.Z.t_Z)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_lt_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); - f_lt - = - (fun (self: t_I32) (rhs: t_I32) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_le_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); - f_le - = - (fun (self: t_I32) (rhs: t_I32) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_gt_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); - f_gt - = - (fun (self: t_I32) (rhs: t_I32) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_ge_post = (fun (self: t_I32) (rhs: t_I32) (out: bool) -> true); - f_ge - = - fun (self: t_I32) (rhs: t_I32) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve self <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I32 #FStar.Tactics.Typeclasses.solve rhs <: t_I32) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_84: Core.Base_interface.Coerce.t_Abstraction t_I16 = - { - f_AbstractType = Core.Base.Spec.Z.t_Z; - f_lift_pre = (fun (self: t_I16) -> true); - f_lift_post = (fun (self: t_I16) (out: Core.Base.Spec.Z.t_Z) -> true); - f_lift = fun (self: t_I16) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_24: Core.Convert.t_From t_I8 t_I16 = - { - f_from_pre = (fun (x: t_I16) -> true); - f_from_post = (fun (x: t_I16) (out: t_I8) -> true); - f_from - = - fun (x: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_25: Core.Convert.t_From t_I32 t_I16 = - { - f_from_pre = (fun (x: t_I16) -> true); - f_from_post = (fun (x: t_I16) (out: t_I32) -> true); - f_from - = - fun (x: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_26: Core.Convert.t_From t_I64 t_I16 = - { - f_from_pre = (fun (x: t_I16) -> true); - f_from_post = (fun (x: t_I16) (out: t_I64) -> true); - f_from - = - fun (x: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_27: Core.Convert.t_From t_I128 t_I16 = - { - f_from_pre = (fun (x: t_I16) -> true); - f_from_post = (fun (x: t_I16) (out: t_I128) -> true); - f_from - = - fun (x: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_94: Core.Cmp.t_PartialEq t_I16 t_I16 = - { - f_eq_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_eq_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); - f_eq - = - (fun (self: t_I16) (rhs: t_I16) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_ne_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); - f_ne - = - fun (self: t_I16) (rhs: t_I16) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_95: Core.Cmp.t_PartialOrd t_I16 t_I16 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_partial_cmp_post - = - (fun (self: t_I16) (rhs: t_I16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_I16) (rhs: t_I16) -> - Core.Option.Option_Some - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) - <: - Core.Base.Spec.Z.t_Z)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_lt_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); - f_lt - = - (fun (self: t_I16) (rhs: t_I16) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_le_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); - f_le - = - (fun (self: t_I16) (rhs: t_I16) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_gt_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); - f_gt - = - (fun (self: t_I16) (rhs: t_I16) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_ge_post = (fun (self: t_I16) (rhs: t_I16) (out: bool) -> true); - f_ge - = - fun (self: t_I16) (rhs: t_I16) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve self <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I16 #FStar.Tactics.Typeclasses.solve rhs <: t_I16) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_98: Core.Base_interface.Coerce.t_Abstraction t_I8 = - { - f_AbstractType = Core.Base.Spec.Z.t_Z; - f_lift_pre = (fun (self: t_I8) -> true); - f_lift_post = (fun (self: t_I8) (out: Core.Base.Spec.Z.t_Z) -> true); - f_lift = fun (self: t_I8) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_20: Core.Convert.t_From t_I16 t_I8 = - { - f_from_pre = (fun (x: t_I8) -> true); - f_from_post = (fun (x: t_I8) (out: t_I16) -> true); - f_from - = - fun (x: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_21: Core.Convert.t_From t_I32 t_I8 = - { - f_from_pre = (fun (x: t_I8) -> true); - f_from_post = (fun (x: t_I8) (out: t_I32) -> true); - f_from - = - fun (x: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_22: Core.Convert.t_From t_I64 t_I8 = - { - f_from_pre = (fun (x: t_I8) -> true); - f_from_post = (fun (x: t_I8) (out: t_I64) -> true); - f_from - = - fun (x: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_23: Core.Convert.t_From t_I128 t_I8 = - { - f_from_pre = (fun (x: t_I8) -> true); - f_from_post = (fun (x: t_I8) (out: t_I128) -> true); - f_from - = - fun (x: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_108: Core.Cmp.t_PartialEq t_I8 t_I8 = - { - f_eq_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_eq_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); - f_eq - = - (fun (self: t_I8) (rhs: t_I8) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_ne_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); - f_ne - = - fun (self: t_I8) (rhs: t_I8) -> - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_109: Core.Cmp.t_PartialOrd t_I8 t_I8 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_partial_cmp_post - = - (fun (self: t_I8) (rhs: t_I8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_I8) (rhs: t_I8) -> - Core.Option.Option_Some - (Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) - <: - Core.Base.Spec.Z.t_Z)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_lt_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); - f_lt - = - (fun (self: t_I8) (rhs: t_I8) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_le_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); - f_le - = - (fun (self: t_I8) (rhs: t_I8) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_gt_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); - f_gt - = - (fun (self: t_I8) (rhs: t_I8) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_ge_post = (fun (self: t_I8) (rhs: t_I8) (out: bool) -> true); - f_ge - = - fun (self: t_I8) (rhs: t_I8) -> - match - Core.Base.Z.z_cmp (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve self <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_I8 #FStar.Tactics.Typeclasses.solve rhs <: t_I8) - <: - Core.Base.Spec.Z.t_Z) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_112: Core.Base_interface.Coerce.t_Abstraction t_U128 = - { - f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; - f_lift_pre = (fun (self: t_U128) -> true); - f_lift_post = (fun (self: t_U128) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_lift = fun (self: t_U128) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_135: Core.Cmp.t_PartialEq t_U128 t_U128 = - { - f_eq_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_eq_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_eq - = - (fun (self: t_U128) (rhs: t_U128) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_ne_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_ne - = - fun (self: t_U128) (rhs: t_U128) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_136: Core.Cmp.t_PartialOrd t_U128 t_U128 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_partial_cmp_post - = - (fun (self: t_U128) (rhs: t_U128) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_U128) (rhs: t_U128) -> - Core.Option.Option_Some - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_lt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_lt - = - (fun (self: t_U128) (rhs: t_U128) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_le_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_le - = - (fun (self: t_U128) (rhs: t_U128) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_gt_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_gt - = - (fun (self: t_U128) (rhs: t_U128) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_ge_post = (fun (self: t_U128) (rhs: t_U128) (out: bool) -> true); - f_ge - = - fun (self: t_U128) (rhs: t_U128) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve self <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_139: Core.Base_interface.Coerce.t_Abstraction t_U64 = - { - f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; - f_lift_pre = (fun (self: t_U64) -> true); - f_lift_post = (fun (self: t_U64) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_lift = fun (self: t_U64) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_162: Core.Cmp.t_PartialEq t_U64 t_U64 = - { - f_eq_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_eq_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_eq - = - (fun (self: t_U64) (rhs: t_U64) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_ne_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_ne - = - fun (self: t_U64) (rhs: t_U64) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_163: Core.Cmp.t_PartialOrd t_U64 t_U64 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_partial_cmp_post - = - (fun (self: t_U64) (rhs: t_U64) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_U64) (rhs: t_U64) -> - Core.Option.Option_Some - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_lt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_lt - = - (fun (self: t_U64) (rhs: t_U64) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_le_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_le - = - (fun (self: t_U64) (rhs: t_U64) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_gt_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_gt - = - (fun (self: t_U64) (rhs: t_U64) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_ge_post = (fun (self: t_U64) (rhs: t_U64) (out: bool) -> true); - f_ge - = - fun (self: t_U64) (rhs: t_U64) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve self <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_166: Core.Base_interface.Coerce.t_Abstraction t_U32 = - { - f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; - f_lift_pre = (fun (self: t_U32) -> true); - f_lift_post = (fun (self: t_U32) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_lift = fun (self: t_U32) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_189: Core.Cmp.t_PartialEq t_U32 t_U32 = - { - f_eq_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_eq_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_eq - = - (fun (self: t_U32) (rhs: t_U32) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_ne_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_ne - = - fun (self: t_U32) (rhs: t_U32) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_190: Core.Cmp.t_PartialOrd t_U32 t_U32 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_partial_cmp_post - = - (fun (self: t_U32) (rhs: t_U32) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_U32) (rhs: t_U32) -> - Core.Option.Option_Some - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_lt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_lt - = - (fun (self: t_U32) (rhs: t_U32) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_le_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_le - = - (fun (self: t_U32) (rhs: t_U32) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_gt_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_gt - = - (fun (self: t_U32) (rhs: t_U32) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_ge_post = (fun (self: t_U32) (rhs: t_U32) (out: bool) -> true); - f_ge - = - fun (self: t_U32) (rhs: t_U32) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve self <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_193: Core.Base_interface.Coerce.t_Abstraction t_U16 = - { - f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; - f_lift_pre = (fun (self: t_U16) -> true); - f_lift_post = (fun (self: t_U16) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_lift = fun (self: t_U16) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_216: Core.Cmp.t_PartialEq t_U16 t_U16 = - { - f_eq_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_eq_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_eq - = - (fun (self: t_U16) (rhs: t_U16) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_ne_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_ne - = - fun (self: t_U16) (rhs: t_U16) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_217: Core.Cmp.t_PartialOrd t_U16 t_U16 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_partial_cmp_post - = - (fun (self: t_U16) (rhs: t_U16) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_U16) (rhs: t_U16) -> - Core.Option.Option_Some - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_lt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_lt - = - (fun (self: t_U16) (rhs: t_U16) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_le_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_le - = - (fun (self: t_U16) (rhs: t_U16) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_gt_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_gt - = - (fun (self: t_U16) (rhs: t_U16) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_ge_post = (fun (self: t_U16) (rhs: t_U16) (out: bool) -> true); - f_ge - = - fun (self: t_U16) (rhs: t_U16) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve self <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_220: Core.Base_interface.Coerce.t_Abstraction t_U8 = - { - f_AbstractType = Core.Base.Spec.Haxint.t_HaxInt; - f_lift_pre = (fun (self: t_U8) -> true); - f_lift_post = (fun (self: t_U8) (out: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_lift = fun (self: t_U8) -> self.f_v - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_243: Core.Cmp.t_PartialEq t_U8 t_U8 = - { - f_eq_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_eq_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_eq - = - (fun (self: t_U8) (rhs: t_U8) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) =. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering)); - f_ne_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_ne_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_ne - = - fun (self: t_U8) (rhs: t_U8) -> - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Cmp.t_Ordering) <>. - (Core.Cmp.Ordering_Equal <: Core.Cmp.t_Ordering) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_244: Core.Cmp.t_PartialOrd t_U8 t_U8 = - { - _super_9014672428308350468 = FStar.Tactics.Typeclasses.solve; - f_partial_cmp_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_partial_cmp_post - = - (fun (self: t_U8) (rhs: t_U8) (out: Core.Option.t_Option Core.Cmp.t_Ordering) -> true); - f_partial_cmp - = - (fun (self: t_U8) (rhs: t_U8) -> - Core.Option.Option_Some - (Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt)) - <: - Core.Option.t_Option Core.Cmp.t_Ordering); - f_lt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_lt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_lt - = - (fun (self: t_U8) (rhs: t_U8) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less -> true - | _ -> false); - f_le_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_le_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_le - = - (fun (self: t_U8) (rhs: t_U8) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Less | Core.Cmp.Ordering_Equal -> true - | _ -> false); - f_gt_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_gt_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_gt - = - (fun (self: t_U8) (rhs: t_U8) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater -> true - | _ -> false); - f_ge_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_ge_post = (fun (self: t_U8) (rhs: t_U8) (out: bool) -> true); - f_ge - = - fun (self: t_U8) (rhs: t_U8) -> - match - Core.Base.Pos.haxint_cmp (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve self <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Clone.f_clone #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - <: - Core.Base.Spec.Haxint.t_HaxInt) - with - | Core.Cmp.Ordering_Greater | Core.Cmp.Ordering_Equal -> true - | _ -> false - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_48: Core.Ops.Arith.t_Neg t_I128 = - { - f_Output = t_I128; - f_neg_pre = (fun (self: t_I128) -> true); - f_neg_post = (fun (self: t_I128) (out: t_I128) -> true); - f_neg - = - fun (self: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_50: Core.Ops.Bit.t_BitOr t_I128 t_I128 = - { - f_Output = t_I128; - f_bitor_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_bitor_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); - f_bitor - = - fun (self: t_I128) (rhs: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_62: Core.Ops.Arith.t_Neg t_I64 = - { - f_Output = t_I64; - f_neg_pre = (fun (self: t_I64) -> true); - f_neg_post = (fun (self: t_I64) (out: t_I64) -> true); - f_neg - = - fun (self: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_64: Core.Ops.Bit.t_BitOr t_I64 t_I64 = - { - f_Output = t_I64; - f_bitor_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_bitor_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); - f_bitor - = - fun (self: t_I64) (rhs: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_76: Core.Ops.Arith.t_Neg t_I32 = - { - f_Output = t_I32; - f_neg_pre = (fun (self: t_I32) -> true); - f_neg_post = (fun (self: t_I32) (out: t_I32) -> true); - f_neg - = - fun (self: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_78: Core.Ops.Bit.t_BitOr t_I32 t_I32 = - { - f_Output = t_I32; - f_bitor_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_bitor_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); - f_bitor - = - fun (self: t_I32) (rhs: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_90: Core.Ops.Arith.t_Neg t_I16 = - { - f_Output = t_I16; - f_neg_pre = (fun (self: t_I16) -> true); - f_neg_post = (fun (self: t_I16) (out: t_I16) -> true); - f_neg - = - fun (self: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_92: Core.Ops.Bit.t_BitOr t_I16 t_I16 = - { - f_Output = t_I16; - f_bitor_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_bitor_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); - f_bitor - = - fun (self: t_I16) (rhs: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_104: Core.Ops.Arith.t_Neg t_I8 = - { - f_Output = t_I8; - f_neg_pre = (fun (self: t_I8) -> true); - f_neg_post = (fun (self: t_I8) (out: t_I8) -> true); - f_neg - = - fun (self: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_neg (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_106: Core.Ops.Bit.t_BitOr t_I8 t_I8 = - { - f_Output = t_I8; - f_bitor_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_bitor_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); - f_bitor - = - fun (self: t_I8) (rhs: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_bitor (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_46: Core.Ops.Arith.t_Add t_I128 t_I128 = - { - f_Output = t_I128; - f_add_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_add_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); - f_add - = - fun (self: t_I128) (rhs: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_49: Core.Ops.Arith.t_Sub t_I128 t_I128 = - { - f_Output = t_I128; - f_sub_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_sub_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); - f_sub - = - fun (self: t_I128) (rhs: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_60: Core.Ops.Arith.t_Add t_I64 t_I64 = - { - f_Output = t_I64; - f_add_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_add_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); - f_add - = - fun (self: t_I64) (rhs: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_63: Core.Ops.Arith.t_Sub t_I64 t_I64 = - { - f_Output = t_I64; - f_sub_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_sub_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); - f_sub - = - fun (self: t_I64) (rhs: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_74: Core.Ops.Arith.t_Add t_I32 t_I32 = - { - f_Output = t_I32; - f_add_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_add_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); - f_add - = - fun (self: t_I32) (rhs: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_77: Core.Ops.Arith.t_Sub t_I32 t_I32 = - { - f_Output = t_I32; - f_sub_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_sub_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); - f_sub - = - fun (self: t_I32) (rhs: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_88: Core.Ops.Arith.t_Add t_I16 t_I16 = - { - f_Output = t_I16; - f_add_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_add_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); - f_add - = - fun (self: t_I16) (rhs: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_91: Core.Ops.Arith.t_Sub t_I16 t_I16 = - { - f_Output = t_I16; - f_sub_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_sub_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); - f_sub - = - fun (self: t_I16) (rhs: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_102: Core.Ops.Arith.t_Add t_I8 t_I8 = - { - f_Output = t_I8; - f_add_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_add_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); - f_add - = - fun (self: t_I8) (rhs: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_add (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_105: Core.Ops.Arith.t_Sub t_I8 t_I8 = - { - f_Output = t_I8; - f_sub_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_sub_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); - f_sub - = - fun (self: t_I8) (rhs: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_sub (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_113: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U128 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) (out: t_U128) -> true); - f_concretize - = - fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> - { f_v = Core.Base.Pos.haxint_rem self Core.Base.Spec.Constants.v_WORDSIZE_128_ } <: t_U128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: Core.Convert.t_From t_U128 t_U8 = - { - f_from_pre = (fun (x: t_U8) -> true); - f_from_post = (fun (x: t_U8) (out: t_U128) -> true); - f_from - = - fun (x: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: Core.Convert.t_From t_U128 t_U16 = - { - f_from_pre = (fun (x: t_U16) -> true); - f_from_post = (fun (x: t_U16) (out: t_U128) -> true); - f_from - = - fun (x: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_11: Core.Convert.t_From t_U128 t_U32 = - { - f_from_pre = (fun (x: t_U32) -> true); - f_from_post = (fun (x: t_U32) (out: t_U128) -> true); - f_from - = - fun (x: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_15: Core.Convert.t_From t_U128 t_U64 = - { - f_from_pre = (fun (x: t_U64) -> true); - f_from_post = (fun (x: t_U64) (out: t_U128) -> true); - f_from - = - fun (x: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_140: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U64 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) (out: t_U64) -> true); - f_concretize - = - fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> - { f_v = Core.Base.Pos.haxint_rem self Core.Base.Spec.Constants.v_WORDSIZE_64_ } <: t_U64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Convert.t_From t_U64 t_U8 = - { - f_from_pre = (fun (x: t_U8) -> true); - f_from_post = (fun (x: t_U8) (out: t_U64) -> true); - f_from - = - fun (x: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: Core.Convert.t_From t_U64 t_U16 = - { - f_from_pre = (fun (x: t_U16) -> true); - f_from_post = (fun (x: t_U16) (out: t_U64) -> true); - f_from - = - fun (x: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_10: Core.Convert.t_From t_U64 t_U32 = - { - f_from_pre = (fun (x: t_U32) -> true); - f_from_post = (fun (x: t_U32) (out: t_U64) -> true); - f_from - = - fun (x: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_19: Core.Convert.t_From t_U64 t_U128 = - { - f_from_pre = (fun (x: t_U128) -> true); - f_from_post = (fun (x: t_U128) (out: t_U64) -> true); - f_from - = - fun (x: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_167: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U32 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) (out: t_U32) -> true); - f_concretize - = - fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> - { f_v = Core.Base.Pos.haxint_rem self Core.Base.Spec.Constants.v_WORDSIZE_32_ } <: t_U32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Convert.t_From t_U32 t_U8 = - { - f_from_pre = (fun (x: t_U8) -> true); - f_from_post = (fun (x: t_U8) (out: t_U32) -> true); - f_from - = - fun (x: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: Core.Convert.t_From t_U32 t_U16 = - { - f_from_pre = (fun (x: t_U16) -> true); - f_from_post = (fun (x: t_U16) (out: t_U32) -> true); - f_from - = - fun (x: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_14: Core.Convert.t_From t_U32 t_U64 = - { - f_from_pre = (fun (x: t_U64) -> true); - f_from_post = (fun (x: t_U64) (out: t_U32) -> true); - f_from - = - fun (x: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_18: Core.Convert.t_From t_U32 t_U128 = - { - f_from_pre = (fun (x: t_U128) -> true); - f_from_post = (fun (x: t_U128) (out: t_U32) -> true); - f_from - = - fun (x: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_194: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U16 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) (out: t_U16) -> true); - f_concretize - = - fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> - { f_v = Core.Base.Pos.haxint_rem self Core.Base.Spec.Constants.v_WORDSIZE_16_ } <: t_U16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl: Core.Convert.t_From t_U16 t_U8 = - { - f_from_pre = (fun (x: t_U8) -> true); - f_from_post = (fun (x: t_U8) (out: t_U16) -> true); - f_from - = - fun (x: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_9: Core.Convert.t_From t_U16 t_U32 = - { - f_from_pre = (fun (x: t_U32) -> true); - f_from_post = (fun (x: t_U32) (out: t_U16) -> true); - f_from - = - fun (x: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_13: Core.Convert.t_From t_U16 t_U64 = - { - f_from_pre = (fun (x: t_U64) -> true); - f_from_post = (fun (x: t_U64) (out: t_U16) -> true); - f_from - = - fun (x: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_17: Core.Convert.t_From t_U16 t_U128 = - { - f_from_pre = (fun (x: t_U128) -> true); - f_from_post = (fun (x: t_U128) (out: t_U16) -> true); - f_from - = - fun (x: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_221: Core.Base_interface.Coerce.t_Concretization Core.Base.Spec.Haxint.t_HaxInt t_U8 = - { - f_concretize_pre = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> true); - f_concretize_post = (fun (self: Core.Base.Spec.Haxint.t_HaxInt) (out: t_U8) -> true); - f_concretize - = - fun (self: Core.Base.Spec.Haxint.t_HaxInt) -> - { f_v = Core.Base.Pos.haxint_rem self Core.Base.Spec.Constants.v_WORDSIZE_8_ } <: t_U8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: Core.Convert.t_From t_U8 t_U16 = - { - f_from_pre = (fun (x: t_U16) -> true); - f_from_post = (fun (x: t_U16) (out: t_U8) -> true); - f_from - = - fun (x: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_8: Core.Convert.t_From t_U8 t_U32 = - { - f_from_pre = (fun (x: t_U32) -> true); - f_from_post = (fun (x: t_U32) (out: t_U8) -> true); - f_from - = - fun (x: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_12: Core.Convert.t_From t_U8 t_U64 = - { - f_from_pre = (fun (x: t_U64) -> true); - f_from_post = (fun (x: t_U64) (out: t_U8) -> true); - f_from - = - fun (x: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_16: Core.Convert.t_From t_U8 t_U128 = - { - f_from_pre = (fun (x: t_U128) -> true); - f_from_post = (fun (x: t_U128) (out: t_U8) -> true); - f_from - = - fun (x: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve x - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_44: Core.Ops.Arith.t_Mul t_I128 t_I128 = - { - f_Output = t_I128; - f_mul_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_mul_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); - f_mul - = - fun (self: t_I128) (rhs: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_mul (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_58: Core.Ops.Arith.t_Mul t_I64 t_I64 = - { - f_Output = t_I64; - f_mul_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_mul_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); - f_mul - = - fun (self: t_I64) (rhs: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_mul (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_72: Core.Ops.Arith.t_Mul t_I32 t_I32 = - { - f_Output = t_I32; - f_mul_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_mul_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); - f_mul - = - fun (self: t_I32) (rhs: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_mul (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_86: Core.Ops.Arith.t_Mul t_I16 t_I16 = - { - f_Output = t_I16; - f_mul_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_mul_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); - f_mul - = - fun (self: t_I16) (rhs: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_mul (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_100: Core.Ops.Arith.t_Mul t_I8 t_I8 = - { - f_Output = t_I8; - f_mul_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_mul_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); - f_mul - = - fun (self: t_I8) (rhs: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_mul (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_114: Core.Ops.Arith.t_Neg t_U128 = - { - f_Output = t_U128; - f_neg_pre = (fun (self: t_U128) -> true); - f_neg_post = (fun (self: t_U128) (out: t_U128) -> true); - f_neg - = - fun (self: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_sub Core.Base.Spec.Constants.v_WORDSIZE_128_ - (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - Core.Base.Spec.Constants.v_WORDSIZE_128_ - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_117: Core.Ops.Arith.t_Mul t_U128 t_U128 = - { - f_Output = t_U128; - f_mul_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_mul_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_mul - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_118: Core.Ops.Arith.t_Rem t_U128 t_U128 = - { - f_Output = t_U128; - f_rem_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_rem_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_rem - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_119: Core.Ops.Arith.t_Add t_U128 t_U128 = - { - f_Output = t_U128; - f_add_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_add_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_add - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_120: Core.Ops.Arith.t_Div t_U128 t_U128 = - { - f_Output = t_U128; - f_div_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_div_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_div - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_121: Core.Ops.Bit.t_Shl t_U128 t_U8 = - { - f_Output = t_U128; - f_shl_pre = (fun (self: t_U128) (rhs: t_U8) -> true); - f_shl_post = (fun (self: t_U128) (rhs: t_U8) (out: t_U128) -> true); - f_shl - = - fun (self: t_U128) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_122: Core.Ops.Bit.t_Shl t_U128 t_U16 = - { - f_Output = t_U128; - f_shl_pre = (fun (self: t_U128) (rhs: t_U16) -> true); - f_shl_post = (fun (self: t_U128) (rhs: t_U16) (out: t_U128) -> true); - f_shl - = - fun (self: t_U128) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_123: Core.Ops.Bit.t_Shl t_U128 t_U32 = - { - f_Output = t_U128; - f_shl_pre = (fun (self: t_U128) (rhs: t_U32) -> true); - f_shl_post = (fun (self: t_U128) (rhs: t_U32) (out: t_U128) -> true); - f_shl - = - fun (self: t_U128) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_124: Core.Ops.Bit.t_Shl t_U128 t_U64 = - { - f_Output = t_U128; - f_shl_pre = (fun (self: t_U128) (rhs: t_U64) -> true); - f_shl_post = (fun (self: t_U128) (rhs: t_U64) (out: t_U128) -> true); - f_shl - = - fun (self: t_U128) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_125: Core.Ops.Bit.t_Shl t_U128 t_U128 = - { - f_Output = t_U128; - f_shl_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_shl_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_shl - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_126: Core.Ops.Bit.t_Shr t_U128 t_U8 = - { - f_Output = t_U128; - f_shr_pre = (fun (self: t_U128) (rhs: t_U8) -> true); - f_shr_post = (fun (self: t_U128) (rhs: t_U8) (out: t_U128) -> true); - f_shr - = - fun (self: t_U128) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_127: Core.Ops.Bit.t_Shr t_U128 t_U16 = - { - f_Output = t_U128; - f_shr_pre = (fun (self: t_U128) (rhs: t_U16) -> true); - f_shr_post = (fun (self: t_U128) (rhs: t_U16) (out: t_U128) -> true); - f_shr - = - fun (self: t_U128) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_128: Core.Ops.Bit.t_Shr t_U128 t_U32 = - { - f_Output = t_U128; - f_shr_pre = (fun (self: t_U128) (rhs: t_U32) -> true); - f_shr_post = (fun (self: t_U128) (rhs: t_U32) (out: t_U128) -> true); - f_shr - = - fun (self: t_U128) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_129: Core.Ops.Bit.t_Shr t_U128 t_U64 = - { - f_Output = t_U128; - f_shr_pre = (fun (self: t_U128) (rhs: t_U64) -> true); - f_shr_post = (fun (self: t_U128) (rhs: t_U64) (out: t_U128) -> true); - f_shr - = - fun (self: t_U128) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_130: Core.Ops.Bit.t_Shr t_U128 t_U128 = - { - f_Output = t_U128; - f_shr_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_shr_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_shr - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_131: Core.Ops.Bit.t_BitXor t_U128 t_U128 = - { - f_Output = t_U128; - f_bitxor_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_bitxor_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_bitxor - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitxor (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_132: Core.Ops.Bit.t_BitAnd t_U128 t_U128 = - { - f_Output = t_U128; - f_bitand_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_bitand_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_bitand - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitand (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_133: Core.Ops.Bit.t_BitOr t_U128 t_U128 = - { - f_Output = t_U128; - f_bitor_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_bitor_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_bitor - = - fun (self: t_U128) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitor (Core.Base_interface.Coerce.f_lift #t_U128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_141: Core.Ops.Arith.t_Neg t_U64 = - { - f_Output = t_U64; - f_neg_pre = (fun (self: t_U64) -> true); - f_neg_post = (fun (self: t_U64) (out: t_U64) -> true); - f_neg - = - fun (self: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_sub Core.Base.Spec.Constants.v_WORDSIZE_64_ - (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - Core.Base.Spec.Constants.v_WORDSIZE_64_ - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_144: Core.Ops.Arith.t_Mul t_U64 t_U64 = - { - f_Output = t_U64; - f_mul_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_mul_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_mul - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_145: Core.Ops.Arith.t_Rem t_U64 t_U64 = - { - f_Output = t_U64; - f_rem_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_rem_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_rem - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_146: Core.Ops.Arith.t_Add t_U64 t_U64 = - { - f_Output = t_U64; - f_add_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_add_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_add - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_147: Core.Ops.Arith.t_Div t_U64 t_U64 = - { - f_Output = t_U64; - f_div_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_div_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_div - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_148: Core.Ops.Bit.t_Shl t_U64 t_U8 = - { - f_Output = t_U64; - f_shl_pre = (fun (self: t_U64) (rhs: t_U8) -> true); - f_shl_post = (fun (self: t_U64) (rhs: t_U8) (out: t_U64) -> true); - f_shl - = - fun (self: t_U64) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_149: Core.Ops.Bit.t_Shl t_U64 t_U16 = - { - f_Output = t_U64; - f_shl_pre = (fun (self: t_U64) (rhs: t_U16) -> true); - f_shl_post = (fun (self: t_U64) (rhs: t_U16) (out: t_U64) -> true); - f_shl - = - fun (self: t_U64) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_150: Core.Ops.Bit.t_Shl t_U64 t_U32 = - { - f_Output = t_U64; - f_shl_pre = (fun (self: t_U64) (rhs: t_U32) -> true); - f_shl_post = (fun (self: t_U64) (rhs: t_U32) (out: t_U64) -> true); - f_shl - = - fun (self: t_U64) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_151: Core.Ops.Bit.t_Shl t_U64 t_U64 = - { - f_Output = t_U64; - f_shl_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_shl_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_shl - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_152: Core.Ops.Bit.t_Shl t_U64 t_U128 = - { - f_Output = t_U64; - f_shl_pre = (fun (self: t_U64) (rhs: t_U128) -> true); - f_shl_post = (fun (self: t_U64) (rhs: t_U128) (out: t_U64) -> true); - f_shl - = - fun (self: t_U64) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_153: Core.Ops.Bit.t_Shr t_U64 t_U8 = - { - f_Output = t_U64; - f_shr_pre = (fun (self: t_U64) (rhs: t_U8) -> true); - f_shr_post = (fun (self: t_U64) (rhs: t_U8) (out: t_U64) -> true); - f_shr - = - fun (self: t_U64) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_154: Core.Ops.Bit.t_Shr t_U64 t_U16 = - { - f_Output = t_U64; - f_shr_pre = (fun (self: t_U64) (rhs: t_U16) -> true); - f_shr_post = (fun (self: t_U64) (rhs: t_U16) (out: t_U64) -> true); - f_shr - = - fun (self: t_U64) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_155: Core.Ops.Bit.t_Shr t_U64 t_U32 = - { - f_Output = t_U64; - f_shr_pre = (fun (self: t_U64) (rhs: t_U32) -> true); - f_shr_post = (fun (self: t_U64) (rhs: t_U32) (out: t_U64) -> true); - f_shr - = - fun (self: t_U64) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_156: Core.Ops.Bit.t_Shr t_U64 t_U64 = - { - f_Output = t_U64; - f_shr_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_shr_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_shr - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_157: Core.Ops.Bit.t_Shr t_U64 t_U128 = - { - f_Output = t_U64; - f_shr_pre = (fun (self: t_U64) (rhs: t_U128) -> true); - f_shr_post = (fun (self: t_U64) (rhs: t_U128) (out: t_U64) -> true); - f_shr - = - fun (self: t_U64) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_158: Core.Ops.Bit.t_BitXor t_U64 t_U64 = - { - f_Output = t_U64; - f_bitxor_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_bitxor_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_bitxor - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitxor (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_159: Core.Ops.Bit.t_BitAnd t_U64 t_U64 = - { - f_Output = t_U64; - f_bitand_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_bitand_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_bitand - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitand (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_160: Core.Ops.Bit.t_BitOr t_U64 t_U64 = - { - f_Output = t_U64; - f_bitor_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_bitor_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_bitor - = - fun (self: t_U64) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitor (Core.Base_interface.Coerce.f_lift #t_U64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_168: Core.Ops.Arith.t_Neg t_U32 = - { - f_Output = t_U32; - f_neg_pre = (fun (self: t_U32) -> true); - f_neg_post = (fun (self: t_U32) (out: t_U32) -> true); - f_neg - = - fun (self: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_sub Core.Base.Spec.Constants.v_WORDSIZE_32_ - (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - Core.Base.Spec.Constants.v_WORDSIZE_32_ - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_171: Core.Ops.Arith.t_Mul t_U32 t_U32 = - { - f_Output = t_U32; - f_mul_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_mul_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_mul - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_172: Core.Ops.Arith.t_Rem t_U32 t_U32 = - { - f_Output = t_U32; - f_rem_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_rem_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_rem - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_173: Core.Ops.Arith.t_Add t_U32 t_U32 = - { - f_Output = t_U32; - f_add_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_add_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_add - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_174: Core.Ops.Arith.t_Div t_U32 t_U32 = - { - f_Output = t_U32; - f_div_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_div_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_div - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_175: Core.Ops.Bit.t_Shl t_U32 t_U8 = - { - f_Output = t_U32; - f_shl_pre = (fun (self: t_U32) (rhs: t_U8) -> true); - f_shl_post = (fun (self: t_U32) (rhs: t_U8) (out: t_U32) -> true); - f_shl - = - fun (self: t_U32) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_176: Core.Ops.Bit.t_Shl t_U32 t_U16 = - { - f_Output = t_U32; - f_shl_pre = (fun (self: t_U32) (rhs: t_U16) -> true); - f_shl_post = (fun (self: t_U32) (rhs: t_U16) (out: t_U32) -> true); - f_shl - = - fun (self: t_U32) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_177: Core.Ops.Bit.t_Shl t_U32 t_U32 = - { - f_Output = t_U32; - f_shl_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_shl_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_shl - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_178: Core.Ops.Bit.t_Shl t_U32 t_U64 = - { - f_Output = t_U32; - f_shl_pre = (fun (self: t_U32) (rhs: t_U64) -> true); - f_shl_post = (fun (self: t_U32) (rhs: t_U64) (out: t_U32) -> true); - f_shl - = - fun (self: t_U32) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_179: Core.Ops.Bit.t_Shl t_U32 t_U128 = - { - f_Output = t_U32; - f_shl_pre = (fun (self: t_U32) (rhs: t_U128) -> true); - f_shl_post = (fun (self: t_U32) (rhs: t_U128) (out: t_U32) -> true); - f_shl - = - fun (self: t_U32) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_180: Core.Ops.Bit.t_Shr t_U32 t_U8 = - { - f_Output = t_U32; - f_shr_pre = (fun (self: t_U32) (rhs: t_U8) -> true); - f_shr_post = (fun (self: t_U32) (rhs: t_U8) (out: t_U32) -> true); - f_shr - = - fun (self: t_U32) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_181: Core.Ops.Bit.t_Shr t_U32 t_U16 = - { - f_Output = t_U32; - f_shr_pre = (fun (self: t_U32) (rhs: t_U16) -> true); - f_shr_post = (fun (self: t_U32) (rhs: t_U16) (out: t_U32) -> true); - f_shr - = - fun (self: t_U32) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_182: Core.Ops.Bit.t_Shr t_U32 t_U32 = - { - f_Output = t_U32; - f_shr_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_shr_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_shr - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_183: Core.Ops.Bit.t_Shr t_U32 t_U64 = - { - f_Output = t_U32; - f_shr_pre = (fun (self: t_U32) (rhs: t_U64) -> true); - f_shr_post = (fun (self: t_U32) (rhs: t_U64) (out: t_U32) -> true); - f_shr - = - fun (self: t_U32) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_184: Core.Ops.Bit.t_Shr t_U32 t_U128 = - { - f_Output = t_U32; - f_shr_pre = (fun (self: t_U32) (rhs: t_U128) -> true); - f_shr_post = (fun (self: t_U32) (rhs: t_U128) (out: t_U32) -> true); - f_shr - = - fun (self: t_U32) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_185: Core.Ops.Bit.t_BitXor t_U32 t_U32 = - { - f_Output = t_U32; - f_bitxor_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_bitxor_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_bitxor - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitxor (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_186: Core.Ops.Bit.t_BitAnd t_U32 t_U32 = - { - f_Output = t_U32; - f_bitand_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_bitand_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_bitand - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitand (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_187: Core.Ops.Bit.t_BitOr t_U32 t_U32 = - { - f_Output = t_U32; - f_bitor_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_bitor_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_bitor - = - fun (self: t_U32) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitor (Core.Base_interface.Coerce.f_lift #t_U32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_195: Core.Ops.Arith.t_Neg t_U16 = - { - f_Output = t_U16; - f_neg_pre = (fun (self: t_U16) -> true); - f_neg_post = (fun (self: t_U16) (out: t_U16) -> true); - f_neg - = - fun (self: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_sub Core.Base.Spec.Constants.v_WORDSIZE_16_ - (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - Core.Base.Spec.Constants.v_WORDSIZE_16_ - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_198: Core.Ops.Arith.t_Mul t_U16 t_U16 = - { - f_Output = t_U16; - f_mul_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_mul_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_mul - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_199: Core.Ops.Arith.t_Rem t_U16 t_U16 = - { - f_Output = t_U16; - f_rem_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_rem_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_rem - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_200: Core.Ops.Arith.t_Add t_U16 t_U16 = - { - f_Output = t_U16; - f_add_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_add_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_add - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_201: Core.Ops.Arith.t_Div t_U16 t_U16 = - { - f_Output = t_U16; - f_div_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_div_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_div - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_202: Core.Ops.Bit.t_Shl t_U16 t_U8 = - { - f_Output = t_U16; - f_shl_pre = (fun (self: t_U16) (rhs: t_U8) -> true); - f_shl_post = (fun (self: t_U16) (rhs: t_U8) (out: t_U16) -> true); - f_shl - = - fun (self: t_U16) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_203: Core.Ops.Bit.t_Shl t_U16 t_U16 = - { - f_Output = t_U16; - f_shl_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_shl_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_shl - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_204: Core.Ops.Bit.t_Shl t_U16 t_U32 = - { - f_Output = t_U16; - f_shl_pre = (fun (self: t_U16) (rhs: t_U32) -> true); - f_shl_post = (fun (self: t_U16) (rhs: t_U32) (out: t_U16) -> true); - f_shl - = - fun (self: t_U16) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_205: Core.Ops.Bit.t_Shl t_U16 t_U64 = - { - f_Output = t_U16; - f_shl_pre = (fun (self: t_U16) (rhs: t_U64) -> true); - f_shl_post = (fun (self: t_U16) (rhs: t_U64) (out: t_U16) -> true); - f_shl - = - fun (self: t_U16) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_206: Core.Ops.Bit.t_Shl t_U16 t_U128 = - { - f_Output = t_U16; - f_shl_pre = (fun (self: t_U16) (rhs: t_U128) -> true); - f_shl_post = (fun (self: t_U16) (rhs: t_U128) (out: t_U16) -> true); - f_shl - = - fun (self: t_U16) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_207: Core.Ops.Bit.t_Shr t_U16 t_U8 = - { - f_Output = t_U16; - f_shr_pre = (fun (self: t_U16) (rhs: t_U8) -> true); - f_shr_post = (fun (self: t_U16) (rhs: t_U8) (out: t_U16) -> true); - f_shr - = - fun (self: t_U16) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_208: Core.Ops.Bit.t_Shr t_U16 t_U16 = - { - f_Output = t_U16; - f_shr_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_shr_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_shr - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_209: Core.Ops.Bit.t_Shr t_U16 t_U32 = - { - f_Output = t_U16; - f_shr_pre = (fun (self: t_U16) (rhs: t_U32) -> true); - f_shr_post = (fun (self: t_U16) (rhs: t_U32) (out: t_U16) -> true); - f_shr - = - fun (self: t_U16) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_210: Core.Ops.Bit.t_Shr t_U16 t_U64 = - { - f_Output = t_U16; - f_shr_pre = (fun (self: t_U16) (rhs: t_U64) -> true); - f_shr_post = (fun (self: t_U16) (rhs: t_U64) (out: t_U16) -> true); - f_shr - = - fun (self: t_U16) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_211: Core.Ops.Bit.t_Shr t_U16 t_U128 = - { - f_Output = t_U16; - f_shr_pre = (fun (self: t_U16) (rhs: t_U128) -> true); - f_shr_post = (fun (self: t_U16) (rhs: t_U128) (out: t_U16) -> true); - f_shr - = - fun (self: t_U16) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_212: Core.Ops.Bit.t_BitXor t_U16 t_U16 = - { - f_Output = t_U16; - f_bitxor_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_bitxor_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_bitxor - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitxor (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_213: Core.Ops.Bit.t_BitAnd t_U16 t_U16 = - { - f_Output = t_U16; - f_bitand_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_bitand_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_bitand - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitand (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_214: Core.Ops.Bit.t_BitOr t_U16 t_U16 = - { - f_Output = t_U16; - f_bitor_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_bitor_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_bitor - = - fun (self: t_U16) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitor (Core.Base_interface.Coerce.f_lift #t_U16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_222: Core.Ops.Arith.t_Neg t_U8 = - { - f_Output = t_U8; - f_neg_pre = (fun (self: t_U8) -> true); - f_neg_post = (fun (self: t_U8) (out: t_U8) -> true); - f_neg - = - fun (self: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_sub Core.Base.Spec.Constants.v_WORDSIZE_8_ - (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - Core.Base.Spec.Constants.v_WORDSIZE_8_ - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_225: Core.Ops.Arith.t_Mul t_U8 t_U8 = - { - f_Output = t_U8; - f_mul_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_mul_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_mul - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_mul (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_226: Core.Ops.Arith.t_Rem t_U8 t_U8 = - { - f_Output = t_U8; - f_rem_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_rem_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_rem - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_rem (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_227: Core.Ops.Arith.t_Add t_U8 t_U8 = - { - f_Output = t_U8; - f_add_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_add_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_add - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_add (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_228: Core.Ops.Arith.t_Div t_U8 t_U8 = - { - f_Output = t_U8; - f_div_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_div_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_div - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_div (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_229: Core.Ops.Bit.t_Shl t_U8 t_U8 = - { - f_Output = t_U8; - f_shl_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_shl_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_shl - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_230: Core.Ops.Bit.t_Shl t_U8 t_U16 = - { - f_Output = t_U8; - f_shl_pre = (fun (self: t_U8) (rhs: t_U16) -> true); - f_shl_post = (fun (self: t_U8) (rhs: t_U16) (out: t_U8) -> true); - f_shl - = - fun (self: t_U8) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_231: Core.Ops.Bit.t_Shl t_U8 t_U32 = - { - f_Output = t_U8; - f_shl_pre = (fun (self: t_U8) (rhs: t_U32) -> true); - f_shl_post = (fun (self: t_U8) (rhs: t_U32) (out: t_U8) -> true); - f_shl - = - fun (self: t_U8) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_232: Core.Ops.Bit.t_Shl t_U8 t_U64 = - { - f_Output = t_U8; - f_shl_pre = (fun (self: t_U8) (rhs: t_U64) -> true); - f_shl_post = (fun (self: t_U8) (rhs: t_U64) (out: t_U8) -> true); - f_shl - = - fun (self: t_U8) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_233: Core.Ops.Bit.t_Shl t_U8 t_U128 = - { - f_Output = t_U8; - f_shl_pre = (fun (self: t_U8) (rhs: t_U128) -> true); - f_shl_post = (fun (self: t_U8) (rhs: t_U128) (out: t_U8) -> true); - f_shl - = - fun (self: t_U8) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shl (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_234: Core.Ops.Bit.t_Shr t_U8 t_U8 = - { - f_Output = t_U8; - f_shr_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_shr_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_shr - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_235: Core.Ops.Bit.t_Shr t_U8 t_U16 = - { - f_Output = t_U8; - f_shr_pre = (fun (self: t_U8) (rhs: t_U16) -> true); - f_shr_post = (fun (self: t_U8) (rhs: t_U16) (out: t_U8) -> true); - f_shr - = - fun (self: t_U8) (rhs: t_U16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_236: Core.Ops.Bit.t_Shr t_U8 t_U32 = - { - f_Output = t_U8; - f_shr_pre = (fun (self: t_U8) (rhs: t_U32) -> true); - f_shr_post = (fun (self: t_U8) (rhs: t_U32) (out: t_U8) -> true); - f_shr - = - fun (self: t_U8) (rhs: t_U32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_237: Core.Ops.Bit.t_Shr t_U8 t_U64 = - { - f_Output = t_U8; - f_shr_pre = (fun (self: t_U8) (rhs: t_U64) -> true); - f_shr_post = (fun (self: t_U8) (rhs: t_U64) (out: t_U8) -> true); - f_shr - = - fun (self: t_U8) (rhs: t_U64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_238: Core.Ops.Bit.t_Shr t_U8 t_U128 = - { - f_Output = t_U8; - f_shr_pre = (fun (self: t_U8) (rhs: t_U128) -> true); - f_shr_post = (fun (self: t_U8) (rhs: t_U128) (out: t_U8) -> true); - f_shr - = - fun (self: t_U8) (rhs: t_U128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_shr (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_239: Core.Ops.Bit.t_BitXor t_U8 t_U8 = - { - f_Output = t_U8; - f_bitxor_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_bitxor_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_bitxor - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitxor (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_240: Core.Ops.Bit.t_BitAnd t_U8 t_U8 = - { - f_Output = t_U8; - f_bitand_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_bitand_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_bitand - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitand (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_241: Core.Ops.Bit.t_BitOr t_U8 t_U8 = - { - f_Output = t_U8; - f_bitor_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_bitor_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_bitor - = - fun (self: t_U8) (rhs: t_U8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Haxint.t_HaxInt - #t_U8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Pos.haxint_bitor (Core.Base_interface.Coerce.f_lift #t_U8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Haxint.t_HaxInt) - (Core.Base_interface.Coerce.f_lift #t_U8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Haxint.t_HaxInt) - <: - Core.Base.Spec.Haxint.t_HaxInt) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_45: Core.Ops.Arith.t_Rem t_I128 t_I128 = - { - f_Output = t_I128; - f_rem_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_rem_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); - f_rem - = - fun (self: t_I128) (rhs: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_rem (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_47: Core.Ops.Arith.t_Div t_I128 t_I128 = - { - f_Output = t_I128; - f_div_pre = (fun (self: t_I128) (rhs: t_I128) -> true); - f_div_post = (fun (self: t_I128) (rhs: t_I128) (out: t_I128) -> true); - f_div - = - fun (self: t_I128) (rhs: t_I128) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I128 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #t_I128 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I128 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_59: Core.Ops.Arith.t_Rem t_I64 t_I64 = - { - f_Output = t_I64; - f_rem_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_rem_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); - f_rem - = - fun (self: t_I64) (rhs: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_rem (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_61: Core.Ops.Arith.t_Div t_I64 t_I64 = - { - f_Output = t_I64; - f_div_pre = (fun (self: t_I64) (rhs: t_I64) -> true); - f_div_post = (fun (self: t_I64) (rhs: t_I64) (out: t_I64) -> true); - f_div - = - fun (self: t_I64) (rhs: t_I64) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I64 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #t_I64 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I64 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_73: Core.Ops.Arith.t_Rem t_I32 t_I32 = - { - f_Output = t_I32; - f_rem_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_rem_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); - f_rem - = - fun (self: t_I32) (rhs: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_rem (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_75: Core.Ops.Arith.t_Div t_I32 t_I32 = - { - f_Output = t_I32; - f_div_pre = (fun (self: t_I32) (rhs: t_I32) -> true); - f_div_post = (fun (self: t_I32) (rhs: t_I32) (out: t_I32) -> true); - f_div - = - fun (self: t_I32) (rhs: t_I32) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I32 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #t_I32 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I32 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_87: Core.Ops.Arith.t_Rem t_I16 t_I16 = - { - f_Output = t_I16; - f_rem_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_rem_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); - f_rem - = - fun (self: t_I16) (rhs: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_rem (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_89: Core.Ops.Arith.t_Div t_I16 t_I16 = - { - f_Output = t_I16; - f_div_pre = (fun (self: t_I16) (rhs: t_I16) -> true); - f_div_post = (fun (self: t_I16) (rhs: t_I16) (out: t_I16) -> true); - f_div - = - fun (self: t_I16) (rhs: t_I16) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I16 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #t_I16 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I16 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_101: Core.Ops.Arith.t_Rem t_I8 t_I8 = - { - f_Output = t_I8; - f_rem_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_rem_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); - f_rem - = - fun (self: t_I8) (rhs: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_rem (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_103: Core.Ops.Arith.t_Div t_I8 t_I8 = - { - f_Output = t_I8; - f_div_pre = (fun (self: t_I8) (rhs: t_I8) -> true); - f_div_post = (fun (self: t_I8) (rhs: t_I8) (out: t_I8) -> true); - f_div - = - fun (self: t_I8) (rhs: t_I8) -> - Core.Base_interface.Coerce.f_concretize #Core.Base.Spec.Z.t_Z - #t_I8 - #FStar.Tactics.Typeclasses.solve - (Core.Base.Z.z_div (Core.Base_interface.Coerce.f_lift #t_I8 - #FStar.Tactics.Typeclasses.solve - self - <: - Core.Base.Spec.Z.t_Z) - (Core.Base_interface.Coerce.f_lift #t_I8 #FStar.Tactics.Typeclasses.solve rhs - <: - Core.Base.Spec.Z.t_Z) - <: - Core.Base.Spec.Z.t_Z) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_115: Core.Ops.Arith.t_Sub t_U128 t_U128 = - { - f_Output = t_U128; - f_sub_pre = (fun (self: t_U128) (rhs: t_U128) -> true); - f_sub_post = (fun (self: t_U128) (rhs: t_U128) (out: t_U128) -> true); - f_sub - = - fun (self: t_U128) (rhs: t_U128) -> - self +! (Core.Ops.Arith.f_neg #t_U128 #FStar.Tactics.Typeclasses.solve rhs <: t_U128) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_116: Core.Ops.Bit.t_Not t_U128 = - { - f_Output = t_U128; - f_not_pre = (fun (self: t_U128) -> true); - f_not_post = (fun (self: t_U128) (out: t_U128) -> true); - f_not = fun (self: t_U128) -> self ^. (f_MAX #FStar.Tactics.Typeclasses.solve <: t_U128) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_142: Core.Ops.Arith.t_Sub t_U64 t_U64 = - { - f_Output = t_U64; - f_sub_pre = (fun (self: t_U64) (rhs: t_U64) -> true); - f_sub_post = (fun (self: t_U64) (rhs: t_U64) (out: t_U64) -> true); - f_sub - = - fun (self: t_U64) (rhs: t_U64) -> - self +! (Core.Ops.Arith.f_neg #t_U64 #FStar.Tactics.Typeclasses.solve rhs <: t_U64) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_143: Core.Ops.Bit.t_Not t_U64 = - { - f_Output = t_U64; - f_not_pre = (fun (self: t_U64) -> true); - f_not_post = (fun (self: t_U64) (out: t_U64) -> true); - f_not = fun (self: t_U64) -> self ^. (f_MAX #FStar.Tactics.Typeclasses.solve <: t_U64) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_169: Core.Ops.Arith.t_Sub t_U32 t_U32 = - { - f_Output = t_U32; - f_sub_pre = (fun (self: t_U32) (rhs: t_U32) -> true); - f_sub_post = (fun (self: t_U32) (rhs: t_U32) (out: t_U32) -> true); - f_sub - = - fun (self: t_U32) (rhs: t_U32) -> - self +! (Core.Ops.Arith.f_neg #t_U32 #FStar.Tactics.Typeclasses.solve rhs <: t_U32) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_170: Core.Ops.Bit.t_Not t_U32 = - { - f_Output = t_U32; - f_not_pre = (fun (self: t_U32) -> true); - f_not_post = (fun (self: t_U32) (out: t_U32) -> true); - f_not = fun (self: t_U32) -> self ^. (f_MAX #FStar.Tactics.Typeclasses.solve <: t_U32) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_196: Core.Ops.Arith.t_Sub t_U16 t_U16 = - { - f_Output = t_U16; - f_sub_pre = (fun (self: t_U16) (rhs: t_U16) -> true); - f_sub_post = (fun (self: t_U16) (rhs: t_U16) (out: t_U16) -> true); - f_sub - = - fun (self: t_U16) (rhs: t_U16) -> - self +! (Core.Ops.Arith.f_neg #t_U16 #FStar.Tactics.Typeclasses.solve rhs <: t_U16) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_197: Core.Ops.Bit.t_Not t_U16 = - { - f_Output = t_U16; - f_not_pre = (fun (self: t_U16) -> true); - f_not_post = (fun (self: t_U16) (out: t_U16) -> true); - f_not = fun (self: t_U16) -> self ^. (f_MAX #FStar.Tactics.Typeclasses.solve <: t_U16) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_223: Core.Ops.Arith.t_Sub t_U8 t_U8 = - { - f_Output = t_U8; - f_sub_pre = (fun (self: t_U8) (rhs: t_U8) -> true); - f_sub_post = (fun (self: t_U8) (rhs: t_U8) (out: t_U8) -> true); - f_sub - = - fun (self: t_U8) (rhs: t_U8) -> - self +! (Core.Ops.Arith.f_neg #t_U8 #FStar.Tactics.Typeclasses.solve rhs <: t_U8) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_224: Core.Ops.Bit.t_Not t_U8 = - { - f_Output = t_U8; - f_not_pre = (fun (self: t_U8) -> true); - f_not_post = (fun (self: t_U8) (out: t_U8) -> true); - f_not = fun (self: t_U8) -> self ^. (f_MAX #FStar.Tactics.Typeclasses.solve <: t_U8) - } diff --git a/proof-libs/fstar/generated-core/Core.Clone.fst b/proof-libs/fstar/generated-core/Core.Clone.fst deleted file mode 100644 index 712181f8c..000000000 --- a/proof-libs/fstar/generated-core/Core.Clone.fst +++ /dev/null @@ -1,10 +0,0 @@ -module Core.Clone -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_Clone (v_Self: Type0) = { - f_clone_pre:v_Self -> Type0; - f_clone_post:v_Self -> v_Self -> Type0; - f_clone:x0: v_Self -> Prims.Pure v_Self (f_clone_pre x0) (fun result -> f_clone_post x0 result) -} diff --git a/proof-libs/fstar/generated-core/Core.Cmp.fst b/proof-libs/fstar/generated-core/Core.Cmp.fst deleted file mode 100644 index 8d576fc51..000000000 --- a/proof-libs/fstar/generated-core/Core.Cmp.fst +++ /dev/null @@ -1,135 +0,0 @@ -module Core.Cmp -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let discriminant_Ordering_Equal: i8 = 0y - -let discriminant_Ordering_Greater: i8 = 1y - -type t_Ordering = - | Ordering_Less : t_Ordering - | Ordering_Equal : t_Ordering - | Ordering_Greater : t_Ordering - -let impl__Ordering__is_eq (self: t_Ordering) : bool = - match self with - | Ordering_Equal -> true - | _ -> false - -let impl__Ordering__is_gt (self: t_Ordering) : bool = - match self with - | Ordering_Greater -> true - | _ -> false - -let impl__Ordering__is_lt (self: t_Ordering) : bool = - match self with - | Ordering_Less -> true - | _ -> false - -let impl__Ordering__reverse (self: t_Ordering) : t_Ordering = - match self with - | Ordering_Less -> Ordering_Greater <: t_Ordering - | Ordering_Equal -> Ordering_Equal <: t_Ordering - | Ordering_Greater -> Ordering_Less <: t_Ordering - -let discriminant_Ordering_Less: i8 = (-1y) - -let t_Ordering_cast_to_repr (x: t_Ordering) : i8 = - match x with - | Ordering_Less -> discriminant_Ordering_Less - | Ordering_Equal -> discriminant_Ordering_Equal - | Ordering_Greater -> discriminant_Ordering_Greater - -class t_PartialEq (v_Self: Type0) (v_Rhs: Type0) = { - f_eq_pre:v_Self -> v_Rhs -> Type0; - f_eq_post:v_Self -> v_Rhs -> bool -> Type0; - f_eq:x0: v_Self -> x1: v_Rhs - -> Prims.Pure bool (f_eq_pre x0 x1) (fun result -> f_eq_post x0 x1 result); - f_ne_pre:v_Self -> v_Rhs -> Type0; - f_ne_post:v_Self -> v_Rhs -> bool -> Type0; - f_ne:x0: v_Self -> x1: v_Rhs - -> Prims.Pure bool (f_ne_pre x0 x1) (fun result -> f_ne_post x0 x1 result) -} - -let impl__Ordering__is_ge (self: t_Ordering) : bool = - ~.(match self with - | Ordering_Less -> true - | _ -> false) - -let impl__Ordering__is_le (self: t_Ordering) : bool = - ~.(match self with - | Ordering_Greater -> true - | _ -> false) - -let impl__Ordering__is_ne (self: t_Ordering) : bool = - ~.(match self with - | Ordering_Equal -> true - | _ -> false) - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: t_PartialEq t_Ordering t_Ordering = - { - f_eq_pre = (fun (self: t_Ordering) (other: t_Ordering) -> true); - f_eq_post = (fun (self: t_Ordering) (other: t_Ordering) (out: bool) -> true); - f_eq - = - (fun (self: t_Ordering) (other: t_Ordering) -> - match self with - | Ordering_Less -> - (match other with - | Ordering_Less -> true - | _ -> false) - | Ordering_Equal -> - (match other with - | Ordering_Equal -> true - | _ -> false) - | Ordering_Greater -> - match other with - | Ordering_Greater -> true - | _ -> false); - f_ne_pre = (fun (self: t_Ordering) (other: t_Ordering) -> true); - f_ne_post = (fun (self: t_Ordering) (other: t_Ordering) (out: bool) -> true); - f_ne - = - fun (self: t_Ordering) (other: t_Ordering) -> - ~.(match self with - | Ordering_Less -> - (match other with - | Ordering_Less -> true - | _ -> false) - | Ordering_Equal -> - (match other with - | Ordering_Equal -> true - | _ -> false) - | Ordering_Greater -> - match other with - | Ordering_Greater -> true - | _ -> false) - } - -class t_PartialOrd (v_Self: Type0) (v_Rhs: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_9014672428308350468:t_PartialEq v_Self v_Rhs; - f_partial_cmp_pre:v_Self -> v_Rhs -> Type0; - f_partial_cmp_post:v_Self -> v_Rhs -> Core.Option.t_Option t_Ordering -> Type0; - f_partial_cmp:x0: v_Self -> x1: v_Rhs - -> Prims.Pure (Core.Option.t_Option t_Ordering) - (f_partial_cmp_pre x0 x1) - (fun result -> f_partial_cmp_post x0 x1 result); - f_lt_pre:v_Self -> v_Rhs -> Type0; - f_lt_post:v_Self -> v_Rhs -> bool -> Type0; - f_lt:x0: v_Self -> x1: v_Rhs - -> Prims.Pure bool (f_lt_pre x0 x1) (fun result -> f_lt_post x0 x1 result); - f_le_pre:v_Self -> v_Rhs -> Type0; - f_le_post:v_Self -> v_Rhs -> bool -> Type0; - f_le:x0: v_Self -> x1: v_Rhs - -> Prims.Pure bool (f_le_pre x0 x1) (fun result -> f_le_post x0 x1 result); - f_gt_pre:v_Self -> v_Rhs -> Type0; - f_gt_post:v_Self -> v_Rhs -> bool -> Type0; - f_gt:x0: v_Self -> x1: v_Rhs - -> Prims.Pure bool (f_gt_pre x0 x1) (fun result -> f_gt_post x0 x1 result); - f_ge_pre:v_Self -> v_Rhs -> Type0; - f_ge_post:v_Self -> v_Rhs -> bool -> Type0; - f_ge:x0: v_Self -> x1: v_Rhs - -> Prims.Pure bool (f_ge_pre x0 x1) (fun result -> f_ge_post x0 x1 result) -} diff --git a/proof-libs/fstar/generated-core/Core.Convert.fst b/proof-libs/fstar/generated-core/Core.Convert.fst deleted file mode 100644 index 1262e975d..000000000 --- a/proof-libs/fstar/generated-core/Core.Convert.fst +++ /dev/null @@ -1,33 +0,0 @@ -module Core.Convert -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_From (v_Self: Type0) (v_T: Type0) = { - f_from_pre:v_T -> Type0; - f_from_post:v_T -> v_Self -> Type0; - f_from:x0: v_T -> Prims.Pure v_Self (f_from_pre x0) (fun result -> f_from_post x0 result) -} - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1 (#v_T: Type0) : t_From v_T v_T = - { - f_from_pre = (fun (t: v_T) -> true); - f_from_post = (fun (t: v_T) (out: v_T) -> true); - f_from = fun (t: v_T) -> t - } - -class t_Into (v_Self: Type0) (v_T: Type0) = { - f_into_pre:v_Self -> Type0; - f_into_post:v_Self -> v_T -> Type0; - f_into:x0: v_Self -> Prims.Pure v_T (f_into_pre x0) (fun result -> f_into_post x0 result) -} - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl (#v_T #v_U: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: t_From v_U v_T) - : t_Into v_T v_U = - { - f_into_pre = (fun (self: v_T) -> true); - f_into_post = (fun (self: v_T) (out: v_U) -> true); - f_into = fun (self: v_T) -> f_from #v_U #v_T #FStar.Tactics.Typeclasses.solve self - } diff --git a/proof-libs/fstar/generated-core/Core.Intrinsics.fst b/proof-libs/fstar/generated-core/Core.Intrinsics.fst deleted file mode 100644 index 90fd57715..000000000 --- a/proof-libs/fstar/generated-core/Core.Intrinsics.fst +++ /dev/null @@ -1,220 +0,0 @@ -module Core.Intrinsics -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_i128 as add_with_overflow_i128} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_i16 as add_with_overflow_i16} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_i32 as add_with_overflow_i32} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_i64 as add_with_overflow_i64} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_i8 as add_with_overflow_i8} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_isize as add_with_overflow_isize} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_i128 as unchecked_add_i128} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_i16 as unchecked_add_i16} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_i32 as unchecked_add_i32} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_i64 as unchecked_add_i64} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_i8 as unchecked_add_i8} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_isize as unchecked_add_isize} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_u128 as unchecked_add_u128} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_u16 as unchecked_add_u16} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_u32 as unchecked_add_u32} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_u64 as unchecked_add_u64} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_u8 as unchecked_add_u8} - -include Core.Array.Rec_bundle_579704328 {unchecked_add_usize as unchecked_add_usize} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_u128 as add_with_overflow_u128} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_u16 as add_with_overflow_u16} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_u32 as add_with_overflow_u32} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_u64 as add_with_overflow_u64} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_u8 as add_with_overflow_u8} - -include Core.Array.Rec_bundle_579704328 {add_with_overflow_usize as add_with_overflow_usize} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_u128 as unchecked_div_u128} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_u16 as unchecked_div_u16} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_u32 as unchecked_div_u32} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_u64 as unchecked_div_u64} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_u8 as unchecked_div_u8} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_usize as unchecked_div_usize} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_i128 as wrapping_add_i128} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_i16 as wrapping_add_i16} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_i32 as wrapping_add_i32} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_i64 as wrapping_add_i64} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_i8 as wrapping_add_i8} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_isize as wrapping_add_isize} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_i128 as wrapping_sub_i128} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_i16 as wrapping_sub_i16} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_i32 as wrapping_sub_i32} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_i64 as wrapping_sub_i64} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_i8 as wrapping_sub_i8} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_isize as wrapping_sub_isize} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_i128 as unchecked_div_i128} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_i16 as unchecked_div_i16} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_i32 as unchecked_div_i32} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_i64 as unchecked_div_i64} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_i8 as unchecked_div_i8} - -include Core.Array.Rec_bundle_579704328 {unchecked_div_isize as unchecked_div_isize} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_u128 as wrapping_add_u128} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_u16 as wrapping_add_u16} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_u32 as wrapping_add_u32} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_u64 as wrapping_add_u64} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_u8 as wrapping_add_u8} - -include Core.Array.Rec_bundle_579704328 {wrapping_add_usize as wrapping_add_usize} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_i128 as wrapping_mul_i128} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_i16 as wrapping_mul_i16} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_i32 as wrapping_mul_i32} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_i64 as wrapping_mul_i64} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_i8 as wrapping_mul_i8} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_isize as wrapping_mul_isize} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_u128 as wrapping_mul_u128} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_u16 as wrapping_mul_u16} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_u32 as wrapping_mul_u32} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_u64 as wrapping_mul_u64} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_u8 as wrapping_mul_u8} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul_usize as wrapping_mul_usize} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_u128 as wrapping_sub_u128} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_u16 as wrapping_sub_u16} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_u32 as wrapping_sub_u32} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_u64 as wrapping_sub_u64} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_u8 as wrapping_sub_u8} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub_usize as wrapping_sub_usize} - -include Core.Array.Rec_bundle_579704328 {rotate_left_u128 as rotate_left_u128} - -include Core.Array.Rec_bundle_579704328 {rotate_left_u16 as rotate_left_u16} - -include Core.Array.Rec_bundle_579704328 {rotate_left_u32 as rotate_left_u32} - -include Core.Array.Rec_bundle_579704328 {rotate_left_u64 as rotate_left_u64} - -include Core.Array.Rec_bundle_579704328 {rotate_left_u8 as rotate_left_u8} - -include Core.Array.Rec_bundle_579704328 {rotate_left_usize as rotate_left_usize} - -include Core.Array.Rec_bundle_579704328 {rotate_right_u128 as rotate_right_u128} - -include Core.Array.Rec_bundle_579704328 {rotate_right_u16 as rotate_right_u16} - -include Core.Array.Rec_bundle_579704328 {rotate_right_u32 as rotate_right_u32} - -include Core.Array.Rec_bundle_579704328 {rotate_right_u64 as rotate_right_u64} - -include Core.Array.Rec_bundle_579704328 {rotate_right_u8 as rotate_right_u8} - -include Core.Array.Rec_bundle_579704328 {rotate_right_usize as rotate_right_usize} - -include Core.Array.Rec_bundle_579704328 {bswap_u128 as bswap_u128} - -include Core.Array.Rec_bundle_579704328 {bswap_u16 as bswap_u16} - -include Core.Array.Rec_bundle_579704328 {bswap_u32 as bswap_u32} - -include Core.Array.Rec_bundle_579704328 {bswap_u64 as bswap_u64} - -include Core.Array.Rec_bundle_579704328 {bswap_u8 as bswap_u8} - -include Core.Array.Rec_bundle_579704328 {bswap_usize as bswap_usize} - -include Core.Array.Rec_bundle_579704328 {ctlz_u128 as ctlz_u128} - -include Core.Array.Rec_bundle_579704328 {ctlz_u16 as ctlz_u16} - -include Core.Array.Rec_bundle_579704328 {ctlz_u32 as ctlz_u32} - -include Core.Array.Rec_bundle_579704328 {ctlz_u64 as ctlz_u64} - -include Core.Array.Rec_bundle_579704328 {ctlz_u8 as ctlz_u8} - -include Core.Array.Rec_bundle_579704328 {ctlz_usize as ctlz_usize} - -include Core.Array.Rec_bundle_579704328 {ctpop_u128 as ctpop_u128} - -include Core.Array.Rec_bundle_579704328 {ctpop_u16 as ctpop_u16} - -include Core.Array.Rec_bundle_579704328 {ctpop_u32 as ctpop_u32} - -include Core.Array.Rec_bundle_579704328 {ctpop_u64 as ctpop_u64} - -include Core.Array.Rec_bundle_579704328 {ctpop_u8 as ctpop_u8} - -include Core.Array.Rec_bundle_579704328 {ctpop_usize as ctpop_usize} - -include Core.Array.Rec_bundle_579704328 {cttz_u128 as cttz_u128} - -include Core.Array.Rec_bundle_579704328 {cttz_u16 as cttz_u16} - -include Core.Array.Rec_bundle_579704328 {cttz_u32 as cttz_u32} - -include Core.Array.Rec_bundle_579704328 {cttz_u64 as cttz_u64} - -include Core.Array.Rec_bundle_579704328 {cttz_u8 as cttz_u8} - -include Core.Array.Rec_bundle_579704328 {cttz_usize as cttz_usize} diff --git a/proof-libs/fstar/generated-core/Core.Iter.Range.fst b/proof-libs/fstar/generated-core/Core.Iter.Range.fst deleted file mode 100644 index ac3d512db..000000000 --- a/proof-libs/fstar/generated-core/Core.Iter.Range.fst +++ /dev/null @@ -1,457 +0,0 @@ -module Core.Iter.Range -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_Step (v_Self: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_9442900250278684536:Core.Clone.t_Clone v_Self; - [@@@ FStar.Tactics.Typeclasses.no_method]_super_12866954522599331834:Core.Cmp.t_PartialOrd v_Self - v_Self; - f_steps_between_pre:v_Self -> v_Self -> Type0; - f_steps_between_post:v_Self -> v_Self -> Core.Option.t_Option Core.Primitive.t_usize -> Type0; - f_steps_between:x0: v_Self -> x1: v_Self - -> Prims.Pure (Core.Option.t_Option Core.Primitive.t_usize) - (f_steps_between_pre x0 x1) - (fun result -> f_steps_between_post x0 x1 result); - f_forward_checked_pre:v_Self -> Core.Primitive.t_usize -> Type0; - f_forward_checked_post:v_Self -> Core.Primitive.t_usize -> Core.Option.t_Option v_Self -> Type0; - f_forward_checked:x0: v_Self -> x1: Core.Primitive.t_usize - -> Prims.Pure (Core.Option.t_Option v_Self) - (f_forward_checked_pre x0 x1) - (fun result -> f_forward_checked_post x0 x1 result) -} - -class t_RangeIteratorImpl (v_Self: Type0) = { - f_Item:Type0; - f_spec_next_pre:v_Self -> Type0; - f_spec_next_post:v_Self -> (v_Self & Core.Option.t_Option f_Item) -> Type0; - f_spec_next:x0: v_Self - -> Prims.Pure (v_Self & Core.Option.t_Option f_Item) - (f_spec_next_pre x0) - (fun result -> f_spec_next_post x0 result) -} - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl (#v_A: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Step v_A) - : t_RangeIteratorImpl (Core.Ops.Range.t_Range v_A) = - { - f_Item = v_A; - f_spec_next_pre = (fun (self: Core.Ops.Range.t_Range v_A) -> true); - f_spec_next_post - = - (fun - (self: Core.Ops.Range.t_Range v_A) - (out: (Core.Ops.Range.t_Range v_A & Core.Option.t_Option v_A)) - -> - true); - f_spec_next - = - fun (self: Core.Ops.Range.t_Range v_A) -> - let hax_temp_output:Core.Option.t_Option v_A = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - in - self, hax_temp_output <: (Core.Ops.Range.t_Range v_A & Core.Option.t_Option v_A) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1 (#v_A: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Step v_A) - : Core.Iter.Traits.Iterator.t_Iterator (Core.Ops.Range.t_Range v_A) = - { - f_Item = v_A; - f_next_pre = (fun (self: Core.Ops.Range.t_Range v_A) -> true); - f_next_post - = - (fun - (self: Core.Ops.Range.t_Range v_A) - (out: (Core.Ops.Range.t_Range v_A & Core.Option.t_Option v_A)) - -> - true); - f_next - = - (fun (self: Core.Ops.Range.t_Range v_A) -> - let hax_temp_output:Core.Option.t_Option v_A = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - in - self, hax_temp_output <: (Core.Ops.Range.t_Range v_A & Core.Option.t_Option v_A)); - f_size_hint_pre = (fun (self: Core.Ops.Range.t_Range v_A) -> true); - f_size_hint_post - = - (fun (self: Core.Ops.Range.t_Range v_A) (out: (usize & Core.Option.t_Option usize)) -> true); - f_size_hint - = - fun (self: Core.Ops.Range.t_Range v_A) -> - if self.Core.Ops.Range.f_start <. self.Core.Ops.Range.f_end - then - let hint:Core.Option.t_Option Core.Primitive.t_usize = - f_steps_between #v_A - #FStar.Tactics.Typeclasses.solve - self.Core.Ops.Range.f_start - self.Core.Ops.Range.f_end - in - sz 0, (Core.Option.Option_Some (sz 0) <: Core.Option.t_Option usize) - <: - (usize & Core.Option.t_Option usize) - else - sz 0, (Core.Option.Option_Some (sz 0) <: Core.Option.t_Option usize) - <: - (usize & Core.Option.t_Option usize) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: t_Step Core.Primitive.t_u8 = - { - _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; - _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; - f_steps_between_pre = (fun (start: Core.Primitive.t_u8) (v_end: Core.Primitive.t_u8) -> true); - f_steps_between_post - = - (fun - (start: Core.Primitive.t_u8) - (v_end: Core.Primitive.t_u8) - (out: Core.Option.t_Option Core.Primitive.t_usize) - -> - true); - f_steps_between - = - (fun (start: Core.Primitive.t_u8) (v_end: Core.Primitive.t_u8) -> - if start <=. v_end - then - Core.Option.Option_Some - (Core.Convert.f_into #Core.Primitive.t_u8 - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - ((Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve v_end - <: - Core.Primitive.t_u8) -! - (Core.Clone.f_clone #Core.Primitive.t_u8 #FStar.Tactics.Typeclasses.solve start - <: - Core.Primitive.t_u8) - <: - Core.Primitive.t_u8)) - <: - Core.Option.t_Option Core.Primitive.t_usize - else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); - f_forward_checked_pre = (fun (start: Core.Primitive.t_u8) (n: Core.Primitive.t_usize) -> true); - f_forward_checked_post - = - (fun - (start: Core.Primitive.t_u8) - (n: Core.Primitive.t_usize) - (out: Core.Option.t_Option Core.Primitive.t_u8) - -> - true); - f_forward_checked - = - fun (start: Core.Primitive.t_u8) (n: Core.Primitive.t_usize) -> - match - Core.Convert.f_try_from #Core.Primitive.t_u8 - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - n - with - | Core.Result.Result_Ok n -> Core.Num.impl_6__checked_add start n - | Core.Result.Result_Err _ -> - Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u8 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_3: t_Step Core.Primitive.t_u16 = - { - _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; - _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; - f_steps_between_pre = (fun (start: Core.Primitive.t_u16) (v_end: Core.Primitive.t_u16) -> true); - f_steps_between_post - = - (fun - (start: Core.Primitive.t_u16) - (v_end: Core.Primitive.t_u16) - (out: Core.Option.t_Option Core.Primitive.t_usize) - -> - true); - f_steps_between - = - (fun (start: Core.Primitive.t_u16) (v_end: Core.Primitive.t_u16) -> - if start <=. v_end - then - Core.Option.Option_Some - (Core.Convert.f_into #Core.Primitive.t_u16 - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - ((Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve v_end - <: - Core.Primitive.t_u16) -! - (Core.Clone.f_clone #Core.Primitive.t_u16 #FStar.Tactics.Typeclasses.solve start - <: - Core.Primitive.t_u16) - <: - Core.Primitive.t_u16)) - <: - Core.Option.t_Option Core.Primitive.t_usize - else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); - f_forward_checked_pre = (fun (start: Core.Primitive.t_u16) (n: Core.Primitive.t_usize) -> true); - f_forward_checked_post - = - (fun - (start: Core.Primitive.t_u16) - (n: Core.Primitive.t_usize) - (out: Core.Option.t_Option Core.Primitive.t_u16) - -> - true); - f_forward_checked - = - fun (start: Core.Primitive.t_u16) (n: Core.Primitive.t_usize) -> - match - Core.Convert.f_try_from #Core.Primitive.t_u16 - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - n - with - | Core.Result.Result_Ok n -> Core.Num.impl_7__checked_add start n - | Core.Result.Result_Err _ -> - Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u16 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_4: t_Step Core.Primitive.t_u32 = - { - _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; - _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; - f_steps_between_pre = (fun (start: Core.Primitive.t_u32) (v_end: Core.Primitive.t_u32) -> true); - f_steps_between_post - = - (fun - (start: Core.Primitive.t_u32) - (v_end: Core.Primitive.t_u32) - (out: Core.Option.t_Option Core.Primitive.t_usize) - -> - true); - f_steps_between - = - (fun (start: Core.Primitive.t_u32) (v_end: Core.Primitive.t_u32) -> - if start <=. v_end - then - Core.Option.Option_Some - (Core.Convert.f_into #Core.Primitive.t_u32 - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - ((Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve v_end - <: - Core.Primitive.t_u32) -! - (Core.Clone.f_clone #Core.Primitive.t_u32 #FStar.Tactics.Typeclasses.solve start - <: - Core.Primitive.t_u32) - <: - Core.Primitive.t_u32)) - <: - Core.Option.t_Option Core.Primitive.t_usize - else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); - f_forward_checked_pre = (fun (start: Core.Primitive.t_u32) (n: Core.Primitive.t_usize) -> true); - f_forward_checked_post - = - (fun - (start: Core.Primitive.t_u32) - (n: Core.Primitive.t_usize) - (out: Core.Option.t_Option Core.Primitive.t_u32) - -> - true); - f_forward_checked - = - fun (start: Core.Primitive.t_u32) (n: Core.Primitive.t_usize) -> - match - Core.Convert.f_try_from #Core.Primitive.t_u32 - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - n - with - | Core.Result.Result_Ok n -> Core.Num.impl_8__checked_add start n - | Core.Result.Result_Err _ -> - Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u32 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_5: t_Step Core.Primitive.t_u64 = - { - _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; - _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; - f_steps_between_pre = (fun (start: Core.Primitive.t_u64) (v_end: Core.Primitive.t_u64) -> true); - f_steps_between_post - = - (fun - (start: Core.Primitive.t_u64) - (v_end: Core.Primitive.t_u64) - (out: Core.Option.t_Option Core.Primitive.t_usize) - -> - true); - f_steps_between - = - (fun (start: Core.Primitive.t_u64) (v_end: Core.Primitive.t_u64) -> - if start <=. v_end - then - Core.Option.Option_Some - (Core.Convert.f_into #Core.Primitive.t_u64 - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - ((Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve v_end - <: - Core.Primitive.t_u64) -! - (Core.Clone.f_clone #Core.Primitive.t_u64 #FStar.Tactics.Typeclasses.solve start - <: - Core.Primitive.t_u64) - <: - Core.Primitive.t_u64)) - <: - Core.Option.t_Option Core.Primitive.t_usize - else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); - f_forward_checked_pre = (fun (start: Core.Primitive.t_u64) (n: Core.Primitive.t_usize) -> true); - f_forward_checked_post - = - (fun - (start: Core.Primitive.t_u64) - (n: Core.Primitive.t_usize) - (out: Core.Option.t_Option Core.Primitive.t_u64) - -> - true); - f_forward_checked - = - fun (start: Core.Primitive.t_u64) (n: Core.Primitive.t_usize) -> - match - Core.Convert.f_try_from #Core.Primitive.t_u64 - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - n - with - | Core.Result.Result_Ok n -> Core.Num.impl_9__checked_add start n - | Core.Result.Result_Err _ -> - Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u64 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_7: t_Step Core.Primitive.t_u128 = - { - _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; - _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; - f_steps_between_pre - = - (fun (start: Core.Primitive.t_u128) (v_end: Core.Primitive.t_u128) -> true); - f_steps_between_post - = - (fun - (start: Core.Primitive.t_u128) - (v_end: Core.Primitive.t_u128) - (out: Core.Option.t_Option Core.Primitive.t_usize) - -> - true); - f_steps_between - = - (fun (start: Core.Primitive.t_u128) (v_end: Core.Primitive.t_u128) -> - if start <=. v_end - then - Core.Result.impl__ok #Core.Primitive.t_usize - #Core.Convert.t_Infallible - (Core.Convert.f_try_from #Core.Primitive.t_usize - #Core.Primitive.t_u128 - #FStar.Tactics.Typeclasses.solve - ((Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve v_end - <: - Core.Primitive.t_u128) -! - (Core.Clone.f_clone #Core.Primitive.t_u128 #FStar.Tactics.Typeclasses.solve start - <: - Core.Primitive.t_u128) - <: - Core.Primitive.t_u128) - <: - Core.Result.t_Result Core.Primitive.t_usize Core.Convert.t_Infallible) - else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); - f_forward_checked_pre = (fun (start: Core.Primitive.t_u128) (n: Core.Primitive.t_usize) -> true); - f_forward_checked_post - = - (fun - (start: Core.Primitive.t_u128) - (n: Core.Primitive.t_usize) - (out: Core.Option.t_Option Core.Primitive.t_u128) - -> - true); - f_forward_checked - = - fun (start: Core.Primitive.t_u128) (n: Core.Primitive.t_usize) -> - Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_u128 - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_6: t_Step Core.Primitive.t_usize = - { - _super_9442900250278684536 = FStar.Tactics.Typeclasses.solve; - _super_12866954522599331834 = FStar.Tactics.Typeclasses.solve; - f_steps_between_pre - = - (fun (start: Core.Primitive.t_usize) (v_end: Core.Primitive.t_usize) -> true); - f_steps_between_post - = - (fun - (start: Core.Primitive.t_usize) - (v_end: Core.Primitive.t_usize) - (out: Core.Option.t_Option Core.Primitive.t_usize) - -> - true); - f_steps_between - = - (fun (start: Core.Primitive.t_usize) (v_end: Core.Primitive.t_usize) -> - if start <=. v_end - then - Core.Option.Option_Some - (Core.Convert.f_into #Core.Primitive.t_usize - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - ((Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve v_end - <: - Core.Primitive.t_usize) -! - (Core.Clone.f_clone #Core.Primitive.t_usize #FStar.Tactics.Typeclasses.solve start - <: - Core.Primitive.t_usize) - <: - Core.Primitive.t_usize)) - <: - Core.Option.t_Option Core.Primitive.t_usize - else Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize); - f_forward_checked_pre - = - (fun (start: Core.Primitive.t_usize) (n: Core.Primitive.t_usize) -> true); - f_forward_checked_post - = - (fun - (start: Core.Primitive.t_usize) - (n: Core.Primitive.t_usize) - (out: Core.Option.t_Option Core.Primitive.t_usize) - -> - true); - f_forward_checked - = - fun (start: Core.Primitive.t_usize) (n: Core.Primitive.t_usize) -> - match - Core.Convert.f_try_from #Core.Primitive.t_usize - #Core.Primitive.t_usize - #FStar.Tactics.Typeclasses.solve - n - with - | Core.Result.Result_Ok n -> Core.Num.impl_11__checked_add start n - | Core.Result.Result_Err _ -> - Core.Option.Option_None <: Core.Option.t_Option Core.Primitive.t_usize - } diff --git a/proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst b/proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst deleted file mode 100644 index 489e6afdd..000000000 --- a/proof-libs/fstar/generated-core/Core.Iter.Traits.Collect.fst +++ /dev/null @@ -1,37 +0,0 @@ -module Core.Iter.Traits.Collect -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_IntoIterator (v_Self: Type0) = { - f_Item:Type0; - f_IntoIter:Type0; - f_IntoIter_7190679858849254189:Core.Iter.Traits.Iterator.t_Iterator f_IntoIter; - f_into_iter_pre:v_Self -> Type0; - f_into_iter_post:v_Self -> f_IntoIter -> Type0; - f_into_iter:x0: v_Self - -> Prims.Pure f_IntoIter (f_into_iter_pre x0) (fun result -> f_into_iter_post x0 result) -} - -class t_FromIterator (v_Self: Type0) (v_A: Type0) = { - f_from_iter_pre:#v_T: Type0 -> {| i1: t_IntoIterator v_T |} -> v_T -> Type0; - f_from_iter_post:#v_T: Type0 -> {| i1: t_IntoIterator v_T |} -> v_T -> v_Self -> Type0; - f_from_iter:#v_T: Type0 -> {| i1: t_IntoIterator v_T |} -> x0: v_T - -> Prims.Pure v_Self - (f_from_iter_pre #v_T #i1 x0) - (fun result -> f_from_iter_post #v_T #i1 x0 result) -} - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl - (#v_I: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Iter.Traits.Iterator.t_Iterator v_I) - : t_IntoIterator v_I = - { - f_Item = i1.f_Item; - f_IntoIter = v_I; - f_IntoIter_7190679858849254189 = FStar.Tactics.Typeclasses.solve; - f_into_iter_pre = (fun (self: v_I) -> true); - f_into_iter_post = (fun (self: v_I) (out: v_I) -> true); - f_into_iter = fun (self: v_I) -> self - } diff --git a/proof-libs/fstar/generated-core/Core.Iter.Traits.Exact_size.fst b/proof-libs/fstar/generated-core/Core.Iter.Traits.Exact_size.fst deleted file mode 100644 index 6454d73cb..000000000 --- a/proof-libs/fstar/generated-core/Core.Iter.Traits.Exact_size.fst +++ /dev/null @@ -1,16 +0,0 @@ -module Core.Iter.Traits.Exact_size -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_ExactSizeIterator (v_Self: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_15444444506782437531:Core.Iter.Traits.Iterator.t_Iterator - v_Self; - f_len_pre:v_Self -> Type0; - f_len_post:v_Self -> usize -> Type0; - f_len:x0: v_Self -> Prims.Pure usize (f_len_pre x0) (fun result -> f_len_post x0 result); - f_is_empty_pre:v_Self -> Type0; - f_is_empty_post:v_Self -> bool -> Type0; - f_is_empty:x0: v_Self - -> Prims.Pure bool (f_is_empty_pre x0) (fun result -> f_is_empty_post x0 result) -} diff --git a/proof-libs/fstar/generated-core/Core.Iter.Traits.Iterator.fst b/proof-libs/fstar/generated-core/Core.Iter.Traits.Iterator.fst deleted file mode 100644 index 786522b38..000000000 --- a/proof-libs/fstar/generated-core/Core.Iter.Traits.Iterator.fst +++ /dev/null @@ -1,47 +0,0 @@ -module Core.Iter.Traits.Iterator -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_Iterator (v_Self: Type0) = { - f_Item:Type0; - f_next_pre:v_Self -> Type0; - f_next_post:v_Self -> (v_Self & Core.Option.t_Option f_Item) -> Type0; - f_next:x0: v_Self - -> Prims.Pure (v_Self & Core.Option.t_Option f_Item) - (f_next_pre x0) - (fun result -> f_next_post x0 result); - f_size_hint_pre:v_Self -> Type0; - f_size_hint_post:v_Self -> (usize & Core.Option.t_Option usize) -> Type0; - f_size_hint:x0: v_Self - -> Prims.Pure (usize & Core.Option.t_Option usize) - (f_size_hint_pre x0) - (fun result -> f_size_hint_post x0 result); - f_fold_pre: - #v_B: Type0 -> - #v_F: Type0 -> - {| i4: Core.Ops.Function.t_FnMut v_F (v_B & f_Item) |} -> - v_Self -> - v_B -> - v_F - -> Type0; - f_fold_post: - #v_B: Type0 -> - #v_F: Type0 -> - {| i4: Core.Ops.Function.t_FnMut v_F (v_B & f_Item) |} -> - v_Self -> - v_B -> - v_F -> - v_B - -> Type0; - f_fold: - #v_B: Type0 -> - #v_F: Type0 -> - {| i4: Core.Ops.Function.t_FnMut v_F (v_B & f_Item) |} -> - x0: v_Self -> - x1: v_B -> - x2: v_F - -> Prims.Pure v_B - (f_fold_pre #v_B #v_F #i4 x0 x1 x2) - (fun result -> f_fold_post #v_B #v_F #i4 x0 x1 x2 result) -} diff --git a/proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst b/proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst deleted file mode 100644 index 0992457f1..000000000 --- a/proof-libs/fstar/generated-core/Core.Iter.Traits.Marker.fst +++ /dev/null @@ -1,21 +0,0 @@ -module Core.Iter.Traits.Marker -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_TrustedFused (v_Self: Type0) = { __marker_trait_t_TrustedFused:Prims.unit } - -class t_TrustedStep (v_Self: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_13722385431118852294:Core.Iter.Range.t_Step v_Self; - [@@@ FStar.Tactics.Typeclasses.no_method]_super_11581440318597584651:Core.Marker.t_Copy v_Self -} - -class t_FusedIterator (v_Self: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_15444444506782437531:Core.Iter.Traits.Iterator.t_Iterator - v_Self -} - -class t_TrustedLen (v_Self: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_15444444506782437531:Core.Iter.Traits.Iterator.t_Iterator - v_Self -} diff --git a/proof-libs/fstar/generated-core/Core.Marker.fst b/proof-libs/fstar/generated-core/Core.Marker.fst deleted file mode 100644 index 4c409c9a9..000000000 --- a/proof-libs/fstar/generated-core/Core.Marker.fst +++ /dev/null @@ -1,14 +0,0 @@ -module Core.Marker -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_Copy (v_Self: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_9442900250278684536:Core.Clone.t_Clone v_Self -} - -class t_Destruct (v_Self: Type0) = { __marker_trait_t_Destruct:Prims.unit } - -class t_Sized (v_Self: Type0) = { __marker_trait_t_Sized:Prims.unit } - -class t_Tuple (v_Self: Type0) = { __marker_trait_t_Tuple:Prims.unit } diff --git a/proof-libs/fstar/generated-core/Core.Num.fst b/proof-libs/fstar/generated-core/Core.Num.fst deleted file mode 100644 index bbb03f4a4..000000000 --- a/proof-libs/fstar/generated-core/Core.Num.fst +++ /dev/null @@ -1,472 +0,0 @@ -module Core.Num -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {from_le715594649 as impl_10__from_le} - -include Core.Array.Rec_bundle_579704328 {to_le902648378 as impl_10__to_le} - -include Core.Array.Rec_bundle_579704328 {from_le793045973 as impl_7__from_le} - -include Core.Array.Rec_bundle_579704328 {to_le1012469456 as impl_7__to_le} - -include Core.Array.Rec_bundle_579704328 {from_le706338679 as impl_8__from_le} - -include Core.Array.Rec_bundle_579704328 {to_le724624277 as impl_8__to_le} - -include Core.Array.Rec_bundle_579704328 {from_le435089922 as impl_9__from_le} - -include Core.Array.Rec_bundle_579704328 {to_le2703875 as impl_9__to_le} - -include Core.Array.Rec_bundle_579704328 {from_le529489651 as impl_6__from_le} - -include Core.Array.Rec_bundle_579704328 {to_le523556665 as impl_6__to_le} - -include Core.Array.Rec_bundle_579704328 {from_le418743864 as impl_11__from_le} - -include Core.Array.Rec_bundle_579704328 {to_le946822077 as impl_11__to_le} - -include Core.Array.Rec_bundle_579704328 {v_BITS80497669 as impl__i8__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX626626007 as impl__i8__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN19747349 as impl__i8__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS421056295 as impl__i16__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX474501300 as impl__i16__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN776391606 as impl__i16__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS465526498 as impl_2__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX106630818 as impl_2__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN682967538 as impl_2__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS419886578 as impl__i64__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX527043787 as impl__i64__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN654206259 as impl__i64__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS992667165 as impl__i128__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX375377319 as impl__i128__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN79612531 as impl__i128__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS211584016 as impl__isize__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX937003029 as impl__isize__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN1017039533 as impl__isize__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS690311813 as impl_6__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX310118176 as impl_6__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN41851434 as impl_6__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS277333551 as impl_7__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX487295910 as impl_7__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN592300287 as impl_7__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS473478051 as impl_8__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX826434525 as impl_8__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN932777089 as impl_8__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS177666292 as impl_9__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX815180633 as impl_9__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN631333594 as impl_9__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS136999051 as impl_10__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX404543799 as impl_10__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN668621698 as impl_10__MIN} - -include Core.Array.Rec_bundle_579704328 {v_BITS229952196 as impl_11__BITS} - -include Core.Array.Rec_bundle_579704328 {v_MAX750570916 as impl_11__MAX} - -include Core.Array.Rec_bundle_579704328 {v_MIN861571008 as impl_11__MIN} - -include Core.Array.Rec_bundle_579704328 {is_negative350273175 as impl__i8__is_negative} - -include Core.Array.Rec_bundle_579704328 {is_positive286955196 as impl__i8__is_positive} - -include Core.Array.Rec_bundle_579704328 {signum721334203 as impl__i8__signum} - -include Core.Array.Rec_bundle_579704328 {is_negative477067241 as impl__i16__is_negative} - -include Core.Array.Rec_bundle_579704328 {is_positive821581438 as impl__i16__is_positive} - -include Core.Array.Rec_bundle_579704328 {signum243706004 as impl__i16__signum} - -include Core.Array.Rec_bundle_579704328 {is_negative1035644813 as impl_2__is_negative} - -include Core.Array.Rec_bundle_579704328 {is_positive401652342 as impl_2__is_positive} - -include Core.Array.Rec_bundle_579704328 {signum323641039 as impl_2__signum} - -include Core.Array.Rec_bundle_579704328 {is_negative1066124578 as impl__i64__is_negative} - -include Core.Array.Rec_bundle_579704328 {is_positive16569358 as impl__i64__is_positive} - -include Core.Array.Rec_bundle_579704328 {signum582963664 as impl__i64__signum} - -include Core.Array.Rec_bundle_579704328 {is_negative221698470 as impl__i128__is_negative} - -include Core.Array.Rec_bundle_579704328 {is_positive883218309 as impl__i128__is_positive} - -include Core.Array.Rec_bundle_579704328 {signum408800799 as impl__i128__signum} - -include Core.Array.Rec_bundle_579704328 {is_negative693446369 as impl__isize__is_negative} - -include Core.Array.Rec_bundle_579704328 {is_positive169998680 as impl__isize__is_positive} - -include Core.Array.Rec_bundle_579704328 {signum91486536 as impl__isize__signum} - -include Core.Array.Rec_bundle_579704328 {checked_add268751055 as impl_6__checked_add} - -include Core.Array.Rec_bundle_579704328 {checked_add132377399 as impl_7__checked_add} - -include Core.Array.Rec_bundle_579704328 {checked_add985437730 as impl_8__checked_add} - -include Core.Array.Rec_bundle_579704328 {checked_add586246465 as impl_9__checked_add} - -include Core.Array.Rec_bundle_579704328 {checked_add218978451 as impl_10__checked_add} - -include Core.Array.Rec_bundle_579704328 {checked_add984013567 as impl_11__checked_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_add634491935 as impl__i8__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub973428293 as impl__i8__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg400701205 as impl__i8__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_abs400396545 as impl__i8__wrapping_abs} - -include Core.Array.Rec_bundle_579704328 {wrapping_add868559108 as impl__i16__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub189469152 as impl__i16__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg860505723 as impl__i16__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_abs229076826 as impl__i16__wrapping_abs} - -include Core.Array.Rec_bundle_579704328 {wrapping_add475006616 as impl_2__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub298337071 as impl_2__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg636433078 as impl_2__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_abs729536875 as impl_2__wrapping_abs} - -include Core.Array.Rec_bundle_579704328 {wrapping_add590074241 as impl__i64__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub334584751 as impl__i64__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg868282938 as impl__i64__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_abs285829312 as impl__i64__wrapping_abs} - -include Core.Array.Rec_bundle_579704328 {wrapping_add251385439 as impl__i128__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub681598071 as impl__i128__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg446546984 as impl__i128__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_abs281925696 as impl__i128__wrapping_abs} - -include Core.Array.Rec_bundle_579704328 {wrapping_add226040243 as impl__isize__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub698035192 as impl__isize__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg912291768 as impl__isize__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_abs347300819 as impl__isize__wrapping_abs} - -include Core.Array.Rec_bundle_579704328 {checked_div508301931 as impl_6__checked_div} - -include Core.Array.Rec_bundle_579704328 {overflowing_add708890057 as impl_6__overflowing_add} - -include Core.Array.Rec_bundle_579704328 {checked_div614920780 as impl_7__checked_div} - -include Core.Array.Rec_bundle_579704328 {overflowing_add1023344178 as impl_7__overflowing_add} - -include Core.Array.Rec_bundle_579704328 {checked_div979383477 as impl_8__checked_div} - -include Core.Array.Rec_bundle_579704328 {overflowing_add905744292 as impl_8__overflowing_add} - -include Core.Array.Rec_bundle_579704328 {checked_div988689127 as impl_9__checked_div} - -include Core.Array.Rec_bundle_579704328 {overflowing_add581983607 as impl_9__overflowing_add} - -include Core.Array.Rec_bundle_579704328 {checked_div344106746 as impl_10__checked_div} - -include Core.Array.Rec_bundle_579704328 {overflowing_add458293681 as impl_10__overflowing_add} - -include Core.Array.Rec_bundle_579704328 {checked_div80223906 as impl_11__checked_div} - -include Core.Array.Rec_bundle_579704328 {overflowing_add682280407 as impl_11__overflowing_add} - -include Core.Array.Rec_bundle_579704328 {abs945505614 as impl__i8__abs} - -include Core.Array.Rec_bundle_579704328 {abs581170970 as impl__i16__abs} - -include Core.Array.Rec_bundle_579704328 {abs590464694 as impl_2__abs} - -include Core.Array.Rec_bundle_579704328 {abs654781043 as impl__i64__abs} - -include Core.Array.Rec_bundle_579704328 {abs204417539 as impl__i128__abs} - -include Core.Array.Rec_bundle_579704328 {abs220926056 as impl__isize__abs} - -include Core.Array.Rec_bundle_579704328 {wrapping_add480603777 as impl_6__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul885216284 as impl_6__wrapping_mul} - -include Core.Array.Rec_bundle_579704328 {wrapping_add124432709 as impl_7__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul14465189 as impl_7__wrapping_mul} - -include Core.Array.Rec_bundle_579704328 {wrapping_add1049665857 as impl_8__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul203346768 as impl_8__wrapping_mul} - -include Core.Array.Rec_bundle_579704328 {wrapping_add865565639 as impl_9__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul742978873 as impl_9__wrapping_mul} - -include Core.Array.Rec_bundle_579704328 {wrapping_add40844100 as impl_10__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul294115024 as impl_10__wrapping_mul} - -include Core.Array.Rec_bundle_579704328 {wrapping_add427637036 as impl_11__wrapping_add} - -include Core.Array.Rec_bundle_579704328 {wrapping_mul680896953 as impl_11__wrapping_mul} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub403906422 as impl_6__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg123212788 as impl_6__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub811251034 as impl_7__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg128555595 as impl_7__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub708953500 as impl_8__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg328220773 as impl_8__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub762520851 as impl_9__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg617136337 as impl_9__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub409310259 as impl_10__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg729451428 as impl_10__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_sub813101882 as impl_11__wrapping_sub} - -include Core.Array.Rec_bundle_579704328 {wrapping_neg342773446 as impl_11__wrapping_neg} - -include Core.Array.Rec_bundle_579704328 {wrapping_div660080892 as impl_6__wrapping_div} - -include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid481233436 as impl_6__wrapping_div_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_div366977334 as impl_7__wrapping_div} - -include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid22267888 as impl_7__wrapping_div_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_div931150450 as impl_8__wrapping_div} - -include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid606291997 as impl_8__wrapping_div_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_div168427046 as impl_9__wrapping_div} - -include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid321252086 as impl_9__wrapping_div_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_div692427683 as impl_10__wrapping_div} - -include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid926334515 as impl_10__wrapping_div_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_div905768546 as impl_11__wrapping_div} - -include Core.Array.Rec_bundle_579704328 {wrapping_div_euclid90317722 as impl_11__wrapping_div_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem984569721 as impl_6__wrapping_rem} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid946579345 as impl_6__wrapping_rem_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem378598035 as impl_7__wrapping_rem} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid602402638 as impl_7__wrapping_rem_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem292009099 as impl_8__wrapping_rem} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid1020271291 as impl_8__wrapping_rem_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem390602260 as impl_9__wrapping_rem} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid839264546 as impl_9__wrapping_rem_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem332379920 as impl_10__wrapping_rem} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid646122423 as impl_10__wrapping_rem_euclid} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem333089373 as impl_11__wrapping_rem} - -include Core.Array.Rec_bundle_579704328 {wrapping_rem_euclid769656504 as impl_11__wrapping_rem_euclid} - -include Core.Array.Rec_bundle_579704328 {rotate_left792925914 as impl_6__rotate_left} - -include Core.Array.Rec_bundle_579704328 {rotate_right166090082 as impl_6__rotate_right} - -include Core.Array.Rec_bundle_579704328 {rotate_left297034175 as impl_7__rotate_left} - -include Core.Array.Rec_bundle_579704328 {rotate_right138522246 as impl_7__rotate_right} - -include Core.Array.Rec_bundle_579704328 {rotate_left823573251 as impl_8__rotate_left} - -include Core.Array.Rec_bundle_579704328 {rotate_right869195717 as impl_8__rotate_right} - -include Core.Array.Rec_bundle_579704328 {rotate_left618936072 as impl_9__rotate_left} - -include Core.Array.Rec_bundle_579704328 {rotate_right1041614027 as impl_9__rotate_right} - -include Core.Array.Rec_bundle_579704328 {rotate_left1065866885 as impl_10__rotate_left} - -include Core.Array.Rec_bundle_579704328 {rotate_right591112338 as impl_10__rotate_right} - -include Core.Array.Rec_bundle_579704328 {rotate_left996672710 as impl_11__rotate_left} - -include Core.Array.Rec_bundle_579704328 {rotate_right442734174 as impl_11__rotate_right} - -include Core.Array.Rec_bundle_579704328 {count_ones202509899 as impl_6__count_ones} - -include Core.Array.Rec_bundle_579704328 {leading_zeros75047366 as impl_6__leading_zeros} - -include Core.Array.Rec_bundle_579704328 {swap_bytes657156997 as impl_6__swap_bytes} - -include Core.Array.Rec_bundle_579704328 {from_be746282521 as impl_6__from_be} - -include Core.Array.Rec_bundle_579704328 {to_be972448780 as impl_6__to_be} - -include Core.Array.Rec_bundle_579704328 {trailing_zeros572929871 as impl_6__trailing_zeros} - -include Core.Array.Rec_bundle_579704328 {count_ones91875752 as impl_7__count_ones} - -include Core.Array.Rec_bundle_579704328 {leading_zeros462412478 as impl_7__leading_zeros} - -include Core.Array.Rec_bundle_579704328 {swap_bytes926722059 as impl_7__swap_bytes} - -include Core.Array.Rec_bundle_579704328 {from_be510959665 as impl_7__from_be} - -include Core.Array.Rec_bundle_579704328 {to_be551590602 as impl_7__to_be} - -include Core.Array.Rec_bundle_579704328 {trailing_zeros421474733 as impl_7__trailing_zeros} - -include Core.Array.Rec_bundle_579704328 {count_ones776185738 as impl_8__count_ones} - -include Core.Array.Rec_bundle_579704328 {leading_zeros698221972 as impl_8__leading_zeros} - -include Core.Array.Rec_bundle_579704328 {swap_bytes320480126 as impl_8__swap_bytes} - -include Core.Array.Rec_bundle_579704328 {from_be664756649 as impl_8__from_be} - -include Core.Array.Rec_bundle_579704328 {to_be82825962 as impl_8__to_be} - -include Core.Array.Rec_bundle_579704328 {trailing_zeros1061560720 as impl_8__trailing_zeros} - -include Core.Array.Rec_bundle_579704328 {count_ones235885653 as impl_9__count_ones} - -include Core.Array.Rec_bundle_579704328 {leading_zeros338302110 as impl_9__leading_zeros} - -include Core.Array.Rec_bundle_579704328 {swap_bytes722254271 as impl_9__swap_bytes} - -include Core.Array.Rec_bundle_579704328 {from_be16013635 as impl_9__from_be} - -include Core.Array.Rec_bundle_579704328 {to_be376714729 as impl_9__to_be} - -include Core.Array.Rec_bundle_579704328 {trailing_zeros188346231 as impl_9__trailing_zeros} - -include Core.Array.Rec_bundle_579704328 {count_ones926736261 as impl_10__count_ones} - -include Core.Array.Rec_bundle_579704328 {leading_zeros19644612 as impl_10__leading_zeros} - -include Core.Array.Rec_bundle_579704328 {swap_bytes420879368 as impl_10__swap_bytes} - -include Core.Array.Rec_bundle_579704328 {from_be191085771 as impl_10__from_be} - -include Core.Array.Rec_bundle_579704328 {to_be555075987 as impl_10__to_be} - -include Core.Array.Rec_bundle_579704328 {trailing_zeros821715250 as impl_10__trailing_zeros} - -include Core.Array.Rec_bundle_579704328 {count_ones441645762 as impl_11__count_ones} - -include Core.Array.Rec_bundle_579704328 {leading_zeros905233489 as impl_11__leading_zeros} - -include Core.Array.Rec_bundle_579704328 {swap_bytes268673424 as impl_11__swap_bytes} - -include Core.Array.Rec_bundle_579704328 {from_be607978059 as impl_11__from_be} - -include Core.Array.Rec_bundle_579704328 {to_be561847134 as impl_11__to_be} - -include Core.Array.Rec_bundle_579704328 {trailing_zeros42066260 as impl_11__trailing_zeros} - -include Core.Array.Rec_bundle_579704328 {rem_euclid622298453 as impl__i8__rem_euclid} - -include Core.Array.Rec_bundle_579704328 {rem_euclid158017644 as impl__i16__rem_euclid} - -include Core.Array.Rec_bundle_579704328 {rem_euclid881249982 as impl_2__rem_euclid} - -include Core.Array.Rec_bundle_579704328 {rem_euclid1057082210 as impl__i64__rem_euclid} - -include Core.Array.Rec_bundle_579704328 {rem_euclid254910751 as impl__i128__rem_euclid} - -include Core.Array.Rec_bundle_579704328 {rem_euclid828379367 as impl__isize__rem_euclid} - -include Core.Array.Rec_bundle_579704328 {count_zeros558337492 as impl_6__count_zeros} - -include Core.Array.Rec_bundle_579704328 {leading_ones55148479 as impl_6__leading_ones} - -include Core.Array.Rec_bundle_579704328 {trailing_ones359778731 as impl_6__trailing_ones} - -include Core.Array.Rec_bundle_579704328 {count_zeros199825317 as impl_7__count_zeros} - -include Core.Array.Rec_bundle_579704328 {leading_ones164277656 as impl_7__leading_ones} - -include Core.Array.Rec_bundle_579704328 {trailing_ones903944727 as impl_7__trailing_ones} - -include Core.Array.Rec_bundle_579704328 {count_zeros942566041 as impl_8__count_zeros} - -include Core.Array.Rec_bundle_579704328 {leading_ones766486760 as impl_8__leading_ones} - -include Core.Array.Rec_bundle_579704328 {trailing_ones223371510 as impl_8__trailing_ones} - -include Core.Array.Rec_bundle_579704328 {count_zeros60346158 as impl_9__count_zeros} - -include Core.Array.Rec_bundle_579704328 {leading_ones404666910 as impl_9__leading_ones} - -include Core.Array.Rec_bundle_579704328 {trailing_ones601201120 as impl_9__trailing_ones} - -include Core.Array.Rec_bundle_579704328 {count_zeros824862815 as impl_10__count_zeros} - -include Core.Array.Rec_bundle_579704328 {leading_ones475503572 as impl_10__leading_ones} - -include Core.Array.Rec_bundle_579704328 {trailing_ones705845381 as impl_10__trailing_ones} - -include Core.Array.Rec_bundle_579704328 {count_zeros73479642 as impl_11__count_zeros} - -include Core.Array.Rec_bundle_579704328 {leading_ones667660708 as impl_11__leading_ones} - -include Core.Array.Rec_bundle_579704328 {trailing_ones979548463 as impl_11__trailing_ones} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst b/proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst deleted file mode 100644 index f5cce5147..000000000 --- a/proof-libs/fstar/generated-core/Core.Ops.Arith.Impls_for_prims.fst +++ /dev/null @@ -1,136 +0,0 @@ -module Core.Ops.Arith.Impls_for_prims -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {impl as impl} - -include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} - -include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} - -include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} - -include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} - -include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} - -include Core.Array.Rec_bundle_579704328 {impl_12 as impl_12} - -include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} - -include Core.Array.Rec_bundle_579704328 {impl_14 as impl_14} - -include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} - -include Core.Array.Rec_bundle_579704328 {impl_16 as impl_16} - -include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} - -include Core.Array.Rec_bundle_579704328 {impl_24 as impl_24} - -include Core.Array.Rec_bundle_579704328 {impl_25 as impl_25} - -include Core.Array.Rec_bundle_579704328 {impl_26 as impl_26} - -include Core.Array.Rec_bundle_579704328 {impl_27 as impl_27} - -include Core.Array.Rec_bundle_579704328 {impl_28 as impl_28} - -include Core.Array.Rec_bundle_579704328 {impl_29 as impl_29} - -include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} - -include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} - -include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} - -include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} - -include Core.Array.Rec_bundle_579704328 {impl_10 as impl_10} - -include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} - -include Core.Array.Rec_bundle_579704328 {impl_30 as impl_30} - -include Core.Array.Rec_bundle_579704328 {impl_31 as impl_31} - -include Core.Array.Rec_bundle_579704328 {impl_32 as impl_32} - -include Core.Array.Rec_bundle_579704328 {impl_33 as impl_33} - -include Core.Array.Rec_bundle_579704328 {impl_34 as impl_34} - -include Core.Array.Rec_bundle_579704328 {impl_35 as impl_35} - -include Core.Array.Rec_bundle_579704328 {impl_36 as impl_36} - -include Core.Array.Rec_bundle_579704328 {impl_37 as impl_37} - -include Core.Array.Rec_bundle_579704328 {impl_38 as impl_38} - -include Core.Array.Rec_bundle_579704328 {impl_39 as impl_39} - -include Core.Array.Rec_bundle_579704328 {impl_40 as impl_40} - -include Core.Array.Rec_bundle_579704328 {impl_41 as impl_41} - -include Core.Array.Rec_bundle_579704328 {impl_42 as impl_42} - -include Core.Array.Rec_bundle_579704328 {impl_43 as impl_43} - -include Core.Array.Rec_bundle_579704328 {impl_44 as impl_44} - -include Core.Array.Rec_bundle_579704328 {impl_45 as impl_45} - -include Core.Array.Rec_bundle_579704328 {impl_46 as impl_46} - -include Core.Array.Rec_bundle_579704328 {impl_47 as impl_47} - -include Core.Array.Rec_bundle_579704328 {impl_54 as impl_54} - -include Core.Array.Rec_bundle_579704328 {impl_55 as impl_55} - -include Core.Array.Rec_bundle_579704328 {impl_56 as impl_56} - -include Core.Array.Rec_bundle_579704328 {impl_57 as impl_57} - -include Core.Array.Rec_bundle_579704328 {impl_58 as impl_58} - -include Core.Array.Rec_bundle_579704328 {impl_59 as impl_59} - -include Core.Array.Rec_bundle_579704328 {impl_18 as impl_18} - -include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} - -include Core.Array.Rec_bundle_579704328 {impl_20 as impl_20} - -include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} - -include Core.Array.Rec_bundle_579704328 {impl_22 as impl_22} - -include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} - -include Core.Array.Rec_bundle_579704328 {impl_48 as impl_48} - -include Core.Array.Rec_bundle_579704328 {impl_49 as impl_49} - -include Core.Array.Rec_bundle_579704328 {impl_50 as impl_50} - -include Core.Array.Rec_bundle_579704328 {impl_51 as impl_51} - -include Core.Array.Rec_bundle_579704328 {impl_52 as impl_52} - -include Core.Array.Rec_bundle_579704328 {impl_53 as impl_53} - -include Core.Array.Rec_bundle_579704328 {impl_60 as impl_60} - -include Core.Array.Rec_bundle_579704328 {impl_61 as impl_61} - -include Core.Array.Rec_bundle_579704328 {impl_62 as impl_62} - -include Core.Array.Rec_bundle_579704328 {impl_63 as impl_63} - -include Core.Array.Rec_bundle_579704328 {impl_64 as impl_64} - -include Core.Array.Rec_bundle_579704328 {impl_65 as impl_65} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Arith.fst b/proof-libs/fstar/generated-core/Core.Ops.Arith.fst deleted file mode 100644 index 7bbf57888..000000000 --- a/proof-libs/fstar/generated-core/Core.Ops.Arith.fst +++ /dev/null @@ -1,51 +0,0 @@ -module Core.Ops.Arith -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_Add (v_Self: Type0) (v_Rhs: Type0) = { - f_Output:Type0; - f_add_pre:v_Self -> v_Rhs -> Type0; - f_add_post:v_Self -> v_Rhs -> f_Output -> Type0; - f_add:x0: v_Self -> x1: v_Rhs - -> Prims.Pure f_Output (f_add_pre x0 x1) (fun result -> f_add_post x0 x1 result) -} - -class t_Div (v_Self: Type0) (v_Rhs: Type0) = { - f_Output:Type0; - f_div_pre:v_Self -> v_Rhs -> Type0; - f_div_post:v_Self -> v_Rhs -> f_Output -> Type0; - f_div:x0: v_Self -> x1: v_Rhs - -> Prims.Pure f_Output (f_div_pre x0 x1) (fun result -> f_div_post x0 x1 result) -} - -class t_Mul (v_Self: Type0) (v_Rhs: Type0) = { - f_Output:Type0; - f_mul_pre:v_Self -> v_Rhs -> Type0; - f_mul_post:v_Self -> v_Rhs -> f_Output -> Type0; - f_mul:x0: v_Self -> x1: v_Rhs - -> Prims.Pure f_Output (f_mul_pre x0 x1) (fun result -> f_mul_post x0 x1 result) -} - -class t_Neg (v_Self: Type0) = { - f_Output:Type0; - f_neg_pre:v_Self -> Type0; - f_neg_post:v_Self -> f_Output -> Type0; - f_neg:x0: v_Self -> Prims.Pure f_Output (f_neg_pre x0) (fun result -> f_neg_post x0 result) -} - -class t_Rem (v_Self: Type0) (v_Rhs: Type0) = { - f_Output:Type0; - f_rem_pre:v_Self -> v_Rhs -> Type0; - f_rem_post:v_Self -> v_Rhs -> f_Output -> Type0; - f_rem:x0: v_Self -> x1: v_Rhs - -> Prims.Pure f_Output (f_rem_pre x0 x1) (fun result -> f_rem_post x0 x1 result) -} - -class t_Sub (v_Self: Type0) (v_Rhs: Type0) = { - f_Output:Type0; - f_sub_pre:v_Self -> v_Rhs -> Type0; - f_sub_post:v_Self -> v_Rhs -> f_Output -> Type0; - f_sub:x0: v_Self -> x1: v_Rhs - -> Prims.Pure f_Output (f_sub_pre x0 x1) (fun result -> f_sub_post x0 x1 result) -} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst b/proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst deleted file mode 100644 index 41e5c5480..000000000 --- a/proof-libs/fstar/generated-core/Core.Ops.Bit.Impls_for_prims.fst +++ /dev/null @@ -1,208 +0,0 @@ -module Core.Ops.Bit.Impls_for_prims -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {impl_84 as impl_84} - -include Core.Array.Rec_bundle_579704328 {impl_85 as impl_85} - -include Core.Array.Rec_bundle_579704328 {impl_86 as impl_86} - -include Core.Array.Rec_bundle_579704328 {impl_87 as impl_87} - -include Core.Array.Rec_bundle_579704328 {impl_88 as impl_88} - -include Core.Array.Rec_bundle_579704328 {impl_89 as impl_89} - -include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} - -include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} - -include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} - -include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} - -include Core.Array.Rec_bundle_579704328 {impl_10 as impl_10} - -include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} - -include Core.Array.Rec_bundle_579704328 {impl_12 as impl_12} - -include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} - -include Core.Array.Rec_bundle_579704328 {impl_14 as impl_14} - -include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} - -include Core.Array.Rec_bundle_579704328 {impl_16 as impl_16} - -include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} - -include Core.Array.Rec_bundle_579704328 {impl_18 as impl_18} - -include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} - -include Core.Array.Rec_bundle_579704328 {impl_20 as impl_20} - -include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} - -include Core.Array.Rec_bundle_579704328 {impl_22 as impl_22} - -include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} - -include Core.Array.Rec_bundle_579704328 {impl_24 as impl_24} - -include Core.Array.Rec_bundle_579704328 {impl_25 as impl_25} - -include Core.Array.Rec_bundle_579704328 {impl_26 as impl_26} - -include Core.Array.Rec_bundle_579704328 {impl_27 as impl_27} - -include Core.Array.Rec_bundle_579704328 {impl_28 as impl_28} - -include Core.Array.Rec_bundle_579704328 {impl_29 as impl_29} - -include Core.Array.Rec_bundle_579704328 {impl_30 as impl_30} - -include Core.Array.Rec_bundle_579704328 {impl_31 as impl_31} - -include Core.Array.Rec_bundle_579704328 {impl_32 as impl_32} - -include Core.Array.Rec_bundle_579704328 {impl_33 as impl_33} - -include Core.Array.Rec_bundle_579704328 {impl_34 as impl_34} - -include Core.Array.Rec_bundle_579704328 {impl_35 as impl_35} - -include Core.Array.Rec_bundle_579704328 {impl_36 as impl_36} - -include Core.Array.Rec_bundle_579704328 {impl_37 as impl_37} - -include Core.Array.Rec_bundle_579704328 {impl_38 as impl_38} - -include Core.Array.Rec_bundle_579704328 {impl_39 as impl_39} - -include Core.Array.Rec_bundle_579704328 {impl_40 as impl_40} - -include Core.Array.Rec_bundle_579704328 {impl_41 as impl_41} - -include Core.Array.Rec_bundle_579704328 {impl_42 as impl_42} - -include Core.Array.Rec_bundle_579704328 {impl_43 as impl_43} - -include Core.Array.Rec_bundle_579704328 {impl_44 as impl_44} - -include Core.Array.Rec_bundle_579704328 {impl_45 as impl_45} - -include Core.Array.Rec_bundle_579704328 {impl_46 as impl_46} - -include Core.Array.Rec_bundle_579704328 {impl_47 as impl_47} - -include Core.Array.Rec_bundle_579704328 {impl_48 as impl_48} - -include Core.Array.Rec_bundle_579704328 {impl_49 as impl_49} - -include Core.Array.Rec_bundle_579704328 {impl_50 as impl_50} - -include Core.Array.Rec_bundle_579704328 {impl_51 as impl_51} - -include Core.Array.Rec_bundle_579704328 {impl_52 as impl_52} - -include Core.Array.Rec_bundle_579704328 {impl_53 as impl_53} - -include Core.Array.Rec_bundle_579704328 {impl_54 as impl_54} - -include Core.Array.Rec_bundle_579704328 {impl_55 as impl_55} - -include Core.Array.Rec_bundle_579704328 {impl_56 as impl_56} - -include Core.Array.Rec_bundle_579704328 {impl_57 as impl_57} - -include Core.Array.Rec_bundle_579704328 {impl_58 as impl_58} - -include Core.Array.Rec_bundle_579704328 {impl_59 as impl_59} - -include Core.Array.Rec_bundle_579704328 {impl_60 as impl_60} - -include Core.Array.Rec_bundle_579704328 {impl_61 as impl_61} - -include Core.Array.Rec_bundle_579704328 {impl_62 as impl_62} - -include Core.Array.Rec_bundle_579704328 {impl_63 as impl_63} - -include Core.Array.Rec_bundle_579704328 {impl_64 as impl_64} - -include Core.Array.Rec_bundle_579704328 {impl_65 as impl_65} - -include Core.Array.Rec_bundle_579704328 {impl_66 as impl_66} - -include Core.Array.Rec_bundle_579704328 {impl_67 as impl_67} - -include Core.Array.Rec_bundle_579704328 {impl_68 as impl_68} - -include Core.Array.Rec_bundle_579704328 {impl_69 as impl_69} - -include Core.Array.Rec_bundle_579704328 {impl_70 as impl_70} - -include Core.Array.Rec_bundle_579704328 {impl_71 as impl_71} - -include Core.Array.Rec_bundle_579704328 {impl_72 as impl_72} - -include Core.Array.Rec_bundle_579704328 {impl_73 as impl_73} - -include Core.Array.Rec_bundle_579704328 {impl_74 as impl_74} - -include Core.Array.Rec_bundle_579704328 {impl_75 as impl_75} - -include Core.Array.Rec_bundle_579704328 {impl_76 as impl_76} - -include Core.Array.Rec_bundle_579704328 {impl_77 as impl_77} - -include Core.Array.Rec_bundle_579704328 {impl_78 as impl_78} - -include Core.Array.Rec_bundle_579704328 {impl_79 as impl_79} - -include Core.Array.Rec_bundle_579704328 {impl_80 as impl_80} - -include Core.Array.Rec_bundle_579704328 {impl_81 as impl_81} - -include Core.Array.Rec_bundle_579704328 {impl_82 as impl_82} - -include Core.Array.Rec_bundle_579704328 {impl_83 as impl_83} - -include Core.Array.Rec_bundle_579704328 {impl_90 as impl_90} - -include Core.Array.Rec_bundle_579704328 {impl_91 as impl_91} - -include Core.Array.Rec_bundle_579704328 {impl_92 as impl_92} - -include Core.Array.Rec_bundle_579704328 {impl_93 as impl_93} - -include Core.Array.Rec_bundle_579704328 {impl_94 as impl_94} - -include Core.Array.Rec_bundle_579704328 {impl_95 as impl_95} - -include Core.Array.Rec_bundle_579704328 {impl_96 as impl_96} - -include Core.Array.Rec_bundle_579704328 {impl_97 as impl_97} - -include Core.Array.Rec_bundle_579704328 {impl_98 as impl_98} - -include Core.Array.Rec_bundle_579704328 {impl_99 as impl_99} - -include Core.Array.Rec_bundle_579704328 {impl_100 as impl_100} - -include Core.Array.Rec_bundle_579704328 {impl_101 as impl_101} - -include Core.Array.Rec_bundle_579704328 {impl as impl} - -include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} - -include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} - -include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} - -include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} - -include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Bit.fst b/proof-libs/fstar/generated-core/Core.Ops.Bit.fst deleted file mode 100644 index 60b876097..000000000 --- a/proof-libs/fstar/generated-core/Core.Ops.Bit.fst +++ /dev/null @@ -1,51 +0,0 @@ -module Core.Ops.Bit -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_BitAnd (v_Self: Type0) (v_Rhs: Type0) = { - f_Output:Type0; - f_bitand_pre:v_Self -> v_Rhs -> Type0; - f_bitand_post:v_Self -> v_Rhs -> f_Output -> Type0; - f_bitand:x0: v_Self -> x1: v_Rhs - -> Prims.Pure f_Output (f_bitand_pre x0 x1) (fun result -> f_bitand_post x0 x1 result) -} - -class t_BitOr (v_Self: Type0) (v_Rhs: Type0) = { - f_Output:Type0; - f_bitor_pre:v_Self -> v_Rhs -> Type0; - f_bitor_post:v_Self -> v_Rhs -> f_Output -> Type0; - f_bitor:x0: v_Self -> x1: v_Rhs - -> Prims.Pure f_Output (f_bitor_pre x0 x1) (fun result -> f_bitor_post x0 x1 result) -} - -class t_BitXor (v_Self: Type0) (v_Rhs: Type0) = { - f_Output:Type0; - f_bitxor_pre:v_Self -> v_Rhs -> Type0; - f_bitxor_post:v_Self -> v_Rhs -> f_Output -> Type0; - f_bitxor:x0: v_Self -> x1: v_Rhs - -> Prims.Pure f_Output (f_bitxor_pre x0 x1) (fun result -> f_bitxor_post x0 x1 result) -} - -class t_Not (v_Self: Type0) = { - f_Output:Type0; - f_not_pre:v_Self -> Type0; - f_not_post:v_Self -> f_Output -> Type0; - f_not:x0: v_Self -> Prims.Pure f_Output (f_not_pre x0) (fun result -> f_not_post x0 result) -} - -class t_Shl (v_Self: Type0) (v_Rhs: Type0) = { - f_Output:Type0; - f_shl_pre:v_Self -> v_Rhs -> Type0; - f_shl_post:v_Self -> v_Rhs -> f_Output -> Type0; - f_shl:x0: v_Self -> x1: v_Rhs - -> Prims.Pure f_Output (f_shl_pre x0 x1) (fun result -> f_shl_post x0 x1 result) -} - -class t_Shr (v_Self: Type0) (v_Rhs: Type0) = { - f_Output:Type0; - f_shr_pre:v_Self -> v_Rhs -> Type0; - f_shr_post:v_Self -> v_Rhs -> f_Output -> Type0; - f_shr:x0: v_Self -> x1: v_Rhs - -> Prims.Pure f_Output (f_shr_pre x0 x1) (fun result -> f_shr_post x0 x1 result) -} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Function.fst b/proof-libs/fstar/generated-core/Core.Ops.Function.fst deleted file mode 100644 index 326603935..000000000 --- a/proof-libs/fstar/generated-core/Core.Ops.Function.fst +++ /dev/null @@ -1,31 +0,0 @@ -module Core.Ops.Function -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_FnOnce (v_Self: Type0) (v_Args: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_18093577594825678560:Core.Marker.t_Tuple v_Args; - f_Output:Type0; - f_call_once_pre:v_Self -> v_Args -> Type0; - f_call_once_post:v_Self -> v_Args -> f_Output -> Type0; - f_call_once:x0: v_Self -> x1: v_Args - -> Prims.Pure f_Output (f_call_once_pre x0 x1) (fun result -> f_call_once_post x0 x1 result) -} - -class t_FnMut (v_Self: Type0) (v_Args: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_4383436188827019856:t_FnOnce v_Self v_Args; - [@@@ FStar.Tactics.Typeclasses.no_method]_super_18093577594825678560:Core.Marker.t_Tuple v_Args; - f_call_mut_pre:v_Self -> v_Args -> Type0; - f_call_mut_post:v_Self -> v_Args -> (v_Self & _) -> Type0; - f_call_mut:x0: v_Self -> x1: v_Args - -> Prims.Pure (v_Self & _) (f_call_mut_pre x0 x1) (fun result -> f_call_mut_post x0 x1 result) -} - -class t_Fn (v_Self: Type0) (v_Args: Type0) = { - [@@@ FStar.Tactics.Typeclasses.no_method]_super_17624495069805845666:t_FnMut v_Self v_Args; - [@@@ FStar.Tactics.Typeclasses.no_method]_super_18093577594825678560:Core.Marker.t_Tuple v_Args; - f_call_pre:v_Self -> v_Args -> Type0; - f_call_post:v_Self -> v_Args -> _ -> Type0; - f_call:x0: v_Self -> x1: v_Args - -> Prims.Pure _ (f_call_pre x0 x1) (fun result -> f_call_post x0 x1 result) -} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Index.fst b/proof-libs/fstar/generated-core/Core.Ops.Index.fst deleted file mode 100644 index 6cc80a42c..000000000 --- a/proof-libs/fstar/generated-core/Core.Ops.Index.fst +++ /dev/null @@ -1,12 +0,0 @@ -module Core.Ops.Index -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -class t_Index (v_Self: Type0) (v_Idx: Type0) = { - f_Output:Type0; - f_index_pre:v_Self -> v_Idx -> Type0; - f_index_post:v_Self -> v_Idx -> f_Output -> Type0; - f_index:x0: v_Self -> x1: v_Idx - -> Prims.Pure f_Output (f_index_pre x0 x1) (fun result -> f_index_post x0 x1 result) -} diff --git a/proof-libs/fstar/generated-core/Core.Ops.Index_range.fst b/proof-libs/fstar/generated-core/Core.Ops.Index_range.fst deleted file mode 100644 index d927e5697..000000000 --- a/proof-libs/fstar/generated-core/Core.Ops.Index_range.fst +++ /dev/null @@ -1,118 +0,0 @@ -module Core.Ops.Index_range -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_IndexRange = { - f_start:usize; - f_end:usize -} - -let impl__IndexRange__zero_to (v_end: usize) : t_IndexRange = - { f_start = sz 0; f_end = v_end } <: t_IndexRange - -let impl__IndexRange__next_unchecked (self: t_IndexRange) : (t_IndexRange & usize) = - let value:usize = self.f_start in - let self:t_IndexRange = - { self with f_start = Rust_primitives.Usize.add value (sz 1) } <: t_IndexRange - in - let hax_temp_output:usize = value in - self, hax_temp_output <: (t_IndexRange & usize) - -let impl__IndexRange__len (self: t_IndexRange) : usize = - Rust_primitives.Usize.sub self.f_end self.f_start - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1: Core.Iter.Traits.Iterator.t_Iterator t_IndexRange = - { - f_Item = usize; - f_next_pre = (fun (self: t_IndexRange) -> true); - f_next_post - = - (fun (self: t_IndexRange) (out: (t_IndexRange & Core.Option.t_Option usize)) -> true); - f_next - = - (fun (self: t_IndexRange) -> - let hax_temp_output:Core.Option.t_Option usize = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - in - self, hax_temp_output <: (t_IndexRange & Core.Option.t_Option usize)); - f_size_hint_pre = (fun (self: t_IndexRange) -> true); - f_size_hint_post - = - (fun (self: t_IndexRange) (out: (usize & Core.Option.t_Option usize)) -> true); - f_size_hint - = - (fun (self: t_IndexRange) -> - let len:usize = impl__IndexRange__len self in - len, (Core.Option.Option_Some len <: Core.Option.t_Option usize) - <: - (usize & Core.Option.t_Option usize)); - f_fold_pre - = - (fun - (#v_B: Type0) - (#v_F: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] - i3: - Core.Ops.Function.t_FnMut v_F (v_B & (impl_1).f_Item)) - (self: t_IndexRange) - (init: v_B) - (f: v_F) - -> - true); - f_fold_post - = - (fun - (#v_B: Type0) - (#v_F: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] - i3: - Core.Ops.Function.t_FnMut v_F (v_B & (impl_1).f_Item)) - (self: t_IndexRange) - (init: v_B) - (f: v_F) - (out: v_B) - -> - true); - f_fold - = - fun - (#v_B: Type0) - (#v_F: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] - i3: - Core.Ops.Function.t_FnMut v_F (v_B & (impl_1).f_Item)) - (self: t_IndexRange) - (init: v_B) - (f: v_F) - -> - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 0) - (let list = ["not yet implemented: specification needed"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (Core.Fmt.Rt.impl_1__none () <: t_Array Core.Fmt.Rt.t_Argument (sz 0)) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - } - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_2: Core.Iter.Traits.Exact_size.t_ExactSizeIterator t_IndexRange = - { - _super_15444444506782437531 = FStar.Tactics.Typeclasses.solve; - f_len_pre = (fun (self: t_IndexRange) -> true); - f_len_post = (fun (self: t_IndexRange) (out: usize) -> true); - f_len = fun (self: t_IndexRange) -> impl__IndexRange__len self - } diff --git a/proof-libs/fstar/generated-core/Core.Ops.Range.fst b/proof-libs/fstar/generated-core/Core.Ops.Range.fst deleted file mode 100644 index a1e605f74..000000000 --- a/proof-libs/fstar/generated-core/Core.Ops.Range.fst +++ /dev/null @@ -1,9 +0,0 @@ -module Core.Ops.Range -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_Range (v_Idx: Type0) = { - f_start:v_Idx; - f_end:v_Idx -} diff --git a/proof-libs/fstar/generated-core/Core.Option.fst b/proof-libs/fstar/generated-core/Core.Option.fst deleted file mode 100644 index 6f7c137fd..000000000 --- a/proof-libs/fstar/generated-core/Core.Option.fst +++ /dev/null @@ -1,61 +0,0 @@ -module Core.Option -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_Option (v_T: Type0) = - | Option_None : t_Option v_T - | Option_Some : v_T -> t_Option v_T - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Clone.t_Clone (t_Option v_T) = - { - f_clone_pre = (fun (self: t_Option v_T) -> true); - f_clone_post = (fun (self: t_Option v_T) (out: t_Option v_T) -> true); - f_clone - = - fun (self: t_Option v_T) -> - match self with - | Option_Some x -> - Option_Some (Core.Clone.f_clone #v_T #FStar.Tactics.Typeclasses.solve x) <: t_Option v_T - | Option_None -> Option_None <: t_Option v_T - } - -let impl_1__is_some (#v_T: Type0) (self: t_Option v_T) : bool = - match self with - | Option_Some _ -> true - | _ -> false - -let impl_1__map - (#v_T #v_U #v_F: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i3: Core.Ops.Function.t_FnOnce v_F v_T) - (self: t_Option v_T) - (f: v_F) - : t_Option v_U = - match self with - | Option_Some x -> - Option_Some - (Core.Ops.Function.f_call_once #v_F #v_T #FStar.Tactics.Typeclasses.solve f (x <: v_T)) - <: - t_Option v_U - | Option_None -> Option_None <: t_Option v_U - -let unwrap_failed (_: Prims.unit) : Rust_primitives.Hax.t_Never = - Core.Panicking.panic "called `Option::unwrap()` on a `None` value" - -let impl_1__unwrap (#v_T: Type0) (self: t_Option v_T) - : Prims.Pure v_T (requires impl_1__is_some #v_T self___) (fun _ -> Prims.l_True) = - match self with - | Option_Some v_val -> v_val - | Option_None -> - Rust_primitives.Hax.never_to_any (unwrap_failed () <: Rust_primitives.Hax.t_Never) - -let expect_failed (msg: string) : Rust_primitives.Hax.t_Never = - Core.Panicking.panic_display #string msg - -let impl_1__expect (#v_T: Type0) (self: t_Option v_T) (msg: string) : v_T = - match self with - | Option_Some v_val -> v_val - | Option_None -> - Rust_primitives.Hax.never_to_any (expect_failed msg <: Rust_primitives.Hax.t_Never) diff --git a/proof-libs/fstar/generated-core/Core.Panicking.fst b/proof-libs/fstar/generated-core/Core.Panicking.fst deleted file mode 100644 index 6b444e304..000000000 --- a/proof-libs/fstar/generated-core/Core.Panicking.fst +++ /dev/null @@ -1,51 +0,0 @@ -module Core.Panicking -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_AssertKind = - | AssertKind_Eq : t_AssertKind - | AssertKind_Ne : t_AssertKind - | AssertKind_Match : t_AssertKind - -let t_AssertKind_cast_to_repr (x: t_AssertKind) : isize = - match x with - | AssertKind_Eq -> isz 0 - | AssertKind_Ne -> isz 1 - | AssertKind_Match -> isz 3 - -type t_Never = - -let t_Never_cast_to_repr (x: t_Never) : Rust_primitives.Hax.t_Never = match x with - -let never_to_any (#v_T: Type0) (x: t_Never) : v_T = Rust_primitives.Hax.never_to_any (match x with ) - -let rec panic_fmt (fmt: Core.Fmt.t_Arguments) : Rust_primitives.Hax.t_Never = panic_fmt fmt - -/// The underlying implementation of core's `panic!` macro when no formatting is used. -let panic (expr: string) : Rust_primitives.Hax.t_Never = - panic_fmt (Core.Fmt.impl_2__new_const (sz 1) - (let list = [expr] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - Core.Fmt.t_Arguments) - -let panic_display - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Fmt.t_Display v_T) - (x: v_T) - : Rust_primitives.Hax.t_Never = - panic_fmt (Core.Fmt.impl_2__new_v1 (sz 1) - (sz 1) - (let list = [""] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - (let list = [Core.Fmt.Rt.impl_1__new_display #v_T x <: Core.Fmt.Rt.t_Argument] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - Core.Fmt.t_Arguments) - -let panic_explicit (_: Prims.unit) : Rust_primitives.Hax.t_Never = - panic_display #string "explicit panic" diff --git a/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst b/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst deleted file mode 100644 index c619bcf92..000000000 --- a/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion.fst +++ /dev/null @@ -1,88 +0,0 @@ -module Core.Primitive.Number_conversion -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {impl_31 as impl_31} - -include Core.Array.Rec_bundle_579704328 {impl_40 as impl_40} - -include Core.Array.Rec_bundle_579704328 {impl as impl} - -include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} - -include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} - -include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} - -include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} - -include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} - -include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} - -include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} - -include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} - -include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} - -include Core.Array.Rec_bundle_579704328 {impl_10 as impl_10} - -include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} - -include Core.Array.Rec_bundle_579704328 {impl_12 as impl_12} - -include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} - -include Core.Array.Rec_bundle_579704328 {impl_14 as impl_14} - -include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} - -include Core.Array.Rec_bundle_579704328 {impl_16 as impl_16} - -include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} - -include Core.Array.Rec_bundle_579704328 {impl_18 as impl_18} - -include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} - -include Core.Array.Rec_bundle_579704328 {impl_20 as impl_20} - -include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} - -include Core.Array.Rec_bundle_579704328 {impl_22 as impl_22} - -include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} - -include Core.Array.Rec_bundle_579704328 {impl_24 as impl_24} - -include Core.Array.Rec_bundle_579704328 {impl_25 as impl_25} - -include Core.Array.Rec_bundle_579704328 {impl_26 as impl_26} - -include Core.Array.Rec_bundle_579704328 {impl_27 as impl_27} - -include Core.Array.Rec_bundle_579704328 {impl_28 as impl_28} - -include Core.Array.Rec_bundle_579704328 {impl_29 as impl_29} - -include Core.Array.Rec_bundle_579704328 {impl_30 as impl_30} - -include Core.Array.Rec_bundle_579704328 {impl_32 as impl_32} - -include Core.Array.Rec_bundle_579704328 {impl_33 as impl_33} - -include Core.Array.Rec_bundle_579704328 {impl_34 as impl_34} - -include Core.Array.Rec_bundle_579704328 {impl_35 as impl_35} - -include Core.Array.Rec_bundle_579704328 {impl_36 as impl_36} - -include Core.Array.Rec_bundle_579704328 {impl_37 as impl_37} - -include Core.Array.Rec_bundle_579704328 {impl_38 as impl_38} - -include Core.Array.Rec_bundle_579704328 {impl_39 as impl_39} - -include Core.Array.Rec_bundle_579704328 {impl_41 as impl_41} diff --git a/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst b/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst deleted file mode 100644 index da845bfda..000000000 --- a/proof-libs/fstar/generated-core/Core.Primitive.Number_conversion_i.fst +++ /dev/null @@ -1,88 +0,0 @@ -module Core.Primitive.Number_conversion_i -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {impl_31 as impl_31} - -include Core.Array.Rec_bundle_579704328 {impl_40 as impl_40} - -include Core.Array.Rec_bundle_579704328 {impl as impl} - -include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} - -include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} - -include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} - -include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} - -include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} - -include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} - -include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} - -include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} - -include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} - -include Core.Array.Rec_bundle_579704328 {impl_10 as impl_10} - -include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} - -include Core.Array.Rec_bundle_579704328 {impl_12 as impl_12} - -include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} - -include Core.Array.Rec_bundle_579704328 {impl_14 as impl_14} - -include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} - -include Core.Array.Rec_bundle_579704328 {impl_16 as impl_16} - -include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} - -include Core.Array.Rec_bundle_579704328 {impl_18 as impl_18} - -include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} - -include Core.Array.Rec_bundle_579704328 {impl_20 as impl_20} - -include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} - -include Core.Array.Rec_bundle_579704328 {impl_22 as impl_22} - -include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} - -include Core.Array.Rec_bundle_579704328 {impl_24 as impl_24} - -include Core.Array.Rec_bundle_579704328 {impl_25 as impl_25} - -include Core.Array.Rec_bundle_579704328 {impl_26 as impl_26} - -include Core.Array.Rec_bundle_579704328 {impl_27 as impl_27} - -include Core.Array.Rec_bundle_579704328 {impl_28 as impl_28} - -include Core.Array.Rec_bundle_579704328 {impl_29 as impl_29} - -include Core.Array.Rec_bundle_579704328 {impl_30 as impl_30} - -include Core.Array.Rec_bundle_579704328 {impl_32 as impl_32} - -include Core.Array.Rec_bundle_579704328 {impl_33 as impl_33} - -include Core.Array.Rec_bundle_579704328 {impl_34 as impl_34} - -include Core.Array.Rec_bundle_579704328 {impl_35 as impl_35} - -include Core.Array.Rec_bundle_579704328 {impl_36 as impl_36} - -include Core.Array.Rec_bundle_579704328 {impl_37 as impl_37} - -include Core.Array.Rec_bundle_579704328 {impl_38 as impl_38} - -include Core.Array.Rec_bundle_579704328 {impl_39 as impl_39} - -include Core.Array.Rec_bundle_579704328 {impl_41 as impl_41} diff --git a/proof-libs/fstar/generated-core/Core.Primitive.fst b/proof-libs/fstar/generated-core/Core.Primitive.fst deleted file mode 100644 index 1f0a3d5c4..000000000 --- a/proof-libs/fstar/generated-core/Core.Primitive.fst +++ /dev/null @@ -1,140 +0,0 @@ -module Core.Primitive -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {t_Slice as t_Slice} - -include Core.Array.Rec_bundle_579704328 {f_v as f_v} - -include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} - -include Core.Array.Rec_bundle_579704328 {t_Array as t_Array} - -include Core.Array.Rec_bundle_579704328 {f_v as f_v} - -include Core.Array.Rec_bundle_579704328 {cast as impl_3__cast} - -include Core.Array.Rec_bundle_579704328 {t_i128 as t_i128} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {impl_25 as impl_25} - -include Core.Array.Rec_bundle_579704328 {t_i16 as t_i16} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {impl_19 as impl_19} - -include Core.Array.Rec_bundle_579704328 {t_i32 as t_i32} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {impl_21 as impl_21} - -include Core.Array.Rec_bundle_579704328 {t_i64 as t_i64} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {impl_23 as impl_23} - -include Core.Array.Rec_bundle_579704328 {t_i8 as t_i8} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {impl_17 as impl_17} - -include Core.Array.Rec_bundle_579704328 {t_isize as t_isize} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {impl_27 as impl_27} - -include Core.Array.Rec_bundle_579704328 {t_u128 as t_u128} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {t_u16 as t_u16} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {t_u32 as t_u32} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {t_u64 as t_u64} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {t_u8 as t_u8} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {t_usize as t_usize} - -include Core.Array.Rec_bundle_579704328 {_0 as _0} - -include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} - -include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} - -include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} - -include Core.Array.Rec_bundle_579704328 {impl_9 as impl_9} - -include Core.Array.Rec_bundle_579704328 {impl_11 as impl_11} - -include Core.Array.Rec_bundle_579704328 {impl_13 as impl_13} - -include Core.Array.Rec_bundle_579704328 {impl_15 as impl_15} - -include Core.Array.Rec_bundle_579704328 {impl as impl} - -include Core.Array.Rec_bundle_579704328 {impl_29 as impl_29} - -include Core.Array.Rec_bundle_579704328 {impl_30 as impl_30} - -include Core.Array.Rec_bundle_579704328 {impl_31 as impl_31} - -include Core.Array.Rec_bundle_579704328 {impl_32 as impl_32} - -include Core.Array.Rec_bundle_579704328 {impl_33 as impl_33} - -include Core.Array.Rec_bundle_579704328 {impl_34 as impl_34} - -include Core.Array.Rec_bundle_579704328 {impl_35 as impl_35} - -include Core.Array.Rec_bundle_579704328 {impl_36 as impl_36} - -include Core.Array.Rec_bundle_579704328 {impl_37 as impl_37} - -include Core.Array.Rec_bundle_579704328 {impl_38 as impl_38} - -include Core.Array.Rec_bundle_579704328 {impl_39 as impl_39} - -include Core.Array.Rec_bundle_579704328 {impl_40 as impl_40} - -include Core.Array.Rec_bundle_579704328 {impl_41 as impl_41} - -include Core.Array.Rec_bundle_579704328 {impl_42 as impl_42} - -include Core.Array.Rec_bundle_579704328 {impl_43 as impl_43} - -include Core.Array.Rec_bundle_579704328 {impl_44 as impl_44} - -include Core.Array.Rec_bundle_579704328 {impl_45 as impl_45} - -include Core.Array.Rec_bundle_579704328 {impl_46 as impl_46} - -include Core.Array.Rec_bundle_579704328 {impl_47 as impl_47} - -include Core.Array.Rec_bundle_579704328 {impl_48 as impl_48} - -include Core.Array.Rec_bundle_579704328 {impl_49 as impl_49} - -include Core.Array.Rec_bundle_579704328 {impl_50 as impl_50} - -include Core.Array.Rec_bundle_579704328 {impl_51 as impl_51} - -include Core.Array.Rec_bundle_579704328 {impl_52 as impl_52} diff --git a/proof-libs/fstar/generated-core/Core.Result.fst b/proof-libs/fstar/generated-core/Core.Result.fst deleted file mode 100644 index cd4873cfe..000000000 --- a/proof-libs/fstar/generated-core/Core.Result.fst +++ /dev/null @@ -1,13 +0,0 @@ -module Core.Result -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_Result (v_T: Type0) (v_E: Type0) = - | Result_Ok : v_T -> t_Result v_T v_E - | Result_Err : v_E -> t_Result v_T v_E - -let impl__ok (#v_T #v_E: Type0) (self: t_Result v_T v_E) : Core.Option.t_Option v_T = - match self with - | Result_Ok x -> Core.Option.Option_Some x <: Core.Option.t_Option v_T - | Result_Err _ -> Core.Option.Option_None <: Core.Option.t_Option v_T diff --git a/proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst b/proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst deleted file mode 100644 index bd7714e81..000000000 --- a/proof-libs/fstar/generated-core/Core.Slice.Index.Private_slice_index.fst +++ /dev/null @@ -1,24 +0,0 @@ -module Core.Slice.Index.Private_slice_index -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {v_Sealed as v_Sealed} - -include Core.Array.Rec_bundle_579704328 {impl as impl} - -include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} - -include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} - -include Core.Array.Rec_bundle_579704328 {impl_3 as impl_3} - -include Core.Array.Rec_bundle_579704328 {impl_4 as impl_4} - -include Core.Array.Rec_bundle_579704328 {impl_5 as impl_5} - -include Core.Array.Rec_bundle_579704328 {impl_6 as impl_6} - -include Core.Array.Rec_bundle_579704328 {impl_7 as impl_7} - -include Core.Array.Rec_bundle_579704328 {impl_8 as impl_8} diff --git a/proof-libs/fstar/generated-core/Core.Slice.Index.fst b/proof-libs/fstar/generated-core/Core.Slice.Index.fst deleted file mode 100644 index 04ada15ad..000000000 --- a/proof-libs/fstar/generated-core/Core.Slice.Index.fst +++ /dev/null @@ -1,12 +0,0 @@ -module Core.Slice.Index -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -include Core.Array.Rec_bundle_579704328 {v_SliceIndex as v_SliceIndex} - -include Core.Array.Rec_bundle_579704328 {impl as impl} - -include Core.Array.Rec_bundle_579704328 {impl_2 as impl_2} - -include Core.Array.Rec_bundle_579704328 {impl_1 as impl_1} diff --git a/proof-libs/fstar/generated-core/Core.Slice.Iter.fst b/proof-libs/fstar/generated-core/Core.Slice.Iter.fst deleted file mode 100644 index a9223a99d..000000000 --- a/proof-libs/fstar/generated-core/Core.Slice.Iter.fst +++ /dev/null @@ -1,42 +0,0 @@ -module Core.Slice.Iter -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -type t_Iter (v_T: Type0) = { - f_data:Core.Primitive.t_Slice v_T; - f__marker:Core.Marker.t_PhantomData v_T -} - -let impl__new - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (slice: Core.Primitive.t_Slice v_T) - : t_Iter v_T = - { - f_data = Core.Clone.f_clone #(Core.Primitive.t_Slice v_T) #FStar.Tactics.Typeclasses.solve slice; - f__marker = Core.Marker.PhantomData <: Core.Marker.t_PhantomData v_T - } - <: - t_Iter v_T - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_1 (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - : Core.Clone.t_Clone (t_Iter v_T) = - { - f_clone_pre = (fun (self: t_Iter v_T) -> true); - f_clone_post = (fun (self: t_Iter v_T) (out: t_Iter v_T) -> true); - f_clone - = - fun (self: t_Iter v_T) -> - { - f_data - = - Core.Clone.f_clone #(Core.Primitive.t_Slice v_T) - #FStar.Tactics.Typeclasses.solve - self.f_data; - f__marker = self.f__marker - } - <: - t_Iter v_T - } diff --git a/proof-libs/fstar/generated-core/Core.Slice.fst b/proof-libs/fstar/generated-core/Core.Slice.fst deleted file mode 100644 index 282374444..000000000 --- a/proof-libs/fstar/generated-core/Core.Slice.fst +++ /dev/null @@ -1,33 +0,0 @@ -module Core.Slice -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let impl__iter - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: Core.Primitive.t_Slice v_T) - : Core.Slice.Iter.t_Iter v_T = Core.Slice.Iter.impl__new #v_T self - -let impl__len - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) - (self: Core.Primitive.t_Slice v_T) - : usize = - Core.Convert.f_from #usize - #Core.Base.Spec.Haxint.t_HaxInt - #FStar.Tactics.Typeclasses.solve - (Core.Base.Seq.len #v_T - (Core.Clone.f_clone #(Core.Base.Spec.Seq.t_Seq v_T) - #FStar.Tactics.Typeclasses.solve - self.Core.Primitive.f_v - <: - Core.Base.Spec.Seq.t_Seq v_T) - <: - Core.Base.Spec.Haxint.t_HaxInt) - -let impl__is_empty - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i2: Core.Clone.t_Clone v_T) - (self: Core.Primitive.t_Slice v_T) - : bool = Rust_primitives.Usize.eq (impl__len #v_T self <: usize) (sz 0) From 40ba45ef5bffc8f575c34d9c8deee1f403c398e2 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Tue, 26 Nov 2024 14:55:20 +0100 Subject: [PATCH 32/59] fix(engine/dependencies): item order, add test, refresh snapshots --- ...oolchain__attribute-opaque into-fstar.snap | 4 +- .../toolchain__attributes into-fstar.snap | 140 ++--- ...in__constructor-as-closure into-fstar.snap | 8 +- .../toolchain__cyclic-modules into-fstar.snap | 68 +-- .../toolchain__enum-repr into-coq.snap | 20 +- .../toolchain__enum-repr into-fstar.snap | 12 +- .../toolchain__enum-repr into-ssprove.snap | 32 +- .../toolchain__generics into-fstar.snap | 84 +-- .../snapshots/toolchain__guards into-coq.snap | 48 +- .../toolchain__guards into-fstar.snap | 32 +- .../toolchain__guards into-ssprove.snap | 64 +-- .../toolchain__include-flag into-coq.snap | 28 +- .../toolchain__include-flag into-fstar.snap | 16 +- .../toolchain__interface-only into-fstar.snap | 34 +- .../toolchain__literals into-coq.snap | 66 +-- .../toolchain__literals into-fstar.snap | 162 +++--- .../toolchain__loops into-fstar.snap | 508 +++++++++--------- ..._mut-ref-functionalization into-fstar.snap | 280 +++++----- .../toolchain__naming into-fstar.snap | 90 ++-- .../toolchain__pattern-or into-coq.snap | 42 +- .../toolchain__pattern-or into-fstar.snap | 24 +- .../toolchain__reordering into-coq.snap | 93 +++- .../toolchain__reordering into-fstar.snap | 66 ++- .../toolchain__reordering into-ssprove.snap | 159 +++++- .../toolchain__side-effects into-fstar.snap | 424 +++++++-------- .../toolchain__side-effects into-ssprove.snap | 350 ++++++------ .../toolchain__traits into-fstar.snap | 120 ++--- .../toolchain__unsafe into-fstar.snap | 10 +- tests/reordering/src/lib.rs | 25 + 29 files changed, 1652 insertions(+), 1357 deletions(-) diff --git a/test-harness/src/snapshots/toolchain__attribute-opaque into-fstar.snap b/test-harness/src/snapshots/toolchain__attribute-opaque into-fstar.snap index 2275da427..d45c9cb4d 100644 --- a/test-harness/src/snapshots/toolchain__attribute-opaque into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__attribute-opaque into-fstar.snap @@ -35,7 +35,7 @@ module Attribute_opaque open Core open FStar.Mul -val t_OpaqueEnum (v_X: usize) (#v_T #v_U: Type0) : Type0 - val t_OpaqueStruct (v_X: usize) (#v_T #v_U: Type0) : Type0 + +val t_OpaqueEnum (v_X: usize) (#v_T #v_U: Type0) : Type0 ''' diff --git a/test-harness/src/snapshots/toolchain__attributes into-fstar.snap b/test-harness/src/snapshots/toolchain__attributes into-fstar.snap index e65784071..aa8b73123 100644 --- a/test-harness/src/snapshots/toolchain__attributes into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__attributes into-fstar.snap @@ -92,6 +92,8 @@ open FStar.Mul unfold type t_Int = int +unfold let add x y = x + y + unfold instance impl: Core.Ops.Arith.t_Sub t_Int t_Int = { f_Output = t_Int; @@ -99,8 +101,6 @@ unfold instance impl: Core.Ops.Arith.t_Sub t_Int t_Int = f_sub_post = (fun (self: t_Int) (other: t_Int) (out: t_Int) -> true); f_sub = fun (self: t_Int) (other: t_Int) -> self + other } - -unfold let add x y = x + y ''' "Attributes.Nested_refinement_elim.fst" = ''' module Attributes.Nested_refinement_elim @@ -118,11 +118,16 @@ module Attributes.Newtype_pattern open Core open FStar.Mul +let v_MAX: usize = sz 10 + type t_SafeIndex = { f_i:f_i: usize{f_i <. v_MAX} } -let impl__SafeIndex__as_usize (self: t_SafeIndex) : usize = self.f_i +let impl__SafeIndex__new (i: usize) : Core.Option.t_Option t_SafeIndex = + if i <. v_MAX + then Core.Option.Option_Some ({ f_i = i } <: t_SafeIndex) <: Core.Option.t_Option t_SafeIndex + else Core.Option.Option_None <: Core.Option.t_Option t_SafeIndex -let v_MAX: usize = sz 10 +let impl__SafeIndex__as_usize (self: t_SafeIndex) : usize = self.f_i [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_1 (#v_T: Type0) : Core.Ops.Index.t_Index (t_Array v_T (sz 10)) t_SafeIndex = @@ -132,11 +137,6 @@ let impl_1 (#v_T: Type0) : Core.Ops.Index.t_Index (t_Array v_T (sz 10)) t_SafeIn f_index_post = (fun (self: t_Array v_T (sz 10)) (index: t_SafeIndex) (out: v_T) -> true); f_index = fun (self: t_Array v_T (sz 10)) (index: t_SafeIndex) -> self.[ index.f_i ] } - -let impl__SafeIndex__new (i: usize) : Core.Option.t_Option t_SafeIndex = - if i <. v_MAX - then Core.Option.Option_Some ({ f_i = i } <: t_SafeIndex) <: Core.Option.t_Option t_SafeIndex - else Core.Option.Option_None <: Core.Option.t_Option t_SafeIndex ''' "Attributes.Pre_post_on_traits_and_impls.fst" = ''' module Attributes.Pre_post_on_traits_and_impls @@ -162,13 +162,6 @@ class t_Operation (v_Self: Type0) = { f_double:x0: u8 -> Prims.Pure u8 (f_double_pre x0) (fun result -> f_double_post x0 result) } -class t_TraitWithRequiresAndEnsures (v_Self: Type0) = { - f_method_pre:self___: v_Self -> x: u8 -> pred: Type0{x <. 100uy ==> pred}; - f_method_post:self___: v_Self -> x: u8 -> r: u8 -> pred: Type0{pred ==> r >. 88uy}; - f_method:x0: v_Self -> x1: u8 - -> Prims.Pure u8 (f_method_pre x0 x1) (fun result -> f_method_post x0 x1 result) -} - type t_ViaAdd = | ViaAdd : t_ViaAdd type t_ViaMul = | ViaMul : t_ViaMul @@ -207,6 +200,13 @@ let impl_1: t_Operation t_ViaMul = f_double = fun (x: u8) -> x *! 2uy } +class t_TraitWithRequiresAndEnsures (v_Self: Type0) = { + f_method_pre:self___: v_Self -> x: u8 -> pred: Type0{x <. 100uy ==> pred}; + f_method_post:self___: v_Self -> x: u8 -> r: u8 -> pred: Type0{pred ==> r >. 88uy}; + f_method:x0: v_Self -> x1: u8 + -> Prims.Pure u8 (f_method_pre x0 x1) (fun result -> f_method_post x0 x1 result) +} + let test (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_TraitWithRequiresAndEnsures v_T) @@ -247,10 +247,10 @@ module Attributes.Refined_indexes open Core open FStar.Mul -type t_MyArray = | MyArray : t_Array u8 (sz 10) -> t_MyArray - let v_MAX: usize = sz 10 +type t_MyArray = | MyArray : t_Array u8 (sz 10) -> t_MyArray + /// Triple dash comment (** Multiline double star comment Maecenas blandit accumsan feugiat. Done vitae ullamcorper est. @@ -288,27 +288,20 @@ module Attributes.Refinement_types open Core open FStar.Mul -/// Example of a specific constraint on a value -let t_CompressionFactor = x: u8{x =. 4uy || x =. 5uy || x =. 10uy || x =. 11uy} - let t_BoundedU8 (v_MIN v_MAX: u8) = x: u8{x >=. v_MIN && x <=. v_MAX} -/// A field element -let t_FieldElement = x: u16{x <=. 2347us} +let bounded_u8 (x: t_BoundedU8 12uy 15uy) (y: t_BoundedU8 10uy 11uy) : t_BoundedU8 1uy 23uy = + (x <: u8) +! (y <: u8) <: t_BoundedU8 1uy 23uy /// Even `u8` numbers. Constructing pub Even values triggers static /// proofs in the extraction. let t_Even = x: u8{(x %! 2uy <: u8) =. 0uy} -/// A modular mutliplicative inverse -let t_ModInverse (v_MOD: u32) = - n: - u32 - { (((cast (n <: u32) <: u128) *! (cast (v_MOD <: u32) <: u128) <: u128) %! - (cast (v_MOD <: u32) <: u128) - <: - u128) =. - pub_u128 1 } +let double (x: u8) : Prims.Pure t_Even (requires x <. 127uy) (fun _ -> Prims.l_True) = + x +! x <: t_Even + +let double_refine (x: u8) : Prims.Pure t_Even (requires x <. 127uy) (fun _ -> Prims.l_True) = + x +! x <: t_Even /// A string that contains no space. let t_NoE = @@ -330,14 +323,21 @@ let t_NoE = in ~.out } -let double_refine (x: u8) : Prims.Pure t_Even (requires x <. 127uy) (fun _ -> Prims.l_True) = - x +! x <: t_Even +/// A modular mutliplicative inverse +let t_ModInverse (v_MOD: u32) = + n: + u32 + { (((cast (n <: u32) <: u128) *! (cast (v_MOD <: u32) <: u128) <: u128) %! + (cast (v_MOD <: u32) <: u128) + <: + u128) =. + pub_u128 1 } -let bounded_u8 (x: t_BoundedU8 12uy 15uy) (y: t_BoundedU8 10uy 11uy) : t_BoundedU8 1uy 23uy = - (x <: u8) +! (y <: u8) <: t_BoundedU8 1uy 23uy +/// A field element +let t_FieldElement = x: u16{x <=. 2347us} -let double (x: u8) : Prims.Pure t_Even (requires x <. 127uy) (fun _ -> Prims.l_True) = - x +! x <: t_Even +/// Example of a specific constraint on a value +let t_CompressionFactor = x: u8{x =. 4uy || x =. 5uy || x =. 10uy || x =. 11uy} ''' "Attributes.Requires_mut.fst" = ''' module Attributes.Requires_mut @@ -417,6 +417,12 @@ module Attributes.Verifcation_status open Core open FStar.Mul +#push-options "--admit_smt_queries true" + +let a_function_which_only_laxes (_: Prims.unit) : Prims.unit = Hax_lib.v_assert false + +#pop-options + let a_panicfree_function (_: Prims.unit) : Prims.Pure u8 Prims.l_True @@ -441,12 +447,6 @@ let another_panicfree_function (_: Prims.unit) let nothing:i32 = 0l in let still_not_much:i32 = not_much +! nothing in admit () (* Panic freedom *) - -#push-options "--admit_smt_queries true" - -let a_function_which_only_laxes (_: Prims.unit) : Prims.unit = Hax_lib.v_assert false - -#pop-options ''' "Attributes.fst" = ''' module Attributes @@ -454,23 +454,20 @@ module Attributes open Core open FStar.Mul -type t_Foo = { - f_x:u32; - f_y:f_y: u32{f_y >. 3ul}; - f_z:f_z: u32{((f_y +! f_x <: u32) +! f_z <: u32) >. 3ul} -} - -let inlined_code__V: u8 = 12uy +let u32_max: u32 = 90000ul -let issue_844_ (v__x: u8) - : Prims.Pure u8 - Prims.l_True +/// A doc comment on `add3` +///another doc comment on add3 +let add3 (x y z: u32) + : Prims.Pure u32 + (requires x >. 10ul && y >. 10ul && z >. 10ul && ((x +! y <: u32) +! z <: u32) <. u32_max) (ensures - fun v__x_future -> - let v__x_future:u8 = v__x_future in - true) = v__x - -let u32_max: u32 = 90000ul + fun result -> + let result:u32 = result in + Hax_lib.implies true + (fun temp_0_ -> + let _:Prims.unit = temp_0_ in + result >. 32ul <: bool)) = (x +! y <: u32) +! z let swap_and_mut_req_ens (x y: u32) : Prims.Pure (u32 & u32 & u32) @@ -485,18 +482,13 @@ let swap_and_mut_req_ens (x y: u32) let hax_temp_output:u32 = x +! y in x, y, hax_temp_output <: (u32 & u32 & u32) -/// A doc comment on `add3` -///another doc comment on add3 -let add3 (x y z: u32) - : Prims.Pure u32 - (requires x >. 10ul && y >. 10ul && z >. 10ul && ((x +! y <: u32) +! z <: u32) <. u32_max) +let issue_844_ (v__x: u8) + : Prims.Pure u8 + Prims.l_True (ensures - fun result -> - let result:u32 = result in - Hax_lib.implies true - (fun temp_0_ -> - let _:Prims.unit = temp_0_ in - result >. 32ul <: bool)) = (x +! y <: u32) +! z + fun v__x_future -> + let v__x_future:u8 = v__x_future in + true) = v__x let add3_lemma (x: u32) : Lemma Prims.l_True @@ -504,6 +496,14 @@ let add3_lemma (x: u32) x <=. 10ul || x >=. (u32_max /! 3ul <: u32) || (add3 x x x <: u32) =. (x *! 3ul <: u32)) = () +type t_Foo = { + f_x:u32; + f_y:f_y: u32{f_y >. 3ul}; + f_z:f_z: u32{((f_y +! f_x <: u32) +! f_z <: u32) >. 3ul} +} + +let inlined_code__V: u8 = 12uy + let before_inlined_code = "example before" let inlined_code (foo: t_Foo) : Prims.unit = diff --git a/test-harness/src/snapshots/toolchain__constructor-as-closure into-fstar.snap b/test-harness/src/snapshots/toolchain__constructor-as-closure into-fstar.snap index 6f8919b71..57b89460f 100644 --- a/test-harness/src/snapshots/toolchain__constructor-as-closure into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__constructor-as-closure into-fstar.snap @@ -32,15 +32,15 @@ module Constructor_as_closure open Core open FStar.Mul -type t_Context = - | Context_A : i32 -> t_Context - | Context_B : i32 -> t_Context - type t_Test = | Test : i32 -> t_Test let impl__Test__test (x: Core.Option.t_Option i32) : Core.Option.t_Option t_Test = Core.Option.impl__map #i32 #t_Test x Test +type t_Context = + | Context_A : i32 -> t_Context + | Context_B : i32 -> t_Context + let impl__Context__test (x: Core.Option.t_Option i32) : Core.Option.t_Option t_Context = Core.Option.impl__map #i32 #t_Context x Context_B ''' diff --git a/test-harness/src/snapshots/toolchain__cyclic-modules into-fstar.snap b/test-harness/src/snapshots/toolchain__cyclic-modules into-fstar.snap index af07fc045..32b65dbc7 100644 --- a/test-harness/src/snapshots/toolchain__cyclic-modules into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__cyclic-modules into-fstar.snap @@ -122,32 +122,32 @@ module Cyclic_modules.Enums_a open Core open FStar.Mul -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {t_T240131830 as t_T} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {t_T240131830 as t_T} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T240131830_A as T_A} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T240131830_A as T_A} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T240131830_B as T_B} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T240131830_B as T_B} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T240131830_C as T_C} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T240131830_C as T_C} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T240131830_D as T_D} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T240131830_D as T_D} ''' -"Cyclic_modules.Enums_b.Rec_bundle_994866580.fst" = ''' -module Cyclic_modules.Enums_b.Rec_bundle_994866580 +"Cyclic_modules.Enums_b.Rec_bundle_902271266.fst" = ''' +module Cyclic_modules.Enums_b.Rec_bundle_902271266 #set-options "--fuel 0 --ifuel 1 --z3rlimit 15" open Core open FStar.Mul -type t_T366415196 = - | T366415196_A : t_T366415196 - | T366415196_B : t_T366415196 - | T366415196_C : Alloc.Vec.t_Vec t_T240131830 Alloc.Alloc.t_Global -> t_T366415196 - -and t_U = +type t_U = | U_A : t_U | U_B : t_U | U_C : Alloc.Vec.t_Vec t_T240131830 Alloc.Alloc.t_Global -> t_U +and t_T366415196 = + | T366415196_A : t_T366415196 + | T366415196_B : t_T366415196 + | T366415196_C : Alloc.Vec.t_Vec t_T240131830 Alloc.Alloc.t_Global -> t_T366415196 + and t_T240131830 = | T240131830_A : t_T240131830 | T240131830_B : t_T240131830 @@ -162,23 +162,23 @@ module Cyclic_modules.Enums_b open Core open FStar.Mul -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {t_T366415196 as t_T} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {t_U as t_U} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T366415196_A as T_A} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {U_A as U_A} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T366415196_B as T_B} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {U_B as U_B} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T366415196_C as T_C} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {U_C as U_C} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {t_U as t_U} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {t_T366415196 as t_T} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {U_A as U_A} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T366415196_A as T_A} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {U_B as U_B} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T366415196_B as T_B} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {U_C as U_C} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T366415196_C as T_C} -include Cyclic_modules.Enums_b.Rec_bundle_994866580 {f as f} +include Cyclic_modules.Enums_b.Rec_bundle_902271266 {f as f} ''' "Cyclic_modules.Late_skip_a.fst" = ''' module Cyclic_modules.Late_skip_a @@ -186,10 +186,10 @@ module Cyclic_modules.Late_skip_a open Core open FStar.Mul -include Cyclic_modules.Late_skip_b.Rec_bundle_447022631 {f749016415 as f} +include Cyclic_modules.Late_skip_b.Rec_bundle_862592093 {f749016415 as f} ''' -"Cyclic_modules.Late_skip_b.Rec_bundle_447022631.fst" = ''' -module Cyclic_modules.Late_skip_b.Rec_bundle_447022631 +"Cyclic_modules.Late_skip_b.Rec_bundle_862592093.fst" = ''' +module Cyclic_modules.Late_skip_b.Rec_bundle_862592093 #set-options "--fuel 0 --ifuel 1 --z3rlimit 15" open Core open FStar.Mul @@ -205,7 +205,7 @@ module Cyclic_modules.Late_skip_b open Core open FStar.Mul -include Cyclic_modules.Late_skip_b.Rec_bundle_447022631 {f377825240 as f} +include Cyclic_modules.Late_skip_b.Rec_bundle_862592093 {f377825240 as f} ''' "Cyclic_modules.M1.fst" = ''' module Cyclic_modules.M1 @@ -213,20 +213,20 @@ module Cyclic_modules.M1 open Core open FStar.Mul -include Cyclic_modules.M2.Rec_bundle_489499412 {a as a} +include Cyclic_modules.M2.Rec_bundle_423840416 {a as a} ''' -"Cyclic_modules.M2.Rec_bundle_489499412.fst" = ''' -module Cyclic_modules.M2.Rec_bundle_489499412 +"Cyclic_modules.M2.Rec_bundle_423840416.fst" = ''' +module Cyclic_modules.M2.Rec_bundle_423840416 #set-options "--fuel 0 --ifuel 1 --z3rlimit 15" open Core open FStar.Mul +let d (_: Prims.unit) : Prims.unit = () + let c (_: Prims.unit) : Prims.unit = () let a (_: Prims.unit) : Prims.unit = c () -let d (_: Prims.unit) : Prims.unit = () - let b (_: Prims.unit) : Prims.unit = let _:Prims.unit = a () in d () @@ -237,11 +237,11 @@ module Cyclic_modules.M2 open Core open FStar.Mul -include Cyclic_modules.M2.Rec_bundle_489499412 {c as c} +include Cyclic_modules.M2.Rec_bundle_423840416 {d as d} -include Cyclic_modules.M2.Rec_bundle_489499412 {d as d} +include Cyclic_modules.M2.Rec_bundle_423840416 {c as c} -include Cyclic_modules.M2.Rec_bundle_489499412 {b as b} +include Cyclic_modules.M2.Rec_bundle_423840416 {b as b} ''' "Cyclic_modules.Rec.fst" = ''' module Cyclic_modules.Rec diff --git a/test-harness/src/snapshots/toolchain__enum-repr into-coq.snap b/test-harness/src/snapshots/toolchain__enum-repr into-coq.snap index bfe3bcc0a..6209a1837 100644 --- a/test-harness/src/snapshots/toolchain__enum-repr into-coq.snap +++ b/test-harness/src/snapshots/toolchain__enum-repr into-coq.snap @@ -42,11 +42,7 @@ Import RecordSetNotations. -Definition discriminant_EnumWithRepr_ExplicitDiscr1 : t_u16 := - 1. - -Definition discriminant_EnumWithRepr_ExplicitDiscr2 : t_u16 := - 5. +(* NotImplementedYet *) Inductive t_EnumWithRepr : Type := | EnumWithRepr_ExplicitDiscr1 @@ -56,6 +52,12 @@ Inductive t_EnumWithRepr : Type := Arguments t_EnumWithRepr:clear implicits. Arguments t_EnumWithRepr. +Definition discriminant_EnumWithRepr_ExplicitDiscr1 : t_u16 := + 1. + +Definition discriminant_EnumWithRepr_ExplicitDiscr2 : t_u16 := + 5. + Definition t_EnumWithRepr_cast_to_repr (x : t_EnumWithRepr) : t_u16 := match x with | EnumWithRepr_ExplicitDiscr1 => @@ -68,8 +70,6 @@ Definition t_EnumWithRepr_cast_to_repr (x : t_EnumWithRepr) : t_u16 := t_Add_f_add (discriminant_EnumWithRepr_ExplicitDiscr2) (2) end. -(* NotImplementedYet *) - Definition f (_ : unit) : t_u32 := let v__x := cast (t_Add_f_add (discriminant_EnumWithRepr_ExplicitDiscr2) (0)) in t_Add_f_add (cast (t_EnumWithRepr_cast_to_repr (EnumWithRepr_ImplicitDiscrEmptyTuple))) (cast (t_EnumWithRepr_cast_to_repr (EnumWithRepr_ImplicitDiscrEmptyStruct))). @@ -77,9 +77,9 @@ Definition f (_ : unit) : t_u32 := Definition ff__CONST : t_u16 := cast (t_Add_f_add (discriminant_EnumWithRepr_ExplicitDiscr1) (0)). -Definition get_casted_repr (x : t_EnumWithRepr) : t_u64 := - cast (t_EnumWithRepr_cast_to_repr (x)). - Definition get_repr (x : t_EnumWithRepr) : t_u16 := t_EnumWithRepr_cast_to_repr (x). + +Definition get_casted_repr (x : t_EnumWithRepr) : t_u64 := + cast (t_EnumWithRepr_cast_to_repr (x)). ''' diff --git a/test-harness/src/snapshots/toolchain__enum-repr into-fstar.snap b/test-harness/src/snapshots/toolchain__enum-repr into-fstar.snap index 600085987..e9c50a747 100644 --- a/test-harness/src/snapshots/toolchain__enum-repr into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__enum-repr into-fstar.snap @@ -33,16 +33,16 @@ module Enum_repr open Core open FStar.Mul -let discriminant_EnumWithRepr_ExplicitDiscr1: u16 = 1us - -let discriminant_EnumWithRepr_ExplicitDiscr2: u16 = 5us - type t_EnumWithRepr = | EnumWithRepr_ExplicitDiscr1 : t_EnumWithRepr | EnumWithRepr_ExplicitDiscr2 : t_EnumWithRepr | EnumWithRepr_ImplicitDiscrEmptyTuple : t_EnumWithRepr | EnumWithRepr_ImplicitDiscrEmptyStruct : t_EnumWithRepr +let discriminant_EnumWithRepr_ExplicitDiscr1: u16 = 1us + +let discriminant_EnumWithRepr_ExplicitDiscr2: u16 = 5us + let t_EnumWithRepr_cast_to_repr (x: t_EnumWithRepr) : u16 = match x with | EnumWithRepr_ExplicitDiscr1 -> discriminant_EnumWithRepr_ExplicitDiscr1 @@ -64,7 +64,7 @@ let f (_: Prims.unit) : u32 = let ff__CONST: u16 = cast (discriminant_EnumWithRepr_ExplicitDiscr1 +! 0us <: u16) <: u16 -let get_casted_repr (x: t_EnumWithRepr) : u64 = cast (t_EnumWithRepr_cast_to_repr x <: u16) <: u64 - let get_repr (x: t_EnumWithRepr) : u16 = t_EnumWithRepr_cast_to_repr x + +let get_casted_repr (x: t_EnumWithRepr) : u64 = cast (t_EnumWithRepr_cast_to_repr x <: u16) <: u64 ''' diff --git a/test-harness/src/snapshots/toolchain__enum-repr into-ssprove.snap b/test-harness/src/snapshots/toolchain__enum-repr into-ssprove.snap index d1e4e4c09..613f21e5e 100644 --- a/test-harness/src/snapshots/toolchain__enum-repr into-ssprove.snap +++ b/test-harness/src/snapshots/toolchain__enum-repr into-ssprove.snap @@ -54,15 +54,7 @@ Import choice.Choice.Exports. Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. -Equations discriminant_EnumWithRepr_ExplicitDiscr1 {L : {fset Location}} {I : Interface} : both L I int16 := - discriminant_EnumWithRepr_ExplicitDiscr1 := - solve_lift (ret_both (1 : int16)) : both L I int16. -Fail Next Obligation. - -Equations discriminant_EnumWithRepr_ExplicitDiscr2 {L : {fset Location}} {I : Interface} : both L I int16 := - discriminant_EnumWithRepr_ExplicitDiscr2 := - solve_lift (ret_both (5 : int16)) : both L I int16. -Fail Next Obligation. +(*Not implemented yet? todo(item)*) Definition t_EnumWithRepr : choice_type := ('unit ∐ 'unit ∐ 'unit ∐ 'unit). @@ -87,6 +79,16 @@ Equations EnumWithRepr_ImplicitDiscrEmptyStruct {L : {fset Location}} {I : Inter solve_lift (ret_both (inr (tt : 'unit) : t_EnumWithRepr)) : both L I t_EnumWithRepr. Fail Next Obligation. +Equations discriminant_EnumWithRepr_ExplicitDiscr1 {L : {fset Location}} {I : Interface} : both L I int16 := + discriminant_EnumWithRepr_ExplicitDiscr1 := + solve_lift (ret_both (1 : int16)) : both L I int16. +Fail Next Obligation. + +Equations discriminant_EnumWithRepr_ExplicitDiscr2 {L : {fset Location}} {I : Interface} : both L I int16 := + discriminant_EnumWithRepr_ExplicitDiscr2 := + solve_lift (ret_both (5 : int16)) : both L I int16. +Fail Next Obligation. + Equations t_EnumWithRepr_cast_to_repr {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 t_EnumWithRepr) : both L1 I1 int16 := t_EnumWithRepr_cast_to_repr x := matchb x with @@ -101,8 +103,6 @@ Equations t_EnumWithRepr_cast_to_repr {L1 : {fset Location}} {I1 : Interface} (x end : both L1 I1 int16. Fail Next Obligation. -(*Not implemented yet? todo(item)*) - Equations f {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 int32 := f _ := letb v__x := cast_int (WS2 := _) (discriminant_EnumWithRepr_ExplicitDiscr2 .+ (ret_both (0 : int16))) in @@ -114,13 +114,13 @@ Equations ff__CONST {L : {fset Location}} {I : Interface} : both L I int16 := solve_lift (cast_int (WS2 := _) (discriminant_EnumWithRepr_ExplicitDiscr1 .+ (ret_both (0 : int16)))) : both L I int16. Fail Next Obligation. -Equations get_casted_repr {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 t_EnumWithRepr) : both L1 I1 int64 := - get_casted_repr x := - solve_lift (cast_int (WS2 := _) (t_EnumWithRepr_cast_to_repr x)) : both L1 I1 int64. -Fail Next Obligation. - Equations get_repr {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 t_EnumWithRepr) : both L1 I1 int16 := get_repr x := solve_lift (t_EnumWithRepr_cast_to_repr x) : both L1 I1 int16. Fail Next Obligation. + +Equations get_casted_repr {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 t_EnumWithRepr) : both L1 I1 int64 := + get_casted_repr x := + solve_lift (cast_int (WS2 := _) (t_EnumWithRepr_cast_to_repr x)) : both L1 I1 int64. +Fail Next Obligation. ''' diff --git a/test-harness/src/snapshots/toolchain__generics into-fstar.snap b/test-harness/src/snapshots/toolchain__generics into-fstar.snap index fa558e443..8f3ecf5e7 100644 --- a/test-harness/src/snapshots/toolchain__generics into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__generics into-fstar.snap @@ -43,26 +43,6 @@ module Generics open Core open FStar.Mul -let impl__Bar__inherent_impl_generics (#v_T: Type0) (v_N: usize) (x: t_Array v_T v_N) : Prims.unit = - () - -type t_Bar = | Bar : t_Bar - -class t_Foo (v_Self: Type0) = { - f_const_add_pre:v_N: usize -> v_Self -> Type0; - f_const_add_post:v_N: usize -> v_Self -> usize -> Type0; - f_const_add:v_N: usize -> x0: v_Self - -> Prims.Pure usize (f_const_add_pre v_N x0) (fun result -> f_const_add_post v_N x0 result) -} - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_Foo_for_usize: t_Foo usize = - { - f_const_add_pre = (fun (v_N: usize) (self: usize) -> true); - f_const_add_post = (fun (v_N: usize) (self: usize) (out: usize) -> true); - f_const_add = fun (v_N: usize) (self: usize) -> self +! v_N - } - let dup (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) @@ -73,6 +53,30 @@ let dup <: (v_T & v_T) +let foo (v_LEN: usize) (arr: t_Array usize v_LEN) : usize = + let acc:usize = v_LEN +! sz 9 in + let acc:usize = + Rust_primitives.Hax.Folds.fold_range (sz 0) + v_LEN + (fun acc temp_1_ -> + let acc:usize = acc in + let _:usize = temp_1_ in + true) + acc + (fun acc i -> + let acc:usize = acc in + let i:usize = i in + acc +! (arr.[ i ] <: usize) <: usize) + in + acc + +let repeat + (v_LEN: usize) + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Marker.t_Copy v_T) + (x: v_T) + : t_Array v_T v_LEN = Rust_primitives.Hax.repeat x v_LEN + let f (v_N x: usize) : usize = (v_N +! v_N <: usize) +! x let call_f (_: Prims.unit) : usize = (f (sz 10) (sz 3) <: usize) +! sz 3 @@ -110,27 +114,23 @@ let call_g (_: Prims.unit) : usize = usize) +! sz 3 -let foo (v_LEN: usize) (arr: t_Array usize v_LEN) : usize = - let acc:usize = v_LEN +! sz 9 in - let acc:usize = - Rust_primitives.Hax.Folds.fold_range (sz 0) - v_LEN - (fun acc temp_1_ -> - let acc:usize = acc in - let _:usize = temp_1_ in - true) - acc - (fun acc i -> - let acc:usize = acc in - let i:usize = i in - acc +! (arr.[ i ] <: usize) <: usize) - in - acc +class t_Foo (v_Self: Type0) = { + f_const_add_pre:v_N: usize -> v_Self -> Type0; + f_const_add_post:v_N: usize -> v_Self -> usize -> Type0; + f_const_add:v_N: usize -> x0: v_Self + -> Prims.Pure usize (f_const_add_pre v_N x0) (fun result -> f_const_add_post v_N x0 result) +} -let repeat - (v_LEN: usize) - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Marker.t_Copy v_T) - (x: v_T) - : t_Array v_T v_LEN = Rust_primitives.Hax.repeat x v_LEN +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_Foo_for_usize: t_Foo usize = + { + f_const_add_pre = (fun (v_N: usize) (self: usize) -> true); + f_const_add_post = (fun (v_N: usize) (self: usize) (out: usize) -> true); + f_const_add = fun (v_N: usize) (self: usize) -> self +! v_N + } + +type t_Bar = | Bar : t_Bar + +let impl__Bar__inherent_impl_generics (#v_T: Type0) (v_N: usize) (x: t_Array v_T v_N) : Prims.unit = + () ''' diff --git a/test-harness/src/snapshots/toolchain__guards into-coq.snap b/test-harness/src/snapshots/toolchain__guards into-coq.snap index abd2a3274..7755eb3aa 100644 --- a/test-harness/src/snapshots/toolchain__guards into-coq.snap +++ b/test-harness/src/snapshots/toolchain__guards into-coq.snap @@ -43,7 +43,7 @@ Import RecordSetNotations. (* NotImplementedYet *) -Definition equivalent (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := +Definition if_let_guard (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := match x with | Option_None => 0 @@ -59,8 +59,8 @@ Definition equivalent (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := | _ => Option_None end with - | Option_Some (y) => - y + | Option_Some (x) => + x | Option_None => match x with | Option_Some (Result_Err (y)) => @@ -71,25 +71,7 @@ Definition equivalent (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := end end. -Definition if_guard (x : t_Option ((t_i32))) : t_i32 := - match match x with - | Option_Some (v) => - match t_PartialOrd_f_gt (v) (0) with - | true => - Option_Some (v) - | _ => - Option_None - end - | _ => - Option_None - end with - | Option_Some (x) => - x - | Option_None => - 0 - end. - -Definition if_let_guard (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := +Definition equivalent (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := match x with | Option_None => 0 @@ -105,8 +87,8 @@ Definition if_let_guard (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 | _ => Option_None end with - | Option_Some (x) => - x + | Option_Some (y) => + y | Option_None => match x with | Option_Some (Result_Err (y)) => @@ -159,4 +141,22 @@ Definition multiple_guards (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i end end end. + +Definition if_guard (x : t_Option ((t_i32))) : t_i32 := + match match x with + | Option_Some (v) => + match t_PartialOrd_f_gt (v) (0) with + | true => + Option_Some (v) + | _ => + Option_None + end + | _ => + Option_None + end with + | Option_Some (x) => + x + | Option_None => + 0 + end. ''' diff --git a/test-harness/src/snapshots/toolchain__guards into-fstar.snap b/test-harness/src/snapshots/toolchain__guards into-fstar.snap index ff12f664a..d575e5eca 100644 --- a/test-harness/src/snapshots/toolchain__guards into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__guards into-fstar.snap @@ -32,7 +32,7 @@ module Guards open Core open FStar.Mul -let equivalent (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 = +let if_let_guard (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 = match x with | Core.Option.Option_None -> 0l | _ -> @@ -44,25 +44,13 @@ let equivalent (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 = | _ -> Core.Option.Option_None <: Core.Option.t_Option i32) | _ -> Core.Option.Option_None <: Core.Option.t_Option i32 with - | Core.Option.Option_Some y -> y + | Core.Option.Option_Some x -> x | Core.Option.Option_None -> match x with | Core.Option.Option_Some (Core.Result.Result_Err y) -> y | _ -> 1l -let if_guard (x: Core.Option.t_Option i32) : i32 = - match - match x with - | Core.Option.Option_Some v -> - (match v >. 0l with - | true -> Core.Option.Option_Some v <: Core.Option.t_Option i32 - | _ -> Core.Option.Option_None <: Core.Option.t_Option i32) - | _ -> Core.Option.Option_None <: Core.Option.t_Option i32 - with - | Core.Option.Option_Some x -> x - | Core.Option.Option_None -> 0l - -let if_let_guard (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 = +let equivalent (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 = match x with | Core.Option.Option_None -> 0l | _ -> @@ -74,7 +62,7 @@ let if_let_guard (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 | _ -> Core.Option.Option_None <: Core.Option.t_Option i32) | _ -> Core.Option.Option_None <: Core.Option.t_Option i32 with - | Core.Option.Option_Some x -> x + | Core.Option.Option_Some y -> y | Core.Option.Option_None -> match x with | Core.Option.Option_Some (Core.Result.Result_Err y) -> y @@ -107,4 +95,16 @@ let multiple_guards (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i match x with | Core.Option.Option_Some (Core.Result.Result_Err y) -> y | _ -> 1l + +let if_guard (x: Core.Option.t_Option i32) : i32 = + match + match x with + | Core.Option.Option_Some v -> + (match v >. 0l with + | true -> Core.Option.Option_Some v <: Core.Option.t_Option i32 + | _ -> Core.Option.Option_None <: Core.Option.t_Option i32) + | _ -> Core.Option.Option_None <: Core.Option.t_Option i32 + with + | Core.Option.Option_Some x -> x + | Core.Option.Option_None -> 0l ''' diff --git a/test-harness/src/snapshots/toolchain__guards into-ssprove.snap b/test-harness/src/snapshots/toolchain__guards into-ssprove.snap index 57b079118..a499287d3 100644 --- a/test-harness/src/snapshots/toolchain__guards into-ssprove.snap +++ b/test-harness/src/snapshots/toolchain__guards into-ssprove.snap @@ -55,8 +55,8 @@ Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. (*Not implemented yet? todo(item)*) -Equations equivalent {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option (t_Result int32 int32))) : both L1 I1 int32 := - equivalent x := +Equations if_let_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option (t_Result int32 int32))) : both L1 I1 int32 := + if_let_guard x := matchb x with | Option_None_case => solve_lift (ret_both (0 : int32)) @@ -74,9 +74,9 @@ Equations equivalent {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_ | _ => Option_None end with - | Option_Some_case y => - letb y := ret_both ((y) : (int32)) in - solve_lift y + | Option_Some_case x => + letb x := ret_both ((x) : (int32)) in + solve_lift x | Option_None_case => matchb x with | Option_Some_case Result_Err y => @@ -89,30 +89,8 @@ Equations equivalent {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_ end : both L1 I1 int32. Fail Next Obligation. -Equations if_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option int32)) : both L1 I1 int32 := - if_guard x := - matchb matchb x with - | Option_Some_case v => - letb v := ret_both ((v) : (int32)) in - matchb v >.? (ret_both (0 : int32)) with - | true => - Option_Some (solve_lift v) - | _ => - Option_None - end - | _ => - Option_None - end with - | Option_Some_case x => - letb x := ret_both ((x) : (int32)) in - solve_lift x - | Option_None_case => - solve_lift (ret_both (0 : int32)) - end : both L1 I1 int32. -Fail Next Obligation. - -Equations if_let_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option (t_Result int32 int32))) : both L1 I1 int32 := - if_let_guard x := +Equations equivalent {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option (t_Result int32 int32))) : both L1 I1 int32 := + equivalent x := matchb x with | Option_None_case => solve_lift (ret_both (0 : int32)) @@ -130,9 +108,9 @@ Equations if_let_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 ( | _ => Option_None end with - | Option_Some_case x => - letb x := ret_both ((x) : (int32)) in - solve_lift x + | Option_Some_case y => + letb y := ret_both ((y) : (int32)) in + solve_lift y | Option_None_case => matchb x with | Option_Some_case Result_Err y => @@ -196,4 +174,26 @@ Equations multiple_guards {L1 : {fset Location}} {I1 : Interface} (x : both L1 I end end : both L1 I1 int32. Fail Next Obligation. + +Equations if_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option int32)) : both L1 I1 int32 := + if_guard x := + matchb matchb x with + | Option_Some_case v => + letb v := ret_both ((v) : (int32)) in + matchb v >.? (ret_both (0 : int32)) with + | true => + Option_Some (solve_lift v) + | _ => + Option_None + end + | _ => + Option_None + end with + | Option_Some_case x => + letb x := ret_both ((x) : (int32)) in + solve_lift x + | Option_None_case => + solve_lift (ret_both (0 : int32)) + end : both L1 I1 int32. +Fail Next Obligation. ''' diff --git a/test-harness/src/snapshots/toolchain__include-flag into-coq.snap b/test-harness/src/snapshots/toolchain__include-flag into-coq.snap index c86f3b275..04abbc64e 100644 --- a/test-harness/src/snapshots/toolchain__include-flag into-coq.snap +++ b/test-harness/src/snapshots/toolchain__include-flag into-coq.snap @@ -41,6 +41,8 @@ Import RecordSetNotations. +(* NotImplementedYet *) + Record t_Foo : Type := { }. @@ -60,14 +62,24 @@ Instance t_Trait_254780795 : t_Trait ((t_Foo)) := { }. -(* NotImplementedYet *) - Definition main_a_a (_ : unit) : unit := tt. +Definition main_b_a (_ : unit) : unit := + tt. + +Definition main_c_a (_ : unit) : unit := + tt. + Definition main_a_b (_ : unit) : unit := tt. +Definition main_b_b (_ : unit) : unit := + tt. + +Definition main_c_b (_ : unit) : unit := + tt. + Definition main_a_c (_ : unit) : unit := tt. @@ -77,12 +89,6 @@ Definition main_a `{v_T : Type} `{t_Sized (v_T)} `{t_Trait (v_T)} (x : v_T) : un let _ := main_a_c (tt) in tt. -Definition main_b_a (_ : unit) : unit := - tt. - -Definition main_b_b (_ : unit) : unit := - tt. - Definition main_b_c (_ : unit) : unit := tt. @@ -92,12 +98,6 @@ Definition main_b (_ : unit) : unit := let _ := main_b_c (tt) in tt. -Definition main_c_a (_ : unit) : unit := - tt. - -Definition main_c_b (_ : unit) : unit := - tt. - Definition main_c_c (_ : unit) : unit := tt. diff --git a/test-harness/src/snapshots/toolchain__include-flag into-fstar.snap b/test-harness/src/snapshots/toolchain__include-flag into-fstar.snap index 41cd2ac28..de9402027 100644 --- a/test-harness/src/snapshots/toolchain__include-flag into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__include-flag into-fstar.snap @@ -42,8 +42,16 @@ let impl_Trait_for_Foo: t_Trait t_Foo = { __marker_trait = () } /// Indirect dependencies let main_a_a (_: Prims.unit) : Prims.unit = () +let main_b_a (_: Prims.unit) : Prims.unit = () + +let main_c_a (_: Prims.unit) : Prims.unit = () + let main_a_b (_: Prims.unit) : Prims.unit = () +let main_b_b (_: Prims.unit) : Prims.unit = () + +let main_c_b (_: Prims.unit) : Prims.unit = () + let main_a_c (_: Prims.unit) : Prims.unit = () /// Direct dependencies @@ -54,10 +62,6 @@ let main_a (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Trait let _:Prims.unit = main_a_c () in () -let main_b_a (_: Prims.unit) : Prims.unit = () - -let main_b_b (_: Prims.unit) : Prims.unit = () - let main_b_c (_: Prims.unit) : Prims.unit = () let main_b (_: Prims.unit) : Prims.unit = @@ -66,10 +70,6 @@ let main_b (_: Prims.unit) : Prims.unit = let _:Prims.unit = main_b_c () in () -let main_c_a (_: Prims.unit) : Prims.unit = () - -let main_c_b (_: Prims.unit) : Prims.unit = () - let main_c_c (_: Prims.unit) : Prims.unit = () let main_c (_: Prims.unit) : Prims.unit = diff --git a/test-harness/src/snapshots/toolchain__interface-only into-fstar.snap b/test-harness/src/snapshots/toolchain__interface-only into-fstar.snap index 9aaa938a6..7b58e61f3 100644 --- a/test-harness/src/snapshots/toolchain__interface-only into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__interface-only into-fstar.snap @@ -33,11 +33,20 @@ module Interface_only open Core open FStar.Mul -type t_Bar = | Bar : t_Bar - -type t_Holder (v_T: Type0) = { f_value:Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global } +/// This item contains unsafe blocks and raw references, two features +/// not supported by hax. Thanks to the `-i` flag and the `+:` +/// modifier, `f` is still extractable as an interface. +/// Expressions within type are still extracted, as well as pre- and +/// post-conditions. +val f (x: u8) + : Prims.Pure (t_Array u8 (sz 4)) + (requires x <. 254uy) + (ensures + fun r -> + let r:t_Array u8 (sz 4) = r in + (r.[ sz 0 ] <: u8) >. x) -type t_Param (v_SIZE: usize) = { f_value:t_Array u8 v_SIZE } +type t_Bar = | Bar : t_Bar /// Non-inherent implementations are extracted, their bodies are not /// dropped. This might be a bit surprising: see @@ -51,22 +60,13 @@ val impl_1:Core.Convert.t_From t_Bar u8 val from__from: u8 -> Prims.Pure t_Bar Prims.l_True (fun _ -> Prims.l_True) +type t_Holder (v_T: Type0) = { f_value:Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global } + [@@ FStar.Tactics.Typeclasses.tcinstance] val impl_2 (#v_T: Type0) : Core.Convert.t_From (t_Holder v_T) Prims.unit +type t_Param (v_SIZE: usize) = { f_value:t_Array u8 v_SIZE } + [@@ FStar.Tactics.Typeclasses.tcinstance] val impl_3 (v_SIZE: usize) : Core.Convert.t_From (t_Param v_SIZE) Prims.unit - -/// This item contains unsafe blocks and raw references, two features -/// not supported by hax. Thanks to the `-i` flag and the `+:` -/// modifier, `f` is still extractable as an interface. -/// Expressions within type are still extracted, as well as pre- and -/// post-conditions. -val f (x: u8) - : Prims.Pure (t_Array u8 (sz 4)) - (requires x <. 254uy) - (ensures - fun r -> - let r:t_Array u8 (sz 4) = r in - (r.[ sz 0 ] <: u8) >. x) ''' diff --git a/test-harness/src/snapshots/toolchain__literals into-coq.snap b/test-harness/src/snapshots/toolchain__literals into-coq.snap index 77d4150c3..f0b5dc23a 100644 --- a/test-harness/src/snapshots/toolchain__literals into-coq.snap +++ b/test-harness/src/snapshots/toolchain__literals into-coq.snap @@ -42,39 +42,10 @@ Import RecordSetNotations. -From Literals Require Import Hax_lib (t_int). -Export Hax_lib (t_int). - -Record t_Foo : Type := - { - f_field : t_u8; - }. -Arguments t_Foo:clear implicits. -Arguments t_Foo. -Arguments Build_t_Foo. -#[export] Instance settable_t_Foo : Settable _ := - settable! (@Build_t_Foo) . - (* NotImplementedYet *) -Definition v_CONSTANT : t_Foo := - Build_t_Foo (3). - -Definition casts (x8 : t_u8) (x16 : t_u16) (x32 : t_u32) (x64 : t_u64) (xs : t_usize) : unit := - let _ : t_u64 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (x64)) (cast (xs)) in - let _ : t_u32 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (x32)) (cast (x64))) (cast (xs)) in - let _ : t_u16 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (x16)) (cast (x32))) (cast (x64))) (cast (xs)) in - let _ : t_u8 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (x8) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in - let _ : t_i64 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in - let _ : t_i32 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in - let _ : t_i16 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in - let _ : t_i8 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in - tt. - -Definition fn_pointer_cast (_ : unit) : unit := - let f : t_u32 -> t_u32 := fun x => - x in - tt. +From Literals Require Import Hax_lib (t_int). +Export Hax_lib (t_int). Definition math_integers (x : t_Int) `{andb (f_gt (x) (impl__Int___unsafe_from_str ("0"%string))) (f_lt (x) (impl__Int___unsafe_from_str ("16"%string))) = true} : t_u8 := let _ : t_Int := f_lift (3) in @@ -100,6 +71,22 @@ Definition math_integers (x : t_Int) `{andb (f_gt (x) (impl__Int___unsafe_from_s let _ : t_usize := impl__Int__to_usize (x) in impl__Int__to_u8 (f_add (x) (f_mul (x) (x))). +Definition panic_with_msg (_ : unit) : unit := + never_to_any (panic_fmt (impl_2__new_const (["with msg"%string]))). + +Record t_Foo : Type := + { + f_field : t_u8; + }. +Arguments t_Foo:clear implicits. +Arguments t_Foo. +Arguments Build_t_Foo. +#[export] Instance settable_t_Foo : Settable _ := + settable! (@Build_t_Foo) . + +Definition v_CONSTANT : t_Foo := + Build_t_Foo (3). + Definition numeric (_ : unit) : unit := let _ : t_usize := 123 in let _ : t_isize := -42 in @@ -129,10 +116,23 @@ Definition patterns (_ : unit) : unit := end in tt. -Definition panic_with_msg (_ : unit) : unit := - never_to_any (panic_fmt (impl_2__new_const (["with msg"%string]))). +Definition casts (x8 : t_u8) (x16 : t_u16) (x32 : t_u32) (x64 : t_u64) (xs : t_usize) : unit := + let _ : t_u64 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (x64)) (cast (xs)) in + let _ : t_u32 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (x32)) (cast (x64))) (cast (xs)) in + let _ : t_u16 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (x16)) (cast (x32))) (cast (x64))) (cast (xs)) in + let _ : t_u8 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (x8) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in + let _ : t_i64 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in + let _ : t_i32 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in + let _ : t_i16 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in + let _ : t_i8 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in + tt. Definition empty_array (_ : unit) : unit := let _ : t_Slice t_u8 := unsize ([]) in tt. + +Definition fn_pointer_cast (_ : unit) : unit := + let f : t_u32 -> t_u32 := fun x => + x in + tt. ''' diff --git a/test-harness/src/snapshots/toolchain__literals into-fstar.snap b/test-harness/src/snapshots/toolchain__literals into-fstar.snap index f6c262b10..60e23edb4 100644 --- a/test-harness/src/snapshots/toolchain__literals into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__literals into-fstar.snap @@ -33,10 +33,86 @@ module Literals open Core open FStar.Mul +let math_integers (x: Hax_lib.Int.t_Int) + : Prims.Pure u8 + (requires x > (0 <: Hax_lib.Int.t_Int) && x < (16 <: Hax_lib.Int.t_Int)) + (fun _ -> Prims.l_True) = + let (_: Hax_lib.Int.t_Int):Hax_lib.Int.t_Int = Rust_primitives.Hax.Int.from_machine (sz 3) in + let _:bool = + ((-340282366920938463463374607431768211455000) <: Hax_lib.Int.t_Int) > + (340282366920938463463374607431768211455000 <: Hax_lib.Int.t_Int) + in + let _:bool = x < x in + let _:bool = x >= x in + let _:bool = x <= x in + let _:bool = x <> x in + let _:bool = x = x in + let _:Hax_lib.Int.t_Int = x + x in + let _:Hax_lib.Int.t_Int = x - x in + let _:Hax_lib.Int.t_Int = x * x in + let _:Hax_lib.Int.t_Int = x / x in + let (_: i16):i16 = Hax_lib.Int.impl__Int__to_i16 x in + let (_: i32):i32 = Hax_lib.Int.impl__Int__to_i32 x in + let (_: i64):i64 = Hax_lib.Int.impl__Int__to_i64 x in + let (_: i128):i128 = Hax_lib.Int.impl__Int__to_i128 x in + let (_: isize):isize = Hax_lib.Int.impl__Int__to_isize x in + let (_: u16):u16 = Hax_lib.Int.impl__Int__to_u16 x in + let (_: u32):u32 = Hax_lib.Int.impl__Int__to_u32 x in + let (_: u64):u64 = Hax_lib.Int.impl__Int__to_u64 x in + let (_: u128):u128 = Hax_lib.Int.impl__Int__to_u128 x in + let (_: usize):usize = Hax_lib.Int.impl__Int__to_usize x in + Hax_lib.Int.impl__Int__to_u8 (x + (x * x <: Hax_lib.Int.t_Int) <: Hax_lib.Int.t_Int) + +let panic_with_msg (_: Prims.unit) : Prims.unit = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_const (sz 1) + (let list = ["with msg"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + type t_Foo = { f_field:u8 } let v_CONSTANT: t_Foo = { f_field = 3uy } <: t_Foo +let numeric (_: Prims.unit) : Prims.unit = + let (_: usize):usize = sz 123 in + let (_: isize):isize = isz (-42) in + let (_: isize):isize = isz 42 in + let (_: i32):i32 = (-42l) in + let (_: u128):u128 = pub_u128 22222222222222222222 in + () + +let patterns (_: Prims.unit) : Prims.unit = + let _:Prims.unit = + match 1uy with + | 2uy -> () <: Prims.unit + | _ -> () <: Prims.unit + in + let _:Prims.unit = + match + "hello", + (123l, + (let list = ["a"; "b"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); + Rust_primitives.Hax.array_of_list 2 list) + <: + (i32 & t_Array string (sz 2))) + <: + (string & (i32 & t_Array string (sz 2))) + with + | "hello", (123l, v__todo) -> () <: Prims.unit + | _ -> () <: Prims.unit + in + let _:Prims.unit = + match { f_field = 4uy } <: t_Foo with + | { f_field = 3uy } -> () <: Prims.unit + | _ -> () <: Prims.unit + in + () + let casts (x8: u8) (x16: u16) (x32: u32) (x64: u64) (xs: usize) : Prims.unit = let (_: u64):u64 = ((((cast (x8 <: u8) <: u64) +! (cast (x16 <: u16) <: u64) <: u64) +! (cast (x32 <: u32) <: u64) @@ -106,87 +182,6 @@ let casts (x8: u8) (x16: u16) (x32: u32) (x64: u64) (xs: usize) : Prims.unit = in () -/// https://github.com/hacspec/hax/issues/500 -let fn_pointer_cast (_: Prims.unit) : Prims.unit = - let (f: (u32 -> u32)): u32 -> u32 = fun x -> x in - () - -let math_integers (x: Hax_lib.Int.t_Int) - : Prims.Pure u8 - (requires x > (0 <: Hax_lib.Int.t_Int) && x < (16 <: Hax_lib.Int.t_Int)) - (fun _ -> Prims.l_True) = - let (_: Hax_lib.Int.t_Int):Hax_lib.Int.t_Int = Rust_primitives.Hax.Int.from_machine (sz 3) in - let _:bool = - ((-340282366920938463463374607431768211455000) <: Hax_lib.Int.t_Int) > - (340282366920938463463374607431768211455000 <: Hax_lib.Int.t_Int) - in - let _:bool = x < x in - let _:bool = x >= x in - let _:bool = x <= x in - let _:bool = x <> x in - let _:bool = x = x in - let _:Hax_lib.Int.t_Int = x + x in - let _:Hax_lib.Int.t_Int = x - x in - let _:Hax_lib.Int.t_Int = x * x in - let _:Hax_lib.Int.t_Int = x / x in - let (_: i16):i16 = Hax_lib.Int.impl__Int__to_i16 x in - let (_: i32):i32 = Hax_lib.Int.impl__Int__to_i32 x in - let (_: i64):i64 = Hax_lib.Int.impl__Int__to_i64 x in - let (_: i128):i128 = Hax_lib.Int.impl__Int__to_i128 x in - let (_: isize):isize = Hax_lib.Int.impl__Int__to_isize x in - let (_: u16):u16 = Hax_lib.Int.impl__Int__to_u16 x in - let (_: u32):u32 = Hax_lib.Int.impl__Int__to_u32 x in - let (_: u64):u64 = Hax_lib.Int.impl__Int__to_u64 x in - let (_: u128):u128 = Hax_lib.Int.impl__Int__to_u128 x in - let (_: usize):usize = Hax_lib.Int.impl__Int__to_usize x in - Hax_lib.Int.impl__Int__to_u8 (x + (x * x <: Hax_lib.Int.t_Int) <: Hax_lib.Int.t_Int) - -let numeric (_: Prims.unit) : Prims.unit = - let (_: usize):usize = sz 123 in - let (_: isize):isize = isz (-42) in - let (_: isize):isize = isz 42 in - let (_: i32):i32 = (-42l) in - let (_: u128):u128 = pub_u128 22222222222222222222 in - () - -let patterns (_: Prims.unit) : Prims.unit = - let _:Prims.unit = - match 1uy with - | 2uy -> () <: Prims.unit - | _ -> () <: Prims.unit - in - let _:Prims.unit = - match - "hello", - (123l, - (let list = ["a"; "b"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); - Rust_primitives.Hax.array_of_list 2 list) - <: - (i32 & t_Array string (sz 2))) - <: - (string & (i32 & t_Array string (sz 2))) - with - | "hello", (123l, v__todo) -> () <: Prims.unit - | _ -> () <: Prims.unit - in - let _:Prims.unit = - match { f_field = 4uy } <: t_Foo with - | { f_field = 3uy } -> () <: Prims.unit - | _ -> () <: Prims.unit - in - () - -let panic_with_msg (_: Prims.unit) : Prims.unit = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_const (sz 1) - (let list = ["with msg"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - let empty_array (_: Prims.unit) : Prims.unit = let (_: t_Slice u8):t_Slice u8 = (let list:Prims.list u8 = [] in @@ -196,4 +191,9 @@ let empty_array (_: Prims.unit) : Prims.unit = t_Slice u8 in () + +/// https://github.com/hacspec/hax/issues/500 +let fn_pointer_cast (_: Prims.unit) : Prims.unit = + let (f: (u32 -> u32)): u32 -> u32 = fun x -> x in + () ''' diff --git a/test-harness/src/snapshots/toolchain__loops into-fstar.snap b/test-harness/src/snapshots/toolchain__loops into-fstar.snap index 2c35945ca..ab5457375 100644 --- a/test-harness/src/snapshots/toolchain__loops into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__loops into-fstar.snap @@ -33,80 +33,6 @@ module Loops.Control_flow open Core open FStar.Mul -type t_M = { f_m:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global } - -let impl__M__decoded_message (self: t_M) - : Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = - match - Rust_primitives.Hax.Folds.fold_range_return (sz 0) - (Alloc.Vec.impl_1__len #u8 #Alloc.Alloc.t_Global self.f_m <: usize) - (fun temp_0_ temp_1_ -> - let _:Prims.unit = temp_0_ in - let _:usize = temp_1_ in - true) - () - (fun temp_0_ i -> - let _:Prims.unit = temp_0_ in - let i:usize = i in - if i >. sz 5 <: bool - then - Core.Ops.Control_flow.ControlFlow_Break - (Core.Ops.Control_flow.ControlFlow_Break - (Core.Option.Option_None - <: - Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - <: - Core.Ops.Control_flow.t_ControlFlow - (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - (Prims.unit & Prims.unit)) - <: - Core.Ops.Control_flow.t_ControlFlow - (Core.Ops.Control_flow.t_ControlFlow - (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - (Prims.unit & Prims.unit)) Prims.unit - else - Core.Ops.Control_flow.ControlFlow_Continue () - <: - Core.Ops.Control_flow.t_ControlFlow - (Core.Ops.Control_flow.t_ControlFlow - (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - (Prims.unit & Prims.unit)) Prims.unit) - with - | Core.Ops.Control_flow.ControlFlow_Break ret -> ret - | Core.Ops.Control_flow.ControlFlow_Continue _ -> - Core.Option.Option_Some - (Core.Clone.f_clone #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - #FStar.Tactics.Typeclasses.solve - self.f_m) - <: - Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - -let bigger_power_2_ (x: i32) : i32 = - let pow:i32 = 1l in - Rust_primitives.f_while_loop_cf (fun pow -> - let pow:i32 = pow in - pow <. 1000000l <: bool) - pow - (fun pow -> - let pow:i32 = pow in - let pow:i32 = pow *! 2l in - if pow <. x - then - let pow:i32 = pow *! 3l in - if true - then - Core.Ops.Control_flow.ControlFlow_Break ((), pow <: (Prims.unit & i32)) - <: - Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32 - else - Core.Ops.Control_flow.ControlFlow_Continue (pow *! 2l) - <: - Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32 - else - Core.Ops.Control_flow.ControlFlow_Continue (pow *! 2l) - <: - Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32) - let double_sum (_: Prims.unit) : i32 = let sum:i32 = 0l in let sum:i32 = @@ -160,6 +86,36 @@ let double_sum2 (_: Prims.unit) : i32 = in sum +! sum2 +let double_sum_return (v: t_Slice i32) : i32 = + let sum:i32 = 0l in + match + Rust_primitives.Hax.f_fold_return (Core.Iter.Traits.Collect.f_into_iter #(t_Slice i32) + #FStar.Tactics.Typeclasses.solve + v + <: + Core.Slice.Iter.t_Iter i32) + sum + (fun sum i -> + let sum:i32 = sum in + let i:i32 = i in + if i <. 0l <: bool + then + Core.Ops.Control_flow.ControlFlow_Break + (Core.Ops.Control_flow.ControlFlow_Break 0l + <: + Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) + <: + Core.Ops.Control_flow.t_ControlFlow + (Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) i32 + else + Core.Ops.Control_flow.ControlFlow_Continue (sum +! i <: i32) + <: + Core.Ops.Control_flow.t_ControlFlow + (Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) i32) + with + | Core.Ops.Control_flow.ControlFlow_Break ret -> ret + | Core.Ops.Control_flow.ControlFlow_Continue sum -> sum *! 2l + let double_sum2_return (v: t_Slice i32) : i32 = let sum:i32 = 0l in let sum2:i32 = 0l in @@ -192,35 +148,79 @@ let double_sum2_return (v: t_Slice i32) : i32 = | Core.Ops.Control_flow.ControlFlow_Break ret -> ret | Core.Ops.Control_flow.ControlFlow_Continue (sum, sum2) -> sum +! sum2 -let double_sum_return (v: t_Slice i32) : i32 = - let sum:i32 = 0l in +let bigger_power_2_ (x: i32) : i32 = + let pow:i32 = 1l in + Rust_primitives.f_while_loop_cf (fun pow -> + let pow:i32 = pow in + pow <. 1000000l <: bool) + pow + (fun pow -> + let pow:i32 = pow in + let pow:i32 = pow *! 2l in + if pow <. x + then + let pow:i32 = pow *! 3l in + if true + then + Core.Ops.Control_flow.ControlFlow_Break ((), pow <: (Prims.unit & i32)) + <: + Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32 + else + Core.Ops.Control_flow.ControlFlow_Continue (pow *! 2l) + <: + Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32 + else + Core.Ops.Control_flow.ControlFlow_Continue (pow *! 2l) + <: + Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32) + +type t_M = { f_m:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global } + +let impl__M__decoded_message (self: t_M) + : Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = match - Rust_primitives.Hax.f_fold_return (Core.Iter.Traits.Collect.f_into_iter #(t_Slice i32) - #FStar.Tactics.Typeclasses.solve - v - <: - Core.Slice.Iter.t_Iter i32) - sum - (fun sum i -> - let sum:i32 = sum in - let i:i32 = i in - if i <. 0l <: bool + Rust_primitives.Hax.Folds.fold_range_return (sz 0) + (Alloc.Vec.impl_1__len #u8 #Alloc.Alloc.t_Global self.f_m <: usize) + (fun temp_0_ temp_1_ -> + let _:Prims.unit = temp_0_ in + let _:usize = temp_1_ in + true) + () + (fun temp_0_ i -> + let _:Prims.unit = temp_0_ in + let i:usize = i in + if i >. sz 5 <: bool then Core.Ops.Control_flow.ControlFlow_Break - (Core.Ops.Control_flow.ControlFlow_Break 0l + (Core.Ops.Control_flow.ControlFlow_Break + (Core.Option.Option_None + <: + Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) <: - Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) + Core.Ops.Control_flow.t_ControlFlow + (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + (Prims.unit & Prims.unit)) <: Core.Ops.Control_flow.t_ControlFlow - (Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) i32 + (Core.Ops.Control_flow.t_ControlFlow + (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + (Prims.unit & Prims.unit)) Prims.unit else - Core.Ops.Control_flow.ControlFlow_Continue (sum +! i <: i32) + Core.Ops.Control_flow.ControlFlow_Continue () <: Core.Ops.Control_flow.t_ControlFlow - (Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) i32) + (Core.Ops.Control_flow.t_ControlFlow + (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + (Prims.unit & Prims.unit)) Prims.unit) with | Core.Ops.Control_flow.ControlFlow_Break ret -> ret - | Core.Ops.Control_flow.ControlFlow_Continue sum -> sum *! 2l + | Core.Ops.Control_flow.ControlFlow_Continue _ -> + Core.Option.Option_Some + (Core.Clone.f_clone #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + #FStar.Tactics.Typeclasses.solve + self.f_m) + <: + Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) let nested (_: Prims.unit) : i32 = let sum:i32 = 0l in @@ -324,7 +324,94 @@ module Loops.For_loops open Core open FStar.Mul -let bool_returning (x: u8) : bool = x <. 10uy +let range1 (_: Prims.unit) : usize = + let acc:usize = sz 0 in + let acc:usize = + Rust_primitives.Hax.Folds.fold_range (sz 0) + (sz 15) + (fun acc temp_1_ -> + let acc:usize = acc in + let _:usize = temp_1_ in + true) + acc + (fun acc i -> + let acc:usize = acc in + let i:usize = i in + acc +! i <: usize) + in + acc + +let range2 (n: usize) : usize = + let acc:usize = sz 0 in + let acc:usize = + Rust_primitives.Hax.Folds.fold_range (sz 0) + (n +! sz 10 <: usize) + (fun acc temp_1_ -> + let acc:usize = acc in + let _:usize = temp_1_ in + true) + acc + (fun acc i -> + let acc:usize = acc in + let i:usize = i in + (acc +! i <: usize) +! sz 1 <: usize) + in + acc + +let composed_range (n: usize) : usize = + let acc:usize = sz 0 in + let acc:usize = + Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Chain.t_Chain + (Core.Ops.Range.t_Range usize) (Core.Ops.Range.t_Range usize)) + #FStar.Tactics.Typeclasses.solve + (Core.Iter.Traits.Iterator.f_chain #(Core.Ops.Range.t_Range usize) + #FStar.Tactics.Typeclasses.solve + #(Core.Ops.Range.t_Range usize) + ({ Core.Ops.Range.f_start = sz 0; Core.Ops.Range.f_end = n } + <: + Core.Ops.Range.t_Range usize) + ({ + Core.Ops.Range.f_start = n +! sz 10 <: usize; + Core.Ops.Range.f_end = n +! sz 50 <: usize + } + <: + Core.Ops.Range.t_Range usize) + <: + Core.Iter.Adapters.Chain.t_Chain (Core.Ops.Range.t_Range usize) + (Core.Ops.Range.t_Range usize)) + <: + Core.Iter.Adapters.Chain.t_Chain (Core.Ops.Range.t_Range usize) + (Core.Ops.Range.t_Range usize)) + acc + (fun acc i -> + let acc:usize = acc in + let i:usize = i in + (acc +! i <: usize) +! sz 1 <: usize) + in + acc + +let rev_range (n: usize) : usize = + let acc:usize = sz 0 in + let acc:usize = + Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Rev.t_Rev + (Core.Ops.Range.t_Range usize)) + #FStar.Tactics.Typeclasses.solve + (Core.Iter.Traits.Iterator.f_rev #(Core.Ops.Range.t_Range usize) + #FStar.Tactics.Typeclasses.solve + ({ Core.Ops.Range.f_start = sz 0; Core.Ops.Range.f_end = n } + <: + Core.Ops.Range.t_Range usize) + <: + Core.Iter.Adapters.Rev.t_Rev (Core.Ops.Range.t_Range usize)) + <: + Core.Iter.Adapters.Rev.t_Rev (Core.Ops.Range.t_Range usize)) + acc + (fun acc i -> + let acc:usize = acc in + let i:usize = i in + (acc +! i <: usize) +! sz 1 <: usize) + in + acc let chunks (v_CHUNK_LEN: usize) (arr: Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) : usize = let acc:usize = sz 0 in @@ -382,94 +469,6 @@ let chunks (v_CHUNK_LEN: usize) (arr: Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global in acc -let composed_range (n: usize) : usize = - let acc:usize = sz 0 in - let acc:usize = - Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Chain.t_Chain - (Core.Ops.Range.t_Range usize) (Core.Ops.Range.t_Range usize)) - #FStar.Tactics.Typeclasses.solve - (Core.Iter.Traits.Iterator.f_chain #(Core.Ops.Range.t_Range usize) - #FStar.Tactics.Typeclasses.solve - #(Core.Ops.Range.t_Range usize) - ({ Core.Ops.Range.f_start = sz 0; Core.Ops.Range.f_end = n } - <: - Core.Ops.Range.t_Range usize) - ({ - Core.Ops.Range.f_start = n +! sz 10 <: usize; - Core.Ops.Range.f_end = n +! sz 50 <: usize - } - <: - Core.Ops.Range.t_Range usize) - <: - Core.Iter.Adapters.Chain.t_Chain (Core.Ops.Range.t_Range usize) - (Core.Ops.Range.t_Range usize)) - <: - Core.Iter.Adapters.Chain.t_Chain (Core.Ops.Range.t_Range usize) - (Core.Ops.Range.t_Range usize)) - acc - (fun acc i -> - let acc:usize = acc in - let i:usize = i in - (acc +! i <: usize) +! sz 1 <: usize) - in - acc - -let enumerate_chunks (arr: Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) : usize = - let acc:usize = sz 0 in - let acc:usize = - Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Enumerate.t_Enumerate - (Core.Slice.Iter.t_Chunks usize)) - #FStar.Tactics.Typeclasses.solve - (Core.Iter.Traits.Iterator.f_enumerate #(Core.Slice.Iter.t_Chunks usize) - #FStar.Tactics.Typeclasses.solve - (Core.Slice.impl__chunks #usize - (Core.Ops.Deref.f_deref #(Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) - #FStar.Tactics.Typeclasses.solve - arr - <: - t_Slice usize) - (sz 4) - <: - Core.Slice.Iter.t_Chunks usize) - <: - Core.Iter.Adapters.Enumerate.t_Enumerate (Core.Slice.Iter.t_Chunks usize)) - <: - Core.Iter.Adapters.Enumerate.t_Enumerate (Core.Slice.Iter.t_Chunks usize)) - acc - (fun acc temp_1_ -> - let acc:usize = acc in - let i, chunk:(usize & t_Slice usize) = temp_1_ in - Rust_primitives.Hax.Folds.fold_enumerated_slice chunk - (fun acc temp_1_ -> - let acc:usize = acc in - let _:usize = temp_1_ in - true) - acc - (fun acc temp_1_ -> - let acc:usize = acc in - let j, x:(usize & usize) = temp_1_ in - (i +! j <: usize) +! x <: usize) - <: - usize) - in - acc - -let f (_: Prims.unit) : u8 = - let acc:u8 = 0uy in - Rust_primitives.Hax.Folds.fold_range 1uy - 10uy - (fun acc temp_1_ -> - let acc:u8 = acc in - let _:u8 = temp_1_ in - true) - acc - (fun acc i -> - let acc:u8 = acc in - let i:u8 = i in - let acc:u8 = acc +! i in - let _:bool = bool_returning i in - acc) - let iterator (arr: Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) : usize = let acc:usize = sz 0 in let acc:usize = @@ -581,62 +580,63 @@ let pattern (arr: Alloc.Vec.t_Vec (usize & usize) Alloc.Alloc.t_Global) : usize in acc -let range1 (_: Prims.unit) : usize = - let acc:usize = sz 0 in - let acc:usize = - Rust_primitives.Hax.Folds.fold_range (sz 0) - (sz 15) - (fun acc temp_1_ -> - let acc:usize = acc in - let _:usize = temp_1_ in - true) - acc - (fun acc i -> - let acc:usize = acc in - let i:usize = i in - acc +! i <: usize) - in - acc - -let range2 (n: usize) : usize = - let acc:usize = sz 0 in - let acc:usize = - Rust_primitives.Hax.Folds.fold_range (sz 0) - (n +! sz 10 <: usize) - (fun acc temp_1_ -> - let acc:usize = acc in - let _:usize = temp_1_ in - true) - acc - (fun acc i -> - let acc:usize = acc in - let i:usize = i in - (acc +! i <: usize) +! sz 1 <: usize) - in - acc - -let rev_range (n: usize) : usize = +let enumerate_chunks (arr: Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) : usize = let acc:usize = sz 0 in let acc:usize = - Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Rev.t_Rev - (Core.Ops.Range.t_Range usize)) + Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Enumerate.t_Enumerate + (Core.Slice.Iter.t_Chunks usize)) #FStar.Tactics.Typeclasses.solve - (Core.Iter.Traits.Iterator.f_rev #(Core.Ops.Range.t_Range usize) + (Core.Iter.Traits.Iterator.f_enumerate #(Core.Slice.Iter.t_Chunks usize) #FStar.Tactics.Typeclasses.solve - ({ Core.Ops.Range.f_start = sz 0; Core.Ops.Range.f_end = n } + (Core.Slice.impl__chunks #usize + (Core.Ops.Deref.f_deref #(Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) + #FStar.Tactics.Typeclasses.solve + arr + <: + t_Slice usize) + (sz 4) <: - Core.Ops.Range.t_Range usize) + Core.Slice.Iter.t_Chunks usize) <: - Core.Iter.Adapters.Rev.t_Rev (Core.Ops.Range.t_Range usize)) + Core.Iter.Adapters.Enumerate.t_Enumerate (Core.Slice.Iter.t_Chunks usize)) <: - Core.Iter.Adapters.Rev.t_Rev (Core.Ops.Range.t_Range usize)) + Core.Iter.Adapters.Enumerate.t_Enumerate (Core.Slice.Iter.t_Chunks usize)) acc - (fun acc i -> + (fun acc temp_1_ -> let acc:usize = acc in - let i:usize = i in - (acc +! i <: usize) +! sz 1 <: usize) + let i, chunk:(usize & t_Slice usize) = temp_1_ in + Rust_primitives.Hax.Folds.fold_enumerated_slice chunk + (fun acc temp_1_ -> + let acc:usize = acc in + let _:usize = temp_1_ in + true) + acc + (fun acc temp_1_ -> + let acc:usize = acc in + let j, x:(usize & usize) = temp_1_ in + (i +! j <: usize) +! x <: usize) + <: + usize) in acc + +let bool_returning (x: u8) : bool = x <. 10uy + +let f (_: Prims.unit) : u8 = + let acc:u8 = 0uy in + Rust_primitives.Hax.Folds.fold_range 1uy + 10uy + (fun acc temp_1_ -> + let acc:u8 = acc in + let _:u8 = temp_1_ in + true) + acc + (fun acc i -> + let acc:u8 = acc in + let i:u8 = i in + let acc:u8 = acc +! i in + let _:bool = bool_returning i in + acc) ''' "Loops.Recognized_loops.fst" = ''' module Loops.Recognized_loops @@ -644,64 +644,64 @@ module Loops.Recognized_loops open Core open FStar.Mul -let enumerated_chunked_slice (#v_T: Type0) (slice: t_Slice v_T) : u64 = +let range (_: Prims.unit) : u64 = let count:u64 = 0uL in - Rust_primitives.Hax.Folds.fold_enumerated_chunked_slice (sz 3) - slice + Rust_primitives.Hax.Folds.fold_range 0uy + 10uy (fun count i -> let count:u64 = count in - let i:usize = i in - i <= Core.Slice.impl__len #v_T slice) + let i:u8 = i in + i <=. 10uy <: bool) count (fun count i -> let count:u64 = count in - let i:(usize & t_Slice v_T) = i in - let count:u64 = count +! 3uL in + let i:u8 = i in + let count:u64 = count +! 1uL in count) -let enumerated_slice (#v_T: Type0) (slice: t_Slice v_T) : u64 = +let range_step_by (_: Prims.unit) : u64 = let count:u64 = 0uL in - Rust_primitives.Hax.Folds.fold_enumerated_slice slice + Rust_primitives.Hax.Folds.fold_range_step_by 0uy + 10uy + (sz 2) (fun count i -> let count:u64 = count in - let i:usize = i in - i <=. sz 10 <: bool) + let i:u8 = i in + i <=. 10uy <: bool) count (fun count i -> let count:u64 = count in - let i:(usize & v_T) = i in - let count:u64 = count +! 2uL in + let i:u8 = i in + let count:u64 = count +! 1uL in count) -let range (_: Prims.unit) : u64 = +let enumerated_slice (#v_T: Type0) (slice: t_Slice v_T) : u64 = let count:u64 = 0uL in - Rust_primitives.Hax.Folds.fold_range 0uy - 10uy + Rust_primitives.Hax.Folds.fold_enumerated_slice slice (fun count i -> let count:u64 = count in - let i:u8 = i in - i <=. 10uy <: bool) + let i:usize = i in + i <=. sz 10 <: bool) count (fun count i -> let count:u64 = count in - let i:u8 = i in - let count:u64 = count +! 1uL in + let i:(usize & v_T) = i in + let count:u64 = count +! 2uL in count) -let range_step_by (_: Prims.unit) : u64 = +let enumerated_chunked_slice (#v_T: Type0) (slice: t_Slice v_T) : u64 = let count:u64 = 0uL in - Rust_primitives.Hax.Folds.fold_range_step_by 0uy - 10uy - (sz 2) + Rust_primitives.Hax.Folds.fold_enumerated_chunked_slice (sz 3) + slice (fun count i -> let count:u64 = count in - let i:u8 = i in - i <=. 10uy <: bool) + let i:usize = i in + i <= Core.Slice.impl__len #v_T slice) count (fun count i -> let count:u64 = count in - let i:u8 = i in - let count:u64 = count +! 1uL in + let i:(usize & t_Slice v_T) = i in + let count:u64 = count +! 3uL in count) ''' "Loops.While_loops.fst" = ''' diff --git a/test-harness/src/snapshots/toolchain__mut-ref-functionalization into-fstar.snap b/test-harness/src/snapshots/toolchain__mut-ref-functionalization into-fstar.snap index fee5eaadb..f1ffe9f82 100644 --- a/test-harness/src/snapshots/toolchain__mut-ref-functionalization into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__mut-ref-functionalization into-fstar.snap @@ -32,102 +32,8 @@ module Mut_ref_functionalization open Core open FStar.Mul -type t_Bar = { - f_a:u8; - f_b:u8 -} - -type t_Foo = { f_field:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global } - -class t_FooTrait (v_Self: Type0) = { - f_z_pre:v_Self -> Type0; - f_z_post:v_Self -> v_Self -> Type0; - f_z:x0: v_Self -> Prims.Pure v_Self (f_z_pre x0) (fun result -> f_z_post x0 result) -} - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_FooTrait_for_Foo: t_FooTrait t_Foo = - { - f_z_pre = (fun (self: t_Foo) -> true); - f_z_post = (fun (self: t_Foo) (out: t_Foo) -> true); - f_z = fun (self: t_Foo) -> self - } - -type t_Pair (v_T: Type0) = { - f_a:v_T; - f_b:t_Foo -} - type t_S = { f_b:t_Array u8 (sz 5) } -let impl__S__update (self: t_S) (x: u8) : t_S = - let self:t_S = - { - self with - f_b = Rust_primitives.Hax.Monomorphized_update_at.update_at_usize self.f_b (sz 0) x - } - <: - t_S - in - self - -let array (x: t_Array u8 (sz 10)) : t_Array u8 (sz 10) = - let x:t_Array u8 (sz 10) = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize x (sz 1) (x.[ sz 2 ] <: u8) - in - x - -let f (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Alloc.Vec.impl__new #u8 () in - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global vec 1uy - in - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global vec 2uy - in - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Core.Slice.impl__swap #u8 vec (sz 0) (sz 1) in - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Core.Slice.impl__swap #u8 vec (sz 0) (sz 1) in - vec - -let h (x: u8) : u8 = - let x:u8 = x +! 10uy in - x - -let i (bar: t_Bar) : (t_Bar & u8) = - let bar:t_Bar = { bar with f_b = bar.f_b +! bar.f_a } <: t_Bar in - let bar:t_Bar = { bar with f_a = h bar.f_a } <: t_Bar in - let hax_temp_output:u8 = bar.f_a +! bar.f_b in - bar, hax_temp_output <: (t_Bar & u8) - -let j (x: t_Bar) : (t_Bar & u8) = - let out:u8 = 123uy in - let tmp0, out1:(t_Bar & u8) = i x in - let x:t_Bar = tmp0 in - let hax_temp_output:u8 = out1 +! out in - x, hax_temp_output <: (t_Bar & u8) - -let k - (vec: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - (arg_1_wild3: u16) - (arg_1_wild: u8) - (arg_3_wild2: Prims.unit) - : (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global & u16 & Prims.unit & u64) = - let arg_1_wild2:u8 = vec.[ sz 1 ] in - let arg_3_wild:u8 = vec.[ sz 2 ] in - let arg_1_wild1:u8 = vec.[ sz 3 ] in - let arg_3_wild1:u8 = vec.[ sz 4 ] in - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize vec - (sz 0) - ((((arg_1_wild +! arg_3_wild <: u8) +! arg_1_wild1 <: u8) +! arg_3_wild1 <: u8) +! arg_1_wild - <: - u8) - in - let hax_temp_output:u64 = 12345uL in - vec, arg_1_wild3, arg_3_wild2, hax_temp_output - <: - (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global & u16 & Prims.unit & u64) - let foo (lhs rhs: t_S) : t_S = let lhs:t_S = Rust_primitives.Hax.Folds.fold_range (sz 0) @@ -155,56 +61,16 @@ let foo (lhs rhs: t_S) : t_S = in lhs -let g (x: t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = - Rust_primitives.Hax.Folds.fold_range 1uy - 10uy - (fun x temp_1_ -> - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in - let _:u8 = temp_1_ in - true) - x - (fun x i -> - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in - let i:u8 = i in - { - x with - f_a - = - Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global x.f_a i - <: - Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global - } - <: - t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - in - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = - { x with f_a = Core.Slice.impl__swap #u8 x.f_a (sz 0) (sz 1) } - <: - t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - in - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = +let impl__S__update (self: t_S) (x: u8) : t_S = + let self:t_S = { - x with - f_b = { x.f_b with f_field = Core.Slice.impl__swap #u8 x.f_b.f_field (sz 0) (sz 1) } <: t_Foo + self with + f_b = Rust_primitives.Hax.Monomorphized_update_at.update_at_usize self.f_b (sz 0) x } <: - t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + t_S in - x.f_a - -let build_vec (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - Alloc.Slice.impl__into_vec #u8 - #Alloc.Alloc.t_Global - (Rust_primitives.unsize (Rust_primitives.Hax.box_new (let list = [1uy; 2uy; 3uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 3); - Rust_primitives.Hax.array_of_list 3 list) - <: - Alloc.Boxed.t_Box (t_Array u8 (sz 3)) Alloc.Alloc.t_Global) - <: - Alloc.Boxed.t_Box (t_Slice u8) Alloc.Alloc.t_Global) + self let index_mutation (x: Core.Ops.Range.t_Range usize) (a: t_Slice u8) : Prims.unit = let v:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = @@ -250,6 +116,17 @@ let index_mutation_unsize (x: t_Array u8 (sz 12)) : u8 = in 42uy +let build_vec (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + Alloc.Slice.impl__into_vec #u8 + #Alloc.Alloc.t_Global + (Rust_primitives.unsize (Rust_primitives.Hax.box_new (let list = [1uy; 2uy; 3uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 3); + Rust_primitives.Hax.array_of_list 3 list) + <: + Alloc.Boxed.t_Box (t_Array u8 (sz 3)) Alloc.Alloc.t_Global) + <: + Alloc.Boxed.t_Box (t_Slice u8) Alloc.Alloc.t_Global) + let test_append (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = let vec1:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Alloc.Vec.impl__new #u8 () in let vec2:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = @@ -277,4 +154,127 @@ let test_append (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = (build_vec () <: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) in vec1 + +let f (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Alloc.Vec.impl__new #u8 () in + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global vec 1uy + in + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global vec 2uy + in + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Core.Slice.impl__swap #u8 vec (sz 0) (sz 1) in + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Core.Slice.impl__swap #u8 vec (sz 0) (sz 1) in + vec + +type t_Foo = { f_field:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global } + +type t_Pair (v_T: Type0) = { + f_a:v_T; + f_b:t_Foo +} + +let g (x: t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = + Rust_primitives.Hax.Folds.fold_range 1uy + 10uy + (fun x temp_1_ -> + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in + let _:u8 = temp_1_ in + true) + x + (fun x i -> + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in + let i:u8 = i in + { + x with + f_a + = + Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global x.f_a i + <: + Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global + } + <: + t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + in + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = + { x with f_a = Core.Slice.impl__swap #u8 x.f_a (sz 0) (sz 1) } + <: + t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + in + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = + { + x with + f_b = { x.f_b with f_field = Core.Slice.impl__swap #u8 x.f_b.f_field (sz 0) (sz 1) } <: t_Foo + } + <: + t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + in + x.f_a + +let h (x: u8) : u8 = + let x:u8 = x +! 10uy in + x + +type t_Bar = { + f_a:u8; + f_b:u8 +} + +let i (bar: t_Bar) : (t_Bar & u8) = + let bar:t_Bar = { bar with f_b = bar.f_b +! bar.f_a } <: t_Bar in + let bar:t_Bar = { bar with f_a = h bar.f_a } <: t_Bar in + let hax_temp_output:u8 = bar.f_a +! bar.f_b in + bar, hax_temp_output <: (t_Bar & u8) + +let j (x: t_Bar) : (t_Bar & u8) = + let out:u8 = 123uy in + let tmp0, out1:(t_Bar & u8) = i x in + let x:t_Bar = tmp0 in + let hax_temp_output:u8 = out1 +! out in + x, hax_temp_output <: (t_Bar & u8) + +let k + (vec: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + (arg_1_wild3: u16) + (arg_1_wild: u8) + (arg_3_wild2: Prims.unit) + : (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global & u16 & Prims.unit & u64) = + let arg_1_wild2:u8 = vec.[ sz 1 ] in + let arg_3_wild:u8 = vec.[ sz 2 ] in + let arg_1_wild1:u8 = vec.[ sz 3 ] in + let arg_3_wild1:u8 = vec.[ sz 4 ] in + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize vec + (sz 0) + ((((arg_1_wild +! arg_3_wild <: u8) +! arg_1_wild1 <: u8) +! arg_3_wild1 <: u8) +! arg_1_wild + <: + u8) + in + let hax_temp_output:u64 = 12345uL in + vec, arg_1_wild3, arg_3_wild2, hax_temp_output + <: + (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global & u16 & Prims.unit & u64) + +class t_FooTrait (v_Self: Type0) = { + f_z_pre:v_Self -> Type0; + f_z_post:v_Self -> v_Self -> Type0; + f_z:x0: v_Self -> Prims.Pure v_Self (f_z_pre x0) (fun result -> f_z_post x0 result) +} + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_FooTrait_for_Foo: t_FooTrait t_Foo = + { + f_z_pre = (fun (self: t_Foo) -> true); + f_z_post = (fun (self: t_Foo) (out: t_Foo) -> true); + f_z = fun (self: t_Foo) -> self + } + +let array (x: t_Array u8 (sz 10)) : t_Array u8 (sz 10) = + let x:t_Array u8 (sz 10) = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize x (sz 1) (x.[ sz 2 ] <: u8) + in + x ''' diff --git a/test-harness/src/snapshots/toolchain__naming into-fstar.snap b/test-harness/src/snapshots/toolchain__naming into-fstar.snap index f25ae1575..903e5db34 100644 --- a/test-harness/src/snapshots/toolchain__naming into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__naming into-fstar.snap @@ -94,41 +94,46 @@ module Naming open Core open FStar.Mul -type t_Arity1 (v_T: Type0) = | Arity1 : v_T -> t_Arity1 v_T - -type t_B = | B : t_B - -let impl__B__f (self: t_B) : t_B = B <: t_B - -type t_C = { f_x:usize } - type t_Foo = | Foo_A : t_Foo | Foo_B { f_x:usize }: t_Foo -let impl__Foo__f (self: t_Foo) : t_Foo = Foo_A <: t_Foo - type t_Foo2 = | Foo2_A : t_Foo2 | Foo2_B { f_x:usize }: t_Foo2 -class t_FooTrait (v_Self: Type0) = { f_ASSOCIATED_CONSTANT:usize } +type t_B = | B : t_B + +type t_C = { f_x:usize } + +type t_X = | X : t_X + +let mk_c (_: Prims.unit) : t_C = + let _:t_Foo = Foo_B ({ Naming.Foo.f_x = sz 3 }) <: t_Foo in + let _:t_X = X <: t_X in + { f_x = sz 3 } <: t_C + +let impl__Foo__f (self: t_Foo) : t_Foo = Foo_A <: t_Foo + +let impl__B__f (self: t_B) : t_B = B <: t_B type t_Foobar = { f_a:t_Foo } -type t_StructA = { f_a:usize } +let ff__g (_: Prims.unit) : Prims.unit = () -type t_StructB = { - f_a:usize; - f_b:usize -} +let ff__g__impl__g (self: t_B) : usize = sz 0 -type t_StructC = { f_a:usize } +type t_f__g__impl__g__Foo = + | C_f__g__impl__g__Foo_A : t_f__g__impl__g__Foo + | C_f__g__impl__g__Foo_B { f_x:usize }: t_f__g__impl__g__Foo -type t_StructD = { - f_a:usize; - f_b:usize -} +let ff__g__impl_1__g (self: t_Foo) : usize = sz 1 + +let f (x: t_Foobar) : usize = ff__g__impl_1__g x.f_a + +let reserved_names (v_val v_noeq v_of: u8) : u8 = (v_val +! v_noeq <: u8) +! v_of + +type t_Arity1 (v_T: Type0) = | Arity1 : v_T -> t_Arity1 v_T class t_T1 (v_Self: Type0) = { __marker_trait_t_T1:Prims.unit } @@ -149,16 +154,19 @@ class t_T3_e_for_a (v_Self: Type0) = { __marker_trait_t_T3_e_for_a:Prims.unit } [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_T3_e_e_for_a_for_Foo: t_T3_e_for_a t_Foo = { __marker_trait = () } -type t_X = | X : t_X +type t_StructA = { f_a:usize } -let v_INHERENT_CONSTANT: usize = sz 3 +type t_StructB = { + f_a:usize; + f_b:usize +} -let constants - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_FooTrait v_T) - (_: Prims.unit) - : usize = - (f_ASSOCIATED_CONSTANT #FStar.Tactics.Typeclasses.solve <: usize) +! v_INHERENT_CONSTANT +type t_StructC = { f_a:usize } + +type t_StructD = { + f_a:usize; + f_b:usize +} let construct_structs (a b: usize) : Prims.unit = let _:t_StructA = { f_a = a } <: t_StructA in @@ -167,24 +175,16 @@ let construct_structs (a b: usize) : Prims.unit = let _:t_StructD = { f_a = a; f_b = b } <: t_StructD in () -let ff__g (_: Prims.unit) : Prims.unit = () - -let ff__g__impl__g (self: t_B) : usize = sz 0 - -type t_f__g__impl__g__Foo = - | C_f__g__impl__g__Foo_A : t_f__g__impl__g__Foo - | C_f__g__impl__g__Foo_B { f_x:usize }: t_f__g__impl__g__Foo - -let ff__g__impl_1__g (self: t_Foo) : usize = sz 1 - -let f (x: t_Foobar) : usize = ff__g__impl_1__g x.f_a +let v_INHERENT_CONSTANT: usize = sz 3 -let mk_c (_: Prims.unit) : t_C = - let _:t_Foo = Foo_B ({ Naming.Foo.f_x = sz 3 }) <: t_Foo in - let _:t_X = X <: t_X in - { f_x = sz 3 } <: t_C +class t_FooTrait (v_Self: Type0) = { f_ASSOCIATED_CONSTANT:usize } -let reserved_names (v_val v_noeq v_of: u8) : u8 = (v_val +! v_noeq <: u8) +! v_of +let constants + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_FooTrait v_T) + (_: Prims.unit) + : usize = + (f_ASSOCIATED_CONSTANT #FStar.Tactics.Typeclasses.solve <: usize) +! v_INHERENT_CONSTANT /// From issue https://github.com/hacspec/hax/issues/839 let string_shadows (v_string n: string) : Prims.unit = () diff --git a/test-harness/src/snapshots/toolchain__pattern-or into-coq.snap b/test-harness/src/snapshots/toolchain__pattern-or into-coq.snap index f4b3cbfe0..470b72517 100644 --- a/test-harness/src/snapshots/toolchain__pattern-or into-coq.snap +++ b/test-harness/src/snapshots/toolchain__pattern-or into-coq.snap @@ -42,6 +42,8 @@ Import RecordSetNotations. +(* NotImplementedYet *) + Inductive t_E : Type := | E_A | E_B. @@ -56,8 +58,6 @@ Definition t_E_cast_to_repr (x : t_E) : t_isize := 1 end. -(* NotImplementedYet *) - Definition bar (x : t_E) : unit := match x with | E_A @@ -65,6 +65,17 @@ Definition bar (x : t_E) : unit := tt end. +Definition nested (x : t_Option ((t_i32))) : t_i32 := + match x with + | Option_Some (1 + | 2) => + 1 + | Option_Some (x) => + x + | Option_None => + 0 + end. + Definition deep (x : (t_i32*t_Option ((t_i32)))) : t_i32 := match x with | (1 @@ -75,18 +86,6 @@ Definition deep (x : (t_i32*t_Option ((t_i32)))) : t_i32 := x end. -Definition deep_capture (x : t_Result (((t_i32*t_i32))) (((t_i32*t_i32)))) : t_i32 := - match x with - | Result_Ok ((1 - | 2,x)) - | Result_Err ((3 - | 4,x)) => - x - | Result_Ok ((x,_)) - | Result_Err ((x,_)) => - x - end. - Definition equivalent (x : (t_i32*t_Option ((t_i32)))) : t_i32 := match x with | (1,Option_Some (3)) @@ -98,14 +97,15 @@ Definition equivalent (x : (t_i32*t_Option ((t_i32)))) : t_i32 := x end. -Definition nested (x : t_Option ((t_i32))) : t_i32 := +Definition deep_capture (x : t_Result (((t_i32*t_i32))) (((t_i32*t_i32)))) : t_i32 := match x with - | Option_Some (1 - | 2) => - 1 - | Option_Some (x) => + | Result_Ok ((1 + | 2,x)) + | Result_Err ((3 + | 4,x)) => + x + | Result_Ok ((x,_)) + | Result_Err ((x,_)) => x - | Option_None => - 0 end. ''' diff --git a/test-harness/src/snapshots/toolchain__pattern-or into-fstar.snap b/test-harness/src/snapshots/toolchain__pattern-or into-fstar.snap index 9fdc477aa..16d56d8f9 100644 --- a/test-harness/src/snapshots/toolchain__pattern-or into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__pattern-or into-fstar.snap @@ -44,6 +44,12 @@ let t_E_cast_to_repr (x: t_E) : isize = let bar (x: t_E) : Prims.unit = match x with | E_A | E_B -> () <: Prims.unit +let nested (x: Core.Option.t_Option i32) : i32 = + match x with + | Core.Option.Option_Some 1l | Core.Option.Option_Some 2l -> 1l + | Core.Option.Option_Some x -> x + | Core.Option.Option_None -> 0l + let deep (x: (i32 & Core.Option.t_Option i32)) : i32 = match x with | 1l, Core.Option.Option_Some 3l @@ -52,14 +58,6 @@ let deep (x: (i32 & Core.Option.t_Option i32)) : i32 = | 2l, Core.Option.Option_Some 4l -> 0l | x, _ -> x -let deep_capture (x: Core.Result.t_Result (i32 & i32) (i32 & i32)) : i32 = - match x with - | Core.Result.Result_Ok (1l, x) - | Core.Result.Result_Ok (2l, x) - | Core.Result.Result_Err (3l, x) - | Core.Result.Result_Err (4l, x) -> x - | Core.Result.Result_Ok (x, _) | Core.Result.Result_Err (x, _) -> x - let equivalent (x: (i32 & Core.Option.t_Option i32)) : i32 = match x with | 1l, Core.Option.Option_Some 3l @@ -68,9 +66,11 @@ let equivalent (x: (i32 & Core.Option.t_Option i32)) : i32 = | 2l, Core.Option.Option_Some 4l -> 0l | x, _ -> x -let nested (x: Core.Option.t_Option i32) : i32 = +let deep_capture (x: Core.Result.t_Result (i32 & i32) (i32 & i32)) : i32 = match x with - | Core.Option.Option_Some 1l | Core.Option.Option_Some 2l -> 1l - | Core.Option.Option_Some x -> x - | Core.Option.Option_None -> 0l + | Core.Result.Result_Ok (1l, x) + | Core.Result.Result_Ok (2l, x) + | Core.Result.Result_Err (3l, x) + | Core.Result.Result_Err (4l, x) -> x + | Core.Result.Result_Ok (x, _) | Core.Result.Result_Err (x, _) -> x ''' diff --git a/test-harness/src/snapshots/toolchain__reordering into-coq.snap b/test-harness/src/snapshots/toolchain__reordering into-coq.snap index d3b0567d8..4890d697f 100644 --- a/test-harness/src/snapshots/toolchain__reordering into-coq.snap +++ b/test-harness/src/snapshots/toolchain__reordering into-coq.snap @@ -41,12 +41,23 @@ Import RecordSetNotations. +(* NotImplementedYet *) + +Definition no_dependency_1_ (_ : unit) : unit := + tt. + +Definition no_dependency_2_ (_ : unit) : unit := + tt. + Inductive t_Foo : Type := | Foo_A | Foo_B. Arguments t_Foo:clear implicits. Arguments t_Foo. +Definition f (_ : t_u32) : t_Foo := + Foo_A. + Record t_Bar : Type := { 0 : t_Foo; @@ -57,6 +68,9 @@ Arguments Build_t_Bar. #[export] Instance settable_t_Bar : Settable _ := settable! (@Build_t_Bar) <0>. +Definition g (_ : unit) : t_Bar := + Build_t_Bar (f (32)). + Definition t_Foo_cast_to_repr (x : t_Foo) : t_isize := match x with | Foo_A => @@ -66,16 +80,83 @@ Definition t_Foo_cast_to_repr (x : t_Foo) : t_isize := end. (* NotImplementedYet *) +''' +"Reordering_No_alpha_sorting.v" = ''' +(* File automatically generated by Hacspec *) +From Coq Require Import ZArith. +Require Import List. +Import List.ListNotations. +Open Scope Z_scope. +Open Scope bool_scope. +Require Import Ascii. +Require Import String. +Require Import Coq.Floats.Floats. +From RecordUpdate Require Import RecordSet. +Import RecordSetNotations. -Definition f (_ : t_u32) : t_Foo := - Foo_A. +Definition u01 (_ : unit) : unit := + tt. -Definition g (_ : unit) : t_Bar := - Build_t_Bar (f (32)). +Definition r02 (_ : unit) : unit := + tt. -Definition no_dependency_1_ (_ : unit) : unit := +Definition b03 (_ : unit) : unit := tt. -Definition no_dependency_2_ (_ : unit) : unit := +Definition f04 (_ : unit) : unit := + tt. + +Definition h05 (_ : unit) : unit := + tt. + +Definition i06 (_ : unit) : unit := + tt. + +Definition c07 (_ : unit) : unit := + tt. + +Definition k08 (_ : unit) : unit := + tt. + +Definition d09 (_ : unit) : unit := + tt. + +Definition e10 (_ : unit) : unit := + tt. + +Definition g11 (_ : unit) : unit := + tt. + +Definition j12 (_ : unit) : unit := + tt. + +Definition o13 (_ : unit) : unit := + tt. + +Definition a14 (_ : unit) : unit := + tt. + +Definition q15 (_ : unit) : unit := + tt. + +Definition m16 (_ : unit) : unit := + tt. + +Definition l17 (_ : unit) : unit := + tt. + +Definition n18 (_ : unit) : unit := + tt. + +Definition v19 (_ : unit) : unit := + tt. + +Definition s20 (_ : unit) : unit := + tt. + +Definition p21 (_ : unit) : unit := + tt. + +Definition t22 (_ : unit) : unit := tt. ''' diff --git a/test-harness/src/snapshots/toolchain__reordering into-fstar.snap b/test-harness/src/snapshots/toolchain__reordering into-fstar.snap index 385642dd2..dec2f94bb 100644 --- a/test-harness/src/snapshots/toolchain__reordering into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__reordering into-fstar.snap @@ -26,28 +26,78 @@ exit = 0 diagnostics = [] [stdout.files] +"Reordering.No_alpha_sorting.fst" = ''' +module Reordering.No_alpha_sorting +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +let u01 (_: Prims.unit) : Prims.unit = () + +let r02 (_: Prims.unit) : Prims.unit = () + +let b03 (_: Prims.unit) : Prims.unit = () + +let f04 (_: Prims.unit) : Prims.unit = () + +let h05 (_: Prims.unit) : Prims.unit = () + +let i06 (_: Prims.unit) : Prims.unit = () + +let c07 (_: Prims.unit) : Prims.unit = () + +let k08 (_: Prims.unit) : Prims.unit = () + +let d09 (_: Prims.unit) : Prims.unit = () + +let e10 (_: Prims.unit) : Prims.unit = () + +let g11 (_: Prims.unit) : Prims.unit = () + +let j12 (_: Prims.unit) : Prims.unit = () + +let o13 (_: Prims.unit) : Prims.unit = () + +let a14 (_: Prims.unit) : Prims.unit = () + +let q15 (_: Prims.unit) : Prims.unit = () + +let m16 (_: Prims.unit) : Prims.unit = () + +let l17 (_: Prims.unit) : Prims.unit = () + +let n18 (_: Prims.unit) : Prims.unit = () + +let v19 (_: Prims.unit) : Prims.unit = () + +let s20 (_: Prims.unit) : Prims.unit = () + +let p21 (_: Prims.unit) : Prims.unit = () + +let t22 (_: Prims.unit) : Prims.unit = () +''' "Reordering.fst" = ''' module Reordering #set-options "--fuel 0 --ifuel 1 --z3rlimit 15" open Core open FStar.Mul +let no_dependency_1_ (_: Prims.unit) : Prims.unit = () + +let no_dependency_2_ (_: Prims.unit) : Prims.unit = () + type t_Foo = | Foo_A : t_Foo | Foo_B : t_Foo +let f (_: u32) : t_Foo = Foo_A <: t_Foo + type t_Bar = | Bar : t_Foo -> t_Bar +let g (_: Prims.unit) : t_Bar = Bar (f 32ul) <: t_Bar + let t_Foo_cast_to_repr (x: t_Foo) : isize = match x with | Foo_A -> isz 0 | Foo_B -> isz 1 - -let f (_: u32) : t_Foo = Foo_A <: t_Foo - -let g (_: Prims.unit) : t_Bar = Bar (f 32ul) <: t_Bar - -let no_dependency_1_ (_: Prims.unit) : Prims.unit = () - -let no_dependency_2_ (_: Prims.unit) : Prims.unit = () ''' diff --git a/test-harness/src/snapshots/toolchain__reordering into-ssprove.snap b/test-harness/src/snapshots/toolchain__reordering into-ssprove.snap index b6655f747..884bc8a78 100644 --- a/test-harness/src/snapshots/toolchain__reordering into-ssprove.snap +++ b/test-harness/src/snapshots/toolchain__reordering into-ssprove.snap @@ -53,6 +53,18 @@ Import choice.Choice.Exports. Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. +(*Not implemented yet? todo(item)*) + +Equations no_dependency_1_ {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + no_dependency_1_ _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations no_dependency_2_ {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + no_dependency_2_ _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + Definition t_Foo : choice_type := ('unit ∐ 'unit). Notation "'Foo_A_case'" := (inl tt) (at level 100). @@ -66,6 +78,11 @@ Equations Foo_B {L : {fset Location}} {I : Interface} : both L I t_Foo := solve_lift (ret_both (inr (tt : 'unit) : t_Foo)) : both L I t_Foo. Fail Next Obligation. +Equations f {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 int32) : both L1 I1 t_Foo := + f _ := + Foo_A : both L1 I1 t_Foo. +Fail Next Obligation. + Definition t_Bar : choice_type := (t_Foo). Equations 0 {L : {fset Location}} {I : Interface} (s : both L I t_Bar) : both L I t_Foo := @@ -80,6 +97,11 @@ Equations Build_t_Bar {L0 : {fset Location}} {I0 : Interface} {0 : both L0 I0 t_ Fail Next Obligation. Notation "'Build_t_Bar' '[' x ']' '(' '0' ':=' y ')'" := (Build_t_Bar (0 := y)). +Equations g {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 t_Bar := + g _ := + Bar (solve_lift (f (ret_both (32 : int32)))) : both L1 I1 t_Bar. +Fail Next Obligation. + Equations t_Foo_cast_to_repr {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 t_Foo) : both L1 I1 uint_size := t_Foo_cast_to_repr x := matchb x with @@ -91,24 +113,141 @@ Equations t_Foo_cast_to_repr {L1 : {fset Location}} {I1 : Interface} (x : both L Fail Next Obligation. (*Not implemented yet? todo(item)*) +''' +"Reordering_No_alpha_sorting.v" = ''' +(* File automatically generated by Hacspec *) +Set Warnings "-notation-overridden,-ambiguous-paths". +From Crypt Require Import choice_type Package Prelude. +Import PackageNotation. +From extructures Require Import ord fset. +From mathcomp Require Import word_ssrZ word. +From Jasmin Require Import word. -Equations f {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 int32) : both L1 I1 t_Foo := - f _ := - Foo_A : both L1 I1 t_Foo. +From Coq Require Import ZArith. +From Coq Require Import Strings.String. +Import List.ListNotations. +Open Scope list_scope. +Open Scope Z_scope. +Open Scope bool_scope. + +From Hacspec Require Import ChoiceEquality. +From Hacspec Require Import LocationUtility. +From Hacspec Require Import Hacspec_Lib_Comparable. +From Hacspec Require Import Hacspec_Lib_Pre. +From Hacspec Require Import Hacspec_Lib. + +Open Scope hacspec_scope. +Import choice.Choice.Exports. + +Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. + +Equations u01 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + u01 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. Fail Next Obligation. -Equations g {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 t_Bar := - g _ := - Bar (solve_lift (f (ret_both (32 : int32)))) : both L1 I1 t_Bar. +Equations r02 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + r02 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. Fail Next Obligation. -Equations no_dependency_1_ {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - no_dependency_1_ _ := +Equations b03 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + b03 _ := solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. Fail Next Obligation. -Equations no_dependency_2_ {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - no_dependency_2_ _ := +Equations f04 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + f04 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations h05 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + h05 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations i06 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + i06 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations c07 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + c07 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations k08 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + k08 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations d09 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + d09 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations e10 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + e10 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations g11 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + g11 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations j12 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + j12 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations o13 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + o13 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations a14 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + a14 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations q15 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + q15 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations m16 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + m16 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations l17 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + l17 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations n18 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + n18 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations v19 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + v19 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations s20 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + s20 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations p21 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + p21 _ := + solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Fail Next Obligation. + +Equations t22 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + t22 _ := solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. Fail Next Obligation. ''' diff --git a/test-harness/src/snapshots/toolchain__side-effects into-fstar.snap b/test-harness/src/snapshots/toolchain__side-effects into-fstar.snap index a2038278d..08362b003 100644 --- a/test-harness/src/snapshots/toolchain__side-effects into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__side-effects into-fstar.snap @@ -72,8 +72,8 @@ let test (x y: Core.Option.t_Option i32) : Core.Option.t_Option i32 = (fun i -> let i:i32 = i in match y with - | Core.Option.Option_Some hoist1 -> - Core.Option.Option_Some (i +! hoist1 <: i32) <: Core.Option.t_Option i32 + | Core.Option.Option_Some hoist38 -> + Core.Option.Option_Some (i +! hoist38 <: i32) <: Core.Option.t_Option i32 | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option i32) with | Core.Option.Option_Some some -> some @@ -85,150 +85,10 @@ module Side_effects open Core open FStar.Mul -type t_A = | A : t_A - -type t_B = | B : t_B - -type t_Bar = { - f_a:bool; - f_b:(t_Array (bool & bool) (sz 6) & bool) -} - -type t_Foo = { - f_x:bool; - f_y:(bool & Alloc.Vec.t_Vec t_Bar Alloc.Alloc.t_Global); - f_z:t_Array t_Bar (sz 6); - f_bar:t_Bar -} - /// Helper function let add3 (x y z: u32) : u32 = Core.Num.impl__u32__wrapping_add (Core.Num.impl__u32__wrapping_add x y <: u32) z -/// Test assignation on non-trivial places -let assign_non_trivial_lhs (foo: t_Foo) : t_Foo = - let foo:t_Foo = { foo with f_x = true } <: t_Foo in - let foo:t_Foo = { foo with f_bar = { foo.f_bar with f_a = true } <: t_Bar } <: t_Foo in - let foo:t_Foo = - { - foo with - f_bar - = - { - foo.f_bar with - f_b - = - { - foo.f_bar.f_b with - _1 - = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_bar.f_b._1 - (sz 3) - ({ (foo.f_bar.f_b._1.[ sz 3 ] <: (bool & bool)) with _2 = true } <: (bool & bool)) - } - <: - (t_Array (bool & bool) (sz 6) & bool) - } - <: - t_Bar - } - <: - t_Foo - in - let foo:t_Foo = - { - foo with - f_z - = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_z - (sz 3) - ({ (foo.f_z.[ sz 3 ] <: t_Bar) with f_a = true } <: t_Bar) - } - <: - t_Foo - in - let foo:t_Foo = - { - foo with - f_y - = - { - foo.f_y with - _2 - = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_y._2 - (sz 3) - ({ - (foo.f_y._2.[ sz 3 ] <: t_Bar) with - f_b - = - { - (foo.f_y._2.[ sz 3 ] <: t_Bar).f_b with - _1 - = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize (foo.f_y._2.[ sz 3 ] - <: - t_Bar) - .f_b - ._1 - (sz 5) - ({ - ((foo.f_y._2.[ sz 3 ] <: t_Bar).f_b._1.[ sz 5 ] <: (bool & bool)) with - _1 = true - } - <: - (bool & bool)) - <: - t_Array (bool & bool) (sz 6) - } - <: - (t_Array (bool & bool) (sz 6) & bool) - } - <: - t_Bar) - } - <: - (bool & Alloc.Vec.t_Vec t_Bar Alloc.Alloc.t_Global) - } - <: - t_Foo - in - foo - -/// Question mark without error coercion -let direct_result_question_mark (y: Core.Result.t_Result Prims.unit u32) - : Core.Result.t_Result i8 u32 = - match y with - | Core.Result.Result_Ok _ -> Core.Result.Result_Ok 0y <: Core.Result.t_Result i8 u32 - | Core.Result.Result_Err err -> Core.Result.Result_Err err <: Core.Result.t_Result i8 u32 - -/// Question mark with an error coercion -let direct_result_question_mark_coercion (y: Core.Result.t_Result i8 u16) - : Core.Result.t_Result i8 u32 = - match y with - | Core.Result.Result_Ok hoist5 -> Core.Result.Result_Ok hoist5 <: Core.Result.t_Result i8 u32 - | Core.Result.Result_Err err -> - Core.Result.Result_Err (Core.Convert.f_from #u32 #u16 #FStar.Tactics.Typeclasses.solve err) - <: - Core.Result.t_Result i8 u32 - -/// Exercise early returns with control flow and loops -let early_returns (x: u32) : u32 = - if x >. 3ul - then 0ul - else - if x >. 30ul - then - match true with - | true -> 34ul - | _ -> - let x, hoist9:(u32 & u32) = x, 3ul <: (u32 & u32) in - Core.Num.impl__u32__wrapping_add (Core.Num.impl__u32__wrapping_add 123ul hoist9 <: u32) x - else - let x:u32 = x +! 9ul in - let x, hoist9:(u32 & u32) = x, x +! 1ul <: (u32 & u32) in - Core.Num.impl__u32__wrapping_add (Core.Num.impl__u32__wrapping_add 123ul hoist9 <: u32) x - /// Exercise local mutation with control flow and loops let local_mutation (x: u32) : u32 = let y:u32 = 0ul in @@ -255,7 +115,7 @@ let local_mutation (x: u32) : u32 = in Core.Num.impl__u32__wrapping_add x y else - let (x, y), hoist19:((u32 & u32) & u32) = + let (x, y), hoist7:((u32 & u32) & u32) = match x with | 12ul -> let y:u32 = Core.Num.impl__u32__wrapping_add x y in @@ -267,47 +127,97 @@ let local_mutation (x: u32) : u32 = ((u32 & u32) & u32) | _ -> (x, y <: (u32 & u32)), 0ul <: ((u32 & u32) & u32) in - let x:u32 = hoist19 in + let x:u32 = hoist7 in Core.Num.impl__u32__wrapping_add x y -/// Combine `?` and early return -let monad_lifting (x: u8) : Core.Result.t_Result t_A t_B = - if x >. 123uy +/// Exercise early returns with control flow and loops +let early_returns (x: u32) : u32 = + if x >. 3ul + then 0ul + else + if x >. 30ul + then + match true with + | true -> 34ul + | _ -> + let x, hoist11:(u32 & u32) = x, 3ul <: (u32 & u32) in + Core.Num.impl__u32__wrapping_add (Core.Num.impl__u32__wrapping_add 123ul hoist11 <: u32) x + else + let x:u32 = x +! 9ul in + let x, hoist11:(u32 & u32) = x, x +! 1ul <: (u32 & u32) in + Core.Num.impl__u32__wrapping_add (Core.Num.impl__u32__wrapping_add 123ul hoist11 <: u32) x + +let simplifiable_return (c1 c2 c3: bool) : i32 = + let x:i32 = 0l in + if c1 then - match Core.Result.Result_Err (B <: t_B) <: Core.Result.t_Result t_A t_B with - | Core.Result.Result_Ok hoist20 -> Core.Result.Result_Ok hoist20 <: Core.Result.t_Result t_A t_B - | Core.Result.Result_Err err -> Core.Result.Result_Err err <: Core.Result.t_Result t_A t_B - else Core.Result.Result_Ok (A <: t_A) <: Core.Result.t_Result t_A t_B + if c2 + then + let x:i32 = x +! 10l in + if c3 then 1l else x +! 1l + else x +! 1l + else x + +let simplifiable_question_mark (c: bool) (x: Core.Option.t_Option i32) : Core.Option.t_Option i32 = + if c + then + match x with + | Core.Option.Option_Some hoist16 -> + let a:i32 = hoist16 +! 10l in + let b:i32 = 20l in + Core.Option.Option_Some (a +! b) <: Core.Option.t_Option i32 + | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option i32 + else + let a:i32 = 0l in + let b:i32 = 20l in + Core.Option.Option_Some (a +! b) <: Core.Option.t_Option i32 + +/// Question mark without error coercion +let direct_result_question_mark (y: Core.Result.t_Result Prims.unit u32) + : Core.Result.t_Result i8 u32 = + match y with + | Core.Result.Result_Ok _ -> Core.Result.Result_Ok 0y <: Core.Result.t_Result i8 u32 + | Core.Result.Result_Err err -> Core.Result.Result_Err err <: Core.Result.t_Result i8 u32 + +/// Question mark with an error coercion +let direct_result_question_mark_coercion (y: Core.Result.t_Result i8 u16) + : Core.Result.t_Result i8 u32 = + match y with + | Core.Result.Result_Ok hoist17 -> Core.Result.Result_Ok hoist17 <: Core.Result.t_Result i8 u32 + | Core.Result.Result_Err err -> + Core.Result.Result_Err (Core.Convert.f_from #u32 #u16 #FStar.Tactics.Typeclasses.solve err) + <: + Core.Result.t_Result i8 u32 /// Test question mark on `Option`s with some control flow let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core.Option.t_Option u8 = match x with - | Core.Option.Option_Some hoist26 -> - if hoist26 >. 10uy + | Core.Option.Option_Some hoist21 -> + if hoist21 >. 10uy then match x with - | Core.Option.Option_Some hoist28 -> + | Core.Option.Option_Some hoist23 -> (match - Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add hoist28 3uy) + Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add hoist23 3uy) <: Core.Option.t_Option u8 with - | Core.Option.Option_Some hoist34 -> - (match hoist34 with + | Core.Option.Option_Some hoist29 -> + (match hoist29 with | 3uy -> (match Core.Option.Option_None <: Core.Option.t_Option u8 with | Core.Option.Option_Some some -> let v:u8 = some in (match x with - | Core.Option.Option_Some hoist35 -> + | Core.Option.Option_Some hoist30 -> (match y with - | Core.Option.Option_Some hoist36 -> + | Core.Option.Option_Some hoist31 -> Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v - hoist35 + hoist30 <: u8) - hoist36) + hoist31) <: Core.Option.t_Option u8 | Core.Option.Option_None -> @@ -317,18 +227,18 @@ let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core. | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option u8) | 4uy -> (match z with - | Core.Option.Option_Some hoist23 -> - let v:u8 = 4uy +! (if hoist23 >. 4uL <: bool then 0uy else 3uy) in + | Core.Option.Option_Some hoist18 -> + let v:u8 = 4uy +! (if hoist18 >. 4uL <: bool then 0uy else 3uy) in (match x with - | Core.Option.Option_Some hoist35 -> + | Core.Option.Option_Some hoist30 -> (match y with - | Core.Option.Option_Some hoist36 -> + | Core.Option.Option_Some hoist31 -> Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v - hoist35 + hoist30 <: u8) - hoist36) + hoist31) <: Core.Option.t_Option u8 | Core.Option.Option_None -> @@ -339,14 +249,14 @@ let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core. | _ -> let v:u8 = 12uy in match x with - | Core.Option.Option_Some hoist35 -> + | Core.Option.Option_Some hoist30 -> (match y with - | Core.Option.Option_Some hoist36 -> + | Core.Option.Option_Some hoist31 -> Core.Option.Option_Some - (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v hoist35 + (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v hoist30 <: u8) - hoist36) + hoist31) <: Core.Option.t_Option u8 | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option u8 @@ -356,30 +266,30 @@ let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core. | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option u8 else (match x with - | Core.Option.Option_Some hoist31 -> + | Core.Option.Option_Some hoist26 -> (match y with - | Core.Option.Option_Some hoist30 -> + | Core.Option.Option_Some hoist25 -> (match - Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add hoist31 hoist30) + Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add hoist26 hoist25) <: Core.Option.t_Option u8 with - | Core.Option.Option_Some hoist34 -> - (match hoist34 with + | Core.Option.Option_Some hoist29 -> + (match hoist29 with | 3uy -> (match Core.Option.Option_None <: Core.Option.t_Option u8 with | Core.Option.Option_Some some -> let v:u8 = some in (match x with - | Core.Option.Option_Some hoist35 -> + | Core.Option.Option_Some hoist30 -> (match y with - | Core.Option.Option_Some hoist36 -> + | Core.Option.Option_Some hoist31 -> Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v - hoist35 + hoist30 <: u8) - hoist36) + hoist31) <: Core.Option.t_Option u8 | Core.Option.Option_None -> @@ -390,18 +300,18 @@ let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core. Core.Option.Option_None <: Core.Option.t_Option u8) | 4uy -> (match z with - | Core.Option.Option_Some hoist23 -> - let v:u8 = 4uy +! (if hoist23 >. 4uL <: bool then 0uy else 3uy) in + | Core.Option.Option_Some hoist18 -> + let v:u8 = 4uy +! (if hoist18 >. 4uL <: bool then 0uy else 3uy) in (match x with - | Core.Option.Option_Some hoist35 -> + | Core.Option.Option_Some hoist30 -> (match y with - | Core.Option.Option_Some hoist36 -> + | Core.Option.Option_Some hoist31 -> Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v - hoist35 + hoist30 <: u8) - hoist36) + hoist31) <: Core.Option.t_Option u8 | Core.Option.Option_None -> @@ -413,15 +323,15 @@ let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core. | _ -> let v:u8 = 12uy in match x with - | Core.Option.Option_Some hoist35 -> + | Core.Option.Option_Some hoist30 -> (match y with - | Core.Option.Option_Some hoist36 -> + | Core.Option.Option_Some hoist31 -> Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v - hoist35 + hoist30 <: u8) - hoist36) + hoist31) <: Core.Option.t_Option u8 | Core.Option.Option_None -> @@ -457,28 +367,118 @@ let question_mark (x: u32) : Core.Result.t_Result u32 u32 = else Core.Result.Result_Ok (Core.Num.impl__u32__wrapping_add 3ul x) <: Core.Result.t_Result u32 u32 -let simplifiable_question_mark (c: bool) (x: Core.Option.t_Option i32) : Core.Option.t_Option i32 = - if c - then - match x with - | Core.Option.Option_Some hoist40 -> - let a:i32 = hoist40 +! 10l in - let b:i32 = 20l in - Core.Option.Option_Some (a +! b) <: Core.Option.t_Option i32 - | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option i32 - else - let a:i32 = 0l in - let b:i32 = 20l in - Core.Option.Option_Some (a +! b) <: Core.Option.t_Option i32 +type t_A = | A : t_A -let simplifiable_return (c1 c2 c3: bool) : i32 = - let x:i32 = 0l in - if c1 +type t_B = | B : t_B + +/// Combine `?` and early return +let monad_lifting (x: u8) : Core.Result.t_Result t_A t_B = + if x >. 123uy then - if c2 - then - let x:i32 = x +! 10l in - if c3 then 1l else x +! 1l - else x +! 1l - else x + match Core.Result.Result_Err (B <: t_B) <: Core.Result.t_Result t_A t_B with + | Core.Result.Result_Ok hoist35 -> Core.Result.Result_Ok hoist35 <: Core.Result.t_Result t_A t_B + | Core.Result.Result_Err err -> Core.Result.Result_Err err <: Core.Result.t_Result t_A t_B + else Core.Result.Result_Ok (A <: t_A) <: Core.Result.t_Result t_A t_B + +type t_Bar = { + f_a:bool; + f_b:(t_Array (bool & bool) (sz 6) & bool) +} + +type t_Foo = { + f_x:bool; + f_y:(bool & Alloc.Vec.t_Vec t_Bar Alloc.Alloc.t_Global); + f_z:t_Array t_Bar (sz 6); + f_bar:t_Bar +} + +/// Test assignation on non-trivial places +let assign_non_trivial_lhs (foo: t_Foo) : t_Foo = + let foo:t_Foo = { foo with f_x = true } <: t_Foo in + let foo:t_Foo = { foo with f_bar = { foo.f_bar with f_a = true } <: t_Bar } <: t_Foo in + let foo:t_Foo = + { + foo with + f_bar + = + { + foo.f_bar with + f_b + = + { + foo.f_bar.f_b with + _1 + = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_bar.f_b._1 + (sz 3) + ({ (foo.f_bar.f_b._1.[ sz 3 ] <: (bool & bool)) with _2 = true } <: (bool & bool)) + } + <: + (t_Array (bool & bool) (sz 6) & bool) + } + <: + t_Bar + } + <: + t_Foo + in + let foo:t_Foo = + { + foo with + f_z + = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_z + (sz 3) + ({ (foo.f_z.[ sz 3 ] <: t_Bar) with f_a = true } <: t_Bar) + } + <: + t_Foo + in + let foo:t_Foo = + { + foo with + f_y + = + { + foo.f_y with + _2 + = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_y._2 + (sz 3) + ({ + (foo.f_y._2.[ sz 3 ] <: t_Bar) with + f_b + = + { + (foo.f_y._2.[ sz 3 ] <: t_Bar).f_b with + _1 + = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize (foo.f_y._2.[ sz 3 ] + <: + t_Bar) + .f_b + ._1 + (sz 5) + ({ + ((foo.f_y._2.[ sz 3 ] <: t_Bar).f_b._1.[ sz 5 ] <: (bool & bool)) with + _1 = true + } + <: + (bool & bool)) + <: + t_Array (bool & bool) (sz 6) + } + <: + (t_Array (bool & bool) (sz 6) & bool) + } + <: + t_Bar) + } + <: + (bool & Alloc.Vec.t_Vec t_Bar Alloc.Alloc.t_Global) + } + <: + t_Foo + in + foo ''' diff --git a/test-harness/src/snapshots/toolchain__side-effects into-ssprove.snap b/test-harness/src/snapshots/toolchain__side-effects into-ssprove.snap index 2f2304adb..4f1746a23 100644 --- a/test-harness/src/snapshots/toolchain__side-effects into-ssprove.snap +++ b/test-harness/src/snapshots/toolchain__side-effects into-ssprove.snap @@ -54,6 +54,163 @@ Import choice.Choice.Exports. Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. +(*Not implemented yet? todo(item)*) + +Equations add3 {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (x : both L1 I1 int32) (y : both L2 I2 int32) (z : both L3 I3 int32) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) int32 := + add3 x y z := + solve_lift (impl__u32__wrapping_add (impl__u32__wrapping_add x y) z) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) int32. +Fail Next Obligation. + +Definition y_loc : Location := + (int32;0%nat). +Definition y_loc : Location := + (int32;1%nat). +Equations local_mutation {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both (L1 :|: fset [y_loc;y_loc]) I1 int32 := + local_mutation x := + letb y loc(y_loc) := ret_both (0 : int32) in + letb _ := assign todo(term) in + letb hoist1 := x >.? (ret_both (3 : int32)) in + solve_lift (ifb hoist1 + then letb _ := assign todo(term) in + letb y loc(y_loc) := x ./ (ret_both (2 : int32)) in + letb _ := assign todo(term) in + letb hoist2 := ret_both (0 : int32) in + letb hoist3 := Build_t_Range (f_start := hoist2) (f_end := ret_both (10 : int32)) in + letb hoist4 := f_into_iter hoist3 in + letb _ := foldi_both_list hoist4 (fun i => + ssp (fun _ => + assign todo(term) : (both (*0*)(L1:|:fset []) (I1) 'unit))) (ret_both (tt : 'unit)) in + impl__u32__wrapping_add x y + else letb hoist7 := matchb x with + | 12 => + letb _ := assign todo(term) in + solve_lift (ret_both (3 : int32)) + | 13 => + letb hoist6 := x in + letb _ := assign todo(term) in + letb hoist5 := impl__u32__wrapping_add (ret_both (123 : int32)) x in + solve_lift (add3 hoist6 hoist5 x) + | _ => + solve_lift (ret_both (0 : int32)) + end in + letb _ := assign todo(term) in + impl__u32__wrapping_add x y) : both (L1 :|: fset [y_loc;y_loc]) I1 int32. +Fail Next Obligation. + +Equations early_returns {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both L1 I1 int32 := + early_returns x := + solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := ifb x >.? (ret_both (3 : int32)) + then letm[choice_typeMonad.result_bind_code int32] hoist8 := ControlFlow_Break (ret_both (0 : int32)) in + ControlFlow_Continue (never_to_any hoist8) + else () in + letb hoist9 := x >.? (ret_both (30 : int32)) in + letm[choice_typeMonad.result_bind_code int32] hoist11 := ifb hoist9 + then matchb ret_both (true : 'bool) with + | true => + letm[choice_typeMonad.result_bind_code int32] hoist10 := ControlFlow_Break (ret_both (34 : int32)) in + ControlFlow_Continue (solve_lift (never_to_any hoist10)) + | _ => + ControlFlow_Continue (solve_lift (ret_both (3 : int32))) + end + else ControlFlow_Continue (letb _ := assign todo(term) in + x .+ (ret_both (1 : int32))) in + letb hoist12 := impl__u32__wrapping_add (ret_both (123 : int32)) hoist11 in + letb hoist13 := impl__u32__wrapping_add hoist12 x in + letm[choice_typeMonad.result_bind_code int32] hoist14 := ControlFlow_Break hoist13 in + ControlFlow_Continue (never_to_any hoist14))) : both L1 I1 int32. +Fail Next Obligation. + +Definition x_loc : Location := + (int32;2%nat). +Equations simplifiable_return {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (c1 : both L1 I1 'bool) (c2 : both L2 I2 'bool) (c3 : both L3 I3 'bool) : both (L1 :|: L2 :|: L3 :|: fset [x_loc]) (I1 :|: I2 :|: I3) int32 := + simplifiable_return c1 c2 c3 := + solve_lift (run (letb x loc(x_loc) := ret_both (0 : int32) in + letm[choice_typeMonad.result_bind_code int32] _ := ifb c1 + then letm[choice_typeMonad.result_bind_code int32] _ := ifb c2 + then letb _ := assign todo(term) in + ifb c3 + then letm[choice_typeMonad.result_bind_code int32] hoist15 := ControlFlow_Break (ret_both (1 : int32)) in + ControlFlow_Continue (never_to_any hoist15) + else () + else () in + ControlFlow_Continue (letb _ := assign todo(term) in + ret_both (tt : 'unit)) + else () in + ControlFlow_Continue x)) : both (L1 :|: L2 :|: L3 :|: fset [x_loc]) (I1 :|: I2 :|: I3) int32. +Fail Next Obligation. + +Equations simplifiable_question_mark {L1 : {fset Location}} {L2 : {fset Location}} {I1 : Interface} {I2 : Interface} (c : both L1 I1 'bool) (x : both L2 I2 (t_Option int32)) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32) := + simplifiable_question_mark c x := + solve_lift (run (letm[choice_typeMonad.option_bind_code] a := ifb c + then letm[choice_typeMonad.option_bind_code] hoist16 := x in + Option_Some (hoist16 .+ (ret_both (10 : int32))) + else Option_Some (ret_both (0 : int32)) in + Option_Some (letb b := ret_both (20 : int32) in + Option_Some (a .+ b)))) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32). +Fail Next Obligation. + +Equations direct_result_question_mark {L1 : {fset Location}} {I1 : Interface} (y : both L1 I1 (t_Result 'unit int32)) : both L1 I1 (t_Result int8 int32) := + direct_result_question_mark y := + solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := y in + Result_Ok (Result_Ok (ret_both (0 : int8))))) : both L1 I1 (t_Result int8 int32). +Fail Next Obligation. + +Equations direct_result_question_mark_coercion {L1 : {fset Location}} {I1 : Interface} (y : both L1 I1 (t_Result int8 int16)) : both L1 I1 (t_Result int8 int32) := + direct_result_question_mark_coercion y := + solve_lift (run (letm[choice_typeMonad.result_bind_code int32] hoist17 := impl__map_err y f_from in + Result_Ok (Result_Ok hoist17))) : both L1 I1 (t_Result int8 int32). +Fail Next Obligation. + +Equations options {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (x : both L1 I1 (t_Option int8)) (y : both L2 I2 (t_Option int8)) (z : both L3 I3 (t_Option int64)) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) (t_Option int8) := + options x y z := + solve_lift (run (letm[choice_typeMonad.option_bind_code] hoist21 := x in + letb hoist22 := hoist21 >.? (ret_both (10 : int8)) in + letm[choice_typeMonad.option_bind_code] hoist28 := ifb hoist22 + then letm[choice_typeMonad.option_bind_code] hoist23 := x in + Option_Some (letb hoist24 := impl__u8__wrapping_add hoist23 (ret_both (3 : int8)) in + Option_Some hoist24) + else letm[choice_typeMonad.option_bind_code] hoist26 := x in + letm[choice_typeMonad.option_bind_code] hoist25 := y in + Option_Some (letb hoist27 := impl__u8__wrapping_add hoist26 hoist25 in + Option_Some hoist27) in + letm[choice_typeMonad.option_bind_code] hoist29 := hoist28 in + letm[choice_typeMonad.option_bind_code] v := matchb hoist29 with + | 3 => + Option_None + | 4 => + letm[choice_typeMonad.option_bind_code] hoist18 := z in + Option_Some (letb hoist19 := hoist18 >.? (ret_both (4 : int64)) in + letb hoist20 := ifb hoist19 + then ret_both (0 : int8) + else ret_both (3 : int8) in + solve_lift ((ret_both (4 : int8)) .+ hoist20)) + | _ => + Option_Some (solve_lift (ret_both (12 : int8))) + end in + letm[choice_typeMonad.option_bind_code] hoist30 := x in + letb hoist32 := impl__u8__wrapping_add v hoist30 in + letm[choice_typeMonad.option_bind_code] hoist31 := y in + Option_Some (letb hoist33 := impl__u8__wrapping_add hoist32 hoist31 in + Option_Some hoist33))) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) (t_Option int8). +Fail Next Obligation. + +Definition y_loc : Location := + (int32;3%nat). +Equations question_mark {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both (L1 :|: fset [y_loc]) I1 (t_Result int32 int32) := + question_mark x := + solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := ifb x >.? (ret_both (40 : int32)) + then letb y loc(y_loc) := ret_both (0 : int32) in + letb _ := assign todo(term) in + letb _ := assign todo(term) in + letb _ := assign todo(term) in + letb hoist34 := x >.? (ret_both (90 : int32)) in + ifb hoist34 + then impl__map_err (Result_Err (ret_both (12 : int8))) f_from + else () + else () in + Result_Ok (Result_Ok (impl__u32__wrapping_add (ret_both (3 : int32)) x)))) : both (L1 :|: fset [y_loc]) I1 (t_Result int32 int32). +Fail Next Obligation. + Definition t_A : choice_type := 'unit. Equations Build_t_A : both (fset []) (fset []) (t_A) := @@ -68,6 +225,16 @@ Equations Build_t_B : both (fset []) (fset []) (t_B) := solve_lift (ret_both (tt (* Empty tuple *) : (t_B))) : both (fset []) (fset []) (t_B). Fail Next Obligation. +Equations monad_lifting {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int8) : both L1 I1 (t_Result t_A t_B) := + monad_lifting x := + solve_lift (run (ifb x >.? (ret_both (123 : int8)) + then letm[choice_typeMonad.result_bind_code (t_Result t_A t_B)] hoist35 := ControlFlow_Continue (Result_Err B) in + letb hoist36 := Result_Ok hoist35 in + letm[choice_typeMonad.result_bind_code (t_Result t_A t_B)] hoist37 := ControlFlow_Break hoist36 in + ControlFlow_Continue (never_to_any hoist37) + else ControlFlow_Continue (Result_Ok A))) : both L1 I1 (t_Result t_A t_B). +Fail Next Obligation. + Definition t_Bar : choice_type := ('bool × nseq ('bool × 'bool) 6 × 'bool). Equations f_a {L : {fset Location}} {I : Interface} (s : both L I t_Bar) : both L I 'bool := @@ -124,17 +291,6 @@ Notation "'Build_t_Foo' '[' x ']' '(' 'f_y' ':=' y ')'" := (Build_t_Foo (f_x := Notation "'Build_t_Foo' '[' x ']' '(' 'f_z' ':=' y ')'" := (Build_t_Foo (f_x := f_x x) (f_y := f_y x) (f_z := y) (f_bar := f_bar x)). Notation "'Build_t_Foo' '[' x ']' '(' 'f_bar' ':=' y ')'" := (Build_t_Foo (f_x := f_x x) (f_y := f_y x) (f_z := f_z x) (f_bar := y)). -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -(*Not implemented yet? todo(item)*) - -Equations add3 {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (x : both L1 I1 int32) (y : both L2 I2 int32) (z : both L3 I3 int32) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) int32 := - add3 x y z := - solve_lift (impl__u32__wrapping_add (impl__u32__wrapping_add x y) z) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) int32. -Fail Next Obligation. - Equations assign_non_trivial_lhs {L1 : {fset Location}} {I1 : Interface} (foo : both L1 I1 t_Foo) : both L1 I1 t_Foo := assign_non_trivial_lhs foo := letb _ := assign todo(term) in @@ -145,165 +301,9 @@ Equations assign_non_trivial_lhs {L1 : {fset Location}} {I1 : Interface} (foo : solve_lift foo : both L1 I1 t_Foo. Fail Next Obligation. -Equations direct_result_question_mark {L1 : {fset Location}} {I1 : Interface} (y : both L1 I1 (t_Result 'unit int32)) : both L1 I1 (t_Result int8 int32) := - direct_result_question_mark y := - solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := y in - Result_Ok (Result_Ok (ret_both (0 : int8))))) : both L1 I1 (t_Result int8 int32). -Fail Next Obligation. - -Equations direct_result_question_mark_coercion {L1 : {fset Location}} {I1 : Interface} (y : both L1 I1 (t_Result int8 int16)) : both L1 I1 (t_Result int8 int32) := - direct_result_question_mark_coercion y := - solve_lift (run (letm[choice_typeMonad.result_bind_code int32] hoist5 := impl__map_err y f_from in - Result_Ok (Result_Ok hoist5))) : both L1 I1 (t_Result int8 int32). -Fail Next Obligation. - -Equations early_returns {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both L1 I1 int32 := - early_returns x := - solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := ifb x >.? (ret_both (3 : int32)) - then letm[choice_typeMonad.result_bind_code int32] hoist6 := ControlFlow_Break (ret_both (0 : int32)) in - ControlFlow_Continue (never_to_any hoist6) - else () in - letb hoist7 := x >.? (ret_both (30 : int32)) in - letm[choice_typeMonad.result_bind_code int32] hoist9 := ifb hoist7 - then matchb ret_both (true : 'bool) with - | true => - letm[choice_typeMonad.result_bind_code int32] hoist8 := ControlFlow_Break (ret_both (34 : int32)) in - ControlFlow_Continue (solve_lift (never_to_any hoist8)) - | _ => - ControlFlow_Continue (solve_lift (ret_both (3 : int32))) - end - else ControlFlow_Continue (letb _ := assign todo(term) in - x .+ (ret_both (1 : int32))) in - letb hoist10 := impl__u32__wrapping_add (ret_both (123 : int32)) hoist9 in - letb hoist11 := impl__u32__wrapping_add hoist10 x in - letm[choice_typeMonad.result_bind_code int32] hoist12 := ControlFlow_Break hoist11 in - ControlFlow_Continue (never_to_any hoist12))) : both L1 I1 int32. -Fail Next Obligation. - -Definition y_loc : Location := - (int32;0%nat). -Definition y_loc : Location := - (int32;1%nat). -Equations local_mutation {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both (L1 :|: fset [y_loc;y_loc]) I1 int32 := - local_mutation x := - letb y loc(y_loc) := ret_both (0 : int32) in - letb _ := assign todo(term) in - letb hoist13 := x >.? (ret_both (3 : int32)) in - solve_lift (ifb hoist13 - then letb _ := assign todo(term) in - letb y loc(y_loc) := x ./ (ret_both (2 : int32)) in - letb _ := assign todo(term) in - letb hoist14 := ret_both (0 : int32) in - letb hoist15 := Build_t_Range (f_start := hoist14) (f_end := ret_both (10 : int32)) in - letb hoist16 := f_into_iter hoist15 in - letb _ := foldi_both_list hoist16 (fun i => - ssp (fun _ => - assign todo(term) : (both (*0*)(L1:|:fset []) (I1) 'unit))) (ret_both (tt : 'unit)) in - impl__u32__wrapping_add x y - else letb hoist19 := matchb x with - | 12 => - letb _ := assign todo(term) in - solve_lift (ret_both (3 : int32)) - | 13 => - letb hoist18 := x in - letb _ := assign todo(term) in - letb hoist17 := impl__u32__wrapping_add (ret_both (123 : int32)) x in - solve_lift (add3 hoist18 hoist17 x) - | _ => - solve_lift (ret_both (0 : int32)) - end in - letb _ := assign todo(term) in - impl__u32__wrapping_add x y) : both (L1 :|: fset [y_loc;y_loc]) I1 int32. -Fail Next Obligation. - -Equations monad_lifting {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int8) : both L1 I1 (t_Result t_A t_B) := - monad_lifting x := - solve_lift (run (ifb x >.? (ret_both (123 : int8)) - then letm[choice_typeMonad.result_bind_code (t_Result t_A t_B)] hoist20 := ControlFlow_Continue (Result_Err B) in - letb hoist21 := Result_Ok hoist20 in - letm[choice_typeMonad.result_bind_code (t_Result t_A t_B)] hoist22 := ControlFlow_Break hoist21 in - ControlFlow_Continue (never_to_any hoist22) - else ControlFlow_Continue (Result_Ok A))) : both L1 I1 (t_Result t_A t_B). -Fail Next Obligation. - -Equations options {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (x : both L1 I1 (t_Option int8)) (y : both L2 I2 (t_Option int8)) (z : both L3 I3 (t_Option int64)) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) (t_Option int8) := - options x y z := - solve_lift (run (letm[choice_typeMonad.option_bind_code] hoist26 := x in - letb hoist27 := hoist26 >.? (ret_both (10 : int8)) in - letm[choice_typeMonad.option_bind_code] hoist33 := ifb hoist27 - then letm[choice_typeMonad.option_bind_code] hoist28 := x in - Option_Some (letb hoist29 := impl__u8__wrapping_add hoist28 (ret_both (3 : int8)) in - Option_Some hoist29) - else letm[choice_typeMonad.option_bind_code] hoist31 := x in - letm[choice_typeMonad.option_bind_code] hoist30 := y in - Option_Some (letb hoist32 := impl__u8__wrapping_add hoist31 hoist30 in - Option_Some hoist32) in - letm[choice_typeMonad.option_bind_code] hoist34 := hoist33 in - letm[choice_typeMonad.option_bind_code] v := matchb hoist34 with - | 3 => - Option_None - | 4 => - letm[choice_typeMonad.option_bind_code] hoist23 := z in - Option_Some (letb hoist24 := hoist23 >.? (ret_both (4 : int64)) in - letb hoist25 := ifb hoist24 - then ret_both (0 : int8) - else ret_both (3 : int8) in - solve_lift ((ret_both (4 : int8)) .+ hoist25)) - | _ => - Option_Some (solve_lift (ret_both (12 : int8))) - end in - letm[choice_typeMonad.option_bind_code] hoist35 := x in - letb hoist37 := impl__u8__wrapping_add v hoist35 in - letm[choice_typeMonad.option_bind_code] hoist36 := y in - Option_Some (letb hoist38 := impl__u8__wrapping_add hoist37 hoist36 in - Option_Some hoist38))) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) (t_Option int8). -Fail Next Obligation. - -Definition y_loc : Location := - (int32;2%nat). -Equations question_mark {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both (L1 :|: fset [y_loc]) I1 (t_Result int32 int32) := - question_mark x := - solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := ifb x >.? (ret_both (40 : int32)) - then letb y loc(y_loc) := ret_both (0 : int32) in - letb _ := assign todo(term) in - letb _ := assign todo(term) in - letb _ := assign todo(term) in - letb hoist39 := x >.? (ret_both (90 : int32)) in - ifb hoist39 - then impl__map_err (Result_Err (ret_both (12 : int8))) f_from - else () - else () in - Result_Ok (Result_Ok (impl__u32__wrapping_add (ret_both (3 : int32)) x)))) : both (L1 :|: fset [y_loc]) I1 (t_Result int32 int32). -Fail Next Obligation. - -Equations simplifiable_question_mark {L1 : {fset Location}} {L2 : {fset Location}} {I1 : Interface} {I2 : Interface} (c : both L1 I1 'bool) (x : both L2 I2 (t_Option int32)) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32) := - simplifiable_question_mark c x := - solve_lift (run (letm[choice_typeMonad.option_bind_code] a := ifb c - then letm[choice_typeMonad.option_bind_code] hoist40 := x in - Option_Some (hoist40 .+ (ret_both (10 : int32))) - else Option_Some (ret_both (0 : int32)) in - Option_Some (letb b := ret_both (20 : int32) in - Option_Some (a .+ b)))) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32). -Fail Next Obligation. +(*Not implemented yet? todo(item)*) -Definition x_loc : Location := - (int32;3%nat). -Equations simplifiable_return {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (c1 : both L1 I1 'bool) (c2 : both L2 I2 'bool) (c3 : both L3 I3 'bool) : both (L1 :|: L2 :|: L3 :|: fset [x_loc]) (I1 :|: I2 :|: I3) int32 := - simplifiable_return c1 c2 c3 := - solve_lift (run (letb x loc(x_loc) := ret_both (0 : int32) in - letm[choice_typeMonad.result_bind_code int32] _ := ifb c1 - then letm[choice_typeMonad.result_bind_code int32] _ := ifb c2 - then letb _ := assign todo(term) in - ifb c3 - then letm[choice_typeMonad.result_bind_code int32] hoist41 := ControlFlow_Break (ret_both (1 : int32)) in - ControlFlow_Continue (never_to_any hoist41) - else () - else () in - ControlFlow_Continue (letb _ := assign todo(term) in - ret_both (tt : 'unit)) - else () in - ControlFlow_Continue x)) : both (L1 :|: L2 :|: L3 :|: fset [x_loc]) (I1 :|: I2 :|: I3) int32. -Fail Next Obligation. +(*Not implemented yet? todo(item)*) ''' "Side_effects_Issue_1083_.v" = ''' (* File automatically generated by Hacspec *) @@ -380,11 +380,11 @@ Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. Equations test {L1 : {fset Location}} {L2 : {fset Location}} {I1 : Interface} {I2 : Interface} (x : both L1 I1 (t_Option int32)) (y : both L2 I2 (t_Option int32)) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32) := test x y := - solve_lift (run (letb hoist3 := fun i => - letm[choice_typeMonad.option_bind_code] hoist1 := y in - Option_Some (letb hoist2 := i .+ hoist1 in - Option_Some hoist2) in - letb hoist4 := impl__map x hoist3 in - hoist4)) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32). + solve_lift (run (letb hoist40 := fun i => + letm[choice_typeMonad.option_bind_code] hoist38 := y in + Option_Some (letb hoist39 := i .+ hoist38 in + Option_Some hoist39) in + letb hoist41 := impl__map x hoist40 in + hoist41)) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32). Fail Next Obligation. ''' diff --git a/test-harness/src/snapshots/toolchain__traits into-fstar.snap b/test-harness/src/snapshots/toolchain__traits into-fstar.snap index 3ada99292..d71f42f39 100644 --- a/test-harness/src/snapshots/toolchain__traits into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__traits into-fstar.snap @@ -79,33 +79,6 @@ module Traits.For_clauses.Issue_495_ open Core open FStar.Mul -let minimized_1_ (list: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - Core.Iter.Traits.Iterator.f_collect #(Core.Iter.Adapters.Filter.t_Filter - (Core.Ops.Range.t_Range u8) (u8 -> bool)) - #FStar.Tactics.Typeclasses.solve - #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - (Core.Iter.Traits.Iterator.f_filter #(Core.Ops.Range.t_Range u8) - #FStar.Tactics.Typeclasses.solve - ({ Core.Ops.Range.f_start = 0uy; Core.Ops.Range.f_end = 5uy } <: Core.Ops.Range.t_Range u8) - (fun temp_0_ -> - let _:u8 = temp_0_ in - true) - <: - Core.Iter.Adapters.Filter.t_Filter (Core.Ops.Range.t_Range u8) (u8 -> bool)) - -let minimized_2_ (it: Core.Iter.Adapters.Filter.t_Filter (Core.Ops.Range.t_Range u8) (u8 -> bool)) - : Prims.unit = - let (v__indices: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global):Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global - = - Core.Iter.Traits.Iterator.f_collect #(Core.Iter.Adapters.Filter.t_Filter - (Core.Ops.Range.t_Range u8) (u8 -> bool)) - #FStar.Tactics.Typeclasses.solve - #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - it - in - () - let original_function_from_495_ (list: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) : Prims.unit = let (v__indices: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global):Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = @@ -139,6 +112,33 @@ let original_function_from_495_ (list: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) Core.Iter.Adapters.Filter.t_Filter (Core.Ops.Range.t_Range u8) (u8 -> bool)) in () + +let minimized_1_ (list: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + Core.Iter.Traits.Iterator.f_collect #(Core.Iter.Adapters.Filter.t_Filter + (Core.Ops.Range.t_Range u8) (u8 -> bool)) + #FStar.Tactics.Typeclasses.solve + #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + (Core.Iter.Traits.Iterator.f_filter #(Core.Ops.Range.t_Range u8) + #FStar.Tactics.Typeclasses.solve + ({ Core.Ops.Range.f_start = 0uy; Core.Ops.Range.f_end = 5uy } <: Core.Ops.Range.t_Range u8) + (fun temp_0_ -> + let _:u8 = temp_0_ in + true) + <: + Core.Iter.Adapters.Filter.t_Filter (Core.Ops.Range.t_Range u8) (u8 -> bool)) + +let minimized_2_ (it: Core.Iter.Adapters.Filter.t_Filter (Core.Ops.Range.t_Range u8) (u8 -> bool)) + : Prims.unit = + let (v__indices: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global):Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global + = + Core.Iter.Traits.Iterator.f_collect #(Core.Iter.Adapters.Filter.t_Filter + (Core.Ops.Range.t_Range u8) (u8 -> bool)) + #FStar.Tactics.Typeclasses.solve + #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + it + in + () ''' "Traits.For_clauses.fst" = ''' module Traits.For_clauses @@ -342,7 +342,7 @@ let impl (#v_TypeArg: Type0) (v_ConstArg: usize) : t_Trait Prims.unit v_TypeArg () } -let associated_function_caller +let method_caller (#v_MethodTypeArg #v_TypeArg: Type0) (v_ConstArg v_MethodConstArg: usize) (#v_ImplTrait: Type0) @@ -352,7 +352,7 @@ let associated_function_caller (value_Type: t_Type v_TypeArg v_ConstArg) : Prims.unit = let _:Prims.unit = - f_associated_function #v_ImplTrait + f_method #v_ImplTrait #v_TypeArg #v_ConstArg #FStar.Tactics.Typeclasses.solve @@ -364,7 +364,7 @@ let associated_function_caller in () -let method_caller +let associated_function_caller (#v_MethodTypeArg #v_TypeArg: Type0) (v_ConstArg v_MethodConstArg: usize) (#v_ImplTrait: Type0) @@ -374,7 +374,7 @@ let method_caller (value_Type: t_Type v_TypeArg v_ConstArg) : Prims.unit = let _:Prims.unit = - f_method #v_ImplTrait + f_associated_function #v_ImplTrait #v_TypeArg #v_ConstArg #FStar.Tactics.Typeclasses.solve @@ -491,14 +491,14 @@ module Traits.Unconstrainted_types_issue_677_ open Core open FStar.Mul -type t_Plus = | Plus : t_Plus - class t_PolyOp (v_Self: Type0) = { f_op_pre:u32 -> u32 -> Type0; f_op_post:u32 -> u32 -> u32 -> Type0; f_op:x0: u32 -> x1: u32 -> Prims.Pure u32 (f_op_pre x0 x1) (fun result -> f_op_post x0 x1 result) } +type t_Plus = | Plus : t_Plus + [@@ FStar.Tactics.Typeclasses.tcinstance] let impl: t_PolyOp t_Plus = { @@ -528,26 +528,6 @@ module Traits open Core open FStar.Mul -class t_Bar (v_Self: Type0) = { - f_bar_pre:v_Self -> Type0; - f_bar_post:v_Self -> Prims.unit -> Type0; - f_bar:x0: v_Self -> Prims.Pure Prims.unit (f_bar_pre x0) (fun result -> f_bar_post x0 result) -} - -let impl_2__method (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Bar v_T) (x: v_T) - : Prims.unit = f_bar #v_T #FStar.Tactics.Typeclasses.solve x - -type t_Error = | Error_Fail : t_Error - -let impl__Error__for_application_callback (_: Prims.unit) : Prims.unit -> t_Error = - fun temp_0_ -> - let _:Prims.unit = temp_0_ in - Error_Fail <: t_Error - -let t_Error_cast_to_repr (x: t_Error) : isize = match x with | Error_Fail -> isz 0 - -type t_Struct = | Struct : t_Struct - class t_SuperTrait (v_Self: Type0) = { [@@@ FStar.Tactics.Typeclasses.no_method]_super_9442900250278684536:Core.Clone.t_Clone v_Self; f_function_of_super_trait_pre:v_Self -> Type0; @@ -567,6 +547,17 @@ let impl_SuperTrait_for_i32: t_SuperTrait i32 = f_function_of_super_trait = fun (self: i32) -> cast (Core.Num.impl__i32__abs self <: i32) <: u32 } +type t_Struct = | Struct : t_Struct + +class t_Bar (v_Self: Type0) = { + f_bar_pre:v_Self -> Type0; + f_bar_post:v_Self -> Prims.unit -> Type0; + f_bar:x0: v_Self -> Prims.Pure Prims.unit (f_bar_pre x0) (fun result -> f_bar_post x0 result) +} + +let impl_2__method (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Bar v_T) (x: v_T) + : Prims.unit = f_bar #v_T #FStar.Tactics.Typeclasses.solve x + let closure_impl_expr (#v_I: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Iter.Traits.Iterator.t_Iterator v_I) @@ -597,6 +588,15 @@ let closure_impl_expr_fngen <: Core.Iter.Adapters.Map.t_Map v_I v_F) +type t_Error = | Error_Fail : t_Error + +let t_Error_cast_to_repr (x: t_Error) : isize = match x with | Error_Fail -> isz 0 + +let impl__Error__for_application_callback (_: Prims.unit) : Prims.unit -> t_Error = + fun temp_0_ -> + let _:Prims.unit = temp_0_ in + Error_Fail <: t_Error + let iter_option (#v_T: Type0) (x: Core.Option.t_Option v_T) : Core.Option.t_IntoIter v_T = Core.Iter.Traits.Collect.f_into_iter #(Core.Option.t_Option v_T) #FStar.Tactics.Typeclasses.solve @@ -632,6 +632,13 @@ class t_Foo (v_Self: Type0) = { (fun result -> f_assoc_type_post #i3 x0 result) } +let f (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Foo v_T) (x: v_T) : Prims.unit = + let _:Prims.unit = f_assoc_f #v_T #FStar.Tactics.Typeclasses.solve () in + f_method_f #v_T #FStar.Tactics.Typeclasses.solve x + +let g (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Foo v_T) (x: i1.f_AssocType) + : u32 = f_function_of_super_trait #i1.f_AssocType #FStar.Tactics.Typeclasses.solve x + class t_Lang (v_Self: Type0) = { f_Var:Type0; f_s_pre:v_Self -> i32 -> Type0; @@ -640,13 +647,6 @@ class t_Lang (v_Self: Type0) = { -> Prims.Pure (v_Self & f_Var) (f_s_pre x0 x1) (fun result -> f_s_post x0 x1 result) } -let f (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Foo v_T) (x: v_T) : Prims.unit = - let _:Prims.unit = f_assoc_f #v_T #FStar.Tactics.Typeclasses.solve () in - f_method_f #v_T #FStar.Tactics.Typeclasses.solve x - -let g (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Foo v_T) (x: i1.f_AssocType) - : u32 = f_function_of_super_trait #i1.f_AssocType #FStar.Tactics.Typeclasses.solve x - [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_Foo_for_tuple_: t_Foo Prims.unit = { diff --git a/test-harness/src/snapshots/toolchain__unsafe into-fstar.snap b/test-harness/src/snapshots/toolchain__unsafe into-fstar.snap index 310e2d094..2fba5a2b7 100644 --- a/test-harness/src/snapshots/toolchain__unsafe into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__unsafe into-fstar.snap @@ -37,13 +37,13 @@ type t_Impossible = let t_Impossible_cast_to_repr (x: t_Impossible) : Rust_primitives.Hax.t_Never = match x with -let get_unchecked_example (slice: t_Slice u8) - : Prims.Pure u8 - (requires (Core.Slice.impl__len #u8 slice <: usize) >. sz 10) - (fun _ -> Prims.l_True) = Core.Slice.impl__get_unchecked #u8 #usize slice (sz 6) - let impossible (_: Prims.unit) : Prims.Pure t_Impossible (requires false) (fun _ -> Prims.l_True) = Rust_primitives.Hax.never_to_any (Core.Hint.unreachable_unchecked () <: Rust_primitives.Hax.t_Never) + +let get_unchecked_example (slice: t_Slice u8) + : Prims.Pure u8 + (requires (Core.Slice.impl__len #u8 slice <: usize) >. sz 10) + (fun _ -> Prims.l_True) = Core.Slice.impl__get_unchecked #u8 #usize slice (sz 6) ''' diff --git a/tests/reordering/src/lib.rs b/tests/reordering/src/lib.rs index 03e4d0ea8..2be238457 100644 --- a/tests/reordering/src/lib.rs +++ b/tests/reordering/src/lib.rs @@ -17,3 +17,28 @@ enum Foo { A, B, } + +mod no_alpha_sorting { + fn u01() {} + fn r02() {} + fn b03() {} + fn f04() {} + fn h05() {} + fn i06() {} + fn c07() {} + fn k08() {} + fn d09() {} + fn e10() {} + fn g11() {} + fn j12() {} + fn o13() {} + fn a14() {} + fn q15() {} + fn m16() {} + fn l17() {} + fn n18() {} + fn v19() {} + fn s20() {} + fn p21() {} + fn t22() {} +} From 3159397a817aedc9bc84b7a88c148d680cf3e42f Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 16:17:57 +0100 Subject: [PATCH 33/59] misc(setup.sh): `rebuild.sh` -> `just build` --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index a20542e0f..23f9de20e 100755 --- a/setup.sh +++ b/setup.sh @@ -19,7 +19,7 @@ while [ $# -gt 0 ]; do done # Warns if we're building in a dirty checkout of hax: while hacking on -# hax, we should really be using the `./.utils/rebuild.sh` +# hax, we should really be using `just build`. warn_if_dirty() { ( cd "$SCRIPTPATH" From 1dc71b068bc4860004d3e122bd2700c072522dfd Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 16:23:52 +0100 Subject: [PATCH 34/59] feat(setup.sh): cleanup cargo & dune by default, add a `--no-cleanup` flag --- setup.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/setup.sh b/setup.sh index 23f9de20e..18101ff36 100755 --- a/setup.sh +++ b/setup.sh @@ -5,6 +5,7 @@ set -eu SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" opam_jobs=4 +CLEANUP_WORKSPACE=on # Parse command line arguments. all_args=("$@") @@ -14,10 +15,23 @@ while [ $# -gt 0 ]; do opam_jobs=$2 shift ;; + --no-cleanup) + CLEANUP_WORKSPACE=off + ;; esac shift done +# Cleanup the cargo and dune workspace, to make sure we are in a clean +# state +cleanup_workspace() { + cargo clean + ( + cd engine + dune clean + ) +} + # Warns if we're building in a dirty checkout of hax: while hacking on # hax, we should really be using `just build`. warn_if_dirty() { @@ -86,6 +100,10 @@ install_ocaml_engine() { ) } +if [ "$CLEANUP_WORKSPACE" = "on" ]; then + cleanup_workspace +fi + warn_if_dirty for binary in opam node rustup jq; do From c297dc516a80457403b070ec42771dade92b9213 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 16:27:24 +0100 Subject: [PATCH 35/59] feat(setup.sh): add `--help` message --- setup.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup.sh b/setup.sh index 18101ff36..2e592d1a6 100755 --- a/setup.sh +++ b/setup.sh @@ -18,6 +18,16 @@ while [ $# -gt 0 ]; do --no-cleanup) CLEANUP_WORKSPACE=off ;; + --help) + echo "hax setup script" + echo "" + echo "Usage: $0 [OPTIONS]" + echo "" + echo "Options:" + echo ' -j The number of opam jobs to run in parallel' + echo ' --no-cleanup Disables the default behavior that runs `cargo clean` and `dune clean`' + exit + ;; esac shift done From 62366a44c995976c12f440f1276170d64a1a68af Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 16:54:13 +0100 Subject: [PATCH 36/59] fix(setup.sh): clean: use opam, not dune --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 2e592d1a6..b68f24119 100755 --- a/setup.sh +++ b/setup.sh @@ -25,7 +25,7 @@ while [ $# -gt 0 ]; do echo "" echo "Options:" echo ' -j The number of opam jobs to run in parallel' - echo ' --no-cleanup Disables the default behavior that runs `cargo clean` and `dune clean`' + echo ' --no-cleanup Disables the default behavior that runs `cargo clean` and `opam clean`' exit ;; esac @@ -38,7 +38,7 @@ cleanup_workspace() { cargo clean ( cd engine - dune clean + opam clean ) } From 37fee7aa188c72687d49e6261516818866d01ea5 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 16:54:39 +0100 Subject: [PATCH 37/59] fix(setup.sh): first check for binaries, then do cleanup --- setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index b68f24119..607661a42 100755 --- a/setup.sh +++ b/setup.sh @@ -110,10 +110,6 @@ install_ocaml_engine() { ) } -if [ "$CLEANUP_WORKSPACE" = "on" ]; then - cleanup_workspace -fi - warn_if_dirty for binary in opam node rustup jq; do @@ -121,5 +117,9 @@ for binary in opam node rustup jq; do done ensure_node_is_recent_enough +if [ "$CLEANUP_WORKSPACE" = "on" ]; then + cleanup_workspace +fi + install_rust_binaries install_ocaml_engine From 737aa3fdf4e6110e055237265aff6a37dda0d96d Mon Sep 17 00:00:00 2001 From: Maxime Buyse Date: Wed, 13 Nov 2024 17:03:42 +0100 Subject: [PATCH 38/59] Upstream fstar core changes from cryspen-sandwich. --- proof-libs/fstar/core/Alloc.Borrow.fst | 3 ++ proof-libs/fstar/core/Alloc.Boxed.fst | 3 ++ proof-libs/fstar/core/Alloc.Fmt.fsti | 2 +- proof-libs/fstar/core/Alloc.String.fst | 12 ++++++++ proof-libs/fstar/core/Alloc.Vec.fst | 3 ++ proof-libs/fstar/core/Core.Borrow.fsti | 5 ++++ proof-libs/fstar/core/Core.Convert.fst | 6 ++++ proof-libs/fstar/core/Core.Error.fsti | 10 +++++++ proof-libs/fstar/core/Core.Fmt.fsti | 8 ++++- .../fstar/core/Core.Iter.Traits.Collect.fst | 17 +++++++---- .../fstar/core/Core.Iter.Traits.Iterator.fst | 1 + proof-libs/fstar/core/Core.Marker.fst | 29 ++++++++++++++++++ proof-libs/fstar/core/Core.Ops.Bit.fsti | 6 ++++ proof-libs/fstar/core/Core.Option.fst | 30 +++++++++++++++++++ proof-libs/fstar/core/Core.Result.fst | 12 ++++++++ .../fstar/core/Std.Collections.Hash.Map.fsti | 8 +++++ proof-libs/fstar/core/Std.Hash.Random.fsti | 5 ++++ proof-libs/fstar/core/Std.Io.Error.fsti | 6 ++++ proof-libs/fstar/core/Std.Io.fsti | 29 ++++++++++++++++++ 19 files changed, 188 insertions(+), 7 deletions(-) create mode 100644 proof-libs/fstar/core/Alloc.Borrow.fst create mode 100644 proof-libs/fstar/core/Alloc.Boxed.fst create mode 100644 proof-libs/fstar/core/Core.Borrow.fsti create mode 100644 proof-libs/fstar/core/Core.Error.fsti create mode 100644 proof-libs/fstar/core/Core.Ops.Bit.fsti create mode 100644 proof-libs/fstar/core/Std.Collections.Hash.Map.fsti create mode 100644 proof-libs/fstar/core/Std.Hash.Random.fsti create mode 100644 proof-libs/fstar/core/Std.Io.Error.fsti create mode 100644 proof-libs/fstar/core/Std.Io.fsti diff --git a/proof-libs/fstar/core/Alloc.Borrow.fst b/proof-libs/fstar/core/Alloc.Borrow.fst new file mode 100644 index 000000000..a001c3b2d --- /dev/null +++ b/proof-libs/fstar/core/Alloc.Borrow.fst @@ -0,0 +1,3 @@ +module Alloc.Borrow + +type t_Cow t = t diff --git a/proof-libs/fstar/core/Alloc.Boxed.fst b/proof-libs/fstar/core/Alloc.Boxed.fst new file mode 100644 index 000000000..fb46eea30 --- /dev/null +++ b/proof-libs/fstar/core/Alloc.Boxed.fst @@ -0,0 +1,3 @@ +module Alloc.Boxed + +type t_Box t t_Global = t diff --git a/proof-libs/fstar/core/Alloc.Fmt.fsti b/proof-libs/fstar/core/Alloc.Fmt.fsti index 0c9f76f56..7c0b405af 100644 --- a/proof-libs/fstar/core/Alloc.Fmt.fsti +++ b/proof-libs/fstar/core/Alloc.Fmt.fsti @@ -3,7 +3,7 @@ open Rust_primitives include Core.Fmt -val impl_2__new_v1 (pieces: t_Slice string) (args: Core.Fmt.Rt.t_Argument): t_Arguments +val impl_2__new_v1 (sz1:usize) (sz2: usize) (pieces: t_Slice string) (args: Core.Fmt.Rt.t_Argument): t_Arguments val impl_7__write_fmt (fmt: t_Formatter) (args: t_Arguments): t_Result val format (args: t_Arguments): string diff --git a/proof-libs/fstar/core/Alloc.String.fst b/proof-libs/fstar/core/Alloc.String.fst index e4e56287c..d0a7d2660 100644 --- a/proof-libs/fstar/core/Alloc.String.fst +++ b/proof-libs/fstar/core/Alloc.String.fst @@ -2,4 +2,16 @@ module Alloc.String type t_String = string +let impl__String__new (): t_String = "" +let impl__String__push_str (self: t_String) (s: t_String): t_String = + self ^ s + +let impl__String__push (self: t_String) (ch: FStar.Char.char) = + self ^ (FStar.String.string_of_char ch) + +let impl__String__pop (self: t_String): (Alloc.String.t_String & Core.Option.t_Option FStar.Char.char) = + let l = FStar.String.length self in + if l > 0 then + (FStar.String.sub self 0 (l - 1), Core.Option.Option_Some (FStar.String.index self (l - 1))) + else (self, Core.Option.Option_None) diff --git a/proof-libs/fstar/core/Alloc.Vec.fst b/proof-libs/fstar/core/Alloc.Vec.fst index 01f566049..6e3b411e1 100644 --- a/proof-libs/fstar/core/Alloc.Vec.fst +++ b/proof-libs/fstar/core/Alloc.Vec.fst @@ -35,3 +35,6 @@ instance update_at_tc_array t n: update_at_tc (t_Vec t ()) (int_t n) = { update_at = (fun arr i x -> FStar.Seq.upd arr (v i) x); } + +let impl_1__is_empty #t (#[(Tactics.exact (`()))]alloc:unit) (v: t_Vec t alloc): bool = + Seq.length v = 0 diff --git a/proof-libs/fstar/core/Core.Borrow.fsti b/proof-libs/fstar/core/Core.Borrow.fsti new file mode 100644 index 000000000..cadb1a99c --- /dev/null +++ b/proof-libs/fstar/core/Core.Borrow.fsti @@ -0,0 +1,5 @@ +module Core.Borrow + +class t_Borrow (v_Self: Type0) (v_Borrowed: Type0) = { + f__hax_placeholder:unit +} diff --git a/proof-libs/fstar/core/Core.Convert.fst b/proof-libs/fstar/core/Core.Convert.fst index cfac41d66..0cf837881 100644 --- a/proof-libs/fstar/core/Core.Convert.fst +++ b/proof-libs/fstar/core/Core.Convert.fst @@ -72,4 +72,10 @@ class t_AsRef self t = { f_as_ref: self -> t; } +instance as_ref_id a: t_AsRef a a = { + f_as_ref_pre = (fun _ -> true); + f_as_ref_post = (fun _ _ -> true); + f_as_ref = (fun x -> x) +} + type t_Infallible = _:unit{False} diff --git a/proof-libs/fstar/core/Core.Error.fsti b/proof-libs/fstar/core/Core.Error.fsti new file mode 100644 index 000000000..78dc74a11 --- /dev/null +++ b/proof-libs/fstar/core/Core.Error.fsti @@ -0,0 +1,10 @@ +module Core.Error + +open FStar.Mul + +class t_Error (v_Self: Type0) = { + [@@@ FStar.Tactics.Typeclasses.no_method]_super_11603873402755071380:Core.Fmt.t_Debug v_Self; + [@@@ FStar.Tactics.Typeclasses.no_method]_super_7348497752681407507:Core.Fmt.t_Display v_Self; + + f__hax_placeholder:unit +} diff --git a/proof-libs/fstar/core/Core.Fmt.fsti b/proof-libs/fstar/core/Core.Fmt.fsti index f19fdc662..50b2d5be2 100644 --- a/proof-libs/fstar/core/Core.Fmt.fsti +++ b/proof-libs/fstar/core/Core.Fmt.fsti @@ -12,8 +12,14 @@ class t_Display t_Self = { f_fmt: t_Self -> t_Formatter -> (t_Formatter & Core.Result.t_Result Prims.unit t_Error) } +class t_Debug t_Self = { + f_dbg_fmt_pre: t_Self -> Core.Fmt.t_Formatter -> bool; + f_dbg_fmt_post: t_Self -> Core.Fmt.t_Formatter -> (Core.Fmt.t_Formatter & Core.Result.t_Result Prims.unit Core.Fmt.t_Error) -> bool; + f_dbg_fmt: t_Self -> Core.Fmt.t_Formatter -> (Core.Fmt.t_Formatter & Core.Result.t_Result Prims.unit Core.Fmt.t_Error) +} + val t_Arguments: Type0 -val impl_2__new_v1 (pieces: t_Slice string) (args: t_Slice Core.Fmt.Rt.t_Argument): t_Arguments +val impl_2__new_v1 (sz1: usize) (sz2: usize) (pieces: t_Slice string) (args: t_Slice Core.Fmt.Rt.t_Argument): t_Arguments val impl_7__write_fmt (fmt: t_Formatter) (args: t_Arguments): t_Formatter & t_Result val impl_2__new_const (args: t_Slice string): t_Arguments diff --git a/proof-libs/fstar/core/Core.Iter.Traits.Collect.fst b/proof-libs/fstar/core/Core.Iter.Traits.Collect.fst index 33b16938c..81190f411 100644 --- a/proof-libs/fstar/core/Core.Iter.Traits.Collect.fst +++ b/proof-libs/fstar/core/Core.Iter.Traits.Collect.fst @@ -1,14 +1,21 @@ module Core.Iter.Traits.Collect -class into_iterator self = { - f_IntoIter: Type0; - // f_Item: Type0; - f_into_iter: self -> f_IntoIter; +class into_iterator (v_Self: Type0) = { + // f_Item:Type0; + f_IntoIter:Type0; + f_IntoIter_Iterator:Core.Iter.Traits.Iterator.t_Iterator f_IntoIter; + f_into_iter_pre:v_Self -> bool; + f_into_iter_post:v_Self -> f_IntoIter -> bool; + f_into_iter:x0: v_Self + -> Prims.Pure f_IntoIter (f_into_iter_pre x0) (fun result -> f_into_iter_post x0 result) } let t_IntoIterator = into_iterator -unfold instance impl t {| Core.Iter.Traits.Iterator.iterator t |}: into_iterator t = { +unfold instance impl t {| iterator_t: Core.Iter.Traits.Iterator.iterator t |}: into_iterator t = { f_IntoIter = t; f_into_iter = id; + f_IntoIter_Iterator = iterator_t; + f_into_iter_pre = (fun (self: t) -> true); + f_into_iter_post = (fun (self: t) (out: t) -> true) } diff --git a/proof-libs/fstar/core/Core.Iter.Traits.Iterator.fst b/proof-libs/fstar/core/Core.Iter.Traits.Iterator.fst index 4573af0d4..006ff8b7d 100644 --- a/proof-libs/fstar/core/Core.Iter.Traits.Iterator.fst +++ b/proof-libs/fstar/core/Core.Iter.Traits.Iterator.fst @@ -39,3 +39,4 @@ class iterator (self: Type u#0): Type u#1 = { f_all: self -> (f_Item -> bool) -> self * bool; } +let t_Iterator = iterator diff --git a/proof-libs/fstar/core/Core.Marker.fst b/proof-libs/fstar/core/Core.Marker.fst index dcf5440fc..f624d969e 100644 --- a/proof-libs/fstar/core/Core.Marker.fst +++ b/proof-libs/fstar/core/Core.Marker.fst @@ -1,5 +1,25 @@ module Core.Marker +type t_PhantomData (t: Type) = t + +class t_Send (h: Type) = { + dummy_send_field: unit +} + +(** we consider everything to be send *) +instance t_Send_all t: t_Send t = { + dummy_send_field = () +} + +class t_Sync (h: Type) = { + dummy_sync_field: unit +} + +(** we consider everything to be sync *) +instance t_Sync_all t: t_Sync t = { + dummy_sync_field = () +} + class t_Sized (h: Type) = { dummy_field: unit } @@ -17,3 +37,12 @@ class t_Copy (h: Type) = { instance t_Copy_all t: t_Copy t = { dummy_copy_field = () } + +class t_Clone (h: Type) = { + dummy_clone_field: unit +} + +(** we consider everything to be clonable *) +instance t_Clone_all t: t_Clone t = { + dummy_clone_field = () +} diff --git a/proof-libs/fstar/core/Core.Ops.Bit.fsti b/proof-libs/fstar/core/Core.Ops.Bit.fsti new file mode 100644 index 000000000..1805e9743 --- /dev/null +++ b/proof-libs/fstar/core/Core.Ops.Bit.fsti @@ -0,0 +1,6 @@ +module Core.Ops.Bit +open FStar.Mul + +class t_Shr (v_Self: Type0) (v_Rhs: Type0) = { + f_Output:Type0; +} diff --git a/proof-libs/fstar/core/Core.Option.fst b/proof-libs/fstar/core/Core.Option.fst index d3c57c44a..9f514751d 100644 --- a/proof-libs/fstar/core/Core.Option.fst +++ b/proof-libs/fstar/core/Core.Option.fst @@ -16,3 +16,33 @@ let impl__unwrap #t (x: t_Option t {Option_Some? x}): t = Option_Some?._0 x let impl__is_some #t_Self (self: t_Option t_Self): bool = Option_Some? self +let impl__is_none #t_Self (self: t_Option t_Self): bool = Option_None? self + +let impl__as_ref #t_Self (self: t_Option t_Self): t_Option t_Self = self + +let impl__unwrap_or_default + #t {| i1: Core.Default.t_Default t |} + (self: t_Option t) + = + match self with + | Option_Some inner -> inner + | Core.Option.Option_None -> Core.Default.f_default #t () + +let impl__unwrap_or + #t + (self: t_Option t) + (def: t) + = + match self with + | Option_Some inner -> inner + | Core.Option.Option_None -> def + +let impl__ok_or_else #t_Self #e (self: t_Option t_Self) (err: unit -> e): Core.Result.t_Result t_Self e = + match self with + | Option_Some inner -> Core.Result.Result_Ok inner + | Option_None -> Core.Result.Result_Err (err ()) + +let impl__ok_or #t_Self #e (self: t_Option t_Self) (err: e): Core.Result.t_Result t_Self e = + match self with + | Option_Some inner -> Core.Result.Result_Ok inner + | Option_None -> Core.Result.Result_Err err diff --git a/proof-libs/fstar/core/Core.Result.fst b/proof-libs/fstar/core/Core.Result.fst index ee958b651..ab3cd15d9 100644 --- a/proof-libs/fstar/core/Core.Result.fst +++ b/proof-libs/fstar/core/Core.Result.fst @@ -8,4 +8,16 @@ let impl__map_err #e1 #e2 (x: t_Result 't e1) (f: e1 -> e2): t_Result 't e2 = match x with | Result_Ok v -> Result_Ok v | Result_Err e -> Result_Err (f e) + +let impl__is_ok #t #e (self: t_Result t e): bool + = Result_Ok? self +let impl__map #t #e #u (self: t_Result t e) (f: t -> u): t_Result u e = + match self with + | Result_Ok v -> Result_Ok (f v) + | Result_Err e -> Result_Err e + +let impl__and_then #t #e #u (self: t_Result t e) (op: t -> t_Result u e): t_Result u e = + match self with + | Result_Ok v -> op v + | Result_Err e -> Result_Err e diff --git a/proof-libs/fstar/core/Std.Collections.Hash.Map.fsti b/proof-libs/fstar/core/Std.Collections.Hash.Map.fsti new file mode 100644 index 000000000..82dd99551 --- /dev/null +++ b/proof-libs/fstar/core/Std.Collections.Hash.Map.fsti @@ -0,0 +1,8 @@ +module Std.Collections.Hash.Map + +open Core +open FStar.Mul + +type t_HashMap (v_K: Type0) (v_V: Type0) (v_S: Type0) = { + f__hax_placeholder:unit +} diff --git a/proof-libs/fstar/core/Std.Hash.Random.fsti b/proof-libs/fstar/core/Std.Hash.Random.fsti new file mode 100644 index 000000000..f2148d3fd --- /dev/null +++ b/proof-libs/fstar/core/Std.Hash.Random.fsti @@ -0,0 +1,5 @@ +module Std.Hash.Random + +type t_RandomState = { + dummy_random_state_field: unit +} diff --git a/proof-libs/fstar/core/Std.Io.Error.fsti b/proof-libs/fstar/core/Std.Io.Error.fsti new file mode 100644 index 000000000..7e8f8384f --- /dev/null +++ b/proof-libs/fstar/core/Std.Io.Error.fsti @@ -0,0 +1,6 @@ +module Std.Io.Error + +open Core +open FStar.Mul + +type t_Error = { f__hax_placeholder:Prims.unit } diff --git a/proof-libs/fstar/core/Std.Io.fsti b/proof-libs/fstar/core/Std.Io.fsti new file mode 100644 index 000000000..4c516dc11 --- /dev/null +++ b/proof-libs/fstar/core/Std.Io.fsti @@ -0,0 +1,29 @@ +module Std.Io + +open Core +open FStar.Mul + +class t_Read (v_Self: Type0) = { + f_read_pre:v_Self -> t_Slice u8 -> bool; + f_read_post:v_Self -> t_Slice u8 -> (v_Self & t_Slice u8 & Core.Result.t_Result usize Std.Io.Error.t_Error) + -> bool; + f_read:x0: v_Self -> x1: t_Slice u8 + -> Prims.Pure (v_Self & t_Slice u8 & Core.Result.t_Result usize Std.Io.Error.t_Error) + (f_read_pre x0 x1) + (fun result -> f_read_post x0 x1 result) +} + +class t_Write (v_Self: Type0) = { + f_write_pre:v_Self -> t_Slice u8 -> bool; + f_write_post:v_Self -> t_Slice u8 -> (v_Self & Core.Result.t_Result usize Std.Io.Error.t_Error) -> bool; + f_write:x0: v_Self -> x1: t_Slice u8 + -> Prims.Pure (v_Self & Core.Result.t_Result usize Std.Io.Error.t_Error) + (f_write_pre x0 x1) + (fun result -> f_write_post x0 x1 result); + f_flush_pre:v_Self -> bool; + f_flush_post:v_Self -> (v_Self & Core.Result.t_Result Prims.unit Std.Io.Error.t_Error) -> bool; + f_flush:x0: v_Self + -> Prims.Pure (v_Self & Core.Result.t_Result Prims.unit Std.Io.Error.t_Error) + (f_flush_pre x0) + (fun result -> f_flush_post x0 result) +} From c49e5f0e34dd19f9d0ad69985bbcc74140d375c1 Mon Sep 17 00:00:00 2001 From: Maxime Buyse Date: Wed, 13 Nov 2024 17:39:12 +0100 Subject: [PATCH 39/59] Revert into_iter changes to fix chacha20. --- .../fstar/core/Core.Iter.Traits.Collect.fst | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/proof-libs/fstar/core/Core.Iter.Traits.Collect.fst b/proof-libs/fstar/core/Core.Iter.Traits.Collect.fst index 81190f411..33b16938c 100644 --- a/proof-libs/fstar/core/Core.Iter.Traits.Collect.fst +++ b/proof-libs/fstar/core/Core.Iter.Traits.Collect.fst @@ -1,21 +1,14 @@ module Core.Iter.Traits.Collect -class into_iterator (v_Self: Type0) = { - // f_Item:Type0; - f_IntoIter:Type0; - f_IntoIter_Iterator:Core.Iter.Traits.Iterator.t_Iterator f_IntoIter; - f_into_iter_pre:v_Self -> bool; - f_into_iter_post:v_Self -> f_IntoIter -> bool; - f_into_iter:x0: v_Self - -> Prims.Pure f_IntoIter (f_into_iter_pre x0) (fun result -> f_into_iter_post x0 result) +class into_iterator self = { + f_IntoIter: Type0; + // f_Item: Type0; + f_into_iter: self -> f_IntoIter; } let t_IntoIterator = into_iterator -unfold instance impl t {| iterator_t: Core.Iter.Traits.Iterator.iterator t |}: into_iterator t = { +unfold instance impl t {| Core.Iter.Traits.Iterator.iterator t |}: into_iterator t = { f_IntoIter = t; f_into_iter = id; - f_IntoIter_Iterator = iterator_t; - f_into_iter_pre = (fun (self: t) -> true); - f_into_iter_post = (fun (self: t) (out: t) -> true) } From 0bfd4435c5425215f40516ca5a91f37422f9f050 Mon Sep 17 00:00:00 2001 From: karthikbhargavan Date: Wed, 27 Nov 2024 17:57:48 +0100 Subject: [PATCH 40/59] Revert "fix(engine): item ordering" --- engine/lib/dependencies.ml | 953 ++++++++---------- ...oolchain__attribute-opaque into-fstar.snap | 4 +- .../toolchain__attributes into-fstar.snap | 140 +-- ...in__constructor-as-closure into-fstar.snap | 8 +- .../toolchain__cyclic-modules into-fstar.snap | 68 +- .../toolchain__enum-repr into-coq.snap | 20 +- .../toolchain__enum-repr into-fstar.snap | 12 +- .../toolchain__enum-repr into-ssprove.snap | 32 +- .../toolchain__generics into-fstar.snap | 84 +- .../snapshots/toolchain__guards into-coq.snap | 48 +- .../toolchain__guards into-fstar.snap | 32 +- .../toolchain__guards into-ssprove.snap | 64 +- .../toolchain__include-flag into-coq.snap | 28 +- .../toolchain__include-flag into-fstar.snap | 16 +- .../toolchain__interface-only into-fstar.snap | 34 +- .../toolchain__literals into-coq.snap | 66 +- .../toolchain__literals into-fstar.snap | 162 +-- .../toolchain__loops into-fstar.snap | 508 +++++----- ..._mut-ref-functionalization into-fstar.snap | 280 ++--- .../toolchain__naming into-fstar.snap | 90 +- .../toolchain__pattern-or into-coq.snap | 42 +- .../toolchain__pattern-or into-fstar.snap | 24 +- .../toolchain__reordering into-coq.snap | 93 +- .../toolchain__reordering into-fstar.snap | 66 +- .../toolchain__reordering into-ssprove.snap | 159 +-- .../toolchain__side-effects into-fstar.snap | 424 ++++---- .../toolchain__side-effects into-ssprove.snap | 350 +++---- .../toolchain__traits into-fstar.snap | 120 +-- .../toolchain__unsafe into-fstar.snap | 10 +- tests/reordering/src/lib.rs | 25 - 30 files changed, 1796 insertions(+), 2166 deletions(-) diff --git a/engine/lib/dependencies.ml b/engine/lib/dependencies.ml index 0aa79f898..e46fcb555 100644 --- a/engine/lib/dependencies.ml +++ b/engine/lib/dependencies.ml @@ -33,557 +33,482 @@ module Make (F : Features.T) = struct module Attrs = Attr_payloads.Make (F) (Error) - module type WITH_ITEMS = sig - val uid_associated_items : item list -> Ast.attrs -> item list - val bundle_cyclic_modules : item list -> item list - val sort : item list -> item list - val recursive_bundles : item list -> item list list * item list - - val filter_by_inclusion_clauses : - Types.inclusion_clause list -> item list -> item list - end - - module WithItems (CTX : sig - val items : item list - end) = - struct - let uid_associated_items : attrs -> item list = - let open Attrs.WithItems (struct - let items = CTX.items - end) in - raw_associated_item >> List.map ~f:(snd >> item_of_uid) - - (** `Ordered_concrete_ident` is just like `Concrete_ident`, but - the semantics of comparing two concrete idents is now defined in - term of which comes first in `CTX.items`. If we compare items not - present in `CTX.items` we revert to `Concrete_ident.compare`. *) - module Ordered_concrete_ident = struct - include Concrete_ident - - open struct - let order : t -> int option = - let table : (t, int) Hashtbl.t = - let table = Hashtbl.create (module Concrete_ident) in - List.iteri CTX.items ~f:(fun i item -> - Hashtbl.set ~key:item.ident ~data:i table); - table + let uid_associated_items (items : item list) : attrs -> item list = + let open Attrs.WithItems (struct + let items = items + end) in + raw_associated_item >> List.map ~f:(snd >> item_of_uid) + + module ItemGraph = struct + module G = Graph.Persistent.Digraph.Concrete (Concrete_ident) + module Topological = Graph.Topological.Make_stable (G) + module Oper = Graph.Oper.P (G) + + let vertices_of_item (i : item) : G.V.t list = + let ( @ ) = Set.union in + let v = U.Reducers.collect_concrete_idents in + let concat_map f = + List.map ~f >> Set.union_list (module Concrete_ident) + in + let set = + match i.v with + | Fn { name = _; generics; body; params; _ } -> + v#visit_generics () generics + @ v#visit_expr () body + @ concat_map (v#visit_param ()) params + | TyAlias { name = _; generics; ty } -> + v#visit_generics () generics @ v#visit_ty () ty + | Type { name = _; generics; variants; is_struct = (_ : bool) } -> + v#visit_generics () generics + @ concat_map (v#visit_variant ()) variants + | IMacroInvokation { macro; argument = (_ : string); span; witness = _ } + -> + v#visit_concrete_ident () macro @ v#visit_span () span + | Trait { name = _; generics; items; safety = _ } -> + v#visit_generics () generics + @ concat_map (v#visit_trait_item ()) items + | Impl { generics; self_ty; of_trait; items; parent_bounds; safety = _ } + -> + v#visit_generics () generics + @ v#visit_ty () self_ty + @ v#visit_concrete_ident () (fst of_trait) + @ concat_map (v#visit_generic_value ()) (snd of_trait) + @ concat_map (v#visit_impl_item ()) items + @ concat_map + (fun (ie, ii) -> + v#visit_impl_expr () ie @ v#visit_impl_ident () ii) + parent_bounds + | Alias { name = _; item } -> v#visit_concrete_ident () item + | Use _ | Quote _ | HaxError _ | NotImplementedYet -> + Set.empty (module Concrete_ident) + in + set |> Set.to_list + + let vertices_of_items ~uid_associated_items (items : item list) : G.E.t list + = + List.concat_map + ~f:(fun i -> + let assoc = + uid_associated_items i.attrs |> List.map ~f:(fun i -> i.ident) in - Hashtbl.find table - end + vertices_of_item i @ assoc |> List.map ~f:(Fn.const i.ident &&& Fn.id)) + items - let compare (a : t) (b : t) = - match (order a, order b) with - | Some a, Some b -> Int.compare a b - | Some _, None -> 1 - | None, Some _ -> -1 - | _ -> Concrete_ident.compare a b - end + let of_items ~original_items (items : item list) : G.t = + let init = + List.fold ~init:G.empty ~f:(fun g -> ident_of >> G.add_vertex g) items + in + let uid_associated_items = uid_associated_items original_items in + vertices_of_items ~uid_associated_items items + |> List.fold ~init ~f:(G.add_edge >> uncurry) + + let transitive_dependencies_of (g : G.t) (selection : Concrete_ident.t list) + : Concrete_ident.t Hash_set.t = + let set = Hash_set.create (module Concrete_ident) in + let rec visit vertex = + if Hash_set.mem set vertex |> not then ( + Hash_set.add set vertex; + G.iter_succ visit g vertex) + in + List.filter ~f:(G.mem_vertex g) selection |> List.iter ~f:visit; + set - module ItemGraph = struct - module G = Graph.Persistent.Digraph.Concrete (Ordered_concrete_ident) - module Topological = Graph.Topological.Make_stable (G) - module Oper = Graph.Oper.P (G) + let transitive_dependencies_of_items ~original_items (items : item list) + ?(graph = of_items ~original_items items) + (selection : Concrete_ident.t list) : item list = + let set = transitive_dependencies_of graph selection in + items |> List.filter ~f:(ident_of >> Hash_set.mem set) - let vertices_of_item (i : item) : G.V.t list = - let ( @ ) = Set.union in - let v = U.Reducers.collect_concrete_idents in - let concat_map f = - List.map ~f >> Set.union_list (module Concrete_ident) - in - let set = - match i.v with - | Fn { name = _; generics; body; params; _ } -> - v#visit_generics () generics - @ v#visit_expr () body - @ concat_map (v#visit_param ()) params - | TyAlias { name = _; generics; ty } -> - v#visit_generics () generics @ v#visit_ty () ty - | Type { name = _; generics; variants; is_struct = (_ : bool) } -> - v#visit_generics () generics - @ concat_map (v#visit_variant ()) variants - | IMacroInvokation - { macro; argument = (_ : string); span; witness = _ } -> - v#visit_concrete_ident () macro @ v#visit_span () span - | Trait { name = _; generics; items; safety = _ } -> - v#visit_generics () generics - @ concat_map (v#visit_trait_item ()) items - | Impl - { generics; self_ty; of_trait; items; parent_bounds; safety = _ } - -> - v#visit_generics () generics - @ v#visit_ty () self_ty - @ v#visit_concrete_ident () (fst of_trait) - @ concat_map (v#visit_generic_value ()) (snd of_trait) - @ concat_map (v#visit_impl_item ()) items - @ concat_map - (fun (ie, ii) -> - v#visit_impl_expr () ie @ v#visit_impl_ident () ii) - parent_bounds - | Alias { name = _; item } -> v#visit_concrete_ident () item - | Use _ | Quote _ | HaxError _ | NotImplementedYet -> - Set.empty (module Concrete_ident) - in - set |> Set.to_list + module MutRec = struct + module Bundle = struct + type t = concrete_ident list - let vertices_of_items (items : item list) : G.E.t list = - List.concat_map - ~f:(fun i -> - let assoc = - uid_associated_items i.attrs |> List.map ~f:(fun i -> i.ident) - in - vertices_of_item i @ assoc - |> List.map ~f:(Fn.const i.ident &&& Fn.id)) - items - - let of_items (items : item list) : G.t = - let init = - List.fold ~init:G.empty ~f:(fun g -> ident_of >> G.add_vertex g) items - in - vertices_of_items items |> List.fold ~init ~f:(G.add_edge >> uncurry) - - let transitive_dependencies_of (g : G.t) - (selection : Concrete_ident.t list) : Concrete_ident.t Hash_set.t = - let set = Hash_set.create (module Concrete_ident) in - let rec visit vertex = - if Hash_set.mem set vertex |> not then ( - Hash_set.add set vertex; - G.iter_succ visit g vertex) - in - List.filter ~f:(G.mem_vertex g) selection |> List.iter ~f:visit; - set - - let transitive_dependencies_of_items (items : item list) - ?(graph = of_items items) (selection : Concrete_ident.t list) : - item list = - let set = transitive_dependencies_of graph selection in - items |> List.filter ~f:(ident_of >> Hash_set.mem set) - - module MutRec = struct - module Bundle = struct - type t = concrete_ident list - - let namespaces_of : t -> Namespace.Set.t = - List.map ~f:Namespace.of_concrete_ident - >> Set.of_list (module Namespace) - - let homogeneous_namespace (ns : t) : bool = - Set.length (namespaces_of ns) <= 1 - end - - type t = { - mut_rec_bundles : Bundle.t list; - non_mut_rec : concrete_ident list; - } - - module SCC = Graph.Components.Make (G) - - let of_graph (g : G.t) : t = - let is_mut_rec_with_itself x = G.mem_edge g x x in - let mut_rec_bundles, non_mut_rec = - SCC.scc_list g - |> List.partition_map ~f:(function - | [] -> failwith "scc_list returned empty cluster" - | [ x ] when is_mut_rec_with_itself x |> not -> Second x - | bundle -> First bundle) - in - { mut_rec_bundles; non_mut_rec } + let namespaces_of : t -> Namespace.Set.t = + List.map ~f:Namespace.of_concrete_ident + >> Set.of_list (module Namespace) - let all_homogeneous_namespace (g : G.t) = - List.for_all ~f:Bundle.homogeneous_namespace - (of_graph g).mut_rec_bundles + let homogeneous_namespace (ns : t) : bool = + Set.length (namespaces_of ns) <= 1 end - module CyclicDep = struct - module Bundle = struct - type t = Concrete_ident.t list - - module G = Graph.Persistent.Graph.Concrete (Ordered_concrete_ident) - module CC = Graph.Components.Undirected (G) - - let cycles g = CC.components_list g - end - - (* This is a solution that bundles together everything that belongs to the same module SCC. - It results in bundles that are much bigger than they could be but is a simple solution - to the problem described in https://github.com/hacspec/hax/issues/995#issuecomment-2411114404 *) - let of_mod_sccs (items : item list) - (mod_graph_cycles : Namespace.Set.t list) : Bundle.t list = - let item_names = List.map items ~f:(fun x -> x.ident) in - let cycles = - List.filter mod_graph_cycles ~f:(fun set -> - Prelude.Set.length set > 1) - in - let bundles = - List.map cycles ~f:(fun set -> - List.filter item_names ~f:(fun item -> - Prelude.Set.mem set (Namespace.of_concrete_ident item))) - in - bundles - end + type t = { + mut_rec_bundles : Bundle.t list; + non_mut_rec : concrete_ident list; + } - open Graph.Graphviz.Dot (struct - include G + module SCC = Graph.Components.Make (G) - let graph_attributes _ = [] - let default_vertex_attributes _ = [] - let vertex_name i = "\"" ^ Concrete_ident.show i ^ "\"" + let of_graph (g : G.t) : t = + let is_mut_rec_with_itself x = G.mem_edge g x x in + let mut_rec_bundles, non_mut_rec = + SCC.scc_list g + |> List.partition_map ~f:(function + | [] -> failwith "scc_list returned empty cluster" + | [ x ] when is_mut_rec_with_itself x |> not -> Second x + | bundle -> First bundle) + in + { mut_rec_bundles; non_mut_rec } - let vertex_attributes i = - [ `Label (Concrete_ident.DefaultViewAPI.to_definition_name i) ] + let all_homogeneous_namespace (g : G.t) = + List.for_all ~f:Bundle.homogeneous_namespace + (of_graph g).mut_rec_bundles + end - let get_subgraph i = - let ns = Namespace.of_concrete_ident i in - let sg_name = String.concat ~sep:"__" ns in - let label = String.concat ~sep:"::" ns in - let open Graph.Graphviz.DotAttributes in - Some { sg_name; sg_attributes = [ `Label label ]; sg_parent = None } + module CyclicDep = struct + module Bundle = struct + type t = Concrete_ident.t list - let default_edge_attributes _ = [] - let edge_attributes _ = [] - end) + module G = Graph.Persistent.Graph.Concrete (Concrete_ident) + module CC = Graph.Components.Undirected (G) - let print oc items = output_graph oc (of_items items) - end + let cycles g = CC.components_list g + end - module ModGraph = struct - module G = Graph.Persistent.Digraph.Concrete (Namespace) - - let of_items (items : item list) : G.t = - let ig = ItemGraph.of_items items in - List.map ~f:(ident_of >> (Namespace.of_concrete_ident &&& Fn.id)) items - |> Map.of_alist_multi (module Namespace) - |> Map.map - ~f: - (List.concat_map - ~f: - (ItemGraph.G.succ ig - >> List.map ~f:Namespace.of_concrete_ident) - >> Set.of_list (module Namespace) - >> Set.to_list) - |> Map.to_alist - |> List.concat_map ~f:(fun (x, ys) -> List.map ~f:(fun y -> (x, y)) ys) - |> List.fold ~init:G.empty ~f:(G.add_edge >> uncurry) + (* This is a solution that bundles together everything that belongs to the same module SCC. + It results in bundles that are much bigger than they could be but is a simple solution + to the problem described in https://github.com/hacspec/hax/issues/995#issuecomment-2411114404 *) + let of_mod_sccs (items : item list) + (mod_graph_cycles : Namespace.Set.t list) : Bundle.t list = + let item_names = List.map items ~f:(fun x -> x.ident) in + let cycles = + List.filter mod_graph_cycles ~f:(fun set -> + Prelude.Set.length set > 1) + in + let bundles = + List.map cycles ~f:(fun set -> + List.filter item_names ~f:(fun item -> + Prelude.Set.mem set (Namespace.of_concrete_ident item))) + in + bundles + end - module SCC = Graph.Components.Make (G) + open Graph.Graphviz.Dot (struct + include G - let cycles g : Namespace.Set.t list = - SCC.scc_list g |> List.map ~f:(Set.of_list (module Namespace)) + let graph_attributes _ = [] + let default_vertex_attributes _ = [] + let vertex_name i = "\"" ^ Concrete_ident.show i ^ "\"" - open Graph.Graphviz.Dot (struct - include G + let vertex_attributes i = + [ `Label (Concrete_ident.DefaultViewAPI.to_definition_name i) ] - let graph_attributes _ = [] - let default_vertex_attributes _ = [] - let vertex_name ns = "\"" ^ String.concat ~sep:"::" ns ^ "\"" - let vertex_attributes _ = [] - let get_subgraph _ = None - let default_edge_attributes _ = [] - let edge_attributes _ = [] - end) + let get_subgraph i = + let ns = Namespace.of_concrete_ident i in + let sg_name = String.concat ~sep:"__" ns in + let label = String.concat ~sep:"::" ns in + let open Graph.Graphviz.DotAttributes in + Some { sg_name; sg_attributes = [ `Label label ]; sg_parent = None } - let print oc items = - let g = of_items items in - let complicated_ones = - SCC.scc_list g - |> List.concat_map ~f:(function [] | [ _ ] -> [] | bundle -> bundle) - in - let g = - List.concat_map - ~f:(fun ns -> - List.map - ~f:(fun y -> (ns, y)) - (G.succ g ns - |> List.filter - ~f:(List.mem ~equal:[%equal: Namespace.t] complicated_ones) - )) - complicated_ones - |> List.fold ~init:G.empty ~f:(G.add_edge >> uncurry) - in - output_graph oc g - end + let default_edge_attributes _ = [] + let edge_attributes _ = [] + end) - let ident_list_to_string = - List.map ~f:Concrete_ident.DefaultViewAPI.show >> String.concat ~sep:", " + let print oc items = output_graph oc (of_items ~original_items:items items) + end - let sort (items : item list) : item list = - let g = ItemGraph.of_items items |> ItemGraph.Oper.mirror in - let lookup (name : concrete_ident) = - List.find ~f:(ident_of >> Concrete_ident.equal name) items - in - let items' = - ItemGraph.Topological.fold List.cons g [] - |> List.filter_map ~f:lookup |> List.rev + module ModGraph = struct + module G = Graph.Persistent.Digraph.Concrete (Namespace) + + let of_items (items : item list) : G.t = + let ig = ItemGraph.of_items ~original_items:items items in + List.map ~f:(ident_of >> (Namespace.of_concrete_ident &&& Fn.id)) items + |> Map.of_alist_multi (module Namespace) + |> Map.map + ~f: + (List.concat_map + ~f: + (ItemGraph.G.succ ig + >> List.map ~f:Namespace.of_concrete_ident) + >> Set.of_list (module Namespace) + >> Set.to_list) + |> Map.to_alist + |> List.concat_map ~f:(fun (x, ys) -> List.map ~f:(fun y -> (x, y)) ys) + |> List.fold ~init:G.empty ~f:(G.add_edge >> uncurry) + + module SCC = Graph.Components.Make (G) + + let cycles g : Namespace.Set.t list = + SCC.scc_list g |> List.map ~f:(Set.of_list (module Namespace)) + + open Graph.Graphviz.Dot (struct + include G + + let graph_attributes _ = [] + let default_vertex_attributes _ = [] + let vertex_name ns = "\"" ^ String.concat ~sep:"::" ns ^ "\"" + let vertex_attributes _ = [] + let get_subgraph _ = None + let default_edge_attributes _ = [] + let edge_attributes _ = [] + end) + + let print oc items = + let g = of_items items in + let complicated_ones = + SCC.scc_list g + |> List.concat_map ~f:(function [] | [ _ ] -> [] | bundle -> bundle) in - assert ( - let of_list = - List.map ~f:ident_of >> Set.of_list (module Concrete_ident) - in - let items = of_list items in - let items' = of_list items' in - Set.equal items items'); - items' - - let filter_by_inclusion_clauses' (clauses : Types.inclusion_clause list) - (items : item list) : item list * Concrete_ident.t Hash_set.t = - let graph = ItemGraph.of_items items in - let of_list = Set.of_list (module Concrete_ident) in - let selection = List.map ~f:ident_of items |> of_list in - let deps_of = - let to_set = Hash_set.to_list >> of_list in - Set.to_list >> ItemGraph.transitive_dependencies_of graph >> to_set - in - let show_ident_set = - Set.to_list - >> List.map ~f:Concrete_ident.DefaultViewAPI.show - >> List.map ~f:(fun s -> " - " ^ s) - >> String.concat ~sep:"\n" + let g = + List.concat_map + ~f:(fun ns -> + List.map + ~f:(fun y -> (ns, y)) + (G.succ g ns + |> List.filter + ~f:(List.mem ~equal:[%equal: Namespace.t] complicated_ones))) + complicated_ones + |> List.fold ~init:G.empty ~f:(G.add_edge >> uncurry) in - let show_inclusion_clause Types.{ kind; namespace } = - (match kind with - | Excluded -> "-" - | SignatureOnly -> "+:" - | Included deps_kind -> ( - match deps_kind with - | Transitive -> "+" - | Shallow -> "+~" - | None' -> "+!")) - ^ "[" - ^ (List.map - ~f:(function Glob One -> "*" | Glob Many -> "**" | Exact s -> s) - namespace.chunks - |> String.concat ~sep:"::") - ^ "]" + output_graph oc g + end + + let ident_list_to_string = + List.map ~f:Concrete_ident.DefaultViewAPI.show >> String.concat ~sep:", " + + let sort (items : item list) : item list = + let g = + ItemGraph.of_items ~original_items:items items |> ItemGraph.Oper.mirror + in + let lookup (name : concrete_ident) = + List.find ~f:(ident_of >> Concrete_ident.equal name) items + in + let items' = + ItemGraph.Topological.fold List.cons g [] + |> List.filter_map ~f:lookup |> List.rev + in + assert ( + let of_list = + List.map ~f:ident_of >> Set.of_list (module Concrete_ident) in - let items_drop_body = Hash_set.create (module Concrete_ident) in - let apply_clause selection' (clause : Types.inclusion_clause) = - let matches = Concrete_ident.matches_namespace clause.Types.namespace in - let matched0 = Set.filter ~f:matches selection in - let with_deps, drop_bodies = - match clause.kind with - | Included Transitive -> (true, false) - | Included Shallow -> (true, true) - | Included None' -> (false, false) - | SignatureOnly -> (false, true) - | Excluded -> (false, false) - in - let matched = matched0 |> if with_deps then deps_of else Fn.id in - if drop_bodies then ( - Set.iter ~f:(Hash_set.add items_drop_body) matched; - Set.iter ~f:(Hash_set.remove items_drop_body) matched0); - Logs.info (fun m -> - m "The clause [%s] will %s the following Rust items:\n%s" - (show_inclusion_clause clause) - (match clause.kind with Excluded -> "remove" | _ -> "add") - @@ show_ident_set matched); - let set_op = - match clause.kind with - | Included _ | SignatureOnly -> Set.union - | Excluded -> Set.diff - in - let result = set_op selection' matched in - result + let items = of_list items in + let items' = of_list items' in + Set.equal items items'); + items' + + let filter_by_inclusion_clauses' ~original_items + (clauses : Types.inclusion_clause list) (items : item list) : + item list * Concrete_ident.t Hash_set.t = + let graph = ItemGraph.of_items ~original_items items in + let of_list = Set.of_list (module Concrete_ident) in + let selection = List.map ~f:ident_of items |> of_list in + let deps_of = + let to_set = Hash_set.to_list >> of_list in + Set.to_list >> ItemGraph.transitive_dependencies_of graph >> to_set + in + let show_ident_set = + Set.to_list + >> List.map ~f:Concrete_ident.DefaultViewAPI.show + >> List.map ~f:(fun s -> " - " ^ s) + >> String.concat ~sep:"\n" + in + let show_inclusion_clause Types.{ kind; namespace } = + (match kind with + | Excluded -> "-" + | SignatureOnly -> "+:" + | Included deps_kind -> ( + match deps_kind with + | Transitive -> "+" + | Shallow -> "+~" + | None' -> "+!")) + ^ "[" + ^ (List.map + ~f:(function Glob One -> "*" | Glob Many -> "**" | Exact s -> s) + namespace.chunks + |> String.concat ~sep:"::") + ^ "]" + in + let items_drop_body = Hash_set.create (module Concrete_ident) in + let apply_clause selection' (clause : Types.inclusion_clause) = + let matches = Concrete_ident.matches_namespace clause.Types.namespace in + let matched0 = Set.filter ~f:matches selection in + let with_deps, drop_bodies = + match clause.kind with + | Included Transitive -> (true, false) + | Included Shallow -> (true, true) + | Included None' -> (false, false) + | SignatureOnly -> (false, true) + | Excluded -> (false, false) in - let selection = List.fold ~init:selection ~f:apply_clause clauses in + let matched = matched0 |> if with_deps then deps_of else Fn.id in + if drop_bodies then ( + Set.iter ~f:(Hash_set.add items_drop_body) matched; + Set.iter ~f:(Hash_set.remove items_drop_body) matched0); Logs.info (fun m -> - m "The following Rust items are going to be extracted:\n%s" - @@ show_ident_set selection); - (List.filter ~f:(ident_of >> Set.mem selection) items, items_drop_body) - - let filter_by_inclusion_clauses (clauses : Types.inclusion_clause list) - (items : item list) : item list = - let f = filter_by_inclusion_clauses' clauses in - let selection = - let items', items_drop_body = f items in - let items', _ = - (* when one includes only shallow dependencies, we just remove bodies *) - List.map - ~f:(fun item -> - if Hash_set.mem items_drop_body (ident_of item) then - U.Mappers.drop_bodies#visit_item () item - else item) - items' - |> f - in - List.map ~f:ident_of items' |> Set.of_list (module Concrete_ident) + m "The clause [%s] will %s the following Rust items:\n%s" + (show_inclusion_clause clause) + (match clause.kind with Excluded -> "remove" | _ -> "add") + @@ show_ident_set matched); + let set_op = + match clause.kind with + | Included _ | SignatureOnly -> Set.union + | Excluded -> Set.diff in - List.filter ~f:(ident_of >> Set.mem selection) items - - (* Construct the new item `f item` (say `item'`), and create a - "symbolic link" to `item'`. Returns a pair that consists in the - symbolic link and in `item'`. *) - let shallow_copy (f : item -> item) - (variants_renamings : - concrete_ident * concrete_ident -> - (concrete_ident * concrete_ident) list) (item : item) : item list = - let item' = f item in - let old_new = (ident_of item, ident_of item') in - let aliases = - List.map (old_new :: variants_renamings old_new) - ~f:(fun (old_ident, new_ident) -> - let attrs = - List.filter ~f:(fun att -> Attrs.late_skip [ att ]) item.attrs - in - - { - item with - v = Alias { name = old_ident; item = new_ident }; - attrs; - }) + let result = set_op selection' matched in + result + in + let selection = List.fold ~init:selection ~f:apply_clause clauses in + Logs.info (fun m -> + m "The following Rust items are going to be extracted:\n%s" + @@ show_ident_set selection); + (List.filter ~f:(ident_of >> Set.mem selection) items, items_drop_body) + + let filter_by_inclusion_clauses (clauses : Types.inclusion_clause list) + (items : item list) : item list = + let f = filter_by_inclusion_clauses' ~original_items:items clauses in + let selection = + let items', items_drop_body = f items in + let items', _ = + (* when one includes only shallow dependencies, we just remove bodies *) + List.map + ~f:(fun item -> + if Hash_set.mem items_drop_body (ident_of item) then + U.Mappers.drop_bodies#visit_item () item + else item) + items' + |> f in - item' :: aliases + List.map ~f:ident_of items' |> Set.of_list (module Concrete_ident) + in + List.filter ~f:(ident_of >> Set.mem selection) items + + (* Construct the new item `f item` (say `item'`), and create a + "symbolic link" to `item'`. Returns a pair that consists in the + symbolic link and in `item'`. *) + let shallow_copy (f : item -> item) + (variants_renamings : + concrete_ident * concrete_ident -> + (concrete_ident * concrete_ident) list) (item : item) : item list = + let item' = f item in + let old_new = (ident_of item, ident_of item') in + let aliases = + List.map (old_new :: variants_renamings old_new) + ~f:(fun (old_ident, new_ident) -> + let attrs = + List.filter ~f:(fun att -> Attrs.late_skip [ att ]) item.attrs + in - let bundle_cyclic_modules (items : item list) : item list = - let from_ident ident : item option = - List.find ~f:(fun i -> [%equal: Concrete_ident.t] i.ident ident) items + { item with v = Alias { name = old_ident; item = new_ident }; attrs }) + in + item' :: aliases + + let bundle_cyclic_modules (items : item list) : item list = + let from_ident ident : item option = + List.find ~f:(fun i -> [%equal: Concrete_ident.t] i.ident ident) items + in + let mut_rec_bundles = + let mod_graph_cycles = ModGraph.of_items items |> ModGraph.cycles in + (* `Use` items shouldn't be bundled as they have no dependencies + and they have dummy names. *) + let non_use_items = + List.filter + ~f:(fun item -> + match item.v with Use _ | NotImplementedYet -> false | _ -> true) + items in - let mut_rec_bundles = - let mod_graph_cycles = ModGraph.of_items items |> ModGraph.cycles in - (* `Use` items shouldn't be bundled as they have no dependencies - and they have dummy names. *) - let non_use_items = - List.filter - ~f:(fun item -> - match item.v with Use _ | NotImplementedYet -> false | _ -> true) - items - in - let bundles = - ItemGraph.CyclicDep.of_mod_sccs non_use_items mod_graph_cycles - in - let f = List.filter_map ~f:from_ident in - List.map ~f bundles + let bundles = + ItemGraph.CyclicDep.of_mod_sccs non_use_items mod_graph_cycles in + let f = List.filter_map ~f:from_ident in + List.map ~f bundles + in - let transform (bundle : item list) = - let ns : Concrete_ident.t = - Concrete_ident.Create.fresh_module ~from:(List.map ~f:ident_of bundle) - in - let new_name_under_ns : Concrete_ident.t -> Concrete_ident.t = - Concrete_ident.Create.move_under ~new_parent:ns - in - let new_names = List.map ~f:(ident_of >> new_name_under_ns) bundle in - let duplicates = - new_names |> List.find_all_dups ~compare:Concrete_ident.compare - in - (* Verify name clashes *) - (* In case of clash, add hash *) - let add_prefix id = - if - not - (List.mem duplicates (new_name_under_ns id) - ~equal:Concrete_ident.equal) - then id - else - Concrete_ident.Create.map_last - ~f:(fun name -> name ^ (Concrete_ident.hash id |> Int.to_string)) - id - in - let renamings = - List.map - ~f:(ident_of >> (Fn.id &&& (add_prefix >> new_name_under_ns))) - bundle - in - let variants_renamings (previous_name, new_name) = - match from_ident previous_name with - | Some { v = Type { variants; is_struct = false; _ }; _ } -> - List.map variants ~f:(fun { name; _ } -> - ( name, - Concrete_ident.Create.move_under ~new_parent:new_name name - )) - | Some { v = Type { variants; is_struct = true; _ }; _ } -> - List.concat_map variants ~f:(fun { arguments; _ } -> - List.map arguments ~f:(fun (name, _, _) -> - ( name, - Concrete_ident.Create.move_under ~new_parent:new_name - name ))) - | _ -> [] - in - let variant_and_constructors_renamings = - List.concat_map ~f:variants_renamings renamings - |> List.concat_map ~f:(fun (old_name, new_name) -> - [ - (old_name, new_name); - ( Concrete_ident.Create.constructor old_name, - Concrete_ident.Create.constructor new_name ); - ]) - in - let renamings = - Map.of_alist_exn - (module Concrete_ident) - (renamings @ variant_and_constructors_renamings) - in - let rename = - let renamer _lvl i = - Map.find renamings i |> Option.value ~default:i - in - (U.Mappers.rename_concrete_idents renamer)#visit_item ExprLevel - in - fun it -> shallow_copy rename variants_renamings it + let transform (bundle : item list) = + let ns : Concrete_ident.t = + Concrete_ident.Create.fresh_module ~from:(List.map ~f:ident_of bundle) in - let bundle_transforms = - List.concat_map mut_rec_bundles ~f:(fun bundle -> - let bundle_value = - ( List.map ~f:ident_of bundle - |> ItemGraph.MutRec.Bundle.homogeneous_namespace, - transform bundle ) - in - List.map bundle ~f:(fun item -> (item, bundle_value))) + let new_name_under_ns : Concrete_ident.t -> Concrete_ident.t = + Concrete_ident.Create.move_under ~new_parent:ns in - let module ComparableItem = struct - module T = struct - type t = item [@@deriving sexp_of, compare, hash] - end - - include T - include Comparable.Make (T) - end in - let bundle_of_item = - Hashtbl.of_alist_exn (module ComparableItem) bundle_transforms + let new_names = List.map ~f:(ident_of >> new_name_under_ns) bundle in + let duplicates = + new_names |> List.find_all_dups ~compare:Concrete_ident.compare in - let maybe_transform_item item = - match Hashtbl.find bundle_of_item item with - | Some (homogeneous_bundle, transform_bundle) -> - if homogeneous_bundle then [ item ] else transform_bundle item - | None -> [ item ] + (* Verify name clashes *) + (* In case of clash, add hash *) + let add_prefix id = + if + not + (List.mem duplicates (new_name_under_ns id) + ~equal:Concrete_ident.equal) + then id + else + Concrete_ident.Create.map_last + ~f:(fun name -> name ^ (Concrete_ident.hash id |> Int.to_string)) + id in - List.concat_map items ~f:maybe_transform_item - - let recursive_bundles (items : item list) : item list list * item list = - let g = ItemGraph.of_items items in - let bundles = ItemGraph.MutRec.of_graph g in - let from_ident ident : item option = - List.find ~f:(fun i -> [%equal: Concrete_ident.t] i.ident ident) items + let renamings = + List.map + ~f:(ident_of >> (Fn.id &&& (add_prefix >> new_name_under_ns))) + bundle in - let f = List.filter_map ~f:from_ident in - (List.map ~f bundles.mut_rec_bundles, f bundles.non_mut_rec) - end - - let uid_associated_items items' = - let open WithItems (struct - let items = items' - end) in - uid_associated_items - - let bundle_cyclic_modules items' = - let open WithItems (struct - let items = items' - end) in - bundle_cyclic_modules items' - - let sort items' = - let open WithItems (struct - let items = items' - end) in - sort items' - - let recursive_bundles items' = - let open WithItems (struct - let items = items' - end) in - recursive_bundles items' + let variants_renamings (previous_name, new_name) = + match from_ident previous_name with + | Some { v = Type { variants; is_struct = false; _ }; _ } -> + List.map variants ~f:(fun { name; _ } -> + ( name, + Concrete_ident.Create.move_under ~new_parent:new_name name )) + | Some { v = Type { variants; is_struct = true; _ }; _ } -> + List.concat_map variants ~f:(fun { arguments; _ } -> + List.map arguments ~f:(fun (name, _, _) -> + ( name, + Concrete_ident.Create.move_under ~new_parent:new_name name + ))) + | _ -> [] + in + let variant_and_constructors_renamings = + List.concat_map ~f:variants_renamings renamings + |> List.concat_map ~f:(fun (old_name, new_name) -> + [ + (old_name, new_name); + ( Concrete_ident.Create.constructor old_name, + Concrete_ident.Create.constructor new_name ); + ]) + in + let renamings = + Map.of_alist_exn + (module Concrete_ident) + (renamings @ variant_and_constructors_renamings) + in + let rename = + let renamer _lvl i = Map.find renamings i |> Option.value ~default:i in + (U.Mappers.rename_concrete_idents renamer)#visit_item ExprLevel + in + fun it -> shallow_copy rename variants_renamings it + in + let bundle_transforms = + List.concat_map mut_rec_bundles ~f:(fun bundle -> + let bundle_value = + ( List.map ~f:ident_of bundle + |> ItemGraph.MutRec.Bundle.homogeneous_namespace, + transform bundle ) + in + List.map bundle ~f:(fun item -> (item, bundle_value))) + in + let module ComparableItem = struct + module T = struct + type t = item [@@deriving sexp_of, compare, hash] + end - let filter_by_inclusion_clauses clauses items' = - let open WithItems (struct - let items = items' - end) in - filter_by_inclusion_clauses clauses items' + include T + include Comparable.Make (T) + end in + let bundle_of_item = + Hashtbl.of_alist_exn (module ComparableItem) bundle_transforms + in + let maybe_transform_item item = + match Hashtbl.find bundle_of_item item with + | Some (homogeneous_bundle, transform_bundle) -> + if homogeneous_bundle then [ item ] else transform_bundle item + | None -> [ item ] + in + List.concat_map items ~f:maybe_transform_item + + let recursive_bundles (items : item list) : item list list * item list = + let g = ItemGraph.of_items ~original_items:items items in + let bundles = ItemGraph.MutRec.of_graph g in + let from_ident ident : item option = + List.find ~f:(fun i -> [%equal: Concrete_ident.t] i.ident ident) items + in + let f = List.filter_map ~f:from_ident in + (List.map ~f bundles.mut_rec_bundles, f bundles.non_mut_rec) end diff --git a/test-harness/src/snapshots/toolchain__attribute-opaque into-fstar.snap b/test-harness/src/snapshots/toolchain__attribute-opaque into-fstar.snap index d45c9cb4d..2275da427 100644 --- a/test-harness/src/snapshots/toolchain__attribute-opaque into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__attribute-opaque into-fstar.snap @@ -35,7 +35,7 @@ module Attribute_opaque open Core open FStar.Mul -val t_OpaqueStruct (v_X: usize) (#v_T #v_U: Type0) : Type0 - val t_OpaqueEnum (v_X: usize) (#v_T #v_U: Type0) : Type0 + +val t_OpaqueStruct (v_X: usize) (#v_T #v_U: Type0) : Type0 ''' diff --git a/test-harness/src/snapshots/toolchain__attributes into-fstar.snap b/test-harness/src/snapshots/toolchain__attributes into-fstar.snap index aa8b73123..e65784071 100644 --- a/test-harness/src/snapshots/toolchain__attributes into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__attributes into-fstar.snap @@ -92,8 +92,6 @@ open FStar.Mul unfold type t_Int = int -unfold let add x y = x + y - unfold instance impl: Core.Ops.Arith.t_Sub t_Int t_Int = { f_Output = t_Int; @@ -101,6 +99,8 @@ unfold instance impl: Core.Ops.Arith.t_Sub t_Int t_Int = f_sub_post = (fun (self: t_Int) (other: t_Int) (out: t_Int) -> true); f_sub = fun (self: t_Int) (other: t_Int) -> self + other } + +unfold let add x y = x + y ''' "Attributes.Nested_refinement_elim.fst" = ''' module Attributes.Nested_refinement_elim @@ -118,17 +118,12 @@ module Attributes.Newtype_pattern open Core open FStar.Mul -let v_MAX: usize = sz 10 - type t_SafeIndex = { f_i:f_i: usize{f_i <. v_MAX} } -let impl__SafeIndex__new (i: usize) : Core.Option.t_Option t_SafeIndex = - if i <. v_MAX - then Core.Option.Option_Some ({ f_i = i } <: t_SafeIndex) <: Core.Option.t_Option t_SafeIndex - else Core.Option.Option_None <: Core.Option.t_Option t_SafeIndex - let impl__SafeIndex__as_usize (self: t_SafeIndex) : usize = self.f_i +let v_MAX: usize = sz 10 + [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_1 (#v_T: Type0) : Core.Ops.Index.t_Index (t_Array v_T (sz 10)) t_SafeIndex = { @@ -137,6 +132,11 @@ let impl_1 (#v_T: Type0) : Core.Ops.Index.t_Index (t_Array v_T (sz 10)) t_SafeIn f_index_post = (fun (self: t_Array v_T (sz 10)) (index: t_SafeIndex) (out: v_T) -> true); f_index = fun (self: t_Array v_T (sz 10)) (index: t_SafeIndex) -> self.[ index.f_i ] } + +let impl__SafeIndex__new (i: usize) : Core.Option.t_Option t_SafeIndex = + if i <. v_MAX + then Core.Option.Option_Some ({ f_i = i } <: t_SafeIndex) <: Core.Option.t_Option t_SafeIndex + else Core.Option.Option_None <: Core.Option.t_Option t_SafeIndex ''' "Attributes.Pre_post_on_traits_and_impls.fst" = ''' module Attributes.Pre_post_on_traits_and_impls @@ -162,6 +162,13 @@ class t_Operation (v_Self: Type0) = { f_double:x0: u8 -> Prims.Pure u8 (f_double_pre x0) (fun result -> f_double_post x0 result) } +class t_TraitWithRequiresAndEnsures (v_Self: Type0) = { + f_method_pre:self___: v_Self -> x: u8 -> pred: Type0{x <. 100uy ==> pred}; + f_method_post:self___: v_Self -> x: u8 -> r: u8 -> pred: Type0{pred ==> r >. 88uy}; + f_method:x0: v_Self -> x1: u8 + -> Prims.Pure u8 (f_method_pre x0 x1) (fun result -> f_method_post x0 x1 result) +} + type t_ViaAdd = | ViaAdd : t_ViaAdd type t_ViaMul = | ViaMul : t_ViaMul @@ -200,13 +207,6 @@ let impl_1: t_Operation t_ViaMul = f_double = fun (x: u8) -> x *! 2uy } -class t_TraitWithRequiresAndEnsures (v_Self: Type0) = { - f_method_pre:self___: v_Self -> x: u8 -> pred: Type0{x <. 100uy ==> pred}; - f_method_post:self___: v_Self -> x: u8 -> r: u8 -> pred: Type0{pred ==> r >. 88uy}; - f_method:x0: v_Self -> x1: u8 - -> Prims.Pure u8 (f_method_pre x0 x1) (fun result -> f_method_post x0 x1 result) -} - let test (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_TraitWithRequiresAndEnsures v_T) @@ -247,10 +247,10 @@ module Attributes.Refined_indexes open Core open FStar.Mul -let v_MAX: usize = sz 10 - type t_MyArray = | MyArray : t_Array u8 (sz 10) -> t_MyArray +let v_MAX: usize = sz 10 + /// Triple dash comment (** Multiline double star comment Maecenas blandit accumsan feugiat. Done vitae ullamcorper est. @@ -288,20 +288,27 @@ module Attributes.Refinement_types open Core open FStar.Mul +/// Example of a specific constraint on a value +let t_CompressionFactor = x: u8{x =. 4uy || x =. 5uy || x =. 10uy || x =. 11uy} + let t_BoundedU8 (v_MIN v_MAX: u8) = x: u8{x >=. v_MIN && x <=. v_MAX} -let bounded_u8 (x: t_BoundedU8 12uy 15uy) (y: t_BoundedU8 10uy 11uy) : t_BoundedU8 1uy 23uy = - (x <: u8) +! (y <: u8) <: t_BoundedU8 1uy 23uy +/// A field element +let t_FieldElement = x: u16{x <=. 2347us} /// Even `u8` numbers. Constructing pub Even values triggers static /// proofs in the extraction. let t_Even = x: u8{(x %! 2uy <: u8) =. 0uy} -let double (x: u8) : Prims.Pure t_Even (requires x <. 127uy) (fun _ -> Prims.l_True) = - x +! x <: t_Even - -let double_refine (x: u8) : Prims.Pure t_Even (requires x <. 127uy) (fun _ -> Prims.l_True) = - x +! x <: t_Even +/// A modular mutliplicative inverse +let t_ModInverse (v_MOD: u32) = + n: + u32 + { (((cast (n <: u32) <: u128) *! (cast (v_MOD <: u32) <: u128) <: u128) %! + (cast (v_MOD <: u32) <: u128) + <: + u128) =. + pub_u128 1 } /// A string that contains no space. let t_NoE = @@ -323,21 +330,14 @@ let t_NoE = in ~.out } -/// A modular mutliplicative inverse -let t_ModInverse (v_MOD: u32) = - n: - u32 - { (((cast (n <: u32) <: u128) *! (cast (v_MOD <: u32) <: u128) <: u128) %! - (cast (v_MOD <: u32) <: u128) - <: - u128) =. - pub_u128 1 } +let double_refine (x: u8) : Prims.Pure t_Even (requires x <. 127uy) (fun _ -> Prims.l_True) = + x +! x <: t_Even -/// A field element -let t_FieldElement = x: u16{x <=. 2347us} +let bounded_u8 (x: t_BoundedU8 12uy 15uy) (y: t_BoundedU8 10uy 11uy) : t_BoundedU8 1uy 23uy = + (x <: u8) +! (y <: u8) <: t_BoundedU8 1uy 23uy -/// Example of a specific constraint on a value -let t_CompressionFactor = x: u8{x =. 4uy || x =. 5uy || x =. 10uy || x =. 11uy} +let double (x: u8) : Prims.Pure t_Even (requires x <. 127uy) (fun _ -> Prims.l_True) = + x +! x <: t_Even ''' "Attributes.Requires_mut.fst" = ''' module Attributes.Requires_mut @@ -417,12 +417,6 @@ module Attributes.Verifcation_status open Core open FStar.Mul -#push-options "--admit_smt_queries true" - -let a_function_which_only_laxes (_: Prims.unit) : Prims.unit = Hax_lib.v_assert false - -#pop-options - let a_panicfree_function (_: Prims.unit) : Prims.Pure u8 Prims.l_True @@ -447,6 +441,12 @@ let another_panicfree_function (_: Prims.unit) let nothing:i32 = 0l in let still_not_much:i32 = not_much +! nothing in admit () (* Panic freedom *) + +#push-options "--admit_smt_queries true" + +let a_function_which_only_laxes (_: Prims.unit) : Prims.unit = Hax_lib.v_assert false + +#pop-options ''' "Attributes.fst" = ''' module Attributes @@ -454,20 +454,23 @@ module Attributes open Core open FStar.Mul -let u32_max: u32 = 90000ul +type t_Foo = { + f_x:u32; + f_y:f_y: u32{f_y >. 3ul}; + f_z:f_z: u32{((f_y +! f_x <: u32) +! f_z <: u32) >. 3ul} +} -/// A doc comment on `add3` -///another doc comment on add3 -let add3 (x y z: u32) - : Prims.Pure u32 - (requires x >. 10ul && y >. 10ul && z >. 10ul && ((x +! y <: u32) +! z <: u32) <. u32_max) +let inlined_code__V: u8 = 12uy + +let issue_844_ (v__x: u8) + : Prims.Pure u8 + Prims.l_True (ensures - fun result -> - let result:u32 = result in - Hax_lib.implies true - (fun temp_0_ -> - let _:Prims.unit = temp_0_ in - result >. 32ul <: bool)) = (x +! y <: u32) +! z + fun v__x_future -> + let v__x_future:u8 = v__x_future in + true) = v__x + +let u32_max: u32 = 90000ul let swap_and_mut_req_ens (x y: u32) : Prims.Pure (u32 & u32 & u32) @@ -482,13 +485,18 @@ let swap_and_mut_req_ens (x y: u32) let hax_temp_output:u32 = x +! y in x, y, hax_temp_output <: (u32 & u32 & u32) -let issue_844_ (v__x: u8) - : Prims.Pure u8 - Prims.l_True +/// A doc comment on `add3` +///another doc comment on add3 +let add3 (x y z: u32) + : Prims.Pure u32 + (requires x >. 10ul && y >. 10ul && z >. 10ul && ((x +! y <: u32) +! z <: u32) <. u32_max) (ensures - fun v__x_future -> - let v__x_future:u8 = v__x_future in - true) = v__x + fun result -> + let result:u32 = result in + Hax_lib.implies true + (fun temp_0_ -> + let _:Prims.unit = temp_0_ in + result >. 32ul <: bool)) = (x +! y <: u32) +! z let add3_lemma (x: u32) : Lemma Prims.l_True @@ -496,14 +504,6 @@ let add3_lemma (x: u32) x <=. 10ul || x >=. (u32_max /! 3ul <: u32) || (add3 x x x <: u32) =. (x *! 3ul <: u32)) = () -type t_Foo = { - f_x:u32; - f_y:f_y: u32{f_y >. 3ul}; - f_z:f_z: u32{((f_y +! f_x <: u32) +! f_z <: u32) >. 3ul} -} - -let inlined_code__V: u8 = 12uy - let before_inlined_code = "example before" let inlined_code (foo: t_Foo) : Prims.unit = diff --git a/test-harness/src/snapshots/toolchain__constructor-as-closure into-fstar.snap b/test-harness/src/snapshots/toolchain__constructor-as-closure into-fstar.snap index 57b89460f..6f8919b71 100644 --- a/test-harness/src/snapshots/toolchain__constructor-as-closure into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__constructor-as-closure into-fstar.snap @@ -32,15 +32,15 @@ module Constructor_as_closure open Core open FStar.Mul +type t_Context = + | Context_A : i32 -> t_Context + | Context_B : i32 -> t_Context + type t_Test = | Test : i32 -> t_Test let impl__Test__test (x: Core.Option.t_Option i32) : Core.Option.t_Option t_Test = Core.Option.impl__map #i32 #t_Test x Test -type t_Context = - | Context_A : i32 -> t_Context - | Context_B : i32 -> t_Context - let impl__Context__test (x: Core.Option.t_Option i32) : Core.Option.t_Option t_Context = Core.Option.impl__map #i32 #t_Context x Context_B ''' diff --git a/test-harness/src/snapshots/toolchain__cyclic-modules into-fstar.snap b/test-harness/src/snapshots/toolchain__cyclic-modules into-fstar.snap index 32b65dbc7..af07fc045 100644 --- a/test-harness/src/snapshots/toolchain__cyclic-modules into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__cyclic-modules into-fstar.snap @@ -122,32 +122,32 @@ module Cyclic_modules.Enums_a open Core open FStar.Mul -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {t_T240131830 as t_T} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {t_T240131830 as t_T} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T240131830_A as T_A} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T240131830_A as T_A} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T240131830_B as T_B} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T240131830_B as T_B} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T240131830_C as T_C} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T240131830_C as T_C} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T240131830_D as T_D} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T240131830_D as T_D} ''' -"Cyclic_modules.Enums_b.Rec_bundle_902271266.fst" = ''' -module Cyclic_modules.Enums_b.Rec_bundle_902271266 +"Cyclic_modules.Enums_b.Rec_bundle_994866580.fst" = ''' +module Cyclic_modules.Enums_b.Rec_bundle_994866580 #set-options "--fuel 0 --ifuel 1 --z3rlimit 15" open Core open FStar.Mul -type t_U = - | U_A : t_U - | U_B : t_U - | U_C : Alloc.Vec.t_Vec t_T240131830 Alloc.Alloc.t_Global -> t_U - -and t_T366415196 = +type t_T366415196 = | T366415196_A : t_T366415196 | T366415196_B : t_T366415196 | T366415196_C : Alloc.Vec.t_Vec t_T240131830 Alloc.Alloc.t_Global -> t_T366415196 +and t_U = + | U_A : t_U + | U_B : t_U + | U_C : Alloc.Vec.t_Vec t_T240131830 Alloc.Alloc.t_Global -> t_U + and t_T240131830 = | T240131830_A : t_T240131830 | T240131830_B : t_T240131830 @@ -162,23 +162,23 @@ module Cyclic_modules.Enums_b open Core open FStar.Mul -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {t_U as t_U} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {t_T366415196 as t_T} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {U_A as U_A} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T366415196_A as T_A} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {U_B as U_B} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T366415196_B as T_B} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {U_C as U_C} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {T366415196_C as T_C} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {t_T366415196 as t_T} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {t_U as t_U} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T366415196_A as T_A} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {U_A as U_A} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T366415196_B as T_B} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {U_B as U_B} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {T366415196_C as T_C} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {U_C as U_C} -include Cyclic_modules.Enums_b.Rec_bundle_902271266 {f as f} +include Cyclic_modules.Enums_b.Rec_bundle_994866580 {f as f} ''' "Cyclic_modules.Late_skip_a.fst" = ''' module Cyclic_modules.Late_skip_a @@ -186,10 +186,10 @@ module Cyclic_modules.Late_skip_a open Core open FStar.Mul -include Cyclic_modules.Late_skip_b.Rec_bundle_862592093 {f749016415 as f} +include Cyclic_modules.Late_skip_b.Rec_bundle_447022631 {f749016415 as f} ''' -"Cyclic_modules.Late_skip_b.Rec_bundle_862592093.fst" = ''' -module Cyclic_modules.Late_skip_b.Rec_bundle_862592093 +"Cyclic_modules.Late_skip_b.Rec_bundle_447022631.fst" = ''' +module Cyclic_modules.Late_skip_b.Rec_bundle_447022631 #set-options "--fuel 0 --ifuel 1 --z3rlimit 15" open Core open FStar.Mul @@ -205,7 +205,7 @@ module Cyclic_modules.Late_skip_b open Core open FStar.Mul -include Cyclic_modules.Late_skip_b.Rec_bundle_862592093 {f377825240 as f} +include Cyclic_modules.Late_skip_b.Rec_bundle_447022631 {f377825240 as f} ''' "Cyclic_modules.M1.fst" = ''' module Cyclic_modules.M1 @@ -213,20 +213,20 @@ module Cyclic_modules.M1 open Core open FStar.Mul -include Cyclic_modules.M2.Rec_bundle_423840416 {a as a} +include Cyclic_modules.M2.Rec_bundle_489499412 {a as a} ''' -"Cyclic_modules.M2.Rec_bundle_423840416.fst" = ''' -module Cyclic_modules.M2.Rec_bundle_423840416 +"Cyclic_modules.M2.Rec_bundle_489499412.fst" = ''' +module Cyclic_modules.M2.Rec_bundle_489499412 #set-options "--fuel 0 --ifuel 1 --z3rlimit 15" open Core open FStar.Mul -let d (_: Prims.unit) : Prims.unit = () - let c (_: Prims.unit) : Prims.unit = () let a (_: Prims.unit) : Prims.unit = c () +let d (_: Prims.unit) : Prims.unit = () + let b (_: Prims.unit) : Prims.unit = let _:Prims.unit = a () in d () @@ -237,11 +237,11 @@ module Cyclic_modules.M2 open Core open FStar.Mul -include Cyclic_modules.M2.Rec_bundle_423840416 {d as d} +include Cyclic_modules.M2.Rec_bundle_489499412 {c as c} -include Cyclic_modules.M2.Rec_bundle_423840416 {c as c} +include Cyclic_modules.M2.Rec_bundle_489499412 {d as d} -include Cyclic_modules.M2.Rec_bundle_423840416 {b as b} +include Cyclic_modules.M2.Rec_bundle_489499412 {b as b} ''' "Cyclic_modules.Rec.fst" = ''' module Cyclic_modules.Rec diff --git a/test-harness/src/snapshots/toolchain__enum-repr into-coq.snap b/test-harness/src/snapshots/toolchain__enum-repr into-coq.snap index 6209a1837..bfe3bcc0a 100644 --- a/test-harness/src/snapshots/toolchain__enum-repr into-coq.snap +++ b/test-harness/src/snapshots/toolchain__enum-repr into-coq.snap @@ -42,7 +42,11 @@ Import RecordSetNotations. -(* NotImplementedYet *) +Definition discriminant_EnumWithRepr_ExplicitDiscr1 : t_u16 := + 1. + +Definition discriminant_EnumWithRepr_ExplicitDiscr2 : t_u16 := + 5. Inductive t_EnumWithRepr : Type := | EnumWithRepr_ExplicitDiscr1 @@ -52,12 +56,6 @@ Inductive t_EnumWithRepr : Type := Arguments t_EnumWithRepr:clear implicits. Arguments t_EnumWithRepr. -Definition discriminant_EnumWithRepr_ExplicitDiscr1 : t_u16 := - 1. - -Definition discriminant_EnumWithRepr_ExplicitDiscr2 : t_u16 := - 5. - Definition t_EnumWithRepr_cast_to_repr (x : t_EnumWithRepr) : t_u16 := match x with | EnumWithRepr_ExplicitDiscr1 => @@ -70,6 +68,8 @@ Definition t_EnumWithRepr_cast_to_repr (x : t_EnumWithRepr) : t_u16 := t_Add_f_add (discriminant_EnumWithRepr_ExplicitDiscr2) (2) end. +(* NotImplementedYet *) + Definition f (_ : unit) : t_u32 := let v__x := cast (t_Add_f_add (discriminant_EnumWithRepr_ExplicitDiscr2) (0)) in t_Add_f_add (cast (t_EnumWithRepr_cast_to_repr (EnumWithRepr_ImplicitDiscrEmptyTuple))) (cast (t_EnumWithRepr_cast_to_repr (EnumWithRepr_ImplicitDiscrEmptyStruct))). @@ -77,9 +77,9 @@ Definition f (_ : unit) : t_u32 := Definition ff__CONST : t_u16 := cast (t_Add_f_add (discriminant_EnumWithRepr_ExplicitDiscr1) (0)). -Definition get_repr (x : t_EnumWithRepr) : t_u16 := - t_EnumWithRepr_cast_to_repr (x). - Definition get_casted_repr (x : t_EnumWithRepr) : t_u64 := cast (t_EnumWithRepr_cast_to_repr (x)). + +Definition get_repr (x : t_EnumWithRepr) : t_u16 := + t_EnumWithRepr_cast_to_repr (x). ''' diff --git a/test-harness/src/snapshots/toolchain__enum-repr into-fstar.snap b/test-harness/src/snapshots/toolchain__enum-repr into-fstar.snap index e9c50a747..600085987 100644 --- a/test-harness/src/snapshots/toolchain__enum-repr into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__enum-repr into-fstar.snap @@ -33,16 +33,16 @@ module Enum_repr open Core open FStar.Mul +let discriminant_EnumWithRepr_ExplicitDiscr1: u16 = 1us + +let discriminant_EnumWithRepr_ExplicitDiscr2: u16 = 5us + type t_EnumWithRepr = | EnumWithRepr_ExplicitDiscr1 : t_EnumWithRepr | EnumWithRepr_ExplicitDiscr2 : t_EnumWithRepr | EnumWithRepr_ImplicitDiscrEmptyTuple : t_EnumWithRepr | EnumWithRepr_ImplicitDiscrEmptyStruct : t_EnumWithRepr -let discriminant_EnumWithRepr_ExplicitDiscr1: u16 = 1us - -let discriminant_EnumWithRepr_ExplicitDiscr2: u16 = 5us - let t_EnumWithRepr_cast_to_repr (x: t_EnumWithRepr) : u16 = match x with | EnumWithRepr_ExplicitDiscr1 -> discriminant_EnumWithRepr_ExplicitDiscr1 @@ -64,7 +64,7 @@ let f (_: Prims.unit) : u32 = let ff__CONST: u16 = cast (discriminant_EnumWithRepr_ExplicitDiscr1 +! 0us <: u16) <: u16 -let get_repr (x: t_EnumWithRepr) : u16 = t_EnumWithRepr_cast_to_repr x - let get_casted_repr (x: t_EnumWithRepr) : u64 = cast (t_EnumWithRepr_cast_to_repr x <: u16) <: u64 + +let get_repr (x: t_EnumWithRepr) : u16 = t_EnumWithRepr_cast_to_repr x ''' diff --git a/test-harness/src/snapshots/toolchain__enum-repr into-ssprove.snap b/test-harness/src/snapshots/toolchain__enum-repr into-ssprove.snap index 613f21e5e..d1e4e4c09 100644 --- a/test-harness/src/snapshots/toolchain__enum-repr into-ssprove.snap +++ b/test-harness/src/snapshots/toolchain__enum-repr into-ssprove.snap @@ -54,7 +54,15 @@ Import choice.Choice.Exports. Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. -(*Not implemented yet? todo(item)*) +Equations discriminant_EnumWithRepr_ExplicitDiscr1 {L : {fset Location}} {I : Interface} : both L I int16 := + discriminant_EnumWithRepr_ExplicitDiscr1 := + solve_lift (ret_both (1 : int16)) : both L I int16. +Fail Next Obligation. + +Equations discriminant_EnumWithRepr_ExplicitDiscr2 {L : {fset Location}} {I : Interface} : both L I int16 := + discriminant_EnumWithRepr_ExplicitDiscr2 := + solve_lift (ret_both (5 : int16)) : both L I int16. +Fail Next Obligation. Definition t_EnumWithRepr : choice_type := ('unit ∐ 'unit ∐ 'unit ∐ 'unit). @@ -79,16 +87,6 @@ Equations EnumWithRepr_ImplicitDiscrEmptyStruct {L : {fset Location}} {I : Inter solve_lift (ret_both (inr (tt : 'unit) : t_EnumWithRepr)) : both L I t_EnumWithRepr. Fail Next Obligation. -Equations discriminant_EnumWithRepr_ExplicitDiscr1 {L : {fset Location}} {I : Interface} : both L I int16 := - discriminant_EnumWithRepr_ExplicitDiscr1 := - solve_lift (ret_both (1 : int16)) : both L I int16. -Fail Next Obligation. - -Equations discriminant_EnumWithRepr_ExplicitDiscr2 {L : {fset Location}} {I : Interface} : both L I int16 := - discriminant_EnumWithRepr_ExplicitDiscr2 := - solve_lift (ret_both (5 : int16)) : both L I int16. -Fail Next Obligation. - Equations t_EnumWithRepr_cast_to_repr {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 t_EnumWithRepr) : both L1 I1 int16 := t_EnumWithRepr_cast_to_repr x := matchb x with @@ -103,6 +101,8 @@ Equations t_EnumWithRepr_cast_to_repr {L1 : {fset Location}} {I1 : Interface} (x end : both L1 I1 int16. Fail Next Obligation. +(*Not implemented yet? todo(item)*) + Equations f {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 int32 := f _ := letb v__x := cast_int (WS2 := _) (discriminant_EnumWithRepr_ExplicitDiscr2 .+ (ret_both (0 : int16))) in @@ -114,13 +114,13 @@ Equations ff__CONST {L : {fset Location}} {I : Interface} : both L I int16 := solve_lift (cast_int (WS2 := _) (discriminant_EnumWithRepr_ExplicitDiscr1 .+ (ret_both (0 : int16)))) : both L I int16. Fail Next Obligation. -Equations get_repr {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 t_EnumWithRepr) : both L1 I1 int16 := - get_repr x := - solve_lift (t_EnumWithRepr_cast_to_repr x) : both L1 I1 int16. -Fail Next Obligation. - Equations get_casted_repr {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 t_EnumWithRepr) : both L1 I1 int64 := get_casted_repr x := solve_lift (cast_int (WS2 := _) (t_EnumWithRepr_cast_to_repr x)) : both L1 I1 int64. Fail Next Obligation. + +Equations get_repr {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 t_EnumWithRepr) : both L1 I1 int16 := + get_repr x := + solve_lift (t_EnumWithRepr_cast_to_repr x) : both L1 I1 int16. +Fail Next Obligation. ''' diff --git a/test-harness/src/snapshots/toolchain__generics into-fstar.snap b/test-harness/src/snapshots/toolchain__generics into-fstar.snap index 8f3ecf5e7..fa558e443 100644 --- a/test-harness/src/snapshots/toolchain__generics into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__generics into-fstar.snap @@ -43,6 +43,26 @@ module Generics open Core open FStar.Mul +let impl__Bar__inherent_impl_generics (#v_T: Type0) (v_N: usize) (x: t_Array v_T v_N) : Prims.unit = + () + +type t_Bar = | Bar : t_Bar + +class t_Foo (v_Self: Type0) = { + f_const_add_pre:v_N: usize -> v_Self -> Type0; + f_const_add_post:v_N: usize -> v_Self -> usize -> Type0; + f_const_add:v_N: usize -> x0: v_Self + -> Prims.Pure usize (f_const_add_pre v_N x0) (fun result -> f_const_add_post v_N x0 result) +} + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_Foo_for_usize: t_Foo usize = + { + f_const_add_pre = (fun (v_N: usize) (self: usize) -> true); + f_const_add_post = (fun (v_N: usize) (self: usize) (out: usize) -> true); + f_const_add = fun (v_N: usize) (self: usize) -> self +! v_N + } + let dup (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Clone.t_Clone v_T) @@ -53,30 +73,6 @@ let dup <: (v_T & v_T) -let foo (v_LEN: usize) (arr: t_Array usize v_LEN) : usize = - let acc:usize = v_LEN +! sz 9 in - let acc:usize = - Rust_primitives.Hax.Folds.fold_range (sz 0) - v_LEN - (fun acc temp_1_ -> - let acc:usize = acc in - let _:usize = temp_1_ in - true) - acc - (fun acc i -> - let acc:usize = acc in - let i:usize = i in - acc +! (arr.[ i ] <: usize) <: usize) - in - acc - -let repeat - (v_LEN: usize) - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Marker.t_Copy v_T) - (x: v_T) - : t_Array v_T v_LEN = Rust_primitives.Hax.repeat x v_LEN - let f (v_N x: usize) : usize = (v_N +! v_N <: usize) +! x let call_f (_: Prims.unit) : usize = (f (sz 10) (sz 3) <: usize) +! sz 3 @@ -114,23 +110,27 @@ let call_g (_: Prims.unit) : usize = usize) +! sz 3 -class t_Foo (v_Self: Type0) = { - f_const_add_pre:v_N: usize -> v_Self -> Type0; - f_const_add_post:v_N: usize -> v_Self -> usize -> Type0; - f_const_add:v_N: usize -> x0: v_Self - -> Prims.Pure usize (f_const_add_pre v_N x0) (fun result -> f_const_add_post v_N x0 result) -} - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_Foo_for_usize: t_Foo usize = - { - f_const_add_pre = (fun (v_N: usize) (self: usize) -> true); - f_const_add_post = (fun (v_N: usize) (self: usize) (out: usize) -> true); - f_const_add = fun (v_N: usize) (self: usize) -> self +! v_N - } - -type t_Bar = | Bar : t_Bar +let foo (v_LEN: usize) (arr: t_Array usize v_LEN) : usize = + let acc:usize = v_LEN +! sz 9 in + let acc:usize = + Rust_primitives.Hax.Folds.fold_range (sz 0) + v_LEN + (fun acc temp_1_ -> + let acc:usize = acc in + let _:usize = temp_1_ in + true) + acc + (fun acc i -> + let acc:usize = acc in + let i:usize = i in + acc +! (arr.[ i ] <: usize) <: usize) + in + acc -let impl__Bar__inherent_impl_generics (#v_T: Type0) (v_N: usize) (x: t_Array v_T v_N) : Prims.unit = - () +let repeat + (v_LEN: usize) + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Marker.t_Copy v_T) + (x: v_T) + : t_Array v_T v_LEN = Rust_primitives.Hax.repeat x v_LEN ''' diff --git a/test-harness/src/snapshots/toolchain__guards into-coq.snap b/test-harness/src/snapshots/toolchain__guards into-coq.snap index 7755eb3aa..abd2a3274 100644 --- a/test-harness/src/snapshots/toolchain__guards into-coq.snap +++ b/test-harness/src/snapshots/toolchain__guards into-coq.snap @@ -43,7 +43,7 @@ Import RecordSetNotations. (* NotImplementedYet *) -Definition if_let_guard (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := +Definition equivalent (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := match x with | Option_None => 0 @@ -59,8 +59,8 @@ Definition if_let_guard (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 | _ => Option_None end with - | Option_Some (x) => - x + | Option_Some (y) => + y | Option_None => match x with | Option_Some (Result_Err (y)) => @@ -71,7 +71,25 @@ Definition if_let_guard (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 end end. -Definition equivalent (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := +Definition if_guard (x : t_Option ((t_i32))) : t_i32 := + match match x with + | Option_Some (v) => + match t_PartialOrd_f_gt (v) (0) with + | true => + Option_Some (v) + | _ => + Option_None + end + | _ => + Option_None + end with + | Option_Some (x) => + x + | Option_None => + 0 + end. + +Definition if_let_guard (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := match x with | Option_None => 0 @@ -87,8 +105,8 @@ Definition equivalent (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i32 := | _ => Option_None end with - | Option_Some (y) => - y + | Option_Some (x) => + x | Option_None => match x with | Option_Some (Result_Err (y)) => @@ -141,22 +159,4 @@ Definition multiple_guards (x : t_Option ((t_Result ((t_i32)) ((t_i32))))) : t_i end end end. - -Definition if_guard (x : t_Option ((t_i32))) : t_i32 := - match match x with - | Option_Some (v) => - match t_PartialOrd_f_gt (v) (0) with - | true => - Option_Some (v) - | _ => - Option_None - end - | _ => - Option_None - end with - | Option_Some (x) => - x - | Option_None => - 0 - end. ''' diff --git a/test-harness/src/snapshots/toolchain__guards into-fstar.snap b/test-harness/src/snapshots/toolchain__guards into-fstar.snap index d575e5eca..ff12f664a 100644 --- a/test-harness/src/snapshots/toolchain__guards into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__guards into-fstar.snap @@ -32,7 +32,7 @@ module Guards open Core open FStar.Mul -let if_let_guard (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 = +let equivalent (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 = match x with | Core.Option.Option_None -> 0l | _ -> @@ -44,13 +44,25 @@ let if_let_guard (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 | _ -> Core.Option.Option_None <: Core.Option.t_Option i32) | _ -> Core.Option.Option_None <: Core.Option.t_Option i32 with - | Core.Option.Option_Some x -> x + | Core.Option.Option_Some y -> y | Core.Option.Option_None -> match x with | Core.Option.Option_Some (Core.Result.Result_Err y) -> y | _ -> 1l -let equivalent (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 = +let if_guard (x: Core.Option.t_Option i32) : i32 = + match + match x with + | Core.Option.Option_Some v -> + (match v >. 0l with + | true -> Core.Option.Option_Some v <: Core.Option.t_Option i32 + | _ -> Core.Option.Option_None <: Core.Option.t_Option i32) + | _ -> Core.Option.Option_None <: Core.Option.t_Option i32 + with + | Core.Option.Option_Some x -> x + | Core.Option.Option_None -> 0l + +let if_let_guard (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 = match x with | Core.Option.Option_None -> 0l | _ -> @@ -62,7 +74,7 @@ let equivalent (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i32 = | _ -> Core.Option.Option_None <: Core.Option.t_Option i32) | _ -> Core.Option.Option_None <: Core.Option.t_Option i32 with - | Core.Option.Option_Some y -> y + | Core.Option.Option_Some x -> x | Core.Option.Option_None -> match x with | Core.Option.Option_Some (Core.Result.Result_Err y) -> y @@ -95,16 +107,4 @@ let multiple_guards (x: Core.Option.t_Option (Core.Result.t_Result i32 i32)) : i match x with | Core.Option.Option_Some (Core.Result.Result_Err y) -> y | _ -> 1l - -let if_guard (x: Core.Option.t_Option i32) : i32 = - match - match x with - | Core.Option.Option_Some v -> - (match v >. 0l with - | true -> Core.Option.Option_Some v <: Core.Option.t_Option i32 - | _ -> Core.Option.Option_None <: Core.Option.t_Option i32) - | _ -> Core.Option.Option_None <: Core.Option.t_Option i32 - with - | Core.Option.Option_Some x -> x - | Core.Option.Option_None -> 0l ''' diff --git a/test-harness/src/snapshots/toolchain__guards into-ssprove.snap b/test-harness/src/snapshots/toolchain__guards into-ssprove.snap index a499287d3..57b079118 100644 --- a/test-harness/src/snapshots/toolchain__guards into-ssprove.snap +++ b/test-harness/src/snapshots/toolchain__guards into-ssprove.snap @@ -55,8 +55,8 @@ Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. (*Not implemented yet? todo(item)*) -Equations if_let_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option (t_Result int32 int32))) : both L1 I1 int32 := - if_let_guard x := +Equations equivalent {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option (t_Result int32 int32))) : both L1 I1 int32 := + equivalent x := matchb x with | Option_None_case => solve_lift (ret_both (0 : int32)) @@ -74,9 +74,9 @@ Equations if_let_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 ( | _ => Option_None end with - | Option_Some_case x => - letb x := ret_both ((x) : (int32)) in - solve_lift x + | Option_Some_case y => + letb y := ret_both ((y) : (int32)) in + solve_lift y | Option_None_case => matchb x with | Option_Some_case Result_Err y => @@ -89,8 +89,30 @@ Equations if_let_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 ( end : both L1 I1 int32. Fail Next Obligation. -Equations equivalent {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option (t_Result int32 int32))) : both L1 I1 int32 := - equivalent x := +Equations if_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option int32)) : both L1 I1 int32 := + if_guard x := + matchb matchb x with + | Option_Some_case v => + letb v := ret_both ((v) : (int32)) in + matchb v >.? (ret_both (0 : int32)) with + | true => + Option_Some (solve_lift v) + | _ => + Option_None + end + | _ => + Option_None + end with + | Option_Some_case x => + letb x := ret_both ((x) : (int32)) in + solve_lift x + | Option_None_case => + solve_lift (ret_both (0 : int32)) + end : both L1 I1 int32. +Fail Next Obligation. + +Equations if_let_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option (t_Result int32 int32))) : both L1 I1 int32 := + if_let_guard x := matchb x with | Option_None_case => solve_lift (ret_both (0 : int32)) @@ -108,9 +130,9 @@ Equations equivalent {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_ | _ => Option_None end with - | Option_Some_case y => - letb y := ret_both ((y) : (int32)) in - solve_lift y + | Option_Some_case x => + letb x := ret_both ((x) : (int32)) in + solve_lift x | Option_None_case => matchb x with | Option_Some_case Result_Err y => @@ -174,26 +196,4 @@ Equations multiple_guards {L1 : {fset Location}} {I1 : Interface} (x : both L1 I end end : both L1 I1 int32. Fail Next Obligation. - -Equations if_guard {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 (t_Option int32)) : both L1 I1 int32 := - if_guard x := - matchb matchb x with - | Option_Some_case v => - letb v := ret_both ((v) : (int32)) in - matchb v >.? (ret_both (0 : int32)) with - | true => - Option_Some (solve_lift v) - | _ => - Option_None - end - | _ => - Option_None - end with - | Option_Some_case x => - letb x := ret_both ((x) : (int32)) in - solve_lift x - | Option_None_case => - solve_lift (ret_both (0 : int32)) - end : both L1 I1 int32. -Fail Next Obligation. ''' diff --git a/test-harness/src/snapshots/toolchain__include-flag into-coq.snap b/test-harness/src/snapshots/toolchain__include-flag into-coq.snap index 04abbc64e..c86f3b275 100644 --- a/test-harness/src/snapshots/toolchain__include-flag into-coq.snap +++ b/test-harness/src/snapshots/toolchain__include-flag into-coq.snap @@ -41,8 +41,6 @@ Import RecordSetNotations. -(* NotImplementedYet *) - Record t_Foo : Type := { }. @@ -62,24 +60,14 @@ Instance t_Trait_254780795 : t_Trait ((t_Foo)) := { }. -Definition main_a_a (_ : unit) : unit := - tt. - -Definition main_b_a (_ : unit) : unit := - tt. +(* NotImplementedYet *) -Definition main_c_a (_ : unit) : unit := +Definition main_a_a (_ : unit) : unit := tt. Definition main_a_b (_ : unit) : unit := tt. -Definition main_b_b (_ : unit) : unit := - tt. - -Definition main_c_b (_ : unit) : unit := - tt. - Definition main_a_c (_ : unit) : unit := tt. @@ -89,6 +77,12 @@ Definition main_a `{v_T : Type} `{t_Sized (v_T)} `{t_Trait (v_T)} (x : v_T) : un let _ := main_a_c (tt) in tt. +Definition main_b_a (_ : unit) : unit := + tt. + +Definition main_b_b (_ : unit) : unit := + tt. + Definition main_b_c (_ : unit) : unit := tt. @@ -98,6 +92,12 @@ Definition main_b (_ : unit) : unit := let _ := main_b_c (tt) in tt. +Definition main_c_a (_ : unit) : unit := + tt. + +Definition main_c_b (_ : unit) : unit := + tt. + Definition main_c_c (_ : unit) : unit := tt. diff --git a/test-harness/src/snapshots/toolchain__include-flag into-fstar.snap b/test-harness/src/snapshots/toolchain__include-flag into-fstar.snap index de9402027..41cd2ac28 100644 --- a/test-harness/src/snapshots/toolchain__include-flag into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__include-flag into-fstar.snap @@ -42,16 +42,8 @@ let impl_Trait_for_Foo: t_Trait t_Foo = { __marker_trait = () } /// Indirect dependencies let main_a_a (_: Prims.unit) : Prims.unit = () -let main_b_a (_: Prims.unit) : Prims.unit = () - -let main_c_a (_: Prims.unit) : Prims.unit = () - let main_a_b (_: Prims.unit) : Prims.unit = () -let main_b_b (_: Prims.unit) : Prims.unit = () - -let main_c_b (_: Prims.unit) : Prims.unit = () - let main_a_c (_: Prims.unit) : Prims.unit = () /// Direct dependencies @@ -62,6 +54,10 @@ let main_a (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Trait let _:Prims.unit = main_a_c () in () +let main_b_a (_: Prims.unit) : Prims.unit = () + +let main_b_b (_: Prims.unit) : Prims.unit = () + let main_b_c (_: Prims.unit) : Prims.unit = () let main_b (_: Prims.unit) : Prims.unit = @@ -70,6 +66,10 @@ let main_b (_: Prims.unit) : Prims.unit = let _:Prims.unit = main_b_c () in () +let main_c_a (_: Prims.unit) : Prims.unit = () + +let main_c_b (_: Prims.unit) : Prims.unit = () + let main_c_c (_: Prims.unit) : Prims.unit = () let main_c (_: Prims.unit) : Prims.unit = diff --git a/test-harness/src/snapshots/toolchain__interface-only into-fstar.snap b/test-harness/src/snapshots/toolchain__interface-only into-fstar.snap index 7b58e61f3..9aaa938a6 100644 --- a/test-harness/src/snapshots/toolchain__interface-only into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__interface-only into-fstar.snap @@ -33,21 +33,12 @@ module Interface_only open Core open FStar.Mul -/// This item contains unsafe blocks and raw references, two features -/// not supported by hax. Thanks to the `-i` flag and the `+:` -/// modifier, `f` is still extractable as an interface. -/// Expressions within type are still extracted, as well as pre- and -/// post-conditions. -val f (x: u8) - : Prims.Pure (t_Array u8 (sz 4)) - (requires x <. 254uy) - (ensures - fun r -> - let r:t_Array u8 (sz 4) = r in - (r.[ sz 0 ] <: u8) >. x) - type t_Bar = | Bar : t_Bar +type t_Holder (v_T: Type0) = { f_value:Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global } + +type t_Param (v_SIZE: usize) = { f_value:t_Array u8 v_SIZE } + /// Non-inherent implementations are extracted, their bodies are not /// dropped. This might be a bit surprising: see /// https://github.com/hacspec/hax/issues/616. @@ -60,13 +51,22 @@ val impl_1:Core.Convert.t_From t_Bar u8 val from__from: u8 -> Prims.Pure t_Bar Prims.l_True (fun _ -> Prims.l_True) -type t_Holder (v_T: Type0) = { f_value:Alloc.Vec.t_Vec v_T Alloc.Alloc.t_Global } - [@@ FStar.Tactics.Typeclasses.tcinstance] val impl_2 (#v_T: Type0) : Core.Convert.t_From (t_Holder v_T) Prims.unit -type t_Param (v_SIZE: usize) = { f_value:t_Array u8 v_SIZE } - [@@ FStar.Tactics.Typeclasses.tcinstance] val impl_3 (v_SIZE: usize) : Core.Convert.t_From (t_Param v_SIZE) Prims.unit + +/// This item contains unsafe blocks and raw references, two features +/// not supported by hax. Thanks to the `-i` flag and the `+:` +/// modifier, `f` is still extractable as an interface. +/// Expressions within type are still extracted, as well as pre- and +/// post-conditions. +val f (x: u8) + : Prims.Pure (t_Array u8 (sz 4)) + (requires x <. 254uy) + (ensures + fun r -> + let r:t_Array u8 (sz 4) = r in + (r.[ sz 0 ] <: u8) >. x) ''' diff --git a/test-harness/src/snapshots/toolchain__literals into-coq.snap b/test-harness/src/snapshots/toolchain__literals into-coq.snap index f0b5dc23a..77d4150c3 100644 --- a/test-harness/src/snapshots/toolchain__literals into-coq.snap +++ b/test-harness/src/snapshots/toolchain__literals into-coq.snap @@ -42,11 +42,40 @@ Import RecordSetNotations. -(* NotImplementedYet *) - From Literals Require Import Hax_lib (t_int). Export Hax_lib (t_int). +Record t_Foo : Type := + { + f_field : t_u8; + }. +Arguments t_Foo:clear implicits. +Arguments t_Foo. +Arguments Build_t_Foo. +#[export] Instance settable_t_Foo : Settable _ := + settable! (@Build_t_Foo) . + +(* NotImplementedYet *) + +Definition v_CONSTANT : t_Foo := + Build_t_Foo (3). + +Definition casts (x8 : t_u8) (x16 : t_u16) (x32 : t_u32) (x64 : t_u64) (xs : t_usize) : unit := + let _ : t_u64 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (x64)) (cast (xs)) in + let _ : t_u32 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (x32)) (cast (x64))) (cast (xs)) in + let _ : t_u16 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (x16)) (cast (x32))) (cast (x64))) (cast (xs)) in + let _ : t_u8 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (x8) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in + let _ : t_i64 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in + let _ : t_i32 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in + let _ : t_i16 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in + let _ : t_i8 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in + tt. + +Definition fn_pointer_cast (_ : unit) : unit := + let f : t_u32 -> t_u32 := fun x => + x in + tt. + Definition math_integers (x : t_Int) `{andb (f_gt (x) (impl__Int___unsafe_from_str ("0"%string))) (f_lt (x) (impl__Int___unsafe_from_str ("16"%string))) = true} : t_u8 := let _ : t_Int := f_lift (3) in let _ := f_gt (impl__Int___unsafe_from_str ("-340282366920938463463374607431768211455000"%string)) (impl__Int___unsafe_from_str ("340282366920938463463374607431768211455000"%string)) in @@ -71,22 +100,6 @@ Definition math_integers (x : t_Int) `{andb (f_gt (x) (impl__Int___unsafe_from_s let _ : t_usize := impl__Int__to_usize (x) in impl__Int__to_u8 (f_add (x) (f_mul (x) (x))). -Definition panic_with_msg (_ : unit) : unit := - never_to_any (panic_fmt (impl_2__new_const (["with msg"%string]))). - -Record t_Foo : Type := - { - f_field : t_u8; - }. -Arguments t_Foo:clear implicits. -Arguments t_Foo. -Arguments Build_t_Foo. -#[export] Instance settable_t_Foo : Settable _ := - settable! (@Build_t_Foo) . - -Definition v_CONSTANT : t_Foo := - Build_t_Foo (3). - Definition numeric (_ : unit) : unit := let _ : t_usize := 123 in let _ : t_isize := -42 in @@ -116,23 +129,10 @@ Definition patterns (_ : unit) : unit := end in tt. -Definition casts (x8 : t_u8) (x16 : t_u16) (x32 : t_u32) (x64 : t_u64) (xs : t_usize) : unit := - let _ : t_u64 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (x64)) (cast (xs)) in - let _ : t_u32 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (x32)) (cast (x64))) (cast (xs)) in - let _ : t_u16 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (x16)) (cast (x32))) (cast (x64))) (cast (xs)) in - let _ : t_u8 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (x8) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in - let _ : t_i64 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in - let _ : t_i32 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in - let _ : t_i16 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in - let _ : t_i8 := t_Add_f_add (t_Add_f_add (t_Add_f_add (t_Add_f_add (cast (x8)) (cast (x16))) (cast (x32))) (cast (x64))) (cast (xs)) in - tt. +Definition panic_with_msg (_ : unit) : unit := + never_to_any (panic_fmt (impl_2__new_const (["with msg"%string]))). Definition empty_array (_ : unit) : unit := let _ : t_Slice t_u8 := unsize ([]) in tt. - -Definition fn_pointer_cast (_ : unit) : unit := - let f : t_u32 -> t_u32 := fun x => - x in - tt. ''' diff --git a/test-harness/src/snapshots/toolchain__literals into-fstar.snap b/test-harness/src/snapshots/toolchain__literals into-fstar.snap index 60e23edb4..f6c262b10 100644 --- a/test-harness/src/snapshots/toolchain__literals into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__literals into-fstar.snap @@ -33,86 +33,10 @@ module Literals open Core open FStar.Mul -let math_integers (x: Hax_lib.Int.t_Int) - : Prims.Pure u8 - (requires x > (0 <: Hax_lib.Int.t_Int) && x < (16 <: Hax_lib.Int.t_Int)) - (fun _ -> Prims.l_True) = - let (_: Hax_lib.Int.t_Int):Hax_lib.Int.t_Int = Rust_primitives.Hax.Int.from_machine (sz 3) in - let _:bool = - ((-340282366920938463463374607431768211455000) <: Hax_lib.Int.t_Int) > - (340282366920938463463374607431768211455000 <: Hax_lib.Int.t_Int) - in - let _:bool = x < x in - let _:bool = x >= x in - let _:bool = x <= x in - let _:bool = x <> x in - let _:bool = x = x in - let _:Hax_lib.Int.t_Int = x + x in - let _:Hax_lib.Int.t_Int = x - x in - let _:Hax_lib.Int.t_Int = x * x in - let _:Hax_lib.Int.t_Int = x / x in - let (_: i16):i16 = Hax_lib.Int.impl__Int__to_i16 x in - let (_: i32):i32 = Hax_lib.Int.impl__Int__to_i32 x in - let (_: i64):i64 = Hax_lib.Int.impl__Int__to_i64 x in - let (_: i128):i128 = Hax_lib.Int.impl__Int__to_i128 x in - let (_: isize):isize = Hax_lib.Int.impl__Int__to_isize x in - let (_: u16):u16 = Hax_lib.Int.impl__Int__to_u16 x in - let (_: u32):u32 = Hax_lib.Int.impl__Int__to_u32 x in - let (_: u64):u64 = Hax_lib.Int.impl__Int__to_u64 x in - let (_: u128):u128 = Hax_lib.Int.impl__Int__to_u128 x in - let (_: usize):usize = Hax_lib.Int.impl__Int__to_usize x in - Hax_lib.Int.impl__Int__to_u8 (x + (x * x <: Hax_lib.Int.t_Int) <: Hax_lib.Int.t_Int) - -let panic_with_msg (_: Prims.unit) : Prims.unit = - Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_const (sz 1) - (let list = ["with msg"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); - Rust_primitives.Hax.array_of_list 1 list) - <: - Core.Fmt.t_Arguments) - <: - Rust_primitives.Hax.t_Never) - type t_Foo = { f_field:u8 } let v_CONSTANT: t_Foo = { f_field = 3uy } <: t_Foo -let numeric (_: Prims.unit) : Prims.unit = - let (_: usize):usize = sz 123 in - let (_: isize):isize = isz (-42) in - let (_: isize):isize = isz 42 in - let (_: i32):i32 = (-42l) in - let (_: u128):u128 = pub_u128 22222222222222222222 in - () - -let patterns (_: Prims.unit) : Prims.unit = - let _:Prims.unit = - match 1uy with - | 2uy -> () <: Prims.unit - | _ -> () <: Prims.unit - in - let _:Prims.unit = - match - "hello", - (123l, - (let list = ["a"; "b"] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); - Rust_primitives.Hax.array_of_list 2 list) - <: - (i32 & t_Array string (sz 2))) - <: - (string & (i32 & t_Array string (sz 2))) - with - | "hello", (123l, v__todo) -> () <: Prims.unit - | _ -> () <: Prims.unit - in - let _:Prims.unit = - match { f_field = 4uy } <: t_Foo with - | { f_field = 3uy } -> () <: Prims.unit - | _ -> () <: Prims.unit - in - () - let casts (x8: u8) (x16: u16) (x32: u32) (x64: u64) (xs: usize) : Prims.unit = let (_: u64):u64 = ((((cast (x8 <: u8) <: u64) +! (cast (x16 <: u16) <: u64) <: u64) +! (cast (x32 <: u32) <: u64) @@ -182,6 +106,87 @@ let casts (x8: u8) (x16: u16) (x32: u32) (x64: u64) (xs: usize) : Prims.unit = in () +/// https://github.com/hacspec/hax/issues/500 +let fn_pointer_cast (_: Prims.unit) : Prims.unit = + let (f: (u32 -> u32)): u32 -> u32 = fun x -> x in + () + +let math_integers (x: Hax_lib.Int.t_Int) + : Prims.Pure u8 + (requires x > (0 <: Hax_lib.Int.t_Int) && x < (16 <: Hax_lib.Int.t_Int)) + (fun _ -> Prims.l_True) = + let (_: Hax_lib.Int.t_Int):Hax_lib.Int.t_Int = Rust_primitives.Hax.Int.from_machine (sz 3) in + let _:bool = + ((-340282366920938463463374607431768211455000) <: Hax_lib.Int.t_Int) > + (340282366920938463463374607431768211455000 <: Hax_lib.Int.t_Int) + in + let _:bool = x < x in + let _:bool = x >= x in + let _:bool = x <= x in + let _:bool = x <> x in + let _:bool = x = x in + let _:Hax_lib.Int.t_Int = x + x in + let _:Hax_lib.Int.t_Int = x - x in + let _:Hax_lib.Int.t_Int = x * x in + let _:Hax_lib.Int.t_Int = x / x in + let (_: i16):i16 = Hax_lib.Int.impl__Int__to_i16 x in + let (_: i32):i32 = Hax_lib.Int.impl__Int__to_i32 x in + let (_: i64):i64 = Hax_lib.Int.impl__Int__to_i64 x in + let (_: i128):i128 = Hax_lib.Int.impl__Int__to_i128 x in + let (_: isize):isize = Hax_lib.Int.impl__Int__to_isize x in + let (_: u16):u16 = Hax_lib.Int.impl__Int__to_u16 x in + let (_: u32):u32 = Hax_lib.Int.impl__Int__to_u32 x in + let (_: u64):u64 = Hax_lib.Int.impl__Int__to_u64 x in + let (_: u128):u128 = Hax_lib.Int.impl__Int__to_u128 x in + let (_: usize):usize = Hax_lib.Int.impl__Int__to_usize x in + Hax_lib.Int.impl__Int__to_u8 (x + (x * x <: Hax_lib.Int.t_Int) <: Hax_lib.Int.t_Int) + +let numeric (_: Prims.unit) : Prims.unit = + let (_: usize):usize = sz 123 in + let (_: isize):isize = isz (-42) in + let (_: isize):isize = isz 42 in + let (_: i32):i32 = (-42l) in + let (_: u128):u128 = pub_u128 22222222222222222222 in + () + +let patterns (_: Prims.unit) : Prims.unit = + let _:Prims.unit = + match 1uy with + | 2uy -> () <: Prims.unit + | _ -> () <: Prims.unit + in + let _:Prims.unit = + match + "hello", + (123l, + (let list = ["a"; "b"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 2); + Rust_primitives.Hax.array_of_list 2 list) + <: + (i32 & t_Array string (sz 2))) + <: + (string & (i32 & t_Array string (sz 2))) + with + | "hello", (123l, v__todo) -> () <: Prims.unit + | _ -> () <: Prims.unit + in + let _:Prims.unit = + match { f_field = 4uy } <: t_Foo with + | { f_field = 3uy } -> () <: Prims.unit + | _ -> () <: Prims.unit + in + () + +let panic_with_msg (_: Prims.unit) : Prims.unit = + Rust_primitives.Hax.never_to_any (Core.Panicking.panic_fmt (Core.Fmt.impl_2__new_const (sz 1) + (let list = ["with msg"] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 1); + Rust_primitives.Hax.array_of_list 1 list) + <: + Core.Fmt.t_Arguments) + <: + Rust_primitives.Hax.t_Never) + let empty_array (_: Prims.unit) : Prims.unit = let (_: t_Slice u8):t_Slice u8 = (let list:Prims.list u8 = [] in @@ -191,9 +196,4 @@ let empty_array (_: Prims.unit) : Prims.unit = t_Slice u8 in () - -/// https://github.com/hacspec/hax/issues/500 -let fn_pointer_cast (_: Prims.unit) : Prims.unit = - let (f: (u32 -> u32)): u32 -> u32 = fun x -> x in - () ''' diff --git a/test-harness/src/snapshots/toolchain__loops into-fstar.snap b/test-harness/src/snapshots/toolchain__loops into-fstar.snap index ab5457375..2c35945ca 100644 --- a/test-harness/src/snapshots/toolchain__loops into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__loops into-fstar.snap @@ -33,6 +33,80 @@ module Loops.Control_flow open Core open FStar.Mul +type t_M = { f_m:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global } + +let impl__M__decoded_message (self: t_M) + : Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = + match + Rust_primitives.Hax.Folds.fold_range_return (sz 0) + (Alloc.Vec.impl_1__len #u8 #Alloc.Alloc.t_Global self.f_m <: usize) + (fun temp_0_ temp_1_ -> + let _:Prims.unit = temp_0_ in + let _:usize = temp_1_ in + true) + () + (fun temp_0_ i -> + let _:Prims.unit = temp_0_ in + let i:usize = i in + if i >. sz 5 <: bool + then + Core.Ops.Control_flow.ControlFlow_Break + (Core.Ops.Control_flow.ControlFlow_Break + (Core.Option.Option_None + <: + Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + <: + Core.Ops.Control_flow.t_ControlFlow + (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + (Prims.unit & Prims.unit)) + <: + Core.Ops.Control_flow.t_ControlFlow + (Core.Ops.Control_flow.t_ControlFlow + (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + (Prims.unit & Prims.unit)) Prims.unit + else + Core.Ops.Control_flow.ControlFlow_Continue () + <: + Core.Ops.Control_flow.t_ControlFlow + (Core.Ops.Control_flow.t_ControlFlow + (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + (Prims.unit & Prims.unit)) Prims.unit) + with + | Core.Ops.Control_flow.ControlFlow_Break ret -> ret + | Core.Ops.Control_flow.ControlFlow_Continue _ -> + Core.Option.Option_Some + (Core.Clone.f_clone #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + #FStar.Tactics.Typeclasses.solve + self.f_m) + <: + Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + +let bigger_power_2_ (x: i32) : i32 = + let pow:i32 = 1l in + Rust_primitives.f_while_loop_cf (fun pow -> + let pow:i32 = pow in + pow <. 1000000l <: bool) + pow + (fun pow -> + let pow:i32 = pow in + let pow:i32 = pow *! 2l in + if pow <. x + then + let pow:i32 = pow *! 3l in + if true + then + Core.Ops.Control_flow.ControlFlow_Break ((), pow <: (Prims.unit & i32)) + <: + Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32 + else + Core.Ops.Control_flow.ControlFlow_Continue (pow *! 2l) + <: + Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32 + else + Core.Ops.Control_flow.ControlFlow_Continue (pow *! 2l) + <: + Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32) + let double_sum (_: Prims.unit) : i32 = let sum:i32 = 0l in let sum:i32 = @@ -86,36 +160,6 @@ let double_sum2 (_: Prims.unit) : i32 = in sum +! sum2 -let double_sum_return (v: t_Slice i32) : i32 = - let sum:i32 = 0l in - match - Rust_primitives.Hax.f_fold_return (Core.Iter.Traits.Collect.f_into_iter #(t_Slice i32) - #FStar.Tactics.Typeclasses.solve - v - <: - Core.Slice.Iter.t_Iter i32) - sum - (fun sum i -> - let sum:i32 = sum in - let i:i32 = i in - if i <. 0l <: bool - then - Core.Ops.Control_flow.ControlFlow_Break - (Core.Ops.Control_flow.ControlFlow_Break 0l - <: - Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) - <: - Core.Ops.Control_flow.t_ControlFlow - (Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) i32 - else - Core.Ops.Control_flow.ControlFlow_Continue (sum +! i <: i32) - <: - Core.Ops.Control_flow.t_ControlFlow - (Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) i32) - with - | Core.Ops.Control_flow.ControlFlow_Break ret -> ret - | Core.Ops.Control_flow.ControlFlow_Continue sum -> sum *! 2l - let double_sum2_return (v: t_Slice i32) : i32 = let sum:i32 = 0l in let sum2:i32 = 0l in @@ -148,79 +192,35 @@ let double_sum2_return (v: t_Slice i32) : i32 = | Core.Ops.Control_flow.ControlFlow_Break ret -> ret | Core.Ops.Control_flow.ControlFlow_Continue (sum, sum2) -> sum +! sum2 -let bigger_power_2_ (x: i32) : i32 = - let pow:i32 = 1l in - Rust_primitives.f_while_loop_cf (fun pow -> - let pow:i32 = pow in - pow <. 1000000l <: bool) - pow - (fun pow -> - let pow:i32 = pow in - let pow:i32 = pow *! 2l in - if pow <. x - then - let pow:i32 = pow *! 3l in - if true - then - Core.Ops.Control_flow.ControlFlow_Break ((), pow <: (Prims.unit & i32)) - <: - Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32 - else - Core.Ops.Control_flow.ControlFlow_Continue (pow *! 2l) - <: - Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32 - else - Core.Ops.Control_flow.ControlFlow_Continue (pow *! 2l) - <: - Core.Ops.Control_flow.t_ControlFlow (Prims.unit & i32) i32) - -type t_M = { f_m:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global } - -let impl__M__decoded_message (self: t_M) - : Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = +let double_sum_return (v: t_Slice i32) : i32 = + let sum:i32 = 0l in match - Rust_primitives.Hax.Folds.fold_range_return (sz 0) - (Alloc.Vec.impl_1__len #u8 #Alloc.Alloc.t_Global self.f_m <: usize) - (fun temp_0_ temp_1_ -> - let _:Prims.unit = temp_0_ in - let _:usize = temp_1_ in - true) - () - (fun temp_0_ i -> - let _:Prims.unit = temp_0_ in - let i:usize = i in - if i >. sz 5 <: bool + Rust_primitives.Hax.f_fold_return (Core.Iter.Traits.Collect.f_into_iter #(t_Slice i32) + #FStar.Tactics.Typeclasses.solve + v + <: + Core.Slice.Iter.t_Iter i32) + sum + (fun sum i -> + let sum:i32 = sum in + let i:i32 = i in + if i <. 0l <: bool then Core.Ops.Control_flow.ControlFlow_Break - (Core.Ops.Control_flow.ControlFlow_Break - (Core.Option.Option_None - <: - Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + (Core.Ops.Control_flow.ControlFlow_Break 0l <: - Core.Ops.Control_flow.t_ControlFlow - (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - (Prims.unit & Prims.unit)) + Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) <: Core.Ops.Control_flow.t_ControlFlow - (Core.Ops.Control_flow.t_ControlFlow - (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - (Prims.unit & Prims.unit)) Prims.unit + (Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) i32 else - Core.Ops.Control_flow.ControlFlow_Continue () + Core.Ops.Control_flow.ControlFlow_Continue (sum +! i <: i32) <: Core.Ops.Control_flow.t_ControlFlow - (Core.Ops.Control_flow.t_ControlFlow - (Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - (Prims.unit & Prims.unit)) Prims.unit) + (Core.Ops.Control_flow.t_ControlFlow i32 (Prims.unit & i32)) i32) with | Core.Ops.Control_flow.ControlFlow_Break ret -> ret - | Core.Ops.Control_flow.ControlFlow_Continue _ -> - Core.Option.Option_Some - (Core.Clone.f_clone #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - #FStar.Tactics.Typeclasses.solve - self.f_m) - <: - Core.Option.t_Option (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + | Core.Ops.Control_flow.ControlFlow_Continue sum -> sum *! 2l let nested (_: Prims.unit) : i32 = let sum:i32 = 0l in @@ -324,94 +324,7 @@ module Loops.For_loops open Core open FStar.Mul -let range1 (_: Prims.unit) : usize = - let acc:usize = sz 0 in - let acc:usize = - Rust_primitives.Hax.Folds.fold_range (sz 0) - (sz 15) - (fun acc temp_1_ -> - let acc:usize = acc in - let _:usize = temp_1_ in - true) - acc - (fun acc i -> - let acc:usize = acc in - let i:usize = i in - acc +! i <: usize) - in - acc - -let range2 (n: usize) : usize = - let acc:usize = sz 0 in - let acc:usize = - Rust_primitives.Hax.Folds.fold_range (sz 0) - (n +! sz 10 <: usize) - (fun acc temp_1_ -> - let acc:usize = acc in - let _:usize = temp_1_ in - true) - acc - (fun acc i -> - let acc:usize = acc in - let i:usize = i in - (acc +! i <: usize) +! sz 1 <: usize) - in - acc - -let composed_range (n: usize) : usize = - let acc:usize = sz 0 in - let acc:usize = - Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Chain.t_Chain - (Core.Ops.Range.t_Range usize) (Core.Ops.Range.t_Range usize)) - #FStar.Tactics.Typeclasses.solve - (Core.Iter.Traits.Iterator.f_chain #(Core.Ops.Range.t_Range usize) - #FStar.Tactics.Typeclasses.solve - #(Core.Ops.Range.t_Range usize) - ({ Core.Ops.Range.f_start = sz 0; Core.Ops.Range.f_end = n } - <: - Core.Ops.Range.t_Range usize) - ({ - Core.Ops.Range.f_start = n +! sz 10 <: usize; - Core.Ops.Range.f_end = n +! sz 50 <: usize - } - <: - Core.Ops.Range.t_Range usize) - <: - Core.Iter.Adapters.Chain.t_Chain (Core.Ops.Range.t_Range usize) - (Core.Ops.Range.t_Range usize)) - <: - Core.Iter.Adapters.Chain.t_Chain (Core.Ops.Range.t_Range usize) - (Core.Ops.Range.t_Range usize)) - acc - (fun acc i -> - let acc:usize = acc in - let i:usize = i in - (acc +! i <: usize) +! sz 1 <: usize) - in - acc - -let rev_range (n: usize) : usize = - let acc:usize = sz 0 in - let acc:usize = - Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Rev.t_Rev - (Core.Ops.Range.t_Range usize)) - #FStar.Tactics.Typeclasses.solve - (Core.Iter.Traits.Iterator.f_rev #(Core.Ops.Range.t_Range usize) - #FStar.Tactics.Typeclasses.solve - ({ Core.Ops.Range.f_start = sz 0; Core.Ops.Range.f_end = n } - <: - Core.Ops.Range.t_Range usize) - <: - Core.Iter.Adapters.Rev.t_Rev (Core.Ops.Range.t_Range usize)) - <: - Core.Iter.Adapters.Rev.t_Rev (Core.Ops.Range.t_Range usize)) - acc - (fun acc i -> - let acc:usize = acc in - let i:usize = i in - (acc +! i <: usize) +! sz 1 <: usize) - in - acc +let bool_returning (x: u8) : bool = x <. 10uy let chunks (v_CHUNK_LEN: usize) (arr: Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) : usize = let acc:usize = sz 0 in @@ -469,6 +382,94 @@ let chunks (v_CHUNK_LEN: usize) (arr: Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global in acc +let composed_range (n: usize) : usize = + let acc:usize = sz 0 in + let acc:usize = + Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Chain.t_Chain + (Core.Ops.Range.t_Range usize) (Core.Ops.Range.t_Range usize)) + #FStar.Tactics.Typeclasses.solve + (Core.Iter.Traits.Iterator.f_chain #(Core.Ops.Range.t_Range usize) + #FStar.Tactics.Typeclasses.solve + #(Core.Ops.Range.t_Range usize) + ({ Core.Ops.Range.f_start = sz 0; Core.Ops.Range.f_end = n } + <: + Core.Ops.Range.t_Range usize) + ({ + Core.Ops.Range.f_start = n +! sz 10 <: usize; + Core.Ops.Range.f_end = n +! sz 50 <: usize + } + <: + Core.Ops.Range.t_Range usize) + <: + Core.Iter.Adapters.Chain.t_Chain (Core.Ops.Range.t_Range usize) + (Core.Ops.Range.t_Range usize)) + <: + Core.Iter.Adapters.Chain.t_Chain (Core.Ops.Range.t_Range usize) + (Core.Ops.Range.t_Range usize)) + acc + (fun acc i -> + let acc:usize = acc in + let i:usize = i in + (acc +! i <: usize) +! sz 1 <: usize) + in + acc + +let enumerate_chunks (arr: Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) : usize = + let acc:usize = sz 0 in + let acc:usize = + Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Enumerate.t_Enumerate + (Core.Slice.Iter.t_Chunks usize)) + #FStar.Tactics.Typeclasses.solve + (Core.Iter.Traits.Iterator.f_enumerate #(Core.Slice.Iter.t_Chunks usize) + #FStar.Tactics.Typeclasses.solve + (Core.Slice.impl__chunks #usize + (Core.Ops.Deref.f_deref #(Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) + #FStar.Tactics.Typeclasses.solve + arr + <: + t_Slice usize) + (sz 4) + <: + Core.Slice.Iter.t_Chunks usize) + <: + Core.Iter.Adapters.Enumerate.t_Enumerate (Core.Slice.Iter.t_Chunks usize)) + <: + Core.Iter.Adapters.Enumerate.t_Enumerate (Core.Slice.Iter.t_Chunks usize)) + acc + (fun acc temp_1_ -> + let acc:usize = acc in + let i, chunk:(usize & t_Slice usize) = temp_1_ in + Rust_primitives.Hax.Folds.fold_enumerated_slice chunk + (fun acc temp_1_ -> + let acc:usize = acc in + let _:usize = temp_1_ in + true) + acc + (fun acc temp_1_ -> + let acc:usize = acc in + let j, x:(usize & usize) = temp_1_ in + (i +! j <: usize) +! x <: usize) + <: + usize) + in + acc + +let f (_: Prims.unit) : u8 = + let acc:u8 = 0uy in + Rust_primitives.Hax.Folds.fold_range 1uy + 10uy + (fun acc temp_1_ -> + let acc:u8 = acc in + let _:u8 = temp_1_ in + true) + acc + (fun acc i -> + let acc:u8 = acc in + let i:u8 = i in + let acc:u8 = acc +! i in + let _:bool = bool_returning i in + acc) + let iterator (arr: Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) : usize = let acc:usize = sz 0 in let acc:usize = @@ -580,63 +581,62 @@ let pattern (arr: Alloc.Vec.t_Vec (usize & usize) Alloc.Alloc.t_Global) : usize in acc -let enumerate_chunks (arr: Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) : usize = +let range1 (_: Prims.unit) : usize = let acc:usize = sz 0 in let acc:usize = - Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Enumerate.t_Enumerate - (Core.Slice.Iter.t_Chunks usize)) + Rust_primitives.Hax.Folds.fold_range (sz 0) + (sz 15) + (fun acc temp_1_ -> + let acc:usize = acc in + let _:usize = temp_1_ in + true) + acc + (fun acc i -> + let acc:usize = acc in + let i:usize = i in + acc +! i <: usize) + in + acc + +let range2 (n: usize) : usize = + let acc:usize = sz 0 in + let acc:usize = + Rust_primitives.Hax.Folds.fold_range (sz 0) + (n +! sz 10 <: usize) + (fun acc temp_1_ -> + let acc:usize = acc in + let _:usize = temp_1_ in + true) + acc + (fun acc i -> + let acc:usize = acc in + let i:usize = i in + (acc +! i <: usize) +! sz 1 <: usize) + in + acc + +let rev_range (n: usize) : usize = + let acc:usize = sz 0 in + let acc:usize = + Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter #(Core.Iter.Adapters.Rev.t_Rev + (Core.Ops.Range.t_Range usize)) #FStar.Tactics.Typeclasses.solve - (Core.Iter.Traits.Iterator.f_enumerate #(Core.Slice.Iter.t_Chunks usize) + (Core.Iter.Traits.Iterator.f_rev #(Core.Ops.Range.t_Range usize) #FStar.Tactics.Typeclasses.solve - (Core.Slice.impl__chunks #usize - (Core.Ops.Deref.f_deref #(Alloc.Vec.t_Vec usize Alloc.Alloc.t_Global) - #FStar.Tactics.Typeclasses.solve - arr - <: - t_Slice usize) - (sz 4) + ({ Core.Ops.Range.f_start = sz 0; Core.Ops.Range.f_end = n } <: - Core.Slice.Iter.t_Chunks usize) + Core.Ops.Range.t_Range usize) <: - Core.Iter.Adapters.Enumerate.t_Enumerate (Core.Slice.Iter.t_Chunks usize)) + Core.Iter.Adapters.Rev.t_Rev (Core.Ops.Range.t_Range usize)) <: - Core.Iter.Adapters.Enumerate.t_Enumerate (Core.Slice.Iter.t_Chunks usize)) + Core.Iter.Adapters.Rev.t_Rev (Core.Ops.Range.t_Range usize)) acc - (fun acc temp_1_ -> + (fun acc i -> let acc:usize = acc in - let i, chunk:(usize & t_Slice usize) = temp_1_ in - Rust_primitives.Hax.Folds.fold_enumerated_slice chunk - (fun acc temp_1_ -> - let acc:usize = acc in - let _:usize = temp_1_ in - true) - acc - (fun acc temp_1_ -> - let acc:usize = acc in - let j, x:(usize & usize) = temp_1_ in - (i +! j <: usize) +! x <: usize) - <: - usize) + let i:usize = i in + (acc +! i <: usize) +! sz 1 <: usize) in acc - -let bool_returning (x: u8) : bool = x <. 10uy - -let f (_: Prims.unit) : u8 = - let acc:u8 = 0uy in - Rust_primitives.Hax.Folds.fold_range 1uy - 10uy - (fun acc temp_1_ -> - let acc:u8 = acc in - let _:u8 = temp_1_ in - true) - acc - (fun acc i -> - let acc:u8 = acc in - let i:u8 = i in - let acc:u8 = acc +! i in - let _:bool = bool_returning i in - acc) ''' "Loops.Recognized_loops.fst" = ''' module Loops.Recognized_loops @@ -644,64 +644,64 @@ module Loops.Recognized_loops open Core open FStar.Mul -let range (_: Prims.unit) : u64 = +let enumerated_chunked_slice (#v_T: Type0) (slice: t_Slice v_T) : u64 = let count:u64 = 0uL in - Rust_primitives.Hax.Folds.fold_range 0uy - 10uy + Rust_primitives.Hax.Folds.fold_enumerated_chunked_slice (sz 3) + slice (fun count i -> let count:u64 = count in - let i:u8 = i in - i <=. 10uy <: bool) + let i:usize = i in + i <= Core.Slice.impl__len #v_T slice) count (fun count i -> let count:u64 = count in - let i:u8 = i in - let count:u64 = count +! 1uL in + let i:(usize & t_Slice v_T) = i in + let count:u64 = count +! 3uL in count) -let range_step_by (_: Prims.unit) : u64 = +let enumerated_slice (#v_T: Type0) (slice: t_Slice v_T) : u64 = let count:u64 = 0uL in - Rust_primitives.Hax.Folds.fold_range_step_by 0uy - 10uy - (sz 2) + Rust_primitives.Hax.Folds.fold_enumerated_slice slice (fun count i -> let count:u64 = count in - let i:u8 = i in - i <=. 10uy <: bool) + let i:usize = i in + i <=. sz 10 <: bool) count (fun count i -> let count:u64 = count in - let i:u8 = i in - let count:u64 = count +! 1uL in + let i:(usize & v_T) = i in + let count:u64 = count +! 2uL in count) -let enumerated_slice (#v_T: Type0) (slice: t_Slice v_T) : u64 = +let range (_: Prims.unit) : u64 = let count:u64 = 0uL in - Rust_primitives.Hax.Folds.fold_enumerated_slice slice + Rust_primitives.Hax.Folds.fold_range 0uy + 10uy (fun count i -> let count:u64 = count in - let i:usize = i in - i <=. sz 10 <: bool) + let i:u8 = i in + i <=. 10uy <: bool) count (fun count i -> let count:u64 = count in - let i:(usize & v_T) = i in - let count:u64 = count +! 2uL in + let i:u8 = i in + let count:u64 = count +! 1uL in count) -let enumerated_chunked_slice (#v_T: Type0) (slice: t_Slice v_T) : u64 = +let range_step_by (_: Prims.unit) : u64 = let count:u64 = 0uL in - Rust_primitives.Hax.Folds.fold_enumerated_chunked_slice (sz 3) - slice + Rust_primitives.Hax.Folds.fold_range_step_by 0uy + 10uy + (sz 2) (fun count i -> let count:u64 = count in - let i:usize = i in - i <= Core.Slice.impl__len #v_T slice) + let i:u8 = i in + i <=. 10uy <: bool) count (fun count i -> let count:u64 = count in - let i:(usize & t_Slice v_T) = i in - let count:u64 = count +! 3uL in + let i:u8 = i in + let count:u64 = count +! 1uL in count) ''' "Loops.While_loops.fst" = ''' diff --git a/test-harness/src/snapshots/toolchain__mut-ref-functionalization into-fstar.snap b/test-harness/src/snapshots/toolchain__mut-ref-functionalization into-fstar.snap index f1ffe9f82..fee5eaadb 100644 --- a/test-harness/src/snapshots/toolchain__mut-ref-functionalization into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__mut-ref-functionalization into-fstar.snap @@ -32,8 +32,102 @@ module Mut_ref_functionalization open Core open FStar.Mul +type t_Bar = { + f_a:u8; + f_b:u8 +} + +type t_Foo = { f_field:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global } + +class t_FooTrait (v_Self: Type0) = { + f_z_pre:v_Self -> Type0; + f_z_post:v_Self -> v_Self -> Type0; + f_z:x0: v_Self -> Prims.Pure v_Self (f_z_pre x0) (fun result -> f_z_post x0 result) +} + +[@@ FStar.Tactics.Typeclasses.tcinstance] +let impl_FooTrait_for_Foo: t_FooTrait t_Foo = + { + f_z_pre = (fun (self: t_Foo) -> true); + f_z_post = (fun (self: t_Foo) (out: t_Foo) -> true); + f_z = fun (self: t_Foo) -> self + } + +type t_Pair (v_T: Type0) = { + f_a:v_T; + f_b:t_Foo +} + type t_S = { f_b:t_Array u8 (sz 5) } +let impl__S__update (self: t_S) (x: u8) : t_S = + let self:t_S = + { + self with + f_b = Rust_primitives.Hax.Monomorphized_update_at.update_at_usize self.f_b (sz 0) x + } + <: + t_S + in + self + +let array (x: t_Array u8 (sz 10)) : t_Array u8 (sz 10) = + let x:t_Array u8 (sz 10) = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize x (sz 1) (x.[ sz 2 ] <: u8) + in + x + +let f (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Alloc.Vec.impl__new #u8 () in + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global vec 1uy + in + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global vec 2uy + in + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Core.Slice.impl__swap #u8 vec (sz 0) (sz 1) in + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Core.Slice.impl__swap #u8 vec (sz 0) (sz 1) in + vec + +let h (x: u8) : u8 = + let x:u8 = x +! 10uy in + x + +let i (bar: t_Bar) : (t_Bar & u8) = + let bar:t_Bar = { bar with f_b = bar.f_b +! bar.f_a } <: t_Bar in + let bar:t_Bar = { bar with f_a = h bar.f_a } <: t_Bar in + let hax_temp_output:u8 = bar.f_a +! bar.f_b in + bar, hax_temp_output <: (t_Bar & u8) + +let j (x: t_Bar) : (t_Bar & u8) = + let out:u8 = 123uy in + let tmp0, out1:(t_Bar & u8) = i x in + let x:t_Bar = tmp0 in + let hax_temp_output:u8 = out1 +! out in + x, hax_temp_output <: (t_Bar & u8) + +let k + (vec: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + (arg_1_wild3: u16) + (arg_1_wild: u8) + (arg_3_wild2: Prims.unit) + : (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global & u16 & Prims.unit & u64) = + let arg_1_wild2:u8 = vec.[ sz 1 ] in + let arg_3_wild:u8 = vec.[ sz 2 ] in + let arg_1_wild1:u8 = vec.[ sz 3 ] in + let arg_3_wild1:u8 = vec.[ sz 4 ] in + let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize vec + (sz 0) + ((((arg_1_wild +! arg_3_wild <: u8) +! arg_1_wild1 <: u8) +! arg_3_wild1 <: u8) +! arg_1_wild + <: + u8) + in + let hax_temp_output:u64 = 12345uL in + vec, arg_1_wild3, arg_3_wild2, hax_temp_output + <: + (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global & u16 & Prims.unit & u64) + let foo (lhs rhs: t_S) : t_S = let lhs:t_S = Rust_primitives.Hax.Folds.fold_range (sz 0) @@ -61,16 +155,56 @@ let foo (lhs rhs: t_S) : t_S = in lhs -let impl__S__update (self: t_S) (x: u8) : t_S = - let self:t_S = +let g (x: t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = + Rust_primitives.Hax.Folds.fold_range 1uy + 10uy + (fun x temp_1_ -> + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in + let _:u8 = temp_1_ in + true) + x + (fun x i -> + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in + let i:u8 = i in + { + x with + f_a + = + Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global x.f_a i + <: + Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global + } + <: + t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) + in + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = + { x with f_a = Core.Slice.impl__swap #u8 x.f_a (sz 0) (sz 1) } + <: + t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + in + let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = { - self with - f_b = Rust_primitives.Hax.Monomorphized_update_at.update_at_usize self.f_b (sz 0) x + x with + f_b = { x.f_b with f_field = Core.Slice.impl__swap #u8 x.f_b.f_field (sz 0) (sz 1) } <: t_Foo } <: - t_S + t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) in - self + x.f_a + +let build_vec (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + Alloc.Slice.impl__into_vec #u8 + #Alloc.Alloc.t_Global + (Rust_primitives.unsize (Rust_primitives.Hax.box_new (let list = [1uy; 2uy; 3uy] in + FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 3); + Rust_primitives.Hax.array_of_list 3 list) + <: + Alloc.Boxed.t_Box (t_Array u8 (sz 3)) Alloc.Alloc.t_Global) + <: + Alloc.Boxed.t_Box (t_Slice u8) Alloc.Alloc.t_Global) let index_mutation (x: Core.Ops.Range.t_Range usize) (a: t_Slice u8) : Prims.unit = let v:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = @@ -116,17 +250,6 @@ let index_mutation_unsize (x: t_Array u8 (sz 12)) : u8 = in 42uy -let build_vec (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - Alloc.Slice.impl__into_vec #u8 - #Alloc.Alloc.t_Global - (Rust_primitives.unsize (Rust_primitives.Hax.box_new (let list = [1uy; 2uy; 3uy] in - FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 3); - Rust_primitives.Hax.array_of_list 3 list) - <: - Alloc.Boxed.t_Box (t_Array u8 (sz 3)) Alloc.Alloc.t_Global) - <: - Alloc.Boxed.t_Box (t_Slice u8) Alloc.Alloc.t_Global) - let test_append (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = let vec1:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Alloc.Vec.impl__new #u8 () in let vec2:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = @@ -154,127 +277,4 @@ let test_append (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = (build_vec () <: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) in vec1 - -let f (_: Prims.unit) : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Alloc.Vec.impl__new #u8 () in - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global vec 1uy - in - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global vec 2uy - in - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Core.Slice.impl__swap #u8 vec (sz 0) (sz 1) in - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = Core.Slice.impl__swap #u8 vec (sz 0) (sz 1) in - vec - -type t_Foo = { f_field:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global } - -type t_Pair (v_T: Type0) = { - f_a:v_T; - f_b:t_Foo -} - -let g (x: t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = - Rust_primitives.Hax.Folds.fold_range 1uy - 10uy - (fun x temp_1_ -> - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in - let _:u8 = temp_1_ in - true) - x - (fun x i -> - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = x in - let i:u8 = i in - { - x with - f_a - = - Alloc.Vec.impl_1__push #u8 #Alloc.Alloc.t_Global x.f_a i - <: - Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global - } - <: - t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global)) - in - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = - { x with f_a = Core.Slice.impl__swap #u8 x.f_a (sz 0) (sz 1) } - <: - t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - in - let x:t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) = - { - x with - f_b = { x.f_b with f_field = Core.Slice.impl__swap #u8 x.f_b.f_field (sz 0) (sz 1) } <: t_Foo - } - <: - t_Pair (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - in - x.f_a - -let h (x: u8) : u8 = - let x:u8 = x +! 10uy in - x - -type t_Bar = { - f_a:u8; - f_b:u8 -} - -let i (bar: t_Bar) : (t_Bar & u8) = - let bar:t_Bar = { bar with f_b = bar.f_b +! bar.f_a } <: t_Bar in - let bar:t_Bar = { bar with f_a = h bar.f_a } <: t_Bar in - let hax_temp_output:u8 = bar.f_a +! bar.f_b in - bar, hax_temp_output <: (t_Bar & u8) - -let j (x: t_Bar) : (t_Bar & u8) = - let out:u8 = 123uy in - let tmp0, out1:(t_Bar & u8) = i x in - let x:t_Bar = tmp0 in - let hax_temp_output:u8 = out1 +! out in - x, hax_temp_output <: (t_Bar & u8) - -let k - (vec: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - (arg_1_wild3: u16) - (arg_1_wild: u8) - (arg_3_wild2: Prims.unit) - : (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global & u16 & Prims.unit & u64) = - let arg_1_wild2:u8 = vec.[ sz 1 ] in - let arg_3_wild:u8 = vec.[ sz 2 ] in - let arg_1_wild1:u8 = vec.[ sz 3 ] in - let arg_3_wild1:u8 = vec.[ sz 4 ] in - let vec:Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize vec - (sz 0) - ((((arg_1_wild +! arg_3_wild <: u8) +! arg_1_wild1 <: u8) +! arg_3_wild1 <: u8) +! arg_1_wild - <: - u8) - in - let hax_temp_output:u64 = 12345uL in - vec, arg_1_wild3, arg_3_wild2, hax_temp_output - <: - (Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global & u16 & Prims.unit & u64) - -class t_FooTrait (v_Self: Type0) = { - f_z_pre:v_Self -> Type0; - f_z_post:v_Self -> v_Self -> Type0; - f_z:x0: v_Self -> Prims.Pure v_Self (f_z_pre x0) (fun result -> f_z_post x0 result) -} - -[@@ FStar.Tactics.Typeclasses.tcinstance] -let impl_FooTrait_for_Foo: t_FooTrait t_Foo = - { - f_z_pre = (fun (self: t_Foo) -> true); - f_z_post = (fun (self: t_Foo) (out: t_Foo) -> true); - f_z = fun (self: t_Foo) -> self - } - -let array (x: t_Array u8 (sz 10)) : t_Array u8 (sz 10) = - let x:t_Array u8 (sz 10) = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize x (sz 1) (x.[ sz 2 ] <: u8) - in - x ''' diff --git a/test-harness/src/snapshots/toolchain__naming into-fstar.snap b/test-harness/src/snapshots/toolchain__naming into-fstar.snap index 903e5db34..f25ae1575 100644 --- a/test-harness/src/snapshots/toolchain__naming into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__naming into-fstar.snap @@ -94,46 +94,41 @@ module Naming open Core open FStar.Mul -type t_Foo = - | Foo_A : t_Foo - | Foo_B { f_x:usize }: t_Foo - -type t_Foo2 = - | Foo2_A : t_Foo2 - | Foo2_B { f_x:usize }: t_Foo2 +type t_Arity1 (v_T: Type0) = | Arity1 : v_T -> t_Arity1 v_T type t_B = | B : t_B -type t_C = { f_x:usize } +let impl__B__f (self: t_B) : t_B = B <: t_B -type t_X = | X : t_X +type t_C = { f_x:usize } -let mk_c (_: Prims.unit) : t_C = - let _:t_Foo = Foo_B ({ Naming.Foo.f_x = sz 3 }) <: t_Foo in - let _:t_X = X <: t_X in - { f_x = sz 3 } <: t_C +type t_Foo = + | Foo_A : t_Foo + | Foo_B { f_x:usize }: t_Foo let impl__Foo__f (self: t_Foo) : t_Foo = Foo_A <: t_Foo -let impl__B__f (self: t_B) : t_B = B <: t_B - -type t_Foobar = { f_a:t_Foo } - -let ff__g (_: Prims.unit) : Prims.unit = () +type t_Foo2 = + | Foo2_A : t_Foo2 + | Foo2_B { f_x:usize }: t_Foo2 -let ff__g__impl__g (self: t_B) : usize = sz 0 +class t_FooTrait (v_Self: Type0) = { f_ASSOCIATED_CONSTANT:usize } -type t_f__g__impl__g__Foo = - | C_f__g__impl__g__Foo_A : t_f__g__impl__g__Foo - | C_f__g__impl__g__Foo_B { f_x:usize }: t_f__g__impl__g__Foo +type t_Foobar = { f_a:t_Foo } -let ff__g__impl_1__g (self: t_Foo) : usize = sz 1 +type t_StructA = { f_a:usize } -let f (x: t_Foobar) : usize = ff__g__impl_1__g x.f_a +type t_StructB = { + f_a:usize; + f_b:usize +} -let reserved_names (v_val v_noeq v_of: u8) : u8 = (v_val +! v_noeq <: u8) +! v_of +type t_StructC = { f_a:usize } -type t_Arity1 (v_T: Type0) = | Arity1 : v_T -> t_Arity1 v_T +type t_StructD = { + f_a:usize; + f_b:usize +} class t_T1 (v_Self: Type0) = { __marker_trait_t_T1:Prims.unit } @@ -154,19 +149,16 @@ class t_T3_e_for_a (v_Self: Type0) = { __marker_trait_t_T3_e_for_a:Prims.unit } [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_T3_e_e_for_a_for_Foo: t_T3_e_for_a t_Foo = { __marker_trait = () } -type t_StructA = { f_a:usize } - -type t_StructB = { - f_a:usize; - f_b:usize -} +type t_X = | X : t_X -type t_StructC = { f_a:usize } +let v_INHERENT_CONSTANT: usize = sz 3 -type t_StructD = { - f_a:usize; - f_b:usize -} +let constants + (#v_T: Type0) + (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_FooTrait v_T) + (_: Prims.unit) + : usize = + (f_ASSOCIATED_CONSTANT #FStar.Tactics.Typeclasses.solve <: usize) +! v_INHERENT_CONSTANT let construct_structs (a b: usize) : Prims.unit = let _:t_StructA = { f_a = a } <: t_StructA in @@ -175,16 +167,24 @@ let construct_structs (a b: usize) : Prims.unit = let _:t_StructD = { f_a = a; f_b = b } <: t_StructD in () -let v_INHERENT_CONSTANT: usize = sz 3 +let ff__g (_: Prims.unit) : Prims.unit = () -class t_FooTrait (v_Self: Type0) = { f_ASSOCIATED_CONSTANT:usize } +let ff__g__impl__g (self: t_B) : usize = sz 0 -let constants - (#v_T: Type0) - (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_FooTrait v_T) - (_: Prims.unit) - : usize = - (f_ASSOCIATED_CONSTANT #FStar.Tactics.Typeclasses.solve <: usize) +! v_INHERENT_CONSTANT +type t_f__g__impl__g__Foo = + | C_f__g__impl__g__Foo_A : t_f__g__impl__g__Foo + | C_f__g__impl__g__Foo_B { f_x:usize }: t_f__g__impl__g__Foo + +let ff__g__impl_1__g (self: t_Foo) : usize = sz 1 + +let f (x: t_Foobar) : usize = ff__g__impl_1__g x.f_a + +let mk_c (_: Prims.unit) : t_C = + let _:t_Foo = Foo_B ({ Naming.Foo.f_x = sz 3 }) <: t_Foo in + let _:t_X = X <: t_X in + { f_x = sz 3 } <: t_C + +let reserved_names (v_val v_noeq v_of: u8) : u8 = (v_val +! v_noeq <: u8) +! v_of /// From issue https://github.com/hacspec/hax/issues/839 let string_shadows (v_string n: string) : Prims.unit = () diff --git a/test-harness/src/snapshots/toolchain__pattern-or into-coq.snap b/test-harness/src/snapshots/toolchain__pattern-or into-coq.snap index 470b72517..f4b3cbfe0 100644 --- a/test-harness/src/snapshots/toolchain__pattern-or into-coq.snap +++ b/test-harness/src/snapshots/toolchain__pattern-or into-coq.snap @@ -42,8 +42,6 @@ Import RecordSetNotations. -(* NotImplementedYet *) - Inductive t_E : Type := | E_A | E_B. @@ -58,6 +56,8 @@ Definition t_E_cast_to_repr (x : t_E) : t_isize := 1 end. +(* NotImplementedYet *) + Definition bar (x : t_E) : unit := match x with | E_A @@ -65,17 +65,6 @@ Definition bar (x : t_E) : unit := tt end. -Definition nested (x : t_Option ((t_i32))) : t_i32 := - match x with - | Option_Some (1 - | 2) => - 1 - | Option_Some (x) => - x - | Option_None => - 0 - end. - Definition deep (x : (t_i32*t_Option ((t_i32)))) : t_i32 := match x with | (1 @@ -86,6 +75,18 @@ Definition deep (x : (t_i32*t_Option ((t_i32)))) : t_i32 := x end. +Definition deep_capture (x : t_Result (((t_i32*t_i32))) (((t_i32*t_i32)))) : t_i32 := + match x with + | Result_Ok ((1 + | 2,x)) + | Result_Err ((3 + | 4,x)) => + x + | Result_Ok ((x,_)) + | Result_Err ((x,_)) => + x + end. + Definition equivalent (x : (t_i32*t_Option ((t_i32)))) : t_i32 := match x with | (1,Option_Some (3)) @@ -97,15 +98,14 @@ Definition equivalent (x : (t_i32*t_Option ((t_i32)))) : t_i32 := x end. -Definition deep_capture (x : t_Result (((t_i32*t_i32))) (((t_i32*t_i32)))) : t_i32 := +Definition nested (x : t_Option ((t_i32))) : t_i32 := match x with - | Result_Ok ((1 - | 2,x)) - | Result_Err ((3 - | 4,x)) => - x - | Result_Ok ((x,_)) - | Result_Err ((x,_)) => + | Option_Some (1 + | 2) => + 1 + | Option_Some (x) => x + | Option_None => + 0 end. ''' diff --git a/test-harness/src/snapshots/toolchain__pattern-or into-fstar.snap b/test-harness/src/snapshots/toolchain__pattern-or into-fstar.snap index 16d56d8f9..9fdc477aa 100644 --- a/test-harness/src/snapshots/toolchain__pattern-or into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__pattern-or into-fstar.snap @@ -44,12 +44,6 @@ let t_E_cast_to_repr (x: t_E) : isize = let bar (x: t_E) : Prims.unit = match x with | E_A | E_B -> () <: Prims.unit -let nested (x: Core.Option.t_Option i32) : i32 = - match x with - | Core.Option.Option_Some 1l | Core.Option.Option_Some 2l -> 1l - | Core.Option.Option_Some x -> x - | Core.Option.Option_None -> 0l - let deep (x: (i32 & Core.Option.t_Option i32)) : i32 = match x with | 1l, Core.Option.Option_Some 3l @@ -58,6 +52,14 @@ let deep (x: (i32 & Core.Option.t_Option i32)) : i32 = | 2l, Core.Option.Option_Some 4l -> 0l | x, _ -> x +let deep_capture (x: Core.Result.t_Result (i32 & i32) (i32 & i32)) : i32 = + match x with + | Core.Result.Result_Ok (1l, x) + | Core.Result.Result_Ok (2l, x) + | Core.Result.Result_Err (3l, x) + | Core.Result.Result_Err (4l, x) -> x + | Core.Result.Result_Ok (x, _) | Core.Result.Result_Err (x, _) -> x + let equivalent (x: (i32 & Core.Option.t_Option i32)) : i32 = match x with | 1l, Core.Option.Option_Some 3l @@ -66,11 +68,9 @@ let equivalent (x: (i32 & Core.Option.t_Option i32)) : i32 = | 2l, Core.Option.Option_Some 4l -> 0l | x, _ -> x -let deep_capture (x: Core.Result.t_Result (i32 & i32) (i32 & i32)) : i32 = +let nested (x: Core.Option.t_Option i32) : i32 = match x with - | Core.Result.Result_Ok (1l, x) - | Core.Result.Result_Ok (2l, x) - | Core.Result.Result_Err (3l, x) - | Core.Result.Result_Err (4l, x) -> x - | Core.Result.Result_Ok (x, _) | Core.Result.Result_Err (x, _) -> x + | Core.Option.Option_Some 1l | Core.Option.Option_Some 2l -> 1l + | Core.Option.Option_Some x -> x + | Core.Option.Option_None -> 0l ''' diff --git a/test-harness/src/snapshots/toolchain__reordering into-coq.snap b/test-harness/src/snapshots/toolchain__reordering into-coq.snap index 4890d697f..d3b0567d8 100644 --- a/test-harness/src/snapshots/toolchain__reordering into-coq.snap +++ b/test-harness/src/snapshots/toolchain__reordering into-coq.snap @@ -41,23 +41,12 @@ Import RecordSetNotations. -(* NotImplementedYet *) - -Definition no_dependency_1_ (_ : unit) : unit := - tt. - -Definition no_dependency_2_ (_ : unit) : unit := - tt. - Inductive t_Foo : Type := | Foo_A | Foo_B. Arguments t_Foo:clear implicits. Arguments t_Foo. -Definition f (_ : t_u32) : t_Foo := - Foo_A. - Record t_Bar : Type := { 0 : t_Foo; @@ -68,9 +57,6 @@ Arguments Build_t_Bar. #[export] Instance settable_t_Bar : Settable _ := settable! (@Build_t_Bar) <0>. -Definition g (_ : unit) : t_Bar := - Build_t_Bar (f (32)). - Definition t_Foo_cast_to_repr (x : t_Foo) : t_isize := match x with | Foo_A => @@ -80,83 +66,16 @@ Definition t_Foo_cast_to_repr (x : t_Foo) : t_isize := end. (* NotImplementedYet *) -''' -"Reordering_No_alpha_sorting.v" = ''' -(* File automatically generated by Hacspec *) -From Coq Require Import ZArith. -Require Import List. -Import List.ListNotations. -Open Scope Z_scope. -Open Scope bool_scope. -Require Import Ascii. -Require Import String. -Require Import Coq.Floats.Floats. -From RecordUpdate Require Import RecordSet. -Import RecordSetNotations. - -Definition u01 (_ : unit) : unit := - tt. - -Definition r02 (_ : unit) : unit := - tt. - -Definition b03 (_ : unit) : unit := - tt. - -Definition f04 (_ : unit) : unit := - tt. - -Definition h05 (_ : unit) : unit := - tt. - -Definition i06 (_ : unit) : unit := - tt. - -Definition c07 (_ : unit) : unit := - tt. - -Definition k08 (_ : unit) : unit := - tt. - -Definition d09 (_ : unit) : unit := - tt. -Definition e10 (_ : unit) : unit := - tt. - -Definition g11 (_ : unit) : unit := - tt. - -Definition j12 (_ : unit) : unit := - tt. - -Definition o13 (_ : unit) : unit := - tt. - -Definition a14 (_ : unit) : unit := - tt. - -Definition q15 (_ : unit) : unit := - tt. - -Definition m16 (_ : unit) : unit := - tt. - -Definition l17 (_ : unit) : unit := - tt. - -Definition n18 (_ : unit) : unit := - tt. - -Definition v19 (_ : unit) : unit := - tt. +Definition f (_ : t_u32) : t_Foo := + Foo_A. -Definition s20 (_ : unit) : unit := - tt. +Definition g (_ : unit) : t_Bar := + Build_t_Bar (f (32)). -Definition p21 (_ : unit) : unit := +Definition no_dependency_1_ (_ : unit) : unit := tt. -Definition t22 (_ : unit) : unit := +Definition no_dependency_2_ (_ : unit) : unit := tt. ''' diff --git a/test-harness/src/snapshots/toolchain__reordering into-fstar.snap b/test-harness/src/snapshots/toolchain__reordering into-fstar.snap index dec2f94bb..385642dd2 100644 --- a/test-harness/src/snapshots/toolchain__reordering into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__reordering into-fstar.snap @@ -26,78 +26,28 @@ exit = 0 diagnostics = [] [stdout.files] -"Reordering.No_alpha_sorting.fst" = ''' -module Reordering.No_alpha_sorting -#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" -open Core -open FStar.Mul - -let u01 (_: Prims.unit) : Prims.unit = () - -let r02 (_: Prims.unit) : Prims.unit = () - -let b03 (_: Prims.unit) : Prims.unit = () - -let f04 (_: Prims.unit) : Prims.unit = () - -let h05 (_: Prims.unit) : Prims.unit = () - -let i06 (_: Prims.unit) : Prims.unit = () - -let c07 (_: Prims.unit) : Prims.unit = () - -let k08 (_: Prims.unit) : Prims.unit = () - -let d09 (_: Prims.unit) : Prims.unit = () - -let e10 (_: Prims.unit) : Prims.unit = () - -let g11 (_: Prims.unit) : Prims.unit = () - -let j12 (_: Prims.unit) : Prims.unit = () - -let o13 (_: Prims.unit) : Prims.unit = () - -let a14 (_: Prims.unit) : Prims.unit = () - -let q15 (_: Prims.unit) : Prims.unit = () - -let m16 (_: Prims.unit) : Prims.unit = () - -let l17 (_: Prims.unit) : Prims.unit = () - -let n18 (_: Prims.unit) : Prims.unit = () - -let v19 (_: Prims.unit) : Prims.unit = () - -let s20 (_: Prims.unit) : Prims.unit = () - -let p21 (_: Prims.unit) : Prims.unit = () - -let t22 (_: Prims.unit) : Prims.unit = () -''' "Reordering.fst" = ''' module Reordering #set-options "--fuel 0 --ifuel 1 --z3rlimit 15" open Core open FStar.Mul -let no_dependency_1_ (_: Prims.unit) : Prims.unit = () - -let no_dependency_2_ (_: Prims.unit) : Prims.unit = () - type t_Foo = | Foo_A : t_Foo | Foo_B : t_Foo -let f (_: u32) : t_Foo = Foo_A <: t_Foo - type t_Bar = | Bar : t_Foo -> t_Bar -let g (_: Prims.unit) : t_Bar = Bar (f 32ul) <: t_Bar - let t_Foo_cast_to_repr (x: t_Foo) : isize = match x with | Foo_A -> isz 0 | Foo_B -> isz 1 + +let f (_: u32) : t_Foo = Foo_A <: t_Foo + +let g (_: Prims.unit) : t_Bar = Bar (f 32ul) <: t_Bar + +let no_dependency_1_ (_: Prims.unit) : Prims.unit = () + +let no_dependency_2_ (_: Prims.unit) : Prims.unit = () ''' diff --git a/test-harness/src/snapshots/toolchain__reordering into-ssprove.snap b/test-harness/src/snapshots/toolchain__reordering into-ssprove.snap index 884bc8a78..b6655f747 100644 --- a/test-harness/src/snapshots/toolchain__reordering into-ssprove.snap +++ b/test-harness/src/snapshots/toolchain__reordering into-ssprove.snap @@ -53,18 +53,6 @@ Import choice.Choice.Exports. Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. -(*Not implemented yet? todo(item)*) - -Equations no_dependency_1_ {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - no_dependency_1_ _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations no_dependency_2_ {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - no_dependency_2_ _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - Definition t_Foo : choice_type := ('unit ∐ 'unit). Notation "'Foo_A_case'" := (inl tt) (at level 100). @@ -78,11 +66,6 @@ Equations Foo_B {L : {fset Location}} {I : Interface} : both L I t_Foo := solve_lift (ret_both (inr (tt : 'unit) : t_Foo)) : both L I t_Foo. Fail Next Obligation. -Equations f {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 int32) : both L1 I1 t_Foo := - f _ := - Foo_A : both L1 I1 t_Foo. -Fail Next Obligation. - Definition t_Bar : choice_type := (t_Foo). Equations 0 {L : {fset Location}} {I : Interface} (s : both L I t_Bar) : both L I t_Foo := @@ -97,11 +80,6 @@ Equations Build_t_Bar {L0 : {fset Location}} {I0 : Interface} {0 : both L0 I0 t_ Fail Next Obligation. Notation "'Build_t_Bar' '[' x ']' '(' '0' ':=' y ')'" := (Build_t_Bar (0 := y)). -Equations g {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 t_Bar := - g _ := - Bar (solve_lift (f (ret_both (32 : int32)))) : both L1 I1 t_Bar. -Fail Next Obligation. - Equations t_Foo_cast_to_repr {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 t_Foo) : both L1 I1 uint_size := t_Foo_cast_to_repr x := matchb x with @@ -113,141 +91,24 @@ Equations t_Foo_cast_to_repr {L1 : {fset Location}} {I1 : Interface} (x : both L Fail Next Obligation. (*Not implemented yet? todo(item)*) -''' -"Reordering_No_alpha_sorting.v" = ''' -(* File automatically generated by Hacspec *) -Set Warnings "-notation-overridden,-ambiguous-paths". -From Crypt Require Import choice_type Package Prelude. -Import PackageNotation. -From extructures Require Import ord fset. -From mathcomp Require Import word_ssrZ word. -From Jasmin Require Import word. - -From Coq Require Import ZArith. -From Coq Require Import Strings.String. -Import List.ListNotations. -Open Scope list_scope. -Open Scope Z_scope. -Open Scope bool_scope. - -From Hacspec Require Import ChoiceEquality. -From Hacspec Require Import LocationUtility. -From Hacspec Require Import Hacspec_Lib_Comparable. -From Hacspec Require Import Hacspec_Lib_Pre. -From Hacspec Require Import Hacspec_Lib. - -Open Scope hacspec_scope. -Import choice.Choice.Exports. - -Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. - -Equations u01 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - u01 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations r02 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - r02 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations b03 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - b03 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. -Equations f04 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - f04 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations h05 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - h05 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations i06 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - i06 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations c07 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - c07 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations k08 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - k08 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations d09 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - d09 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations e10 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - e10 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations g11 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - g11 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations j12 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - j12 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations o13 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - o13 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations a14 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - a14 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations q15 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - q15 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations m16 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - m16 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations l17 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - l17 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations n18 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - n18 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. -Fail Next Obligation. - -Equations v19 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - v19 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Equations f {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 int32) : both L1 I1 t_Foo := + f _ := + Foo_A : both L1 I1 t_Foo. Fail Next Obligation. -Equations s20 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - s20 _ := - solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. +Equations g {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 t_Bar := + g _ := + Bar (solve_lift (f (ret_both (32 : int32)))) : both L1 I1 t_Bar. Fail Next Obligation. -Equations p21 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - p21 _ := +Equations no_dependency_1_ {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + no_dependency_1_ _ := solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. Fail Next Obligation. -Equations t22 {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := - t22 _ := +Equations no_dependency_2_ {L1 : {fset Location}} {I1 : Interface} (_ : both L1 I1 'unit) : both L1 I1 'unit := + no_dependency_2_ _ := solve_lift (ret_both (tt : 'unit)) : both L1 I1 'unit. Fail Next Obligation. ''' diff --git a/test-harness/src/snapshots/toolchain__side-effects into-fstar.snap b/test-harness/src/snapshots/toolchain__side-effects into-fstar.snap index 08362b003..a2038278d 100644 --- a/test-harness/src/snapshots/toolchain__side-effects into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__side-effects into-fstar.snap @@ -72,8 +72,8 @@ let test (x y: Core.Option.t_Option i32) : Core.Option.t_Option i32 = (fun i -> let i:i32 = i in match y with - | Core.Option.Option_Some hoist38 -> - Core.Option.Option_Some (i +! hoist38 <: i32) <: Core.Option.t_Option i32 + | Core.Option.Option_Some hoist1 -> + Core.Option.Option_Some (i +! hoist1 <: i32) <: Core.Option.t_Option i32 | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option i32) with | Core.Option.Option_Some some -> some @@ -85,10 +85,150 @@ module Side_effects open Core open FStar.Mul +type t_A = | A : t_A + +type t_B = | B : t_B + +type t_Bar = { + f_a:bool; + f_b:(t_Array (bool & bool) (sz 6) & bool) +} + +type t_Foo = { + f_x:bool; + f_y:(bool & Alloc.Vec.t_Vec t_Bar Alloc.Alloc.t_Global); + f_z:t_Array t_Bar (sz 6); + f_bar:t_Bar +} + /// Helper function let add3 (x y z: u32) : u32 = Core.Num.impl__u32__wrapping_add (Core.Num.impl__u32__wrapping_add x y <: u32) z +/// Test assignation on non-trivial places +let assign_non_trivial_lhs (foo: t_Foo) : t_Foo = + let foo:t_Foo = { foo with f_x = true } <: t_Foo in + let foo:t_Foo = { foo with f_bar = { foo.f_bar with f_a = true } <: t_Bar } <: t_Foo in + let foo:t_Foo = + { + foo with + f_bar + = + { + foo.f_bar with + f_b + = + { + foo.f_bar.f_b with + _1 + = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_bar.f_b._1 + (sz 3) + ({ (foo.f_bar.f_b._1.[ sz 3 ] <: (bool & bool)) with _2 = true } <: (bool & bool)) + } + <: + (t_Array (bool & bool) (sz 6) & bool) + } + <: + t_Bar + } + <: + t_Foo + in + let foo:t_Foo = + { + foo with + f_z + = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_z + (sz 3) + ({ (foo.f_z.[ sz 3 ] <: t_Bar) with f_a = true } <: t_Bar) + } + <: + t_Foo + in + let foo:t_Foo = + { + foo with + f_y + = + { + foo.f_y with + _2 + = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_y._2 + (sz 3) + ({ + (foo.f_y._2.[ sz 3 ] <: t_Bar) with + f_b + = + { + (foo.f_y._2.[ sz 3 ] <: t_Bar).f_b with + _1 + = + Rust_primitives.Hax.Monomorphized_update_at.update_at_usize (foo.f_y._2.[ sz 3 ] + <: + t_Bar) + .f_b + ._1 + (sz 5) + ({ + ((foo.f_y._2.[ sz 3 ] <: t_Bar).f_b._1.[ sz 5 ] <: (bool & bool)) with + _1 = true + } + <: + (bool & bool)) + <: + t_Array (bool & bool) (sz 6) + } + <: + (t_Array (bool & bool) (sz 6) & bool) + } + <: + t_Bar) + } + <: + (bool & Alloc.Vec.t_Vec t_Bar Alloc.Alloc.t_Global) + } + <: + t_Foo + in + foo + +/// Question mark without error coercion +let direct_result_question_mark (y: Core.Result.t_Result Prims.unit u32) + : Core.Result.t_Result i8 u32 = + match y with + | Core.Result.Result_Ok _ -> Core.Result.Result_Ok 0y <: Core.Result.t_Result i8 u32 + | Core.Result.Result_Err err -> Core.Result.Result_Err err <: Core.Result.t_Result i8 u32 + +/// Question mark with an error coercion +let direct_result_question_mark_coercion (y: Core.Result.t_Result i8 u16) + : Core.Result.t_Result i8 u32 = + match y with + | Core.Result.Result_Ok hoist5 -> Core.Result.Result_Ok hoist5 <: Core.Result.t_Result i8 u32 + | Core.Result.Result_Err err -> + Core.Result.Result_Err (Core.Convert.f_from #u32 #u16 #FStar.Tactics.Typeclasses.solve err) + <: + Core.Result.t_Result i8 u32 + +/// Exercise early returns with control flow and loops +let early_returns (x: u32) : u32 = + if x >. 3ul + then 0ul + else + if x >. 30ul + then + match true with + | true -> 34ul + | _ -> + let x, hoist9:(u32 & u32) = x, 3ul <: (u32 & u32) in + Core.Num.impl__u32__wrapping_add (Core.Num.impl__u32__wrapping_add 123ul hoist9 <: u32) x + else + let x:u32 = x +! 9ul in + let x, hoist9:(u32 & u32) = x, x +! 1ul <: (u32 & u32) in + Core.Num.impl__u32__wrapping_add (Core.Num.impl__u32__wrapping_add 123ul hoist9 <: u32) x + /// Exercise local mutation with control flow and loops let local_mutation (x: u32) : u32 = let y:u32 = 0ul in @@ -115,7 +255,7 @@ let local_mutation (x: u32) : u32 = in Core.Num.impl__u32__wrapping_add x y else - let (x, y), hoist7:((u32 & u32) & u32) = + let (x, y), hoist19:((u32 & u32) & u32) = match x with | 12ul -> let y:u32 = Core.Num.impl__u32__wrapping_add x y in @@ -127,97 +267,47 @@ let local_mutation (x: u32) : u32 = ((u32 & u32) & u32) | _ -> (x, y <: (u32 & u32)), 0ul <: ((u32 & u32) & u32) in - let x:u32 = hoist7 in + let x:u32 = hoist19 in Core.Num.impl__u32__wrapping_add x y -/// Exercise early returns with control flow and loops -let early_returns (x: u32) : u32 = - if x >. 3ul - then 0ul - else - if x >. 30ul - then - match true with - | true -> 34ul - | _ -> - let x, hoist11:(u32 & u32) = x, 3ul <: (u32 & u32) in - Core.Num.impl__u32__wrapping_add (Core.Num.impl__u32__wrapping_add 123ul hoist11 <: u32) x - else - let x:u32 = x +! 9ul in - let x, hoist11:(u32 & u32) = x, x +! 1ul <: (u32 & u32) in - Core.Num.impl__u32__wrapping_add (Core.Num.impl__u32__wrapping_add 123ul hoist11 <: u32) x - -let simplifiable_return (c1 c2 c3: bool) : i32 = - let x:i32 = 0l in - if c1 - then - if c2 - then - let x:i32 = x +! 10l in - if c3 then 1l else x +! 1l - else x +! 1l - else x - -let simplifiable_question_mark (c: bool) (x: Core.Option.t_Option i32) : Core.Option.t_Option i32 = - if c +/// Combine `?` and early return +let monad_lifting (x: u8) : Core.Result.t_Result t_A t_B = + if x >. 123uy then - match x with - | Core.Option.Option_Some hoist16 -> - let a:i32 = hoist16 +! 10l in - let b:i32 = 20l in - Core.Option.Option_Some (a +! b) <: Core.Option.t_Option i32 - | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option i32 - else - let a:i32 = 0l in - let b:i32 = 20l in - Core.Option.Option_Some (a +! b) <: Core.Option.t_Option i32 - -/// Question mark without error coercion -let direct_result_question_mark (y: Core.Result.t_Result Prims.unit u32) - : Core.Result.t_Result i8 u32 = - match y with - | Core.Result.Result_Ok _ -> Core.Result.Result_Ok 0y <: Core.Result.t_Result i8 u32 - | Core.Result.Result_Err err -> Core.Result.Result_Err err <: Core.Result.t_Result i8 u32 - -/// Question mark with an error coercion -let direct_result_question_mark_coercion (y: Core.Result.t_Result i8 u16) - : Core.Result.t_Result i8 u32 = - match y with - | Core.Result.Result_Ok hoist17 -> Core.Result.Result_Ok hoist17 <: Core.Result.t_Result i8 u32 - | Core.Result.Result_Err err -> - Core.Result.Result_Err (Core.Convert.f_from #u32 #u16 #FStar.Tactics.Typeclasses.solve err) - <: - Core.Result.t_Result i8 u32 + match Core.Result.Result_Err (B <: t_B) <: Core.Result.t_Result t_A t_B with + | Core.Result.Result_Ok hoist20 -> Core.Result.Result_Ok hoist20 <: Core.Result.t_Result t_A t_B + | Core.Result.Result_Err err -> Core.Result.Result_Err err <: Core.Result.t_Result t_A t_B + else Core.Result.Result_Ok (A <: t_A) <: Core.Result.t_Result t_A t_B /// Test question mark on `Option`s with some control flow let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core.Option.t_Option u8 = match x with - | Core.Option.Option_Some hoist21 -> - if hoist21 >. 10uy + | Core.Option.Option_Some hoist26 -> + if hoist26 >. 10uy then match x with - | Core.Option.Option_Some hoist23 -> + | Core.Option.Option_Some hoist28 -> (match - Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add hoist23 3uy) + Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add hoist28 3uy) <: Core.Option.t_Option u8 with - | Core.Option.Option_Some hoist29 -> - (match hoist29 with + | Core.Option.Option_Some hoist34 -> + (match hoist34 with | 3uy -> (match Core.Option.Option_None <: Core.Option.t_Option u8 with | Core.Option.Option_Some some -> let v:u8 = some in (match x with - | Core.Option.Option_Some hoist30 -> + | Core.Option.Option_Some hoist35 -> (match y with - | Core.Option.Option_Some hoist31 -> + | Core.Option.Option_Some hoist36 -> Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v - hoist30 + hoist35 <: u8) - hoist31) + hoist36) <: Core.Option.t_Option u8 | Core.Option.Option_None -> @@ -227,18 +317,18 @@ let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core. | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option u8) | 4uy -> (match z with - | Core.Option.Option_Some hoist18 -> - let v:u8 = 4uy +! (if hoist18 >. 4uL <: bool then 0uy else 3uy) in + | Core.Option.Option_Some hoist23 -> + let v:u8 = 4uy +! (if hoist23 >. 4uL <: bool then 0uy else 3uy) in (match x with - | Core.Option.Option_Some hoist30 -> + | Core.Option.Option_Some hoist35 -> (match y with - | Core.Option.Option_Some hoist31 -> + | Core.Option.Option_Some hoist36 -> Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v - hoist30 + hoist35 <: u8) - hoist31) + hoist36) <: Core.Option.t_Option u8 | Core.Option.Option_None -> @@ -249,14 +339,14 @@ let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core. | _ -> let v:u8 = 12uy in match x with - | Core.Option.Option_Some hoist30 -> + | Core.Option.Option_Some hoist35 -> (match y with - | Core.Option.Option_Some hoist31 -> + | Core.Option.Option_Some hoist36 -> Core.Option.Option_Some - (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v hoist30 + (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v hoist35 <: u8) - hoist31) + hoist36) <: Core.Option.t_Option u8 | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option u8 @@ -266,30 +356,30 @@ let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core. | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option u8 else (match x with - | Core.Option.Option_Some hoist26 -> + | Core.Option.Option_Some hoist31 -> (match y with - | Core.Option.Option_Some hoist25 -> + | Core.Option.Option_Some hoist30 -> (match - Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add hoist26 hoist25) + Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add hoist31 hoist30) <: Core.Option.t_Option u8 with - | Core.Option.Option_Some hoist29 -> - (match hoist29 with + | Core.Option.Option_Some hoist34 -> + (match hoist34 with | 3uy -> (match Core.Option.Option_None <: Core.Option.t_Option u8 with | Core.Option.Option_Some some -> let v:u8 = some in (match x with - | Core.Option.Option_Some hoist30 -> + | Core.Option.Option_Some hoist35 -> (match y with - | Core.Option.Option_Some hoist31 -> + | Core.Option.Option_Some hoist36 -> Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v - hoist30 + hoist35 <: u8) - hoist31) + hoist36) <: Core.Option.t_Option u8 | Core.Option.Option_None -> @@ -300,18 +390,18 @@ let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core. Core.Option.Option_None <: Core.Option.t_Option u8) | 4uy -> (match z with - | Core.Option.Option_Some hoist18 -> - let v:u8 = 4uy +! (if hoist18 >. 4uL <: bool then 0uy else 3uy) in + | Core.Option.Option_Some hoist23 -> + let v:u8 = 4uy +! (if hoist23 >. 4uL <: bool then 0uy else 3uy) in (match x with - | Core.Option.Option_Some hoist30 -> + | Core.Option.Option_Some hoist35 -> (match y with - | Core.Option.Option_Some hoist31 -> + | Core.Option.Option_Some hoist36 -> Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v - hoist30 + hoist35 <: u8) - hoist31) + hoist36) <: Core.Option.t_Option u8 | Core.Option.Option_None -> @@ -323,15 +413,15 @@ let options (x y: Core.Option.t_Option u8) (z: Core.Option.t_Option u64) : Core. | _ -> let v:u8 = 12uy in match x with - | Core.Option.Option_Some hoist30 -> + | Core.Option.Option_Some hoist35 -> (match y with - | Core.Option.Option_Some hoist31 -> + | Core.Option.Option_Some hoist36 -> Core.Option.Option_Some (Core.Num.impl__u8__wrapping_add (Core.Num.impl__u8__wrapping_add v - hoist30 + hoist35 <: u8) - hoist31) + hoist36) <: Core.Option.t_Option u8 | Core.Option.Option_None -> @@ -367,118 +457,28 @@ let question_mark (x: u32) : Core.Result.t_Result u32 u32 = else Core.Result.Result_Ok (Core.Num.impl__u32__wrapping_add 3ul x) <: Core.Result.t_Result u32 u32 -type t_A = | A : t_A - -type t_B = | B : t_B - -/// Combine `?` and early return -let monad_lifting (x: u8) : Core.Result.t_Result t_A t_B = - if x >. 123uy +let simplifiable_question_mark (c: bool) (x: Core.Option.t_Option i32) : Core.Option.t_Option i32 = + if c then - match Core.Result.Result_Err (B <: t_B) <: Core.Result.t_Result t_A t_B with - | Core.Result.Result_Ok hoist35 -> Core.Result.Result_Ok hoist35 <: Core.Result.t_Result t_A t_B - | Core.Result.Result_Err err -> Core.Result.Result_Err err <: Core.Result.t_Result t_A t_B - else Core.Result.Result_Ok (A <: t_A) <: Core.Result.t_Result t_A t_B - -type t_Bar = { - f_a:bool; - f_b:(t_Array (bool & bool) (sz 6) & bool) -} - -type t_Foo = { - f_x:bool; - f_y:(bool & Alloc.Vec.t_Vec t_Bar Alloc.Alloc.t_Global); - f_z:t_Array t_Bar (sz 6); - f_bar:t_Bar -} + match x with + | Core.Option.Option_Some hoist40 -> + let a:i32 = hoist40 +! 10l in + let b:i32 = 20l in + Core.Option.Option_Some (a +! b) <: Core.Option.t_Option i32 + | Core.Option.Option_None -> Core.Option.Option_None <: Core.Option.t_Option i32 + else + let a:i32 = 0l in + let b:i32 = 20l in + Core.Option.Option_Some (a +! b) <: Core.Option.t_Option i32 -/// Test assignation on non-trivial places -let assign_non_trivial_lhs (foo: t_Foo) : t_Foo = - let foo:t_Foo = { foo with f_x = true } <: t_Foo in - let foo:t_Foo = { foo with f_bar = { foo.f_bar with f_a = true } <: t_Bar } <: t_Foo in - let foo:t_Foo = - { - foo with - f_bar - = - { - foo.f_bar with - f_b - = - { - foo.f_bar.f_b with - _1 - = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_bar.f_b._1 - (sz 3) - ({ (foo.f_bar.f_b._1.[ sz 3 ] <: (bool & bool)) with _2 = true } <: (bool & bool)) - } - <: - (t_Array (bool & bool) (sz 6) & bool) - } - <: - t_Bar - } - <: - t_Foo - in - let foo:t_Foo = - { - foo with - f_z - = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_z - (sz 3) - ({ (foo.f_z.[ sz 3 ] <: t_Bar) with f_a = true } <: t_Bar) - } - <: - t_Foo - in - let foo:t_Foo = - { - foo with - f_y - = - { - foo.f_y with - _2 - = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize foo.f_y._2 - (sz 3) - ({ - (foo.f_y._2.[ sz 3 ] <: t_Bar) with - f_b - = - { - (foo.f_y._2.[ sz 3 ] <: t_Bar).f_b with - _1 - = - Rust_primitives.Hax.Monomorphized_update_at.update_at_usize (foo.f_y._2.[ sz 3 ] - <: - t_Bar) - .f_b - ._1 - (sz 5) - ({ - ((foo.f_y._2.[ sz 3 ] <: t_Bar).f_b._1.[ sz 5 ] <: (bool & bool)) with - _1 = true - } - <: - (bool & bool)) - <: - t_Array (bool & bool) (sz 6) - } - <: - (t_Array (bool & bool) (sz 6) & bool) - } - <: - t_Bar) - } - <: - (bool & Alloc.Vec.t_Vec t_Bar Alloc.Alloc.t_Global) - } - <: - t_Foo - in - foo +let simplifiable_return (c1 c2 c3: bool) : i32 = + let x:i32 = 0l in + if c1 + then + if c2 + then + let x:i32 = x +! 10l in + if c3 then 1l else x +! 1l + else x +! 1l + else x ''' diff --git a/test-harness/src/snapshots/toolchain__side-effects into-ssprove.snap b/test-harness/src/snapshots/toolchain__side-effects into-ssprove.snap index 4f1746a23..2f2304adb 100644 --- a/test-harness/src/snapshots/toolchain__side-effects into-ssprove.snap +++ b/test-harness/src/snapshots/toolchain__side-effects into-ssprove.snap @@ -54,163 +54,6 @@ Import choice.Choice.Exports. Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. -(*Not implemented yet? todo(item)*) - -Equations add3 {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (x : both L1 I1 int32) (y : both L2 I2 int32) (z : both L3 I3 int32) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) int32 := - add3 x y z := - solve_lift (impl__u32__wrapping_add (impl__u32__wrapping_add x y) z) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) int32. -Fail Next Obligation. - -Definition y_loc : Location := - (int32;0%nat). -Definition y_loc : Location := - (int32;1%nat). -Equations local_mutation {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both (L1 :|: fset [y_loc;y_loc]) I1 int32 := - local_mutation x := - letb y loc(y_loc) := ret_both (0 : int32) in - letb _ := assign todo(term) in - letb hoist1 := x >.? (ret_both (3 : int32)) in - solve_lift (ifb hoist1 - then letb _ := assign todo(term) in - letb y loc(y_loc) := x ./ (ret_both (2 : int32)) in - letb _ := assign todo(term) in - letb hoist2 := ret_both (0 : int32) in - letb hoist3 := Build_t_Range (f_start := hoist2) (f_end := ret_both (10 : int32)) in - letb hoist4 := f_into_iter hoist3 in - letb _ := foldi_both_list hoist4 (fun i => - ssp (fun _ => - assign todo(term) : (both (*0*)(L1:|:fset []) (I1) 'unit))) (ret_both (tt : 'unit)) in - impl__u32__wrapping_add x y - else letb hoist7 := matchb x with - | 12 => - letb _ := assign todo(term) in - solve_lift (ret_both (3 : int32)) - | 13 => - letb hoist6 := x in - letb _ := assign todo(term) in - letb hoist5 := impl__u32__wrapping_add (ret_both (123 : int32)) x in - solve_lift (add3 hoist6 hoist5 x) - | _ => - solve_lift (ret_both (0 : int32)) - end in - letb _ := assign todo(term) in - impl__u32__wrapping_add x y) : both (L1 :|: fset [y_loc;y_loc]) I1 int32. -Fail Next Obligation. - -Equations early_returns {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both L1 I1 int32 := - early_returns x := - solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := ifb x >.? (ret_both (3 : int32)) - then letm[choice_typeMonad.result_bind_code int32] hoist8 := ControlFlow_Break (ret_both (0 : int32)) in - ControlFlow_Continue (never_to_any hoist8) - else () in - letb hoist9 := x >.? (ret_both (30 : int32)) in - letm[choice_typeMonad.result_bind_code int32] hoist11 := ifb hoist9 - then matchb ret_both (true : 'bool) with - | true => - letm[choice_typeMonad.result_bind_code int32] hoist10 := ControlFlow_Break (ret_both (34 : int32)) in - ControlFlow_Continue (solve_lift (never_to_any hoist10)) - | _ => - ControlFlow_Continue (solve_lift (ret_both (3 : int32))) - end - else ControlFlow_Continue (letb _ := assign todo(term) in - x .+ (ret_both (1 : int32))) in - letb hoist12 := impl__u32__wrapping_add (ret_both (123 : int32)) hoist11 in - letb hoist13 := impl__u32__wrapping_add hoist12 x in - letm[choice_typeMonad.result_bind_code int32] hoist14 := ControlFlow_Break hoist13 in - ControlFlow_Continue (never_to_any hoist14))) : both L1 I1 int32. -Fail Next Obligation. - -Definition x_loc : Location := - (int32;2%nat). -Equations simplifiable_return {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (c1 : both L1 I1 'bool) (c2 : both L2 I2 'bool) (c3 : both L3 I3 'bool) : both (L1 :|: L2 :|: L3 :|: fset [x_loc]) (I1 :|: I2 :|: I3) int32 := - simplifiable_return c1 c2 c3 := - solve_lift (run (letb x loc(x_loc) := ret_both (0 : int32) in - letm[choice_typeMonad.result_bind_code int32] _ := ifb c1 - then letm[choice_typeMonad.result_bind_code int32] _ := ifb c2 - then letb _ := assign todo(term) in - ifb c3 - then letm[choice_typeMonad.result_bind_code int32] hoist15 := ControlFlow_Break (ret_both (1 : int32)) in - ControlFlow_Continue (never_to_any hoist15) - else () - else () in - ControlFlow_Continue (letb _ := assign todo(term) in - ret_both (tt : 'unit)) - else () in - ControlFlow_Continue x)) : both (L1 :|: L2 :|: L3 :|: fset [x_loc]) (I1 :|: I2 :|: I3) int32. -Fail Next Obligation. - -Equations simplifiable_question_mark {L1 : {fset Location}} {L2 : {fset Location}} {I1 : Interface} {I2 : Interface} (c : both L1 I1 'bool) (x : both L2 I2 (t_Option int32)) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32) := - simplifiable_question_mark c x := - solve_lift (run (letm[choice_typeMonad.option_bind_code] a := ifb c - then letm[choice_typeMonad.option_bind_code] hoist16 := x in - Option_Some (hoist16 .+ (ret_both (10 : int32))) - else Option_Some (ret_both (0 : int32)) in - Option_Some (letb b := ret_both (20 : int32) in - Option_Some (a .+ b)))) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32). -Fail Next Obligation. - -Equations direct_result_question_mark {L1 : {fset Location}} {I1 : Interface} (y : both L1 I1 (t_Result 'unit int32)) : both L1 I1 (t_Result int8 int32) := - direct_result_question_mark y := - solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := y in - Result_Ok (Result_Ok (ret_both (0 : int8))))) : both L1 I1 (t_Result int8 int32). -Fail Next Obligation. - -Equations direct_result_question_mark_coercion {L1 : {fset Location}} {I1 : Interface} (y : both L1 I1 (t_Result int8 int16)) : both L1 I1 (t_Result int8 int32) := - direct_result_question_mark_coercion y := - solve_lift (run (letm[choice_typeMonad.result_bind_code int32] hoist17 := impl__map_err y f_from in - Result_Ok (Result_Ok hoist17))) : both L1 I1 (t_Result int8 int32). -Fail Next Obligation. - -Equations options {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (x : both L1 I1 (t_Option int8)) (y : both L2 I2 (t_Option int8)) (z : both L3 I3 (t_Option int64)) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) (t_Option int8) := - options x y z := - solve_lift (run (letm[choice_typeMonad.option_bind_code] hoist21 := x in - letb hoist22 := hoist21 >.? (ret_both (10 : int8)) in - letm[choice_typeMonad.option_bind_code] hoist28 := ifb hoist22 - then letm[choice_typeMonad.option_bind_code] hoist23 := x in - Option_Some (letb hoist24 := impl__u8__wrapping_add hoist23 (ret_both (3 : int8)) in - Option_Some hoist24) - else letm[choice_typeMonad.option_bind_code] hoist26 := x in - letm[choice_typeMonad.option_bind_code] hoist25 := y in - Option_Some (letb hoist27 := impl__u8__wrapping_add hoist26 hoist25 in - Option_Some hoist27) in - letm[choice_typeMonad.option_bind_code] hoist29 := hoist28 in - letm[choice_typeMonad.option_bind_code] v := matchb hoist29 with - | 3 => - Option_None - | 4 => - letm[choice_typeMonad.option_bind_code] hoist18 := z in - Option_Some (letb hoist19 := hoist18 >.? (ret_both (4 : int64)) in - letb hoist20 := ifb hoist19 - then ret_both (0 : int8) - else ret_both (3 : int8) in - solve_lift ((ret_both (4 : int8)) .+ hoist20)) - | _ => - Option_Some (solve_lift (ret_both (12 : int8))) - end in - letm[choice_typeMonad.option_bind_code] hoist30 := x in - letb hoist32 := impl__u8__wrapping_add v hoist30 in - letm[choice_typeMonad.option_bind_code] hoist31 := y in - Option_Some (letb hoist33 := impl__u8__wrapping_add hoist32 hoist31 in - Option_Some hoist33))) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) (t_Option int8). -Fail Next Obligation. - -Definition y_loc : Location := - (int32;3%nat). -Equations question_mark {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both (L1 :|: fset [y_loc]) I1 (t_Result int32 int32) := - question_mark x := - solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := ifb x >.? (ret_both (40 : int32)) - then letb y loc(y_loc) := ret_both (0 : int32) in - letb _ := assign todo(term) in - letb _ := assign todo(term) in - letb _ := assign todo(term) in - letb hoist34 := x >.? (ret_both (90 : int32)) in - ifb hoist34 - then impl__map_err (Result_Err (ret_both (12 : int8))) f_from - else () - else () in - Result_Ok (Result_Ok (impl__u32__wrapping_add (ret_both (3 : int32)) x)))) : both (L1 :|: fset [y_loc]) I1 (t_Result int32 int32). -Fail Next Obligation. - Definition t_A : choice_type := 'unit. Equations Build_t_A : both (fset []) (fset []) (t_A) := @@ -225,16 +68,6 @@ Equations Build_t_B : both (fset []) (fset []) (t_B) := solve_lift (ret_both (tt (* Empty tuple *) : (t_B))) : both (fset []) (fset []) (t_B). Fail Next Obligation. -Equations monad_lifting {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int8) : both L1 I1 (t_Result t_A t_B) := - monad_lifting x := - solve_lift (run (ifb x >.? (ret_both (123 : int8)) - then letm[choice_typeMonad.result_bind_code (t_Result t_A t_B)] hoist35 := ControlFlow_Continue (Result_Err B) in - letb hoist36 := Result_Ok hoist35 in - letm[choice_typeMonad.result_bind_code (t_Result t_A t_B)] hoist37 := ControlFlow_Break hoist36 in - ControlFlow_Continue (never_to_any hoist37) - else ControlFlow_Continue (Result_Ok A))) : both L1 I1 (t_Result t_A t_B). -Fail Next Obligation. - Definition t_Bar : choice_type := ('bool × nseq ('bool × 'bool) 6 × 'bool). Equations f_a {L : {fset Location}} {I : Interface} (s : both L I t_Bar) : both L I 'bool := @@ -291,6 +124,17 @@ Notation "'Build_t_Foo' '[' x ']' '(' 'f_y' ':=' y ')'" := (Build_t_Foo (f_x := Notation "'Build_t_Foo' '[' x ']' '(' 'f_z' ':=' y ')'" := (Build_t_Foo (f_x := f_x x) (f_y := f_y x) (f_z := y) (f_bar := f_bar x)). Notation "'Build_t_Foo' '[' x ']' '(' 'f_bar' ':=' y ')'" := (Build_t_Foo (f_x := f_x x) (f_y := f_y x) (f_z := f_z x) (f_bar := y)). +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +(*Not implemented yet? todo(item)*) + +Equations add3 {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (x : both L1 I1 int32) (y : both L2 I2 int32) (z : both L3 I3 int32) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) int32 := + add3 x y z := + solve_lift (impl__u32__wrapping_add (impl__u32__wrapping_add x y) z) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) int32. +Fail Next Obligation. + Equations assign_non_trivial_lhs {L1 : {fset Location}} {I1 : Interface} (foo : both L1 I1 t_Foo) : both L1 I1 t_Foo := assign_non_trivial_lhs foo := letb _ := assign todo(term) in @@ -301,9 +145,165 @@ Equations assign_non_trivial_lhs {L1 : {fset Location}} {I1 : Interface} (foo : solve_lift foo : both L1 I1 t_Foo. Fail Next Obligation. -(*Not implemented yet? todo(item)*) +Equations direct_result_question_mark {L1 : {fset Location}} {I1 : Interface} (y : both L1 I1 (t_Result 'unit int32)) : both L1 I1 (t_Result int8 int32) := + direct_result_question_mark y := + solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := y in + Result_Ok (Result_Ok (ret_both (0 : int8))))) : both L1 I1 (t_Result int8 int32). +Fail Next Obligation. -(*Not implemented yet? todo(item)*) +Equations direct_result_question_mark_coercion {L1 : {fset Location}} {I1 : Interface} (y : both L1 I1 (t_Result int8 int16)) : both L1 I1 (t_Result int8 int32) := + direct_result_question_mark_coercion y := + solve_lift (run (letm[choice_typeMonad.result_bind_code int32] hoist5 := impl__map_err y f_from in + Result_Ok (Result_Ok hoist5))) : both L1 I1 (t_Result int8 int32). +Fail Next Obligation. + +Equations early_returns {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both L1 I1 int32 := + early_returns x := + solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := ifb x >.? (ret_both (3 : int32)) + then letm[choice_typeMonad.result_bind_code int32] hoist6 := ControlFlow_Break (ret_both (0 : int32)) in + ControlFlow_Continue (never_to_any hoist6) + else () in + letb hoist7 := x >.? (ret_both (30 : int32)) in + letm[choice_typeMonad.result_bind_code int32] hoist9 := ifb hoist7 + then matchb ret_both (true : 'bool) with + | true => + letm[choice_typeMonad.result_bind_code int32] hoist8 := ControlFlow_Break (ret_both (34 : int32)) in + ControlFlow_Continue (solve_lift (never_to_any hoist8)) + | _ => + ControlFlow_Continue (solve_lift (ret_both (3 : int32))) + end + else ControlFlow_Continue (letb _ := assign todo(term) in + x .+ (ret_both (1 : int32))) in + letb hoist10 := impl__u32__wrapping_add (ret_both (123 : int32)) hoist9 in + letb hoist11 := impl__u32__wrapping_add hoist10 x in + letm[choice_typeMonad.result_bind_code int32] hoist12 := ControlFlow_Break hoist11 in + ControlFlow_Continue (never_to_any hoist12))) : both L1 I1 int32. +Fail Next Obligation. + +Definition y_loc : Location := + (int32;0%nat). +Definition y_loc : Location := + (int32;1%nat). +Equations local_mutation {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both (L1 :|: fset [y_loc;y_loc]) I1 int32 := + local_mutation x := + letb y loc(y_loc) := ret_both (0 : int32) in + letb _ := assign todo(term) in + letb hoist13 := x >.? (ret_both (3 : int32)) in + solve_lift (ifb hoist13 + then letb _ := assign todo(term) in + letb y loc(y_loc) := x ./ (ret_both (2 : int32)) in + letb _ := assign todo(term) in + letb hoist14 := ret_both (0 : int32) in + letb hoist15 := Build_t_Range (f_start := hoist14) (f_end := ret_both (10 : int32)) in + letb hoist16 := f_into_iter hoist15 in + letb _ := foldi_both_list hoist16 (fun i => + ssp (fun _ => + assign todo(term) : (both (*0*)(L1:|:fset []) (I1) 'unit))) (ret_both (tt : 'unit)) in + impl__u32__wrapping_add x y + else letb hoist19 := matchb x with + | 12 => + letb _ := assign todo(term) in + solve_lift (ret_both (3 : int32)) + | 13 => + letb hoist18 := x in + letb _ := assign todo(term) in + letb hoist17 := impl__u32__wrapping_add (ret_both (123 : int32)) x in + solve_lift (add3 hoist18 hoist17 x) + | _ => + solve_lift (ret_both (0 : int32)) + end in + letb _ := assign todo(term) in + impl__u32__wrapping_add x y) : both (L1 :|: fset [y_loc;y_loc]) I1 int32. +Fail Next Obligation. + +Equations monad_lifting {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int8) : both L1 I1 (t_Result t_A t_B) := + monad_lifting x := + solve_lift (run (ifb x >.? (ret_both (123 : int8)) + then letm[choice_typeMonad.result_bind_code (t_Result t_A t_B)] hoist20 := ControlFlow_Continue (Result_Err B) in + letb hoist21 := Result_Ok hoist20 in + letm[choice_typeMonad.result_bind_code (t_Result t_A t_B)] hoist22 := ControlFlow_Break hoist21 in + ControlFlow_Continue (never_to_any hoist22) + else ControlFlow_Continue (Result_Ok A))) : both L1 I1 (t_Result t_A t_B). +Fail Next Obligation. + +Equations options {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (x : both L1 I1 (t_Option int8)) (y : both L2 I2 (t_Option int8)) (z : both L3 I3 (t_Option int64)) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) (t_Option int8) := + options x y z := + solve_lift (run (letm[choice_typeMonad.option_bind_code] hoist26 := x in + letb hoist27 := hoist26 >.? (ret_both (10 : int8)) in + letm[choice_typeMonad.option_bind_code] hoist33 := ifb hoist27 + then letm[choice_typeMonad.option_bind_code] hoist28 := x in + Option_Some (letb hoist29 := impl__u8__wrapping_add hoist28 (ret_both (3 : int8)) in + Option_Some hoist29) + else letm[choice_typeMonad.option_bind_code] hoist31 := x in + letm[choice_typeMonad.option_bind_code] hoist30 := y in + Option_Some (letb hoist32 := impl__u8__wrapping_add hoist31 hoist30 in + Option_Some hoist32) in + letm[choice_typeMonad.option_bind_code] hoist34 := hoist33 in + letm[choice_typeMonad.option_bind_code] v := matchb hoist34 with + | 3 => + Option_None + | 4 => + letm[choice_typeMonad.option_bind_code] hoist23 := z in + Option_Some (letb hoist24 := hoist23 >.? (ret_both (4 : int64)) in + letb hoist25 := ifb hoist24 + then ret_both (0 : int8) + else ret_both (3 : int8) in + solve_lift ((ret_both (4 : int8)) .+ hoist25)) + | _ => + Option_Some (solve_lift (ret_both (12 : int8))) + end in + letm[choice_typeMonad.option_bind_code] hoist35 := x in + letb hoist37 := impl__u8__wrapping_add v hoist35 in + letm[choice_typeMonad.option_bind_code] hoist36 := y in + Option_Some (letb hoist38 := impl__u8__wrapping_add hoist37 hoist36 in + Option_Some hoist38))) : both (L1 :|: L2 :|: L3) (I1 :|: I2 :|: I3) (t_Option int8). +Fail Next Obligation. + +Definition y_loc : Location := + (int32;2%nat). +Equations question_mark {L1 : {fset Location}} {I1 : Interface} (x : both L1 I1 int32) : both (L1 :|: fset [y_loc]) I1 (t_Result int32 int32) := + question_mark x := + solve_lift (run (letm[choice_typeMonad.result_bind_code int32] _ := ifb x >.? (ret_both (40 : int32)) + then letb y loc(y_loc) := ret_both (0 : int32) in + letb _ := assign todo(term) in + letb _ := assign todo(term) in + letb _ := assign todo(term) in + letb hoist39 := x >.? (ret_both (90 : int32)) in + ifb hoist39 + then impl__map_err (Result_Err (ret_both (12 : int8))) f_from + else () + else () in + Result_Ok (Result_Ok (impl__u32__wrapping_add (ret_both (3 : int32)) x)))) : both (L1 :|: fset [y_loc]) I1 (t_Result int32 int32). +Fail Next Obligation. + +Equations simplifiable_question_mark {L1 : {fset Location}} {L2 : {fset Location}} {I1 : Interface} {I2 : Interface} (c : both L1 I1 'bool) (x : both L2 I2 (t_Option int32)) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32) := + simplifiable_question_mark c x := + solve_lift (run (letm[choice_typeMonad.option_bind_code] a := ifb c + then letm[choice_typeMonad.option_bind_code] hoist40 := x in + Option_Some (hoist40 .+ (ret_both (10 : int32))) + else Option_Some (ret_both (0 : int32)) in + Option_Some (letb b := ret_both (20 : int32) in + Option_Some (a .+ b)))) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32). +Fail Next Obligation. + +Definition x_loc : Location := + (int32;3%nat). +Equations simplifiable_return {L1 : {fset Location}} {L2 : {fset Location}} {L3 : {fset Location}} {I1 : Interface} {I2 : Interface} {I3 : Interface} (c1 : both L1 I1 'bool) (c2 : both L2 I2 'bool) (c3 : both L3 I3 'bool) : both (L1 :|: L2 :|: L3 :|: fset [x_loc]) (I1 :|: I2 :|: I3) int32 := + simplifiable_return c1 c2 c3 := + solve_lift (run (letb x loc(x_loc) := ret_both (0 : int32) in + letm[choice_typeMonad.result_bind_code int32] _ := ifb c1 + then letm[choice_typeMonad.result_bind_code int32] _ := ifb c2 + then letb _ := assign todo(term) in + ifb c3 + then letm[choice_typeMonad.result_bind_code int32] hoist41 := ControlFlow_Break (ret_both (1 : int32)) in + ControlFlow_Continue (never_to_any hoist41) + else () + else () in + ControlFlow_Continue (letb _ := assign todo(term) in + ret_both (tt : 'unit)) + else () in + ControlFlow_Continue x)) : both (L1 :|: L2 :|: L3 :|: fset [x_loc]) (I1 :|: I2 :|: I3) int32. +Fail Next Obligation. ''' "Side_effects_Issue_1083_.v" = ''' (* File automatically generated by Hacspec *) @@ -380,11 +380,11 @@ Obligation Tactic := (* try timeout 8 *) solve_ssprove_obligations. Equations test {L1 : {fset Location}} {L2 : {fset Location}} {I1 : Interface} {I2 : Interface} (x : both L1 I1 (t_Option int32)) (y : both L2 I2 (t_Option int32)) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32) := test x y := - solve_lift (run (letb hoist40 := fun i => - letm[choice_typeMonad.option_bind_code] hoist38 := y in - Option_Some (letb hoist39 := i .+ hoist38 in - Option_Some hoist39) in - letb hoist41 := impl__map x hoist40 in - hoist41)) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32). + solve_lift (run (letb hoist3 := fun i => + letm[choice_typeMonad.option_bind_code] hoist1 := y in + Option_Some (letb hoist2 := i .+ hoist1 in + Option_Some hoist2) in + letb hoist4 := impl__map x hoist3 in + hoist4)) : both (L1 :|: L2) (I1 :|: I2) (t_Option int32). Fail Next Obligation. ''' diff --git a/test-harness/src/snapshots/toolchain__traits into-fstar.snap b/test-harness/src/snapshots/toolchain__traits into-fstar.snap index bcb0821fb..fcc166dc9 100644 --- a/test-harness/src/snapshots/toolchain__traits into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__traits into-fstar.snap @@ -79,6 +79,33 @@ module Traits.For_clauses.Issue_495_ open Core open FStar.Mul +let minimized_1_ (list: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = + Core.Iter.Traits.Iterator.f_collect #(Core.Iter.Adapters.Filter.t_Filter + (Core.Ops.Range.t_Range u8) (u8 -> bool)) + #FStar.Tactics.Typeclasses.solve + #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + (Core.Iter.Traits.Iterator.f_filter #(Core.Ops.Range.t_Range u8) + #FStar.Tactics.Typeclasses.solve + ({ Core.Ops.Range.f_start = 0uy; Core.Ops.Range.f_end = 5uy } <: Core.Ops.Range.t_Range u8) + (fun temp_0_ -> + let _:u8 = temp_0_ in + true) + <: + Core.Iter.Adapters.Filter.t_Filter (Core.Ops.Range.t_Range u8) (u8 -> bool)) + +let minimized_2_ (it: Core.Iter.Adapters.Filter.t_Filter (Core.Ops.Range.t_Range u8) (u8 -> bool)) + : Prims.unit = + let (v__indices: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global):Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global + = + Core.Iter.Traits.Iterator.f_collect #(Core.Iter.Adapters.Filter.t_Filter + (Core.Ops.Range.t_Range u8) (u8 -> bool)) + #FStar.Tactics.Typeclasses.solve + #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) + it + in + () + let original_function_from_495_ (list: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) : Prims.unit = let (v__indices: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global):Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = @@ -112,33 +139,6 @@ let original_function_from_495_ (list: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) Core.Iter.Adapters.Filter.t_Filter (Core.Ops.Range.t_Range u8) (u8 -> bool)) in () - -let minimized_1_ (list: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - : Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global = - Core.Iter.Traits.Iterator.f_collect #(Core.Iter.Adapters.Filter.t_Filter - (Core.Ops.Range.t_Range u8) (u8 -> bool)) - #FStar.Tactics.Typeclasses.solve - #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - (Core.Iter.Traits.Iterator.f_filter #(Core.Ops.Range.t_Range u8) - #FStar.Tactics.Typeclasses.solve - ({ Core.Ops.Range.f_start = 0uy; Core.Ops.Range.f_end = 5uy } <: Core.Ops.Range.t_Range u8) - (fun temp_0_ -> - let _:u8 = temp_0_ in - true) - <: - Core.Iter.Adapters.Filter.t_Filter (Core.Ops.Range.t_Range u8) (u8 -> bool)) - -let minimized_2_ (it: Core.Iter.Adapters.Filter.t_Filter (Core.Ops.Range.t_Range u8) (u8 -> bool)) - : Prims.unit = - let (v__indices: Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global):Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global - = - Core.Iter.Traits.Iterator.f_collect #(Core.Iter.Adapters.Filter.t_Filter - (Core.Ops.Range.t_Range u8) (u8 -> bool)) - #FStar.Tactics.Typeclasses.solve - #(Alloc.Vec.t_Vec u8 Alloc.Alloc.t_Global) - it - in - () ''' "Traits.For_clauses.fst" = ''' module Traits.For_clauses @@ -342,7 +342,7 @@ let impl (#v_TypeArg: Type0) (v_ConstArg: usize) : t_Trait Prims.unit v_TypeArg () } -let method_caller +let associated_function_caller (#v_MethodTypeArg #v_TypeArg: Type0) (v_ConstArg v_MethodConstArg: usize) (#v_ImplTrait: Type0) @@ -352,7 +352,7 @@ let method_caller (value_Type: t_Type v_TypeArg v_ConstArg) : Prims.unit = let _:Prims.unit = - f_method #v_ImplTrait + f_associated_function #v_ImplTrait #v_TypeArg #v_ConstArg #FStar.Tactics.Typeclasses.solve @@ -364,7 +364,7 @@ let method_caller in () -let associated_function_caller +let method_caller (#v_MethodTypeArg #v_TypeArg: Type0) (v_ConstArg v_MethodConstArg: usize) (#v_ImplTrait: Type0) @@ -374,7 +374,7 @@ let associated_function_caller (value_Type: t_Type v_TypeArg v_ConstArg) : Prims.unit = let _:Prims.unit = - f_associated_function #v_ImplTrait + f_method #v_ImplTrait #v_TypeArg #v_ConstArg #FStar.Tactics.Typeclasses.solve @@ -491,14 +491,14 @@ module Traits.Unconstrainted_types_issue_677_ open Core open FStar.Mul +type t_Plus = | Plus : t_Plus + class t_PolyOp (v_Self: Type0) = { f_op_pre:u32 -> u32 -> Type0; f_op_post:u32 -> u32 -> u32 -> Type0; f_op:x0: u32 -> x1: u32 -> Prims.Pure u32 (f_op_pre x0 x1) (fun result -> f_op_post x0 x1 result) } -type t_Plus = | Plus : t_Plus - [@@ FStar.Tactics.Typeclasses.tcinstance] let impl: t_PolyOp t_Plus = { @@ -528,6 +528,26 @@ module Traits open Core open FStar.Mul +class t_Bar (v_Self: Type0) = { + f_bar_pre:v_Self -> Type0; + f_bar_post:v_Self -> Prims.unit -> Type0; + f_bar:x0: v_Self -> Prims.Pure Prims.unit (f_bar_pre x0) (fun result -> f_bar_post x0 result) +} + +let impl_2__method (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Bar v_T) (x: v_T) + : Prims.unit = f_bar #v_T #FStar.Tactics.Typeclasses.solve x + +type t_Error = | Error_Fail : t_Error + +let impl__Error__for_application_callback (_: Prims.unit) : Prims.unit -> t_Error = + fun temp_0_ -> + let _:Prims.unit = temp_0_ in + Error_Fail <: t_Error + +let t_Error_cast_to_repr (x: t_Error) : isize = match x with | Error_Fail -> isz 0 + +type t_Struct = | Struct : t_Struct + class t_SuperTrait (v_Self: Type0) = { [@@@ FStar.Tactics.Typeclasses.no_method]_super_9442900250278684536:Core.Clone.t_Clone v_Self; f_function_of_super_trait_pre:v_Self -> Type0; @@ -547,17 +567,6 @@ let impl_SuperTrait_for_i32: t_SuperTrait i32 = f_function_of_super_trait = fun (self: i32) -> cast (Core.Num.impl__i32__abs self <: i32) <: u32 } -type t_Struct = | Struct : t_Struct - -class t_Bar (v_Self: Type0) = { - f_bar_pre:v_Self -> Type0; - f_bar_post:v_Self -> Prims.unit -> Type0; - f_bar:x0: v_Self -> Prims.Pure Prims.unit (f_bar_pre x0) (fun result -> f_bar_post x0 result) -} - -let impl_2__method (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Bar v_T) (x: v_T) - : Prims.unit = f_bar #v_T #FStar.Tactics.Typeclasses.solve x - let closure_impl_expr (#v_I: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: Core.Iter.Traits.Iterator.t_Iterator v_I) @@ -588,15 +597,6 @@ let closure_impl_expr_fngen <: Core.Iter.Adapters.Map.t_Map v_I v_F) -type t_Error = | Error_Fail : t_Error - -let t_Error_cast_to_repr (x: t_Error) : isize = match x with | Error_Fail -> isz 0 - -let impl__Error__for_application_callback (_: Prims.unit) : Prims.unit -> t_Error = - fun temp_0_ -> - let _:Prims.unit = temp_0_ in - Error_Fail <: t_Error - let iter_option (#v_T: Type0) (x: Core.Option.t_Option v_T) : Core.Option.t_IntoIter v_T = Core.Iter.Traits.Collect.f_into_iter #(Core.Option.t_Option v_T) #FStar.Tactics.Typeclasses.solve @@ -632,13 +632,6 @@ class t_Foo (v_Self: Type0) = { (fun result -> f_assoc_type_post #i3 x0 result) } -let f (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Foo v_T) (x: v_T) : Prims.unit = - let _:Prims.unit = f_assoc_f #v_T #FStar.Tactics.Typeclasses.solve () in - f_method_f #v_T #FStar.Tactics.Typeclasses.solve x - -let g (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Foo v_T) (x: i1.f_AssocType) - : u32 = f_function_of_super_trait #i1.f_AssocType #FStar.Tactics.Typeclasses.solve x - class t_Lang (v_Self: Type0) = { f_Var:Type0; f_s_pre:v_Self -> i32 -> Type0; @@ -647,6 +640,13 @@ class t_Lang (v_Self: Type0) = { -> Prims.Pure (v_Self & f_Var) (f_s_pre x0 x1) (fun result -> f_s_post x0 x1 result) } +let f (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Foo v_T) (x: v_T) : Prims.unit = + let _:Prims.unit = f_assoc_f #v_T #FStar.Tactics.Typeclasses.solve () in + f_method_f #v_T #FStar.Tactics.Typeclasses.solve x + +let g (#v_T: Type0) (#[FStar.Tactics.Typeclasses.tcresolve ()] i1: t_Foo v_T) (x: i1.f_AssocType) + : u32 = f_function_of_super_trait #i1.f_AssocType #FStar.Tactics.Typeclasses.solve x + [@@ FStar.Tactics.Typeclasses.tcinstance] let impl_Foo_for_tuple_: t_Foo Prims.unit = { diff --git a/test-harness/src/snapshots/toolchain__unsafe into-fstar.snap b/test-harness/src/snapshots/toolchain__unsafe into-fstar.snap index 2fba5a2b7..310e2d094 100644 --- a/test-harness/src/snapshots/toolchain__unsafe into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__unsafe into-fstar.snap @@ -37,13 +37,13 @@ type t_Impossible = let t_Impossible_cast_to_repr (x: t_Impossible) : Rust_primitives.Hax.t_Never = match x with -let impossible (_: Prims.unit) : Prims.Pure t_Impossible (requires false) (fun _ -> Prims.l_True) = - Rust_primitives.Hax.never_to_any (Core.Hint.unreachable_unchecked () - <: - Rust_primitives.Hax.t_Never) - let get_unchecked_example (slice: t_Slice u8) : Prims.Pure u8 (requires (Core.Slice.impl__len #u8 slice <: usize) >. sz 10) (fun _ -> Prims.l_True) = Core.Slice.impl__get_unchecked #u8 #usize slice (sz 6) + +let impossible (_: Prims.unit) : Prims.Pure t_Impossible (requires false) (fun _ -> Prims.l_True) = + Rust_primitives.Hax.never_to_any (Core.Hint.unreachable_unchecked () + <: + Rust_primitives.Hax.t_Never) ''' diff --git a/tests/reordering/src/lib.rs b/tests/reordering/src/lib.rs index 2be238457..03e4d0ea8 100644 --- a/tests/reordering/src/lib.rs +++ b/tests/reordering/src/lib.rs @@ -17,28 +17,3 @@ enum Foo { A, B, } - -mod no_alpha_sorting { - fn u01() {} - fn r02() {} - fn b03() {} - fn f04() {} - fn h05() {} - fn i06() {} - fn c07() {} - fn k08() {} - fn d09() {} - fn e10() {} - fn g11() {} - fn j12() {} - fn o13() {} - fn a14() {} - fn q15() {} - fn m16() {} - fn l17() {} - fn n18() {} - fn v19() {} - fn s20() {} - fn p21() {} - fn t22() {} -} From bb3d4311e174a9cca48c92a392f90a89841c72df Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Mon, 18 Nov 2024 11:03:21 +0100 Subject: [PATCH 41/59] doc(book): architecture of hax --- book/src/SUMMARY.md | 2 +- book/src/contributing/architecture.md | 84 +++++++++++++++++++++++++++ book/src/contributing/structure.md | 0 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 book/src/contributing/architecture.md delete mode 100644 book/src/contributing/structure.md diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index e5f094882..1201418f5 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -19,7 +19,7 @@ - [Command line usage]() - [The include flag: which items should be extracted, and how?](faq/include-flags.md) - [Contributing]() - - [Structure]() + - [Architecture](contributing/architecture.md) - [Hax Cargo subcommand]() - [Frontend: the Rustc driver]() - [Frontend: the exporter]() diff --git a/book/src/contributing/architecture.md b/book/src/contributing/architecture.md new file mode 100644 index 000000000..d6fcab013 --- /dev/null +++ b/book/src/contributing/architecture.md @@ -0,0 +1,84 @@ +# Architecture + +Hax is a software pipeline designed to transform Rust code into various formal verification backends such as **F\***, **Coq**, **ProVerif**, and **EasyCrypt**. It comprises two main components: + +1. **The Frontend** (written in Rust) +2. **The Engine** (written in OCaml) + +## The Frontend (Rust) + +The frontend is responsible for extracting and exporting Rust code's abstract syntax trees (ASTs) in a format suitable for processing by the engine (or by other tools). + +### `hax-frontend-exporter` Library + +This library mirrors the internal types of the Rust compiler (`rustc`) that constitute the **HIR** (High-Level Intermediate Representation), **THIR** (Typed High-Level Intermediate Representation), and **MIR** (Mid-Level Intermediate Representation) ASTs. It extends them with additional information such as attributes, trait implementations, and removes IDs indirections. + +**`SInto` Trait:** The library defines an entry point for translating a given `rustc` value to its mirrored hax version using the `SInto` trait (stateful `into`). For a value `x` of type `T` from `rustc`, if `T` is mirrored by hax, then `x.sinto(s)` produces an augmented and simplified "hax-ified" AST for `x`. Here, `s` represents the state holding information about the translation process. + +### `hax-driver` Binary + +`hax-driver` is a custom Rust compiler driver that behaves like `rustc` but performs additional tasks: + +1. **Item Enumeration:** Lists all items in a crate. +2. **AST Transformation:** Applies `sinto` on each item to generate the hax-ified AST. +3. **Output Generation:** Outputs the mirrored items into a `haxmeta` file within the `target` directory. + +### `cargo-hax` Binary + +`cargo-hax` provides a `hax` subcommand for Cargo, accessible via `cargo hax --help`. It serves as the command-line interface for hax, orchestrating both the frontend and the engine. + +**Workflow:** + +1. **Custom Build Execution:** Runs `cargo build`, instructing Cargo to use `hax-driver` instead of `rustc`. +2. **Multiple Compiler Invocations:** `cargo build` invokes `hax-driver` multiple times with various options. +3. **Inter-Process Communication:** `hax-driver` communicates with `cargo-hax` via `stderr` using JSON lines. +4. **Metadata Generation:** Produces `haxmeta` files containing the transformed ASTs. +5. **Engine Invocation (Optional):** If requested, runs the engine, passing options and `haxmeta` information via `stdin` serialized as JSON. +6. **Interactive Communication:** Engages in interactive communication with the engine. +7. **User Reporting:** Outputs results and diagnostics to the user. + +## The Engine (OCaml) + +The engine processes the transformed ASTs and options provided via JSON input from `stdin`. It performs several key functions to convert the hax-ified Rust code into the target backend language. + +### Importing and Simplifying ASTs + +- **AST Importation:** Imports the hax-ified Rust THIR AST. +- **Internal AST Conversion:** Converts the imported AST into a simplified and opinionated internal AST designed for ease of transformation and analysis. + +### Internal AST and Features + +The internal AST is defined using a **functor** that takes a list of type-level booleans, referred to as **features**, and produces the AST types accordingly. + +Features are for instances, mutation, loops, unsafe code. A full list is available in `engine/lib/features.ml`. + +**Feature Witnesses:** + +- On relevant AST nodes, feature witnesses are included to enforce constraints at the type level. +- **Example:** In the `loop` expression constructor, a witness of type `F.loop` is used, where `F` represents the current feature set. If `F.loop` is an empty type, constructing a `loop` expression is prohibited, ensuring that loops are disallowed in contexts where they are not supported. + +### Transformation Phases + +The engine executes a sequence of **phases**, which are determined based on the target backend. Each phase: + +1. **Input:** Takes a list of items from an AST with specific feature constraints. +2. **Output:** Transforms these items into a new AST type, potentially enabling or disabling features through type-level changes. + +The phases can be found in the `engin/lib/phases/` folder. + +### Backend Code Generation + +After completing the transformation phases: + +1. **Backend Printer Invocation:** Calls the printer associated with the selected backend to generate the target code. +2. **File Map Creation:** Produces a map from file names to their contents, representing the generated code. +3. **Output Serialization:** Outputs the file map and additional information (e.g., errors) as JSON to `stderr`. + +### Communication Protocol + +The engine communicates asynchronously with the frontend using a protocol defined in `hax_types::engine_api::protocol`. This communication includes: + +- **Diagnostic Data:** Sending error messages, warnings, and other diagnostics. +- **Profiling Information:** Providing performance metrics and profiling data. +- **Pretty-Printing Requests:** Requesting formatted versions of Rust source code or diagnostics for better readability. + diff --git a/book/src/contributing/structure.md b/book/src/contributing/structure.md deleted file mode 100644 index e69de29bb..000000000 From 04d7599c41668f1c2a7c593a1628c0e9fa4b8901 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 15:38:29 +0100 Subject: [PATCH 42/59] Update book/src/contributing/architecture.md Co-authored-by: Franziskus Kiefer --- book/src/contributing/architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/contributing/architecture.md b/book/src/contributing/architecture.md index d6fcab013..946a4976b 100644 --- a/book/src/contributing/architecture.md +++ b/book/src/contributing/architecture.md @@ -11,7 +11,7 @@ The frontend is responsible for extracting and exporting Rust code's abstract sy ### `hax-frontend-exporter` Library -This library mirrors the internal types of the Rust compiler (`rustc`) that constitute the **HIR** (High-Level Intermediate Representation), **THIR** (Typed High-Level Intermediate Representation), and **MIR** (Mid-Level Intermediate Representation) ASTs. It extends them with additional information such as attributes, trait implementations, and removes IDs indirections. +This library mirrors the internal types of the Rust compiler (`rustc`) that constitute the **HIR** (High-Level Intermediate Representation), **THIR** (Typed High-Level Intermediate Representation), and **MIR** (Mid-Level Intermediate Representation) ASTs. It extends them with additional information such as attributes, trait implementations, and removes ID indirections. **`SInto` Trait:** The library defines an entry point for translating a given `rustc` value to its mirrored hax version using the `SInto` trait (stateful `into`). For a value `x` of type `T` from `rustc`, if `T` is mirrored by hax, then `x.sinto(s)` produces an augmented and simplified "hax-ified" AST for `x`. Here, `s` represents the state holding information about the translation process. From 55b17d9b5540b495014d61fbfe174e7b357b2dc0 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 16:00:44 +0100 Subject: [PATCH 43/59] feat(book): architecture: add links --- book/src/contributing/architecture.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/book/src/contributing/architecture.md b/book/src/contributing/architecture.md index 946a4976b..083f2c113 100644 --- a/book/src/contributing/architecture.md +++ b/book/src/contributing/architecture.md @@ -9,11 +9,11 @@ Hax is a software pipeline designed to transform Rust code into various formal v The frontend is responsible for extracting and exporting Rust code's abstract syntax trees (ASTs) in a format suitable for processing by the engine (or by other tools). -### `hax-frontend-exporter` Library +### [`hax-frontend-exporter` Library](https://hacspec.org/hax/frontend/hax_frontend_exporter/index.html) This library mirrors the internal types of the Rust compiler (`rustc`) that constitute the **HIR** (High-Level Intermediate Representation), **THIR** (Typed High-Level Intermediate Representation), and **MIR** (Mid-Level Intermediate Representation) ASTs. It extends them with additional information such as attributes, trait implementations, and removes ID indirections. -**`SInto` Trait:** The library defines an entry point for translating a given `rustc` value to its mirrored hax version using the `SInto` trait (stateful `into`). For a value `x` of type `T` from `rustc`, if `T` is mirrored by hax, then `x.sinto(s)` produces an augmented and simplified "hax-ified" AST for `x`. Here, `s` represents the state holding information about the translation process. +**`SInto` Trait:** The library defines an entry point for translating a given `rustc` value to its mirrored hax version using the [`SInto`](https://hacspec.org/hax/frontend/hax_frontend_exporter/trait.SInto.html) trait (stateful `into`). For a value `x` of type `T` from `rustc`, if `T` is mirrored by hax, then `x.sinto(s)` produces an augmented and simplified "hax-ified" AST for `x`. Here, `s` represents the state holding information about the translation process. ### `hax-driver` Binary @@ -37,20 +37,20 @@ This library mirrors the internal types of the Rust compiler (`rustc`) that cons 6. **Interactive Communication:** Engages in interactive communication with the engine. 7. **User Reporting:** Outputs results and diagnostics to the user. -## The Engine (OCaml) +## The Engine (OCaml - [documentation](https://hacspec.org/hax/engine/hax-engine/index.html)) The engine processes the transformed ASTs and options provided via JSON input from `stdin`. It performs several key functions to convert the hax-ified Rust code into the target backend language. ### Importing and Simplifying ASTs -- **AST Importation:** Imports the hax-ified Rust THIR AST. -- **Internal AST Conversion:** Converts the imported AST into a simplified and opinionated internal AST designed for ease of transformation and analysis. +- **AST Importation:** Imports the hax-ified Rust THIR AST. This is module [`Import_thir`](https://hacspec.org/hax/engine/hax-engine/Hax_engine/Import_thir/index.html). +- **Internal AST Conversion:** Converts the imported AST into a simplified and opinionated internal AST designed for ease of transformation and analysis. This is mostly the functor [`Ast.Make`](https://hacspec.org/hax/engine/hax-engine/Hax_engine/Ast/Make/index.html). ### Internal AST and Features The internal AST is defined using a **functor** that takes a list of type-level booleans, referred to as **features**, and produces the AST types accordingly. -Features are for instances, mutation, loops, unsafe code. A full list is available in `engine/lib/features.ml`. +Features are for instances, mutation, loops, unsafe code. The enumeration [`Features.Enumeration`](https://hacspec.org/hax/engine/hax-engine/Hax_engine/Features/Enumeration/index.html) lists all those features. **Feature Witnesses:** @@ -76,7 +76,7 @@ After completing the transformation phases: ### Communication Protocol -The engine communicates asynchronously with the frontend using a protocol defined in `hax_types::engine_api::protocol`. This communication includes: +The engine communicates asynchronously with the frontend using a protocol defined in [`hax_types::engine_api::protocol`](https://hacspec.org/hax/frontend/hax_types/engine_api/protocol/index.html). This communication includes: - **Diagnostic Data:** Sending error messages, warnings, and other diagnostics. - **Profiling Information:** Providing performance metrics and profiling data. From fd4aefa4ab6d595d968dcc2ab48bf3f3f2d1e8ff Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 16:02:35 +0100 Subject: [PATCH 44/59] book: simpliify paragraph, drop bullet poitns --- book/src/contributing/architecture.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/book/src/contributing/architecture.md b/book/src/contributing/architecture.md index 083f2c113..2fb766a27 100644 --- a/book/src/contributing/architecture.md +++ b/book/src/contributing/architecture.md @@ -52,10 +52,7 @@ The internal AST is defined using a **functor** that takes a list of type-level Features are for instances, mutation, loops, unsafe code. The enumeration [`Features.Enumeration`](https://hacspec.org/hax/engine/hax-engine/Hax_engine/Features/Enumeration/index.html) lists all those features. -**Feature Witnesses:** - -- On relevant AST nodes, feature witnesses are included to enforce constraints at the type level. -- **Example:** In the `loop` expression constructor, a witness of type `F.loop` is used, where `F` represents the current feature set. If `F.loop` is an empty type, constructing a `loop` expression is prohibited, ensuring that loops are disallowed in contexts where they are not supported. +**Feature Witnesses:** On relevant AST nodes, feature witnesses are included to enforce constraints at the type level. For example, in the `loop` expression constructor, a witness of type `F.loop` is used, where `F` represents the current feature set. If `F.loop` is an empty type, constructing a `loop` expression is prohibited, ensuring that loops are disallowed in contexts where they are not supported. ### Transformation Phases From afff4b381b6454b5d53521d4c03729ac007dd8c7 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 28 Nov 2024 08:11:40 +0100 Subject: [PATCH 45/59] book(architecture): describe the relation between the frontend & engine in the intro --- book/src/contributing/architecture.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/book/src/contributing/architecture.md b/book/src/contributing/architecture.md index 2fb766a27..fef0fb45f 100644 --- a/book/src/contributing/architecture.md +++ b/book/src/contributing/architecture.md @@ -5,6 +5,8 @@ Hax is a software pipeline designed to transform Rust code into various formal v 1. **The Frontend** (written in Rust) 2. **The Engine** (written in OCaml) +The frontend hooks into the Rust compiler, producing a abstract syntax tree for a given crate. The engine then takes this AST in input, applies various transformation, to reach in the end the language of the backend: F*, Coq... + ## The Frontend (Rust) The frontend is responsible for extracting and exporting Rust code's abstract syntax trees (ASTs) in a format suitable for processing by the engine (or by other tools). From 65c586f64523d345a1eeeb77fad1e3bef02fa4e9 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 28 Nov 2024 08:50:11 +0100 Subject: [PATCH 46/59] doc(book): add more links --- book/src/contributing/architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/contributing/architecture.md b/book/src/contributing/architecture.md index fef0fb45f..4877c97fd 100644 --- a/book/src/contributing/architecture.md +++ b/book/src/contributing/architecture.md @@ -63,7 +63,7 @@ The engine executes a sequence of **phases**, which are determined based on the 1. **Input:** Takes a list of items from an AST with specific feature constraints. 2. **Output:** Transforms these items into a new AST type, potentially enabling or disabling features through type-level changes. -The phases can be found in the `engin/lib/phases/` folder. +The phases can be found in the [`Phases`](https://hacspec.org/hax/engine/hax-engine/Hax_engine/Phases/index.html) module. ### Backend Code Generation From 52f7459a4450069ebdb0d25be034c050ed1a26b1 Mon Sep 17 00:00:00 2001 From: Maxime Buyse Date: Thu, 28 Nov 2024 10:22:53 +0100 Subject: [PATCH 47/59] Increase z3 rlimit for chacha20. --- examples/chacha20/proofs/fstar/extraction/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chacha20/proofs/fstar/extraction/Makefile b/examples/chacha20/proofs/fstar/extraction/Makefile index 381ef237b..3d0b57bc0 100644 --- a/examples/chacha20/proofs/fstar/extraction/Makefile +++ b/examples/chacha20/proofs/fstar/extraction/Makefile @@ -54,7 +54,7 @@ all: $(MAKE) verify # Default hax invocation -HAX_CLI = "cargo hax into fstar" +HAX_CLI = "cargo hax into fstar --z3rlimit 40" # If $HACL_HOME doesn't exist, clone it ${HACL_HOME}: From 4556e8e180f85764f81cdf589b8401e651e0ed33 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 16:48:37 +0100 Subject: [PATCH 48/59] fix(engine/f*): backport FStarLang/FStar#3561 --- .../FStar_Parser_ToDocument.ml | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/engine/backends/fstar/fstar-surface-ast/FStar_Parser_ToDocument.ml b/engine/backends/fstar/fstar-surface-ast/FStar_Parser_ToDocument.ml index 23676511e..062b8a303 100644 --- a/engine/backends/fstar/fstar-surface-ast/FStar_Parser_ToDocument.ml +++ b/engine/backends/fstar/fstar-surface-ast/FStar_Parser_ToDocument.ml @@ -1000,6 +1000,31 @@ let separate_map_with_comments_kw : let uu___2 = f prefix x in (uu___1, uu___2) in let uu___1 = FStar_Compiler_List.fold_left fold_fun init xs1 in FStar_Pervasives_Native.snd uu___1 +let (p_char_literal' : + FStar_Char.char -> FStar_BaseTypes.char -> FStar_Pprint.document) = + fun quote_char -> + fun c -> + str + (match c with + | 8 -> "\\b" + | 12 -> "\\f" + | 10 -> "\\n" + | 9 -> "\\t" + | 13 -> "\\r" + | 11 -> "\\v" + | 0 -> "\\0" + | c1 -> + let s = FStar_Compiler_Util.string_of_char c1 in + if quote_char = c1 then "\\" ^ s else s) +let (p_char_literal : FStar_BaseTypes.char -> FStar_Pprint.document) = + fun c -> let uu___ = p_char_literal' 39 c in FStar_Pprint.squotes uu___ +let (p_string_literal : Prims.string -> FStar_Pprint.document) = + fun s -> + let quotation_mark = 34 in + let uu___ = + FStar_Pprint.concat_map (p_char_literal' quotation_mark) + (FStar_String.list_of_string s) in + FStar_Pprint.dquotes uu___ let rec (p_decl : FStar_Parser_AST.decl -> FStar_Pprint.document) = fun d -> let qualifiers = @@ -4524,10 +4549,7 @@ and (p_atomicTermNotQUident : FStar_Parser_AST.term -> FStar_Pprint.document) FStar_Ident.lid_equals lid FStar_Parser_Const.assume_lid -> str "assume" | FStar_Parser_AST.Tvar tv -> p_tvar tv - | FStar_Parser_AST.Const c -> - (match c with - | FStar_Const.Const_char x when x = 10 -> str "0x0Az" - | uu___ -> p_constant c) + | FStar_Parser_AST.Const c -> p_constant c | FStar_Parser_AST.Name lid when FStar_Ident.lid_equals lid FStar_Parser_Const.true_lid -> str "True" | FStar_Parser_AST.Name lid when @@ -4732,10 +4754,8 @@ and (p_constant : FStar_Const.sconst -> FStar_Pprint.document) = | FStar_Const.Const_unit -> str "()" | FStar_Const.Const_bool b -> FStar_Pprint.doc_of_bool b | FStar_Const.Const_real r -> str (Prims.op_Hat r "R") - | FStar_Const.Const_char x -> FStar_Pprint.doc_of_char x - | FStar_Const.Const_string (s, uu___1) -> - let uu___2 = str (FStar_String.escaped s) in - FStar_Pprint.dquotes uu___2 + | FStar_Const.Const_char x -> p_char_literal x + | FStar_Const.Const_string (s, uu___1) -> p_string_literal s | FStar_Const.Const_int (repr, sign_width_opt) -> let signedness uu___1 = match uu___1 with From cdaf331621074e6cdcdf14129900daa60d027025 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 16:49:26 +0100 Subject: [PATCH 49/59] test(engine/f*): `\0` --- tests/literals/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/literals/src/lib.rs b/tests/literals/src/lib.rs index b82e937f0..7fbc1be70 100644 --- a/tests/literals/src/lib.rs +++ b/tests/literals/src/lib.rs @@ -81,3 +81,5 @@ pub fn empty_array() { fn fn_pointer_cast() { let f: fn(&u32) -> &u32 = |x| x; } + +const null: char = '\0'; From 8fa0825ab3221c858a8779375f6c79c27c1da250 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 16:50:02 +0100 Subject: [PATCH 50/59] feat(justfile): allow arguments to recipies `test` and `_test` --- justfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/justfile b/justfile index 0edcc0754..a935c81c6 100644 --- a/justfile +++ b/justfile @@ -49,11 +49,11 @@ fmt: cd engine && dune fmt # Run hax tests: each test crate has a snapshot, so that we track changes in extracted code. If a snapshot changed, please review them with `just test-review`. -test: - cargo test --test toolchain +test *FLAGS: + cargo test --test toolchain {{FLAGS}} -_test: - CARGO_TESTS_ASSUME_BUILT=1 cargo test --test toolchain +_test *FLAGS: + CARGO_TESTS_ASSUME_BUILT=1 cargo test --test toolchain {{FLAGS}} # Review snapshots test-review: (_ensure_command_in_path "cargo-insta" "Insta (https://insta.rs)") From dd6072672abefa43a7bd37dfaa6a11011e3c2ba5 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 28 Nov 2024 13:29:59 +0100 Subject: [PATCH 51/59] chore: refresh snapshots --- test-harness/src/snapshots/toolchain__literals into-coq.snap | 3 +++ test-harness/src/snapshots/toolchain__literals into-fstar.snap | 2 ++ 2 files changed, 5 insertions(+) diff --git a/test-harness/src/snapshots/toolchain__literals into-coq.snap b/test-harness/src/snapshots/toolchain__literals into-coq.snap index 77d4150c3..f2da7be00 100644 --- a/test-harness/src/snapshots/toolchain__literals into-coq.snap +++ b/test-harness/src/snapshots/toolchain__literals into-coq.snap @@ -100,6 +100,9 @@ Definition math_integers (x : t_Int) `{andb (f_gt (x) (impl__Int___unsafe_from_s let _ : t_usize := impl__Int__to_usize (x) in impl__Int__to_u8 (f_add (x) (f_mul (x) (x))). +Definition null : ascii := + "\000"%char. + Definition numeric (_ : unit) : unit := let _ : t_usize := 123 in let _ : t_isize := -42 in diff --git a/test-harness/src/snapshots/toolchain__literals into-fstar.snap b/test-harness/src/snapshots/toolchain__literals into-fstar.snap index f6c262b10..efe3f1ef0 100644 --- a/test-harness/src/snapshots/toolchain__literals into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__literals into-fstar.snap @@ -141,6 +141,8 @@ let math_integers (x: Hax_lib.Int.t_Int) let (_: usize):usize = Hax_lib.Int.impl__Int__to_usize x in Hax_lib.Int.impl__Int__to_u8 (x + (x * x <: Hax_lib.Int.t_Int) <: Hax_lib.Int.t_Int) +let null: char = '\0' + let numeric (_: Prims.unit) : Prims.unit = let (_: usize):usize = sz 123 in let (_: isize):isize = isz (-42) in From 7d544d67eb2ebd2dd06d4cf84b97a8ce949a9856 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Mon, 7 Oct 2024 17:16:03 +0200 Subject: [PATCH 52/59] doc: release procedure --- Cargo.toml | 4 ++++ PUBLISHING.md | 28 +++++++++++++++++++--------- cli/subcommands/Cargo.toml | 3 +++ engine/names/Cargo.toml | 3 +++ engine/names/extract/Cargo.toml | 3 +++ hax-lib-protocol-macros/Cargo.toml | 3 +++ hax-lib-protocol/Cargo.toml | 3 +++ test-harness/Cargo.toml | 3 +++ 8 files changed, 41 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 52243d79a..fe664a8ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,3 +79,7 @@ hax-lib-macros-types = { path = "hax-lib/macros/types", version = "=0.1.0-alpha. hax-lib = { path = "hax-lib", version = "=0.1.0-alpha.1" } hax-engine-names = { path = "engine/names", version = "=0.1.0-alpha.1" } hax-types = { path = "hax-types", version = "=0.1.0-alpha.1" } + +[workspace.metadata.release] +owners = ["github:hacspec:crates"] + diff --git a/PUBLISHING.md b/PUBLISHING.md index ae1491466..779884788 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -1,4 +1,11 @@ -# Crates publishing +# Publishing + +## OCaml + +There is only the package `hax-engine`, that includes a binary and a +number of libraries. + +## Rust This repository is divided into several crates, some to be published, some not. All crates should start with the `hax-` prefix, but @@ -9,7 +16,7 @@ and `examples`): - `hax-test-harness` **(doesn't need to be published)** -## cargo-hax +### cargo-hax 1. `hax-frontend-exporter-options` (`frontend/exporter/options `) 2. `hax-adt-into` (`frontend/exporter/adt-into`) @@ -20,23 +27,26 @@ and `examples`): - `hax-export-json-schemas` - `hax-pretty-print-diagnostics` -- `hax-phase-debug-webapp` - `hax-driver` +### hax-lib -## hax-lib +We publish the following crates that are helper libraries to be used +for hax code: 1. `hax-lib-macros-types` 2. `hax-lib-macros` 3. `hax-lib` ---- - -- `hax-lint` - -## Supporting crates for the engine +### Supporting crates for the engine The crate listed below are used only by the OCaml build of the engine. Those should not be published on `crate.io`. 1. `cargo-hax-engine-names` 2. `cargo-hax-engine-names-extract` + +## Procedure + 1. Bump the version number with `cargo release LEVEL --no-publish --execute` (`cargo release --help` for more details on `LEVEL`). This will bump the version of every Rust crate, but also the version in `engine/dune-project`. This will also regenerate `engine/hax-engine.opam`. Note this will *not* publish the crate. + 2. PR the change + 3. when the PR is merged in main, checkout `main` and run `cargo release --execute` + diff --git a/cli/subcommands/Cargo.toml b/cli/subcommands/Cargo.toml index 91512f584..9ba434912 100644 --- a/cli/subcommands/Cargo.toml +++ b/cli/subcommands/Cargo.toml @@ -54,6 +54,9 @@ hax-lib-macros-types = {workspace = true, features = ["schemars"]} version_check = "0.9" toml = "0.8" +[package.metadata.release] +pre-release-hook = ["dune", "build", "--root", "../../engine", "hax-engine.opam"] + [[package.metadata.release.pre-release-replacements]] file = "../../engine/dune-project" search = "version [a-z0-9\\.-]+" diff --git a/engine/names/Cargo.toml b/engine/names/Cargo.toml index efc92fca6..790bde85b 100644 --- a/engine/names/Cargo.toml +++ b/engine/names/Cargo.toml @@ -12,3 +12,6 @@ description = "Dummy crate containing all the Rust names the hax engine should b [dependencies] hax-lib-protocol = {path = "../../hax-lib-protocol"} hax-lib = {path = "../../hax-lib"} + +[package.metadata.release] +release = false \ No newline at end of file diff --git a/engine/names/extract/Cargo.toml b/engine/names/extract/Cargo.toml index 22604c874..df9d97479 100644 --- a/engine/names/extract/Cargo.toml +++ b/engine/names/extract/Cargo.toml @@ -23,3 +23,6 @@ extract_names_mode = [] [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("rustc"))'] } + +[package.metadata.release] +release = false \ No newline at end of file diff --git a/hax-lib-protocol-macros/Cargo.toml b/hax-lib-protocol-macros/Cargo.toml index de9561465..32de7ec54 100644 --- a/hax-lib-protocol-macros/Cargo.toml +++ b/hax-lib-protocol-macros/Cargo.toml @@ -21,3 +21,6 @@ syn = { version = "2.0", features = [ "extra-traits", "parsing", ] } + +[package.metadata.release] +release = false \ No newline at end of file diff --git a/hax-lib-protocol/Cargo.toml b/hax-lib-protocol/Cargo.toml index 0dee6ef9e..0b2dc5e28 100644 --- a/hax-lib-protocol/Cargo.toml +++ b/hax-lib-protocol/Cargo.toml @@ -10,3 +10,6 @@ readme.workspace = true [dependencies] libcrux = "0.0.2-pre.2" + +[package.metadata.release] +release = false \ No newline at end of file diff --git a/test-harness/Cargo.toml b/test-harness/Cargo.toml index e0dbfe4ca..bc32eec70 100644 --- a/test-harness/Cargo.toml +++ b/test-harness/Cargo.toml @@ -25,3 +25,6 @@ insta = {version = "1.29.0", features = ["filters", "toml"]} serde = { version = "1.0", features = ["derive"] } regex = "1" hax-types.workspace = true + +[package.metadata.release] +release = false \ No newline at end of file From 508536d42d20a4243bda82576c9c271644f95d9a Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 10 Oct 2024 17:06:34 +0200 Subject: [PATCH 53/59] fix: missing newlines Co-authored-by: Franziskus Kiefer --- engine/names/Cargo.toml | 2 +- engine/names/extract/Cargo.toml | 2 +- hax-lib-protocol-macros/Cargo.toml | 2 +- hax-lib-protocol/Cargo.toml | 2 +- test-harness/Cargo.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engine/names/Cargo.toml b/engine/names/Cargo.toml index 790bde85b..58ebcb0d2 100644 --- a/engine/names/Cargo.toml +++ b/engine/names/Cargo.toml @@ -14,4 +14,4 @@ hax-lib-protocol = {path = "../../hax-lib-protocol"} hax-lib = {path = "../../hax-lib"} [package.metadata.release] -release = false \ No newline at end of file +release = false diff --git a/engine/names/extract/Cargo.toml b/engine/names/extract/Cargo.toml index df9d97479..ed24a9d3d 100644 --- a/engine/names/extract/Cargo.toml +++ b/engine/names/extract/Cargo.toml @@ -25,4 +25,4 @@ extract_names_mode = [] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("rustc"))'] } [package.metadata.release] -release = false \ No newline at end of file +release = false diff --git a/hax-lib-protocol-macros/Cargo.toml b/hax-lib-protocol-macros/Cargo.toml index 32de7ec54..739fd467f 100644 --- a/hax-lib-protocol-macros/Cargo.toml +++ b/hax-lib-protocol-macros/Cargo.toml @@ -23,4 +23,4 @@ syn = { version = "2.0", features = [ ] } [package.metadata.release] -release = false \ No newline at end of file +release = false diff --git a/hax-lib-protocol/Cargo.toml b/hax-lib-protocol/Cargo.toml index 0b2dc5e28..e442033b1 100644 --- a/hax-lib-protocol/Cargo.toml +++ b/hax-lib-protocol/Cargo.toml @@ -12,4 +12,4 @@ readme.workspace = true libcrux = "0.0.2-pre.2" [package.metadata.release] -release = false \ No newline at end of file +release = false diff --git a/test-harness/Cargo.toml b/test-harness/Cargo.toml index bc32eec70..a11bb3e9d 100644 --- a/test-harness/Cargo.toml +++ b/test-harness/Cargo.toml @@ -27,4 +27,4 @@ regex = "1" hax-types.workspace = true [package.metadata.release] -release = false \ No newline at end of file +release = false From f62bff4ef97a1df03d9cba2fc5c1307613f5f8ed Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Thu, 10 Oct 2024 17:13:00 +0200 Subject: [PATCH 54/59] fix(publishing): note about opam --- PUBLISHING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PUBLISHING.md b/PUBLISHING.md index 779884788..cfb04a098 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -50,3 +50,8 @@ engine. Those should not be published on `crate.io`. 2. PR the change 3. when the PR is merged in main, checkout `main` and run `cargo release --execute` +Note: for now, we are not publishing to Opam. Instead, let's just advertise the following for installation: +```bash +opam pin hax-engine https://github.com/hacspec/hax.git#the-release-tag +opam install hax-engine +``` From d4698af0d2a0f375046f6f90d1e2a668163d08d3 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Mon, 2 Dec 2024 13:57:20 +0100 Subject: [PATCH 55/59] doc(publishing): clarification about the engine --- PUBLISHING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PUBLISHING.md b/PUBLISHING.md index cfb04a098..e671dbe78 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -5,6 +5,9 @@ There is only the package `hax-engine`, that includes a binary and a number of libraries. +We have no particular release procedure for the engine: we don't plan +on publishing it to opam. + ## Rust This repository is divided into several crates, some to be published, From 53b757de668c4fd80270c9964ce71406cec4c164 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Mon, 2 Dec 2024 14:00:14 +0100 Subject: [PATCH 56/59] chore: Release --- Cargo.lock | 30 +++++++++++++++--------------- Cargo.toml | 18 +++++++++--------- engine/dune-project | 2 +- engine/hax-engine.opam | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5daeaf35d..265b869ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -144,7 +144,7 @@ dependencies = [ [[package]] name = "cargo-hax" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "annotate-snippets", "cargo_metadata", @@ -445,7 +445,7 @@ checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "hax-adt-into" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "itertools", "proc-macro2", @@ -456,7 +456,7 @@ dependencies = [ [[package]] name = "hax-bounded-integers" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "duplicate", "hax-lib", @@ -465,7 +465,7 @@ dependencies = [ [[package]] name = "hax-driver" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "clap", "colored", @@ -483,7 +483,7 @@ dependencies = [ [[package]] name = "hax-engine-names" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "hax-lib", "hax-lib-protocol", @@ -491,7 +491,7 @@ dependencies = [ [[package]] name = "hax-engine-names-extract" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "hax-adt-into", "hax-engine-names", @@ -502,7 +502,7 @@ dependencies = [ [[package]] name = "hax-frontend-exporter" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "extension-traits", "hax-adt-into", @@ -518,7 +518,7 @@ dependencies = [ [[package]] name = "hax-frontend-exporter-options" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "hax-adt-into", "schemars", @@ -528,7 +528,7 @@ dependencies = [ [[package]] name = "hax-lib" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "hax-lib-macros", "num-bigint", @@ -537,7 +537,7 @@ dependencies = [ [[package]] name = "hax-lib-macros" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "hax-lib", "hax-lib-macros-types", @@ -550,7 +550,7 @@ dependencies = [ [[package]] name = "hax-lib-macros-types" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -562,14 +562,14 @@ dependencies = [ [[package]] name = "hax-lib-protocol" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "libcrux", ] [[package]] name = "hax-lib-protocol-macros" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "proc-macro-error", "proc-macro2", @@ -579,7 +579,7 @@ dependencies = [ [[package]] name = "hax-test-harness" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "assert_cmd", "cargo_metadata", @@ -595,7 +595,7 @@ dependencies = [ [[package]] name = "hax-types" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "annotate-snippets", "clap", diff --git a/Cargo.toml b/Cargo.toml index 52243d79a..9914ef499 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ default-members = [ resolver = "2" [workspace.package] -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" authors = ["hax Authors"] license = "Apache-2.0" homepage = "https://github.com/hacspec/hax" @@ -71,11 +71,11 @@ colored = "2" annotate-snippets = "0.11" # Crates in this repository -hax-frontend-exporter = { path = "frontend/exporter", version = "=0.1.0-alpha.1", default-features = false } -hax-adt-into = { path = "frontend/exporter/adt-into", version = "=0.1.0-alpha.1" } -hax-frontend-exporter-options = { path = "frontend/exporter/options", version = "=0.1.0-alpha.1" } -hax-lib-macros = { path = "hax-lib/macros", version = "=0.1.0-alpha.1" } -hax-lib-macros-types = { path = "hax-lib/macros/types", version = "=0.1.0-alpha.1" } -hax-lib = { path = "hax-lib", version = "=0.1.0-alpha.1" } -hax-engine-names = { path = "engine/names", version = "=0.1.0-alpha.1" } -hax-types = { path = "hax-types", version = "=0.1.0-alpha.1" } +hax-frontend-exporter = { path = "frontend/exporter", version = "=0.1.0-rc.1", default-features = false } +hax-adt-into = { path = "frontend/exporter/adt-into", version = "=0.1.0-rc.1" } +hax-frontend-exporter-options = { path = "frontend/exporter/options", version = "=0.1.0-rc.1" } +hax-lib-macros = { path = "hax-lib/macros", version = "=0.1.0-rc.1" } +hax-lib-macros-types = { path = "hax-lib/macros/types", version = "=0.1.0-rc.1" } +hax-lib = { path = "hax-lib", version = "=0.1.0-rc.1" } +hax-engine-names = { path = "engine/names", version = "=0.1.0-rc.1" } +hax-types = { path = "hax-types", version = "=0.1.0-rc.1" } diff --git a/engine/dune-project b/engine/dune-project index 11531cc1b..5769b572c 100644 --- a/engine/dune-project +++ b/engine/dune-project @@ -2,7 +2,7 @@ (name hax-engine) -(version 0.1.0-alpha.1) +(version 0.1.0-rc.1) (generate_opam_files true) diff --git a/engine/hax-engine.opam b/engine/hax-engine.opam index a1c46c487..e317a03f5 100644 --- a/engine/hax-engine.opam +++ b/engine/hax-engine.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.1.0-alpha.1" +version: "0.1.0-rc.1" synopsis: "The engine of hax, a Rust verification tool" description: "Hax is divided in two: a frontend (written in Rust) and an engine (written in OCaml). This is the engine." From a8695e8a35b406f13076b5b9dfa2047b8161edf3 Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 17:17:56 +0100 Subject: [PATCH 57/59] misc(book): cleanup, remove grayed out sections --- book/src/SUMMARY.md | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 1201418f5..192046d30 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -11,24 +11,23 @@ - [Using the F* backend](examples/fstar/intro.md) - [Using the Coq backend](examples/coq/intro.md) - [Using the ProVerif backend](examples/coq/intro.md) -- [Proofs]() - - [F*]() - - [Coq]() - - [`libcore`]() + + + + - [Troubleshooting/FAQ](faq/intro.md) - - [Command line usage]() - - [The include flag: which items should be extracted, and how?](faq/include-flags.md) -- [Contributing]() + - [The include flag: which items should be extracted, and how?](faq/include-flags.md) +- [Contributing](contributing/intro.md) - [Architecture](contributing/architecture.md) - - [Hax Cargo subcommand]() - - [Frontend: the Rustc driver]() - - [Frontend: the exporter]() - - [Engine]() - - [Backends]() - - [Utilities]() - [Libraries & Macros](contributing/libraries_macros.md) - - [`libcore`]() + + + + + + + --- -[Contributors]() + [Archive](misc/archive.md) From e763642a1df031a1122739872eb536a77e020e5f Mon Sep 17 00:00:00 2001 From: Lucas Franceschino Date: Wed, 27 Nov 2024 17:18:11 +0100 Subject: [PATCH 58/59] misc(book): add contributing page --- book/src/contributing/intro.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 book/src/contributing/intro.md diff --git a/book/src/contributing/intro.md b/book/src/contributing/intro.md new file mode 100644 index 000000000..383716a6f --- /dev/null +++ b/book/src/contributing/intro.md @@ -0,0 +1,4 @@ +# Contributing +This chapter contains information about internals of hax. + +Please read the [`CONTRIBUTING.md`](https://github.com/hacspec/hax/blob/main/CONTRIBUTING.md) before opening a pull request. From 92e7d3377e503661e418e4a8dc5305df34d93628 Mon Sep 17 00:00:00 2001 From: Maxime Buyse Date: Mon, 9 Dec 2024 11:01:20 +0100 Subject: [PATCH 59/59] Remove rejected type ascription patterns from generated f*. --- engine/backends/fstar/fstar_backend.ml | 3 +- .../toolchain__literals into-fstar.snap | 50 +++++++++---------- .../toolchain__patterns into-fstar.snap | 41 +++++++++++++++ tests/Cargo.lock | 14 ++++-- tests/Cargo.toml | 1 + tests/patterns/Cargo.toml | 9 ++++ tests/patterns/src/lib.rs | 15 ++++++ 7 files changed, 102 insertions(+), 31 deletions(-) create mode 100644 test-harness/src/snapshots/toolchain__patterns into-fstar.snap create mode 100644 tests/patterns/Cargo.toml create mode 100644 tests/patterns/src/lib.rs diff --git a/engine/backends/fstar/fstar_backend.ml b/engine/backends/fstar/fstar_backend.ml index f179ffe38..3518e40c4 100644 --- a/engine/backends/fstar/fstar_backend.ml +++ b/engine/backends/fstar/fstar_backend.ml @@ -401,8 +401,9 @@ struct let ppat = ppat' false in match p.p with | PWild -> F.wild - | PAscription { typ; pat } -> + | PAscription { typ; pat = { p = PBinding _; _ } as pat } -> F.pat @@ F.AST.PatAscribed (ppat pat, (pty p.span typ, None)) + | PAscription { pat; _ } -> ppat pat | PBinding { mut = Immutable; diff --git a/test-harness/src/snapshots/toolchain__literals into-fstar.snap b/test-harness/src/snapshots/toolchain__literals into-fstar.snap index efe3f1ef0..f3bb80621 100644 --- a/test-harness/src/snapshots/toolchain__literals into-fstar.snap +++ b/test-harness/src/snapshots/toolchain__literals into-fstar.snap @@ -38,7 +38,7 @@ type t_Foo = { f_field:u8 } let v_CONSTANT: t_Foo = { f_field = 3uy } <: t_Foo let casts (x8: u8) (x16: u16) (x32: u32) (x64: u64) (xs: usize) : Prims.unit = - let (_: u64):u64 = + let _:u64 = ((((cast (x8 <: u8) <: u64) +! (cast (x16 <: u16) <: u64) <: u64) +! (cast (x32 <: u32) <: u64) <: u64) +! @@ -47,28 +47,28 @@ let casts (x8: u8) (x16: u16) (x32: u32) (x64: u64) (xs: usize) : Prims.unit = u64) +! (cast (xs <: usize) <: u64) in - let (_: u32):u32 = + let _:u32 = ((((cast (x8 <: u8) <: u32) +! (cast (x16 <: u16) <: u32) <: u32) +! x32 <: u32) +! (cast (x64 <: u64) <: u32) <: u32) +! (cast (xs <: usize) <: u32) in - let (_: u16):u16 = + let _:u16 = ((((cast (x8 <: u8) <: u16) +! x16 <: u16) +! (cast (x32 <: u32) <: u16) <: u16) +! (cast (x64 <: u64) <: u16) <: u16) +! (cast (xs <: usize) <: u16) in - let (_: u8):u8 = + let _:u8 = (((x8 +! (cast (x16 <: u16) <: u8) <: u8) +! (cast (x32 <: u32) <: u8) <: u8) +! (cast (x64 <: u64) <: u8) <: u8) +! (cast (xs <: usize) <: u8) in - let (_: i64):i64 = + let _:i64 = ((((cast (x8 <: u8) <: i64) +! (cast (x16 <: u16) <: i64) <: i64) +! (cast (x32 <: u32) <: i64) <: i64) +! @@ -77,7 +77,7 @@ let casts (x8: u8) (x16: u16) (x32: u32) (x64: u64) (xs: usize) : Prims.unit = i64) +! (cast (xs <: usize) <: i64) in - let (_: i32):i32 = + let _:i32 = ((((cast (x8 <: u8) <: i32) +! (cast (x16 <: u16) <: i32) <: i32) +! (cast (x32 <: u32) <: i32) <: i32) +! @@ -86,7 +86,7 @@ let casts (x8: u8) (x16: u16) (x32: u32) (x64: u64) (xs: usize) : Prims.unit = i32) +! (cast (xs <: usize) <: i32) in - let (_: i16):i16 = + let _:i16 = ((((cast (x8 <: u8) <: i16) +! (cast (x16 <: u16) <: i16) <: i16) +! (cast (x32 <: u32) <: i16) <: i16) +! @@ -95,7 +95,7 @@ let casts (x8: u8) (x16: u16) (x32: u32) (x64: u64) (xs: usize) : Prims.unit = i16) +! (cast (xs <: usize) <: i16) in - let (_: i8):i8 = + let _:i8 = ((((cast (x8 <: u8) <: i8) +! (cast (x16 <: u16) <: i8) <: i8) +! (cast (x32 <: u32) <: i8) <: i8) +! @@ -115,7 +115,7 @@ let math_integers (x: Hax_lib.Int.t_Int) : Prims.Pure u8 (requires x > (0 <: Hax_lib.Int.t_Int) && x < (16 <: Hax_lib.Int.t_Int)) (fun _ -> Prims.l_True) = - let (_: Hax_lib.Int.t_Int):Hax_lib.Int.t_Int = Rust_primitives.Hax.Int.from_machine (sz 3) in + let _:Hax_lib.Int.t_Int = Rust_primitives.Hax.Int.from_machine (sz 3) in let _:bool = ((-340282366920938463463374607431768211455000) <: Hax_lib.Int.t_Int) > (340282366920938463463374607431768211455000 <: Hax_lib.Int.t_Int) @@ -129,26 +129,26 @@ let math_integers (x: Hax_lib.Int.t_Int) let _:Hax_lib.Int.t_Int = x - x in let _:Hax_lib.Int.t_Int = x * x in let _:Hax_lib.Int.t_Int = x / x in - let (_: i16):i16 = Hax_lib.Int.impl__Int__to_i16 x in - let (_: i32):i32 = Hax_lib.Int.impl__Int__to_i32 x in - let (_: i64):i64 = Hax_lib.Int.impl__Int__to_i64 x in - let (_: i128):i128 = Hax_lib.Int.impl__Int__to_i128 x in - let (_: isize):isize = Hax_lib.Int.impl__Int__to_isize x in - let (_: u16):u16 = Hax_lib.Int.impl__Int__to_u16 x in - let (_: u32):u32 = Hax_lib.Int.impl__Int__to_u32 x in - let (_: u64):u64 = Hax_lib.Int.impl__Int__to_u64 x in - let (_: u128):u128 = Hax_lib.Int.impl__Int__to_u128 x in - let (_: usize):usize = Hax_lib.Int.impl__Int__to_usize x in + let _:i16 = Hax_lib.Int.impl__Int__to_i16 x in + let _:i32 = Hax_lib.Int.impl__Int__to_i32 x in + let _:i64 = Hax_lib.Int.impl__Int__to_i64 x in + let _:i128 = Hax_lib.Int.impl__Int__to_i128 x in + let _:isize = Hax_lib.Int.impl__Int__to_isize x in + let _:u16 = Hax_lib.Int.impl__Int__to_u16 x in + let _:u32 = Hax_lib.Int.impl__Int__to_u32 x in + let _:u64 = Hax_lib.Int.impl__Int__to_u64 x in + let _:u128 = Hax_lib.Int.impl__Int__to_u128 x in + let _:usize = Hax_lib.Int.impl__Int__to_usize x in Hax_lib.Int.impl__Int__to_u8 (x + (x * x <: Hax_lib.Int.t_Int) <: Hax_lib.Int.t_Int) let null: char = '\0' let numeric (_: Prims.unit) : Prims.unit = - let (_: usize):usize = sz 123 in - let (_: isize):isize = isz (-42) in - let (_: isize):isize = isz 42 in - let (_: i32):i32 = (-42l) in - let (_: u128):u128 = pub_u128 22222222222222222222 in + let _:usize = sz 123 in + let _:isize = isz (-42) in + let _:isize = isz 42 in + let _:i32 = (-42l) in + let _:u128 = pub_u128 22222222222222222222 in () let patterns (_: Prims.unit) : Prims.unit = @@ -190,7 +190,7 @@ let panic_with_msg (_: Prims.unit) : Prims.unit = Rust_primitives.Hax.t_Never) let empty_array (_: Prims.unit) : Prims.unit = - let (_: t_Slice u8):t_Slice u8 = + let _:t_Slice u8 = (let list:Prims.list u8 = [] in FStar.Pervasives.assert_norm (Prims.eq2 (List.Tot.length list) 0); Rust_primitives.Hax.array_of_list 0 list) diff --git a/test-harness/src/snapshots/toolchain__patterns into-fstar.snap b/test-harness/src/snapshots/toolchain__patterns into-fstar.snap new file mode 100644 index 000000000..77025089e --- /dev/null +++ b/test-harness/src/snapshots/toolchain__patterns into-fstar.snap @@ -0,0 +1,41 @@ +--- +source: test-harness/src/harness.rs +expression: snapshot +info: + kind: + Translate: + backend: fstar + info: + name: patterns + manifest: patterns/Cargo.toml + description: ~ + spec: + optional: false + broken: false + issue_id: ~ + positive: true + snapshot: + stderr: true + stdout: true + include_flag: ~ + backend_options: ~ +--- +exit = 0 +stderr = 'Finished `dev` profile [unoptimized + debuginfo] target(s) in XXs' + +[stdout] +diagnostics = [] + +[stdout.files] +"Patterns.fst" = ''' +module Patterns +#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" +open Core +open FStar.Mul + +type t_Other = | Other : i32 -> t_Other + +type t_Test = | Test_C1 : t_Other -> t_Test + +let impl__test (self: t_Test) : i32 = match self with | Test_C1 c -> c._0 +''' diff --git a/tests/Cargo.lock b/tests/Cargo.lock index 5fcbe4dc7..1a2c1f3b8 100644 --- a/tests/Cargo.lock +++ b/tests/Cargo.lock @@ -320,7 +320,7 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hax-lib" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "hax-lib-macros", "num-bigint", @@ -329,7 +329,7 @@ dependencies = [ [[package]] name = "hax-lib-macros" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "hax-lib-macros-types", "paste", @@ -341,7 +341,7 @@ dependencies = [ [[package]] name = "hax-lib-macros-types" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -352,14 +352,14 @@ dependencies = [ [[package]] name = "hax-lib-protocol" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "libcrux", ] [[package]] name = "hax-lib-protocol-macros" -version = "0.1.0-alpha.1" +version = "0.1.0-rc.1" dependencies = [ "proc-macro-error", "proc-macro2", @@ -664,6 +664,10 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" name = "pattern-or" version = "0.1.0" +[[package]] +name = "patterns" +version = "0.1.0" + [[package]] name = "ping-pong" version = "0.1.0" diff --git a/tests/Cargo.toml b/tests/Cargo.toml index df3b03ffa..5e73e647e 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -23,6 +23,7 @@ members = [ "dyn", "reordering", "nested-derefs", + "patterns", "proverif-minimal", "proverif-basic-structs", "proverif-ping-pong", diff --git a/tests/patterns/Cargo.toml b/tests/patterns/Cargo.toml new file mode 100644 index 000000000..f6b4e63d6 --- /dev/null +++ b/tests/patterns/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "patterns" +version = "0.1.0" +edition = "2021" + +[dependencies] + +[package.metadata.hax-tests] +into."fstar" = { issue_id = "1170" } \ No newline at end of file diff --git a/tests/patterns/src/lib.rs b/tests/patterns/src/lib.rs new file mode 100644 index 000000000..058e37b70 --- /dev/null +++ b/tests/patterns/src/lib.rs @@ -0,0 +1,15 @@ +#![allow(dead_code)] + +struct Other<'a>(&'a i32); + +enum Test<'a> { + C1(Other<'a>), +} + +impl<'a> Test<'a> { + fn test(&self) -> i32 { + match self { + Self::C1(c) => *c.0, + } + } +}