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/generated-core/_CoqProject b/proof-libs/coq/coq/generated-core/_CoqProject new file mode 100644 index 000000000..e02d03ddd --- /dev/null +++ b/proof-libs/coq/coq/generated-core/_CoqProject @@ -0,0 +1,161 @@ +-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_Function.v + +./src/Core_Option.v +./src/Core_Cmp.v + +./spec/Core_Base_Spec_Haxint.v +./spec/Core_Base_Spec_Unary.v + +./spec/Core_Base_Spec_Binary_Positive.v +./spec/Core_Base_Spec_Binary_Pos.v + +./spec/Core_Base_Spec_Binary.v + +./spec/Core_Base_Spec_Z.v + +./spec/Core_Base_Spec_Seq.v + +./spec/Core_Base_Spec_Constants.v + +./spec/Core_Base_Spec.v + +./src/Core_Base_Binary.v +./src/Core_Base_Pos.v +./src/Core_Base_Z.v + +./src/Core_Base_Seq.v + +./src/Core_Base.v + +./src/Core_Convert.v + +./src/Core_Ops_Index.v + +./src/Core_Ops_Bit.v +./src/Core_Ops_Arith.v + +./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 + +./src/Core_Base_interface_Int.v + +./src/Core_Base_interface.v + +./src/Core_Num_Uint_macros.v # Empty +./src/Core_Num_Int_macros.v # Empty + +./src/Core_Result.v + +./phase_library/ControlFlow.v + +# Bundles: Core_Primitive.v, +./src/Core_Array_Rec_bundle_579704328.v + +# ./src/Core_Primitive_Number_conversion.v +# ./src/Core_Primitive_Number_conversion_i.v + +./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_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/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..253bad01a --- /dev/null +++ b/proof-libs/coq/coq/generated-core/phase_library/TODO.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. + +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. + +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). *) + +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/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.v b/proof-libs/coq/coq/generated-core/src/Core.v new file mode 100644 index 000000000..3965e9d91 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core.v @@ -0,0 +1,80 @@ +(* 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_Primitive. +Export Core_Primitive. + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +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. + +From Core Require Import TODO. +Export TODO. diff --git a/proof-libs/coq/coq/generated-core/src/Core_Array.v b/proof-libs/coq/coq/generated-core/src/Core_Array.v new file mode 100644 index 000000000..c59a39ce4 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Array.v @@ -0,0 +1,37 @@ +(* 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_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_Array_Iter. +Export Core_Array_Iter. + +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 new file mode 100644 index 000000000..3ee71113d --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Array_Iter.v @@ -0,0 +1,50 @@ +(* 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_Num. +Export Core_Num. + + + +From Core Require Import Core_Ops_Index_range. +Export Core_Ops_Index_range. + +From Core Require Import Core_Ops_Range. +Export Core_Ops_Range. + +From Core Require Import Core_Primitive. +Export Core_Primitive. + +(* 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_Base. +Export Core_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..da8881a39 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Array_Rec_bundle_579704328.v @@ -0,0 +1,4554 @@ +(* 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 ControlFlow. + +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. + +#[global] Instance t_Clone_173398349 : t_Clone ((t_i128)) := + { + Clone_f_clone := fun (self : t_i128)=> 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. + +#[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)); + }. + +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. + +#[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)); + }. + +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. + +#[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)); + }. + +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. + +#[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)); + }. + +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. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +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. + +#[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)); + }. + +#[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)); + }. + +Class v_Sealed (v_Self : Type) : Type := + { + }. +Arguments v_Sealed (_). + +#[global] Instance v_Sealed_639968800 : v_Sealed ((t_usize)) := + { + }. + +#[global] 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 := + Build_t_u32 (impl_97__BITS). + +Definition v_MAX626626007 : t_i8 := + Build_t_i8 (Constants_f_MAX). + +Definition v_MIN19747349 : t_i8 := + Build_t_i8 (Constants_f_MIN). + +Definition v_BITS421056295 : t_u32 := + Build_t_u32 (impl_83__BITS). + +Definition v_MAX474501300 : t_i16 := + Build_t_i16 (Constants_f_MAX). + +Definition v_MIN776391606 : t_i16 := + Build_t_i16 (Constants_f_MIN). + +Definition v_BITS465526498 : t_u32 := + Build_t_u32 (impl_69__BITS). + +Definition v_MAX106630818 : t_i32 := + Build_t_i32 (Constants_f_MAX). + +Definition v_MIN682967538 : t_i32 := + Build_t_i32 (Constants_f_MIN). + +Definition v_BITS419886578 : t_u32 := + Build_t_u32 (impl_55__BITS). + +Definition v_MAX527043787 : t_i64 := + Build_t_i64 (Constants_f_MAX). + +Definition v_MIN654206259 : t_i64 := + Build_t_i64 (Constants_f_MIN). + +Definition v_BITS992667165 : t_u32 := + Build_t_u32 (impl_41__BITS). + +Definition v_MAX375377319 : t_i128 := + Build_t_i128 (Constants_f_MAX). + +Definition v_MIN79612531 : t_i128 := + Build_t_i128 (Constants_f_MIN). + +Definition v_BITS211584016 : t_u32 := + Build_t_u32 (impl_55__BITS). + +Definition v_MAX937003029 : t_isize := + Build_t_isize (Constants_f_MAX). + +Definition v_MIN1017039533 : t_isize := + Build_t_isize (Constants_f_MIN). + +Definition v_BITS690311813 : t_u32 := + Build_t_u32 (impl_219__BITS). + +Definition v_MAX310118176 : t_u8 := + Build_t_u8 (Constants_f_MAX). + +Definition v_MIN41851434 : t_u8 := + Build_t_u8 (Constants_f_MIN). + +Definition v_BITS277333551 : t_u32 := + Build_t_u32 (impl_192__BITS). + +Definition v_MAX487295910 : t_u16 := + Build_t_u16 (Constants_f_MAX). + +Definition v_MIN592300287 : t_u16 := + Build_t_u16 (Constants_f_MIN). + +Definition v_BITS473478051 : t_u32 := + Build_t_u32 (impl_165__BITS). + +Definition v_MAX826434525 : t_u32 := + Build_t_u32 (Constants_f_MAX). + +Definition v_MIN932777089 : t_u32 := + Build_t_u32 (Constants_f_MIN). + +Definition v_BITS177666292 : t_u32 := + Build_t_u32 (impl_138__BITS). + +Definition v_MAX815180633 : t_u64 := + Build_t_u64 (Constants_f_MAX). + +Definition v_MIN631333594 : t_u64 := + Build_t_u64 (Constants_f_MIN). + +Definition v_BITS136999051 : t_u32 := + Build_t_u32 (impl_111__BITS). + +Definition v_MAX404543799 : t_u128 := + Build_t_u128 (Constants_f_MAX). + +Definition v_MIN668621698 : t_u128 := + Build_t_u128 (Constants_f_MIN). + +Definition v_BITS229952196 : t_u32 := + Build_t_u32 (impl_138__BITS). + +Definition v_MAX750570916 : t_usize := + Build_t_usize (Constants_f_MAX). + +Definition v_MIN861571008 : t_usize := + Build_t_usize (Constants_f_MIN). + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +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 (_) (_) {_}. + +#[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); + PartialEq_f_ne := fun (self : t_u8) (rhs : t_u8)=> + negb (PartialEq_f_eq (u8_0 self) (u8_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_u16) (rhs : t_u16)=> + negb (PartialEq_f_eq (u16_0 self) (u16_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_u32) (rhs : t_u32)=> + negb (PartialEq_f_eq (u32_0 self) (u32_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_u64) (rhs : t_u64)=> + negb (PartialEq_f_eq (u64_0 self) (u64_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_u128) (rhs : t_u128)=> + negb (PartialEq_f_eq (u128_0 self) (u128_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_usize) (rhs : t_usize)=> + negb (PartialEq_f_eq (usize_0 self) (usize_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_i8) (rhs : t_i8)=> + negb (PartialEq_f_eq (i8_0 self) (i8_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_i16) (rhs : t_i16)=> + negb (PartialEq_f_eq (i16_0 self) (i16_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_i32) (rhs : t_i32)=> + negb (PartialEq_f_eq (i32_0 self) (i32_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_i64) (rhs : t_i64)=> + negb (PartialEq_f_eq (i64_0 self) (i64_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_i128) (rhs : t_i128)=> + negb (PartialEq_f_eq (i128_0 self) (i128_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[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); + PartialEq_f_ne := fun (self : t_isize) (rhs : t_isize)=> + negb (PartialEq_f_eq (isize_0 self) (isize_0 rhs)); + }. + +#[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); + 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_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_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_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; + }. + +#[global] Instance t_From_number_i8 : t_From t_i8 Z := + { + From_f_from (x : Z) := Build_t_i8 (Build_t_I8 x) + }. + +#[global] Instance t_From_number_i16 : t_From t_i16 Z := + { + From_f_from (x : Z) := Build_t_i16 (Build_t_I16 x) + }. + +#[global] Instance t_From_number_i32 : t_From t_i32 Z := + { + From_f_from (x : Z) := Build_t_i32 (Build_t_I32 x) + }. + +#[global] Instance t_From_number_i64 : t_From t_i64 Z := + { + From_f_from (x : Z) := Build_t_i64 (Build_t_I64 x) + }. + +#[global] Instance t_From_number_i128 : t_From t_i128 Z := + { + From_f_from (x : Z) := Build_t_i128 (Build_t_I128 x) + }. + +#[global] Instance t_From_number_isize : t_From t_isize Z := + { + From_f_from (x : Z) := Build_t_isize (Build_t_I64 x) + }. + +#[global] Instance t_From_number_Zi8 : t_From Z t_i8 := + { + From_f_from (x : t_i8) := I8_f_v (i8_0 x) + }. + +#[global] Instance t_From_number_Zi16 : t_From Z t_i16 := + { + From_f_from (x : t_i16) := I16_f_v (i16_0 x) + }. + +#[global] Instance t_From_number_Zi32 : t_From Z t_i32 := + { + From_f_from (x : t_i32) := I32_f_v (i32_0 x) + }. + +#[global] Instance t_From_number_Zi64 : t_From Z t_i64 := + { + From_f_from (x : t_i64) := I64_f_v (i64_0 x) + }. + +#[global] Instance t_From_number_Zi128 : t_From Z t_i128 := + { + From_f_from (x : t_i128) := I128_f_v (i128_0 x) + }. + +#[global] Instance t_From_number_Zisize : t_From Z t_isize := + { + From_f_from (x : t_isize) := I64_f_v (isize_0 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_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_f_from := fun (x : t_i16)=> + Build_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_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_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_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_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_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_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_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_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). + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +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 + (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 + (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 + (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 + (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 + (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 + (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 := + 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 := + 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 := + 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 := + 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 := + 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 := + 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 := + 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 := + 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 := + 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 := + 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 := + 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 := + 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)). + +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 + (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 + (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 + (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 + (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 + (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 + (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 := + 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 := + 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 := + 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 := + 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 := + 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 := + 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 := + Build_t_i128 (Add_f_add (i128_0 a) (i128_0 b)). + +Definition wrapping_add_i16 (a : t_i16) (b : t_i16) : t_i16 := + Build_t_i16 (Add_f_add (i16_0 a) (i16_0 b)). + +Definition wrapping_add_i32 (a : t_i32) (b : t_i32) : t_i32 := + Build_t_i32 (Add_f_add (i32_0 a) (i32_0 b)). + +Definition wrapping_add_i64 (a : t_i64) (b : t_i64) : t_i64 := + Build_t_i64 (Add_f_add (i64_0 a) (i64_0 b)). + +Definition wrapping_add_i8 (a : t_i8) (b : t_i8) : t_i8 := + Build_t_i8 (Add_f_add (i8_0 a) (i8_0 b)). + +Definition wrapping_add_isize (a : t_isize) (b : t_isize) : t_isize := + Build_t_isize (Add_f_add (isize_0 a) (isize_0 b)). + +Definition wrapping_sub_i128 (a : t_i128) (b : t_i128) : t_i128 := + Build_t_i128 (Sub_f_sub (i128_0 a) (i128_0 b)). + +Definition wrapping_sub_i16 (a : t_i16) (b : t_i16) : t_i16 := + Build_t_i16 (Sub_f_sub (i16_0 a) (i16_0 b)). + +Definition wrapping_sub_i32 (a : t_i32) (b : t_i32) : t_i32 := + Build_t_i32 (Sub_f_sub (i32_0 a) (i32_0 b)). + +Definition wrapping_sub_i64 (a : t_i64) (b : t_i64) : t_i64 := + Build_t_i64 (Sub_f_sub (i64_0 a) (i64_0 b)). + +Definition wrapping_sub_i8 (a : t_i8) (b : t_i8) : t_i8 := + Build_t_i8 (Sub_f_sub (i8_0 a) (i8_0 b)). + +Definition wrapping_sub_isize (a : t_isize) (b : t_isize) : t_isize := + 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). + +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. + +#[global] Instance f_into_t_u8 : t_From t_u8 N := + { + From_f_from (x : N) := Build_t_u8 (Build_t_U8 x) + }. + +#[global] Instance f_into_t_u16 : t_From t_u16 N := + { + From_f_from (x : N) := Build_t_u16 (Build_t_U16 x) + }. + +#[global] Instance f_into_t_u32 : t_From t_u32 N := + { + From_f_from (x : N) := Build_t_u32 (Build_t_U32 x) + }. + +#[global] Instance f_into_t_u64 : t_From t_u64 N := + { + From_f_from (x : N) := Build_t_u64 (Build_t_U64 x) + }. + +#[global] Instance f_into_t_u128 : t_From t_u128 N := + { + From_f_from (x : N) := Build_t_u128 (Build_t_U128 x) + }. + +#[global] 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%N) + 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%N)) + 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%N)) + 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%N)) + 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%N)) + 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%N)) + 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). + +Check t_Neg. +#[global] Instance t_Neg_125588538 : t_Neg ((t_i8)) := + { + 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 := + if + is_negative350273175 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +#[global] Instance t_Neg_977573626 : t_Neg ((t_i16)) := + { + 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 := + if + is_negative477067241 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +#[global] Instance t_Neg_289824503 : t_Neg ((t_i32)) := + { + 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 := + if + is_negative1035644813 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +#[global] Instance t_Neg_895800448 : t_Neg ((t_i64)) := + { + 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 := + if + is_negative1066124578 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +#[global] Instance t_Neg_830237431 : t_Neg ((t_i128)) := + { + 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 := + if + is_negative221698470 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +#[global] Instance t_Neg_693499423 : t_Neg ((t_isize)) := + { + 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 := + if + is_negative693446369 (Clone_f_clone (self)) + then + Neg_f_neg (self) + else + self. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +Definition unchecked_div_i128 (x : t_i128) (y : t_i128) : t_i128 := + 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 := + 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 := + 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 := + 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 := + 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 := + 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 := + Build_t_u128 (Add_f_add (u128_0 a) (u128_0 b)). + +Definition wrapping_add_u16 (a : t_u16) (b : t_u16) : t_u16 := + Build_t_u16 (Add_f_add (u16_0 a) (u16_0 b)). + +Definition wrapping_add_u32 (a : t_u32) (b : t_u32) : t_u32 := + Build_t_u32 (Add_f_add (u32_0 a) (u32_0 b)). + +Definition wrapping_add_u64 (a : t_u64) (b : t_u64) : t_u64 := + Build_t_u64 (Add_f_add (u64_0 a) (u64_0 b)). + +Definition wrapping_add_u8 (a : t_u8) (b : t_u8) : t_u8 := + Build_t_u8 (Add_f_add (u8_0 a) (u8_0 b)). + +Definition wrapping_add_usize (a : t_usize) (b : t_usize) : t_usize := + Build_t_usize (Add_f_add (usize_0 a) (usize_0 b)). + +Definition wrapping_mul_i128 (a : t_i128) (b : t_i128) : t_i128 := + Build_t_i128 (Mul_f_mul (i128_0 a) (i128_0 b)). + +Definition wrapping_mul_i16 (a : t_i16) (b : t_i16) : t_i16 := + Build_t_i16 (Mul_f_mul (i16_0 a) (i16_0 b)). + +Definition wrapping_mul_i32 (a : t_i32) (b : t_i32) : t_i32 := + Build_t_i32 (Mul_f_mul (i32_0 a) (i32_0 b)). + +Definition wrapping_mul_i64 (a : t_i64) (b : t_i64) : t_i64 := + Build_t_i64 (Mul_f_mul (i64_0 a) (i64_0 b)). + +Definition wrapping_mul_i8 (a : t_i8) (b : t_i8) : t_i8 := + Build_t_i8 (Mul_f_mul (i8_0 a) (i8_0 b)). + +Definition wrapping_mul_isize (a : t_isize) (b : t_isize) : t_isize := + Build_t_isize (Mul_f_mul (isize_0 a) (isize_0 b)). + +Definition wrapping_mul_u128 (a : t_u128) (b : t_u128) : t_u128 := + Build_t_u128 (Mul_f_mul (u128_0 a) (u128_0 b)). + +Definition wrapping_mul_u16 (a : t_u16) (b : t_u16) : t_u16 := + Build_t_u16 (Mul_f_mul (u16_0 a) (u16_0 b)). + +Definition wrapping_mul_u32 (a : t_u32) (b : t_u32) : t_u32 := + Build_t_u32 (Mul_f_mul (u32_0 a) (u32_0 b)). + +Definition wrapping_mul_u64 (a : t_u64) (b : t_u64) : t_u64 := + Build_t_u64 (Mul_f_mul (u64_0 a) (u64_0 b)). + +Definition wrapping_mul_u8 (a : t_u8) (b : t_u8) : t_u8 := + Build_t_u8 (Mul_f_mul (u8_0 a) (u8_0 b)). + +Definition wrapping_mul_usize (a : t_usize) (b : t_usize) : t_usize := + 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). + +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). + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)=> + Build_t_isize (Sub_f_sub (isize_0 self) (isize_0 other)); + }. + +Definition wrapping_sub_u128 (a : t_u128) (b : t_u128) : t_u128 := + Build_t_u128 (Sub_f_sub (u128_0 a) (u128_0 b)). + +Definition wrapping_sub_u16 (a : t_u16) (b : t_u16) : t_u16 := + Build_t_u16 (Sub_f_sub (u16_0 a) (u16_0 b)). + +Definition wrapping_sub_u32 (a : t_u32) (b : t_u32) : t_u32 := + Build_t_u32 (Sub_f_sub (u32_0 a) (u32_0 b)). + +Definition wrapping_sub_u64 (a : t_u64) (b : t_u64) : t_u64 := + Build_t_u64 (Sub_f_sub (u64_0 a) (u64_0 b)). + +Definition wrapping_sub_u8 (a : t_u8) (b : t_u8) : t_u8 := + Build_t_u8 (Sub_f_sub (u8_0 a) (u8_0 b)). + +Definition wrapping_sub_usize (a : t_usize) (b : t_usize) : t_usize := + 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 (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 (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 (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 (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 (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 (Build_t_usize (Constants_f_ZERO)) (self). + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)=> + Build_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). + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)=> + 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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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). + +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. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +(* 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. *) + +(* Program Definition bswap_u16 (x : t_u16) : t_u16 := *) +(* let count : t_u16 := Into_f_into (0) 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. *) + +(* 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))). *) + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)); + }. + +#[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)=> + Build_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. + +#[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)=> + Build_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. + +#[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)=> + Build_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. + +#[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)=> + Build_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. + +#[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)=> + Build_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. + +#[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)=> + Build_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. + +#[global] Instance t_Not_500984294 : t_Not ((t_u8)) := + { + 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 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)). *) + +#[global] Instance t_Not_560691647 : t_Not ((t_u16)) := + { + 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 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)). *) + +#[global] Instance t_Not_220208504 : t_Not ((t_u32)) := + { + 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 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)). *) + +#[global] Instance t_Not_655044209 : t_Not ((t_u64)) := + { + 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 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)). *) + +#[global] Instance t_Not_851738617 : t_Not ((t_u128)) := + { + 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 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)). *) + +#[global] Instance t_Not_677551814 : t_Not ((t_usize)) := + { + 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 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)). *) + +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. + +#[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; + }. + +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 _) . + +#[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)); + }. + +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 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))) := *) +(* { *) +(* 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; *) +(* }. *) + +#[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)=> + 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 (t_Index := _) (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 new file mode 100644 index 000000000..9b6140c14 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base.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_Base_Spec. +Export Core_Base_Spec. + +From Core Require Import Core_Base_Binary. +Export Core_Base_Binary. + + + +From Core Require Import Core_Base_Pos. +Export Core_Base_Pos. + +From Core Require Import Core_Base_Z. +Export Core_Base_Z. + +(* From Core Require Import Core_Base_Number_conversion. *) +(* Export Core_Base_Number_conversion. *) + +From Core Require Import Core_Base_Seq. +Export Core_Base_Seq. + +(* NotImplementedYet *) + +(* 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 new file mode 100644 index 000000000..c67c519d6 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Binary.v @@ -0,0 +1,162 @@ +(* 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. +Export Core_Base_Spec. + +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 + | POSITIVE_XH => + match match_positive (y) with + | POSITIVE_XH => + r + | POSITIVE_XO (q) + | POSITIVE_XI (q) => + Ordering_Less + end + | 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_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) (rhs : t_Positive) : t_Ordering := + positive_cmp__cmp_binary_cont (lhs) (rhs) (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. + +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)) + end. + +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. + +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)) + 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 + +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 + | 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. + +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 new file mode 100644 index 000000000..286ef8ce0 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Number_conversion.v @@ -0,0 +1,102 @@ +(* 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. +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 new file mode 100644 index 000000000..cfd1242e5 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Pos.v @@ -0,0 +1,421 @@ +(* 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. +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. + +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 => + v_HaxInt_ZERO + | POSITIVE_XO (p) => + positive_to_int (p) + | POSITIVE_XI (p) => + positive_to_int (p) + end + end. + +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_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_succ_double (s : t_HaxInt) : t_Positive := + match match_pos (s) with + | POS_ZERO => + xH + | POS_POS (p) => + xI (p) + end. + +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 => + 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. + +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) + 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) (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 => + v_HaxInt_ZERO + | POS_POS (q) => + bitand_binary (p) (q) + end + end. + +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)) + end + end. + +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)) + 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) (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) + end + end. + +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_Greater + | POS_POS (q) => + positive_cmp (p) (q) + end + end. + +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) (rhs : t_HaxInt) : bool := + match Option_Some (haxint_cmp (lhs) (rhs)) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end. + +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)) + end. + +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)) + end. + +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_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))) + end. + +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)) + end. + +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)) + 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 => + 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. + +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) => + (v_HaxInt_ZERO,v_HaxInt_ONE) + end + | 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) (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) + end + end. + +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) (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 => + v_HaxInt_ZERO + | POS_POS (q) => + positive_to_int (positive_mul (p) (q)) + end + end. + +Definition haxint_rem (lhs : t_HaxInt) (rhs : t_HaxInt) : t_HaxInt := + let (_,r) := haxint_divmod (lhs) (rhs) in + r. 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 new file mode 100644 index 000000000..4e2d5e877 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Seq.v @@ -0,0 +1,270 @@ +(* 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. +Export Core_Base_Spec. + +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_Cmp. +Export Core_Cmp. + +From Core Require Import Core_Marker (t_Sized). +Export Core_Marker (t_Sized). + +From Core Require Import Core_Panicking. +Export Core_Panicking. + +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) `{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 + | LIST_NIL => + true + | LIST_CONS (_) (_) => + false + end. + +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 => + fun HFalse => never_to_any (hd__panic_cold_explicit (tt) (False_rect _ (Bool.diff_false_true HFalse))) + | LIST_CONS (hd) (_) => + fun _ => hd + end Hpre. + +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) *) + | LIST_CONS (_) (tl) => + tl + end. + +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 (PartialEq_f_eq (x) (y)) (eq_inner (xs) (ys)) + end + end. + +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_f_eq := fun (self : t_Seq ((v_T))) (other : t_Seq ((v_T)))=> + eq_inner (Clone_f_clone (self)) (Clone_f_clone (other)); + 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 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 (Hpre := Hpre) (l) + | UNARY_SUCC (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. + + destruct l. + - easy. + - simpl. + + 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) *) + | UNARY_SUCC (m) => + 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)) := + repeat__repeat_unary (unary_from_int (n)) (v). + +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)) + 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) *)). + +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) _) + | 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. +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) (Hpre := ltac:(now rewrite Nnat.N2Nat.id)) (unary_from_int (i)) (v). 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..7a3a4585b --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_Z.v @@ -0,0 +1,377 @@ +(* 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. +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). + +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) => + Z_POS (p) + | Z_ZERO => + Z_ZERO + | Z_POS (p) => + Z_NEG (p) + end. + +Definition z_bitor__n_succ (x : t_POS) : t_Positive := + match x with + | POS_ZERO => + xH + | POS_POS (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 := + 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 => + POS_ZERO + | POS_POS (p) => + POS_POS (xO (p)) + end. + +Definition z_bitor__haxint_ldiff__n_succ_double (x : t_POS) : t_POS := + match x with + | POS_ZERO => + POS_POS (xH) + | POS_POS (p) => + POS_POS (xI (p)) + end. + +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)) + end. + +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)) + end. + +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)) + 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) (rhs : t_POS) : t_POS := + match lhs with + | 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) + end + end. + +Definition z_bitor__n_and (lhs : t_POS) (rhs : t_POS) : t_POS := + match lhs with + | POS_ZERO => + POS_ZERO + | POS_POS (p) => + match rhs with + | POS_ZERO => + POS_ZERO + | POS_POS (q) => + match_pos (bitand_binary (p) (q)) + end + end. + +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) (rhs : t_Z) : t_Z := + 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) (rhs : t_Z) : t_Ordering := + match lhs with + | Z_NEG (p) => + match rhs with + | Z_NEG (q) => + match positive_cmp (p) (q) with + | Ordering_Equal => + Ordering_Equal + | Ordering_Less => + Ordering_Greater + | Ordering_Greater => + Ordering_Less + end + | _ => + Ordering_Less + end + | Z_ZERO => + match rhs with + | Z_ZERO => + Ordering_Equal + | Z_POS (_) => + Ordering_Less + | Z_NEG (_) => + Ordering_Greater + end + | Z_POS (p) => + match rhs with + | Z_POS (q) => + positive_cmp (p) (q) + | _ => + Ordering_Greater + end + end. + +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) (rhs : t_Z) : bool := + match Option_Some (z_cmp (lhs) (rhs)) with + | Option_Some (Ordering_Less) => + true + | _ => + false + end. + +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)) + 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) (rhs : t_Z) : t_Z := + 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) (rhs : t_Z) : t_Z := + z_add (lhs) (z_neg (rhs)). + +Definition z_mul (lhs : t_Z) (rhs : t_Z) : t_Z := + match lhs with + | Z_NEG (p) => + match rhs with + | 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_ZERO + | Z_POS (p) => + match rhs with + | Z_NEG (q) => + Z_NEG (positive_mul (p) (q)) + | Z_ZERO => + Z_ZERO + | Z_POS (q) => + Z_POS (positive_mul (p) (q)) + end + end. + +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) (b : t_Z) : (t_Z*t_Z) := + match a with + | 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 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) (rhs : t_Z) : t_Z := + let (q,_) := z_divmod (lhs) (rhs) in + q. + +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 new file mode 100644 index 000000000..2b2f1b1c2 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface.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_interface_Int. +Export Core_Base_interface_Int. + +From Core Require Import Core_Base_interface_Coerce. +Export Core_Base_interface_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 new file mode 100644 index 000000000..a08de4901 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Coerce.v @@ -0,0 +1,30 @@ +(* 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. +Export Core_Marker. + +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 new file mode 100644 index 000000000..0fa9edfaf --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int.v @@ -0,0 +1,2148 @@ + +(* 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_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). + +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) . + +(* NotImplementedYet *) + +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) . + +(* NotImplementedYet *) + +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) . + +(* NotImplementedYet *) + +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) . + +(* NotImplementedYet *) + +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 *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +#[global] Instance t_Concretization_407178874 : t_Concretization ((t_Z)) ((t_I128)) := + { + Concretization_f_concretize := fun (self : t_Z)=> + Build_t_I128 (self); + }. + +#[global] Instance t_Clone_960918039 : t_Clone ((t_I128)) := + { + Clone_f_clone := fun (self : t_I128)=> + Build_t_I128 (Clone_f_clone (I128_f_v self)); + }. + +#[global] Instance t_Concretization_1068646878 : t_Concretization ((t_Z)) ((t_I64)) := + { + Concretization_f_concretize := fun (self : t_Z)=> + Build_t_I64 (self); + }. + +#[global] Instance t_Clone_305340151 : t_Clone ((t_I64)) := + { + Clone_f_clone := fun (self : t_I64)=> + Build_t_I64 (Clone_f_clone (I64_f_v self)); + }. + +#[global] Instance t_Concretization_499270091 : t_Concretization ((t_Z)) ((t_I32)) := + { + Concretization_f_concretize := fun (self : t_Z)=> + Build_t_I32 (self); + }. + +#[global] Instance t_Clone_774571516 : t_Clone ((t_I32)) := + { + Clone_f_clone := fun (self : t_I32)=> + Build_t_I32 (Clone_f_clone (I32_f_v self)); + }. + +#[global] Instance t_Concretization_432063162 : t_Concretization ((t_Z)) ((t_I16)) := + { + Concretization_f_concretize := fun (self : t_Z)=> + Build_t_I16 (self); + }. + +#[global] Instance t_Clone_611206751 : t_Clone ((t_I16)) := + { + Clone_f_clone := fun (self : t_I16)=> + Build_t_I16 (Clone_f_clone (I16_f_v self)); + }. + +#[global] Instance t_Concretization_232722110 : t_Concretization ((t_Z)) ((t_I8)) := + { + Concretization_f_concretize := fun (self : t_Z)=> + Build_t_I8 (self); + }. + +#[global] Instance t_Clone_122768833 : t_Clone ((t_I8)) := + { + Clone_f_clone := fun (self : t_I8)=> + Build_t_I8 (Clone_f_clone (I8_f_v self)); + }. + +#[global] Instance t_Constants_572255769 : t_Constants ((t_I128)) := + { + 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 := + Build_t_U32 (v_BITS_128_). + +Definition impl_41__WORDSIZE : t_HaxInt := + v_WORDSIZE_128_. + +#[global] Instance t_Constants_908090553 : t_Constants ((t_I64)) := + { + 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 := + Build_t_U32 (v_BITS_64_). + +Definition impl_55__WORDSIZE : t_HaxInt := + v_WORDSIZE_64_. + +#[global] Instance t_Constants_99970330 : t_Constants ((t_I32)) := + { + 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 := + Build_t_U32 (v_BITS_32_). + +Definition impl_69__WORDSIZE : t_HaxInt := + v_WORDSIZE_32_. + +#[global] Instance t_Constants_687261461 : t_Constants ((t_I16)) := + { + 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 := + Build_t_U32 (v_BITS_16_). + +Definition impl_83__WORDSIZE : t_HaxInt := + v_WORDSIZE_16_. + +#[global] Instance t_Constants_636847136 : t_Constants ((t_I8)) := + { + 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 := + Build_t_U32 (v_BITS_8_). + +Definition impl_97__WORDSIZE : t_HaxInt := + v_WORDSIZE_8_. + +#[global] Instance t_Constants_119702187 : t_Constants ((t_U128)) := + { + 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 := + Build_t_U32 (v_BITS_128_). + +Definition impl_111__WORDSIZE : t_HaxInt := + v_WORDSIZE_128_. + +#[global] Instance t_Constants_579677195 : t_Constants ((t_U64)) := + { + 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 := + Build_t_U32 (v_BITS_64_). + +Definition impl_138__WORDSIZE : t_HaxInt := + v_WORDSIZE_64_. + +#[global] Instance t_Constants_63564700 : t_Constants ((t_U32)) := + { + 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 := + Build_t_U32 (v_BITS_32_). + +Definition impl_165__WORDSIZE : t_HaxInt := + v_WORDSIZE_32_. + +#[global] Instance t_Constants_221027212 : t_Constants ((t_U16)) := + { + 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 := + Build_t_U32 (v_BITS_16_). + +Definition impl_192__WORDSIZE : t_HaxInt := + v_WORDSIZE_16_. + +#[global] Instance t_Constants_932070468 : t_Constants ((t_U8)) := + { + 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 := + Build_t_U32 (v_BITS_8_). + +Definition impl_219__WORDSIZE : t_HaxInt := + v_WORDSIZE_8_. + +#[global] Instance t_Clone_138729312 : t_Clone ((t_U128)) := + { + Clone_f_clone := fun (self : t_U128)=> + Build_t_U128 (Clone_f_clone (U128_f_v self)); + }. + +#[global] Instance t_Clone_461763462 : t_Clone ((t_U64)) := + { + Clone_f_clone := fun (self : t_U64)=> + Build_t_U64 (Clone_f_clone (U64_f_v self)); + }. + +#[global] Instance t_Clone_412151272 : t_Clone ((t_U32)) := + { + Clone_f_clone := fun (self : t_U32)=> + Build_t_U32 (Clone_f_clone (U32_f_v self)); + }. + +#[global] Instance t_Clone_387504240 : t_Clone ((t_U16)) := + { + Clone_f_clone := fun (self : t_U16)=> + Build_t_U16 (Clone_f_clone (U16_f_v self)); + }. + +#[global] Instance t_Clone_917943387 : t_Clone ((t_U8)) := + { + Clone_f_clone := fun (self : t_U8)=> + Build_t_U8 (Clone_f_clone (U8_f_v self)); + }. + +#[global] Instance t_Abstraction_970113908 : t_Abstraction ((t_I128)) := + { + Abstraction_f_AbstractType := t_Z; + Abstraction_f_lift := fun (self : t_I128)=> + I128_f_v self; + }. + +#[global] Instance t_From_330503528 : t_From ((t_I8)) ((t_I128)) := + { + From_f_from := fun (x : t_I128)=> + Concretization_f_concretize (Abstraction_f_lift (x) : t_Z); + }. + +#[global] Instance t_From_185067369 : t_From ((t_I16)) ((t_I128)) := + { + From_f_from := fun (x : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (Abstraction_f_lift (x) : t_Z); + }. + +#[globa] Instance t_From_106548803 : t_From ((t_I32)) ((t_I128)) := + { + From_f_from := fun (x : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (Abstraction_f_lift (x) : t_Z); + }. + +#[globa] Instance t_From_237552649 : t_From ((t_I64)) ((t_I128)) := + { + From_f_from := fun (x : t_I128)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (Abstraction_f_lift (x) : t_Z); + }. + +#[globa] Instance t_PartialEq_488790252 : t_PartialEq ((t_I128)) ((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_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); + }. + +#[globa] Instance t_PartialOrd_387128921 : t_PartialOrd ((t_I128)) ((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_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_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_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_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; + }. + +#[globa] Instance t_Abstraction_692501606 : t_Abstraction ((t_I64)) := + { + Abstraction_f_AbstractType := t_Z; + Abstraction_f_lift := fun (self : t_I64)=> + I64_f_v self; + }. + +#[globa] Instance t_From_318313768 : t_From ((t_I8)) ((t_I64)) := + { + From_f_from := fun (x : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I8) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_215423074 : t_From ((t_I16)) ((t_I64)) := + { + From_f_from := fun (x : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_221659723 : t_From ((t_I32)) ((t_I64)) := + { + From_f_from := fun (x : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_927453474 : t_From ((t_I128)) ((t_I64)) := + { + From_f_from := fun (x : t_I64)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_PartialEq_474861724 : t_PartialEq ((t_I64)) ((t_I64)) := + { + 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); + }. + +#[globa] Instance t_PartialOrd_552634265 : t_PartialOrd ((t_I64)) ((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_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_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_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_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; + }. + +#[globa] Instance t_Abstraction_493183574 : t_Abstraction ((t_I32)) := + { + Abstraction_f_AbstractType := t_Z; + Abstraction_f_lift := fun (self : t_I32)=> + I32_f_v self; + }. + +#[globa] Instance t_From_573287156 : t_From ((t_I8)) ((t_I32)) := + { + From_f_from := fun (x : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I8) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_278670998 : t_From ((t_I16)) ((t_I32)) := + { + From_f_from := fun (x : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_697572388 : t_From ((t_I64)) ((t_I32)) := + { + From_f_from := fun (x : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_30146175 : t_From ((t_I128)) ((t_I32)) := + { + From_f_from := fun (x : t_I32)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_PartialEq_795859780 : t_PartialEq ((t_I32)) ((t_I32)) := + { + 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); + }. + +#[globa] Instance t_PartialOrd_126468614 : t_PartialOrd ((t_I32)) ((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_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_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_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_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; + }. + +#[globa] Instance t_Abstraction_8671741 : t_Abstraction ((t_I16)) := + { + Abstraction_f_AbstractType := t_Z; + Abstraction_f_lift := fun (self : t_I16)=> + I16_f_v self; + }. + +#[globa] Instance t_From_767089390 : t_From ((t_I8)) ((t_I16)) := + { + From_f_from := fun (x : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I8) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_339600325 : t_From ((t_I32)) ((t_I16)) := + { + From_f_from := fun (x : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_929749154 : t_From ((t_I64)) ((t_I16)) := + { + From_f_from := fun (x : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_366897745 : t_From ((t_I128)) ((t_I16)) := + { + From_f_from := fun (x : t_I16)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I128) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_PartialEq_359538097 : t_PartialEq ((t_I16)) ((t_I16)) := + { + 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); + }. + +#[globa] Instance t_PartialOrd_524872806 : t_PartialOrd ((t_I16)) ((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_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_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_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_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; + }. + +#[globa] Instance t_Abstraction_78490685 : t_Abstraction ((t_I8)) := + { + Abstraction_f_AbstractType := t_Z; + Abstraction_f_lift := fun (self : t_I8)=> + I8_f_v self; + }. + +#[globa] Instance t_From_995744130 : t_From ((t_I16)) ((t_I8)) := + { + From_f_from := fun (x : t_I8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I16) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_513826093 : t_From ((t_I32)) ((t_I8)) := + { + From_f_from := fun (x : t_I8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I32) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_843443999 : t_From ((t_I64)) ((t_I8)) := + { + From_f_from := fun (x : t_I8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_Z t_I64) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_532428771 : t_From ((t_I128)) ((t_I8)) := + { + From_f_from := fun (x : t_I8)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_Z t_I128) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_PartialEq_594648758 : t_PartialEq ((t_I8)) ((t_I8)) := + { + 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); + }. + +#[globa] Instance t_PartialOrd_221919414 : t_PartialOrd ((t_I8)) ((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_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_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_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_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; + }. + +#[globa] Instance t_Abstraction_133243863 : t_Abstraction ((t_U128)) := + { + Abstraction_f_AbstractType := t_HaxInt; + Abstraction_f_lift := fun (self : t_U128)=> + U128_f_v self; + }. + +#[globa] Instance t_PartialEq_792968920 : t_PartialEq ((t_U128)) ((t_U128)) := + { + 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); + }. + +#[globa] Instance t_PartialOrd_168269581 : t_PartialOrd ((t_U128)) ((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_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_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_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_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; + }. + +#[globa] Instance t_Abstraction_219241396 : t_Abstraction ((t_U64)) := + { + Abstraction_f_AbstractType := t_HaxInt; + Abstraction_f_lift := fun (self : t_U64)=> + U64_f_v self; + }. + +#[globa] Instance t_PartialEq_162514109 : t_PartialEq ((t_U64)) ((t_U64)) := + { + 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); + }. + +#[globa] Instance t_PartialOrd_210240032 : t_PartialOrd ((t_U64)) ((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_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_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_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_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; + }. + +#[globa] Instance t_Abstraction_517050128 : t_Abstraction ((t_U32)) := + { + Abstraction_f_AbstractType := t_HaxInt; + Abstraction_f_lift := fun (self : t_U32)=> + U32_f_v self; + }. + +#[globa] Instance t_PartialEq_894496962 : t_PartialEq ((t_U32)) ((t_U32)) := + { + 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); + }. + +#[globa] Instance t_PartialOrd_534404445 : t_PartialOrd ((t_U32)) ((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_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_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_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_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; + }. + +#[globa] Instance t_Abstraction_994821584 : t_Abstraction ((t_U16)) := + { + Abstraction_f_AbstractType := t_HaxInt; + Abstraction_f_lift := fun (self : t_U16)=> + U16_f_v self; + }. + +#[globa] Instance t_PartialEq_603208302 : t_PartialEq ((t_U16)) ((t_U16)) := + { + 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); + }. + +#[globa] Instance t_PartialOrd_595325431 : t_PartialOrd ((t_U16)) ((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_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_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_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_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; + }. + +#[globa] Instance t_Abstraction_789996186 : t_Abstraction ((t_U8)) := + { + Abstraction_f_AbstractType := t_HaxInt; + Abstraction_f_lift := fun (self : t_U8)=> + U8_f_v self; + }. + +#[globa] Instance t_PartialEq_774173636 : t_PartialEq ((t_U8)) ((t_U8)) := + { + 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); + }. + +#[globa] Instance t_PartialOrd_577399304 : t_PartialOrd ((t_U8)) ((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_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_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_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_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; + }. + +#[globa] Instance t_Neg_375517228 : t_Neg ((t_I128)) := + { + 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))); + }. + +#[globa] Instance t_BitOr_938342430 : t_BitOr ((t_I128)) ((t_I128)) := + { + 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))); + }. + +#[globa] Instance t_Neg_210530286 : t_Neg ((t_I64)) := + { + 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))); + }. + +#[globa] Instance t_BitOr_329754853 : t_BitOr ((t_I64)) ((t_I64)) := + { + 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))); + }. + +#[globa] Instance t_Neg_104016941 : t_Neg ((t_I32)) := + { + 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))); + }. + +#[globa] Instance t_BitOr_840483685 : t_BitOr ((t_I32)) ((t_I32)) := + { + 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))); + }. + +#[globa] Instance t_Neg_1063990797 : t_Neg ((t_I16)) := + { + 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))); + }. + +#[globa] Instance t_BitOr_450806124 : t_BitOr ((t_I16)) ((t_I16)) := + { + 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))); + }. + +#[globa] Instance t_Neg_979719905 : t_Neg ((t_I8)) := + { + Neg_f_Output := t_I8; + Neg_f_neg := fun (self : t_I8)=> + Concretization_f_concretize (z_neg (Abstraction_f_lift (self))); + }. + +#[globa] Instance t_BitOr_828862178 : t_BitOr ((t_I8)) ((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))); + }. + +#[globa] Instance t_Add_749575336 : t_Add ((t_I128)) ((t_I128)) := + { + 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))); + }. + +#[globa] Instance t_Sub_800692471 : t_Sub ((t_I128)) ((t_I128)) := + { + 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))); + }. + +#[globa] Instance t_Add_87367909 : t_Add ((t_I64)) ((t_I64)) := + { + 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))); + }. + +#[globa] Instance t_Sub_741383133 : t_Sub ((t_I64)) ((t_I64)) := + { + 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))); + }. + +#[globa] Instance t_Add_574043038 : t_Add ((t_I32)) ((t_I32)) := + { + 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))); + }. + +#[globa] Instance t_Sub_699874712 : t_Sub ((t_I32)) ((t_I32)) := + { + 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))); + }. + +#[globa] Instance t_Add_413164706 : t_Add ((t_I16)) ((t_I16)) := + { + 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))); + }. + +#[globa] Instance t_Sub_544358249 : t_Sub ((t_I16)) ((t_I16)) := + { + 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))); + }. + +#[globa] Instance t_Add_335735231 : t_Add ((t_I8)) ((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))); + }. + +#[globa] Instance t_Sub_257575332 : t_Sub ((t_I8)) ((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))); + }. + +#[globa] Instance t_Concretization_943450188 : t_Concretization ((t_HaxInt)) ((t_U128)) := + { + Concretization_f_concretize := fun (self : t_HaxInt)=> + Build_t_U128 (haxint_rem (self) (v_WORDSIZE_128_)); + }. + +#[globa] Instance t_From_355161674 : t_From ((t_U128)) ((t_U8)) := + { + From_f_from := fun (x : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U128) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_739905379 : t_From ((t_U128)) ((t_U16)) := + { + From_f_from := fun (x : t_U16)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U128) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_487010006 : t_From ((t_U128)) ((t_U32)) := + { + From_f_from := fun (x : t_U32)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U128) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_665417617 : t_From ((t_U128)) ((t_U64)) := + { + From_f_from := fun (x : t_U64)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U128) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_Concretization_10977439 : t_Concretization ((t_HaxInt)) ((t_U64)) := + { + Concretization_f_concretize := fun (self : t_HaxInt)=> + Build_t_U64 (haxint_rem (self) (v_WORDSIZE_64_)); + }. + +#[globa] Instance t_From_746191059 : t_From ((t_U64)) ((t_U8)) := + { + From_f_from := fun (x : t_U8)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U64) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_598353876 : t_From ((t_U64)) ((t_U16)) := + { + From_f_from := fun (x : t_U16)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U64) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_293255347 : t_From ((t_U64)) ((t_U32)) := + { + From_f_from := fun (x : t_U32)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U64) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_478031507 : t_From ((t_U64)) ((t_U128)) := + { + From_f_from := fun (x : t_U128)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U64) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_Concretization_264065114 : t_Concretization ((t_HaxInt)) ((t_U32)) := + { + Concretization_f_concretize := fun (self : t_HaxInt)=> + Build_t_U32 (haxint_rem (self) (v_WORDSIZE_32_)); + }. + +#[globa] Instance t_From_675834555 : t_From ((t_U32)) ((t_U8)) := + { + From_f_from := fun (x : t_U8)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U32) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_410569540 : t_From ((t_U32)) ((t_U16)) := + { + From_f_from := fun (x : t_U16)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U32) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_616913228 : t_From ((t_U32)) ((t_U64)) := + { + From_f_from := fun (x : t_U64)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U32) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_376625380 : t_From ((t_U32)) ((t_U128)) := + { + From_f_from := fun (x : t_U128)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U32) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_Concretization_656994795 : t_Concretization ((t_HaxInt)) ((t_U16)) := + { + Concretization_f_concretize := fun (self : t_HaxInt)=> + Build_t_U16 (haxint_rem (self) (v_WORDSIZE_16_)); + }. + +#[globa] Instance t_From_352276566 : t_From ((t_U16)) ((t_U8)) := + { + From_f_from := fun (x : t_U8)=> + Concretization_f_concretize (t_Concretization := _ : t_Concretization t_HaxInt t_U16) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_699842532 : t_From ((t_U16)) ((t_U32)) := + { + From_f_from := fun (x : t_U32)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U16) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_326646767 : t_From ((t_U16)) ((t_U64)) := + { + From_f_from := fun (x : t_U64)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U16) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_604186294 : t_From ((t_U16)) ((t_U128)) := + { + From_f_from := fun (x : t_U128)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U16) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_Concretization_492312374 : t_Concretization ((t_HaxInt)) ((t_U8)) := + { + Concretization_f_concretize := fun (self : t_HaxInt)=> + Build_t_U8 (haxint_rem (self) (v_WORDSIZE_8_)); + }. + +#[globa] Instance t_From_374313775 : t_From ((t_U8)) ((t_U16)) := + { + From_f_from := fun (x : t_U16)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U8) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_42776580 : t_From ((t_U8)) ((t_U32)) := + { + From_f_from := fun (x : t_U32)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U8) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_480314375 : t_From ((t_U8)) ((t_U64)) := + { + From_f_from := fun (x : t_U64)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U8) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_From_135782329 : t_From ((t_U8)) ((t_U128)) := + { + From_f_from := fun (x : t_U128)=> + Concretization_f_concretize(t_Concretization := _ : t_Concretization t_HaxInt t_U8) (Abstraction_f_lift (x)); + }. + +#[globa] Instance t_Mul_180009375 : t_Mul ((t_I128)) ((t_I128)) := + { + 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))); + }. + +#[globa] Instance t_Mul_1051209688 : t_Mul ((t_I64)) ((t_I64)) := + { + 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))); + }. + +#[globa] Instance t_Mul_481497752 : t_Mul ((t_I32)) ((t_I32)) := + { + 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))); + }. + +#[globa] Instance t_Mul_768005208 : t_Mul ((t_I16)) ((t_I16)) := + { + 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))); + }. + +#[globa] Instance t_Mul_1057691929 : t_Mul ((t_I8)) ((t_I8)) := + { + 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))); + }. + +#[globa] Instance t_Neg_200638412 : t_Neg ((t_U128)) := + { + 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_))); + }. + +#[globa] Instance t_Mul_508073751 : t_Mul ((t_U128)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_Rem_184769952 : t_Rem ((t_U128)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_Add_74062568 : t_Add ((t_U128)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_Div_697142148 : t_Div ((t_U128)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_Shl_912131656 : t_Shl ((t_U128)) ((t_U8)) := + { + 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))); + }. + +#[globa] Instance t_Shl_188720840 : t_Shl ((t_U128)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Shl_674581806 : t_Shl ((t_U128)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Shl_230523808 : t_Shl ((t_U128)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Shl_304350501 : t_Shl ((t_U128)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_Shr_584068908 : t_Shr ((t_U128)) ((t_U8)) := + { + 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))); + }. + +#[globa] Instance t_Shr_73833277 : t_Shr ((t_U128)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Shr_50912121 : t_Shr ((t_U128)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Shr_282345299 : t_Shr ((t_U128)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Shr_354892033 : t_Shr ((t_U128)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_BitXor_457452962 : t_BitXor ((t_U128)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_BitAnd_499214249 : t_BitAnd ((t_U128)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_BitOr_579754702 : t_BitOr ((t_U128)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_Neg_338880159 : t_Neg ((t_U64)) := + { + 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_))); + }. + +#[globa] Instance t_Mul_785129859 : t_Mul ((t_U64)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Rem_450198244 : t_Rem ((t_U64)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Add_880469818 : t_Add ((t_U64)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Div_1065913959 : t_Div ((t_U64)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Shl_307107617 : t_Shl ((t_U64)) ((t_U8)) := + { + 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))); + }. + +#[globa] Instance t_Shl_521831749 : t_Shl ((t_U64)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Shl_243646433 : t_Shl ((t_U64)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Shl_732371970 : t_Shl ((t_U64)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Shl_362455113 : t_Shl ((t_U64)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_Shr_675607391 : t_Shr ((t_U64)) ((t_U8)) := + { + 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))); + }. + +#[globa] Instance t_Shr_163042579 : t_Shr ((t_U64)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Shr_329072619 : t_Shr ((t_U64)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Shr_1046321056 : t_Shr ((t_U64)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Shr_1027159812 : t_Shr ((t_U64)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_BitXor_771705591 : t_BitXor ((t_U64)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_BitAnd_61309855 : t_BitAnd ((t_U64)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_BitOr_584478327 : t_BitOr ((t_U64)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Neg_660092460 : t_Neg ((t_U32)) := + { + 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_))); + }. + +#[globa] Instance t_Mul_907086750 : t_Mul ((t_U32)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Rem_754047547 : t_Rem ((t_U32)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Add_62760194 : t_Add ((t_U32)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Div_1036065219 : t_Div ((t_U32)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Shl_940272829 : t_Shl ((t_U32)) ((t_U8)) := + { + 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))); + }. + +#[globa] Instance t_Shl_184065944 : t_Shl ((t_U32)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Shl_512141775 : t_Shl ((t_U32)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Shl_760382167 : t_Shl ((t_U32)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Shl_938844716 : t_Shl ((t_U32)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_Shr_376401556 : t_Shr ((t_U32)) ((t_U8)) := + { + 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))); + }. + +#[globa] Instance t_Shr_816225657 : t_Shr ((t_U32)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Shr_131570199 : t_Shr ((t_U32)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Shr_643141508 : t_Shr ((t_U32)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Shr_472576920 : t_Shr ((t_U32)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_BitXor_568575701 : t_BitXor ((t_U32)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_BitAnd_188629984 : t_BitAnd ((t_U32)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_BitOr_727300711 : t_BitOr ((t_U32)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Neg_524209972 : t_Neg ((t_U16)) := + { + 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_))); + }. + +#[globa] Instance t_Mul_813798593 : t_Mul ((t_U16)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Rem_1023129312 : t_Rem ((t_U16)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Add_669194837 : t_Add ((t_U16)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Div_599727096 : t_Div ((t_U16)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Shl_254354835 : t_Shl ((t_U16)) ((t_U8)) := + { + 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))); + }. + +#[globa] Instance t_Shl_786190756 : t_Shl ((t_U16)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Shl_961613024 : t_Shl ((t_U16)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Shl_699049796 : t_Shl ((t_U16)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Shl_98667823 : t_Shl ((t_U16)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_Shr_116990915 : t_Shr ((t_U16)) ((t_U8)) := + { + 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))); + }. + +#[globa] Instance t_Shr_53270962 : t_Shr ((t_U16)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Shr_622272332 : t_Shr ((t_U16)) ((t_U32)) := + { + 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))); + }. + +#[globa] Instance t_Shr_1061476863 : t_Shr ((t_U16)) ((t_U64)) := + { + 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))); + }. + +#[globa] Instance t_Shr_148349277 : t_Shr ((t_U16)) ((t_U128)) := + { + 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))); + }. + +#[globa] Instance t_BitXor_39308972 : t_BitXor ((t_U16)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_BitAnd_100986953 : t_BitAnd ((t_U16)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_BitOr_321212552 : t_BitOr ((t_U16)) ((t_U16)) := + { + 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))); + }. + +#[globa] Instance t_Neg_410091205 : t_Neg ((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_))); + }. + +#[globa] Instance t_Mul_116494850 : t_Mul ((t_U8)) ((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))); + }. + +#[globa] Instance t_Rem_674469245 : t_Rem ((t_U8)) ((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))); + }. + +#[globa] Instance t_Add_886374338 : t_Add ((t_U8)) ((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))); + }. + +#[globa] Instance t_Div_7559770 : t_Div ((t_U8)) ((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))); + }. + +#[globa] Instance t_Shl_889664521 : t_Shl ((t_U8)) ((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))); + }. + +#[globa] Instance t_Shl_268581730 : t_Shl ((t_U8)) ((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))); + }. + +#[globa] Instance t_Shl_833473770 : t_Shl ((t_U8)) ((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))); + }. + +#[globa] Instance t_Shl_896563459 : t_Shl ((t_U8)) ((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))); + }. + +#[globa] Instance t_Shl_595294021 : t_Shl ((t_U8)) ((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))); + }. + +#[globa] Instance t_Shr_467626732 : t_Shr ((t_U8)) ((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))); + }. + +#[globa] Instance t_Shr_985367369 : t_Shr ((t_U8)) ((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))); + }. + +#[globa] Instance t_Shr_868101800 : t_Shr ((t_U8)) ((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))); + }. + +#[globa] Instance t_Shr_300023283 : t_Shr ((t_U8)) ((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))); + }. + +#[globa] Instance t_Shr_794091640 : t_Shr ((t_U8)) ((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))); + }. + +#[globa] Instance t_BitXor_24738444 : t_BitXor ((t_U8)) ((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))); + }. + +#[globa] Instance t_BitAnd_358790390 : t_BitAnd ((t_U8)) ((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))); + }. + +#[globa] Instance t_BitOr_349401480 : t_BitOr ((t_U8)) ((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))); + }. + +#[globa] Instance t_Rem_998027599 : t_Rem ((t_I128)) ((t_I128)) := + { + 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))); + }. + +#[globa] Instance t_Div_865866956 : t_Div ((t_I128)) ((t_I128)) := + { + 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))); + }. + +#[globa] Instance t_Rem_957489424 : t_Rem ((t_I64)) ((t_I64)) := + { + 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))); + }. + +#[globa] Instance t_Div_611785525 : t_Div ((t_I64)) ((t_I64)) := + { + 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))); + }. + +#[globa] Instance t_Rem_219303214 : t_Rem ((t_I32)) ((t_I32)) := + { + 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))); + }. + +#[globa] Instance t_Div_1002924104 : t_Div ((t_I32)) ((t_I32)) := + { + 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))); + }. + +#[globa] Instance t_Rem_948867246 : t_Rem ((t_I16)) ((t_I16)) := + { + 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))); + }. + +#[globa] Instance t_Div_357493436 : t_Div ((t_I16)) ((t_I16)) := + { + 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))); + }. + +#[globa] Instance t_Rem_228000167 : t_Rem ((t_I8)) ((t_I8)) := + { + 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))); + }. + +#[globa] Instance t_Div_470010025 : t_Div ((t_I8)) ((t_I8)) := + { + 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))); + }. + +#[globa] Instance t_Sub_1018502693 : t_Sub ((t_U128)) ((t_U128)) := + { + 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)); + }. + +#[globa] Instance t_Not_758360759 : t_Not ((t_U128)) := + { + Not_f_Output := t_U128; + Not_f_not := fun (self : t_U128)=> + BitXor_f_bitxor (self) (Constants_f_MAX); + }. + +#[globa] Instance t_Sub_919216830 : t_Sub ((t_U64)) ((t_U64)) := + { + 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)); + }. + +#[globa] Instance t_Not_693249901 : t_Not ((t_U64)) := + { + Not_f_Output := t_U64; + Not_f_not := fun (self : t_U64)=> + BitXor_f_bitxor (self) (Constants_f_MAX); + }. + +#[globa] Instance t_Sub_22623594 : t_Sub ((t_U32)) ((t_U32)) := + { + 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)); + }. + +#[globa] Instance t_Not_183316157 : t_Not ((t_U32)) := + { + Not_f_Output := t_U32; + Not_f_not := fun (self : t_U32)=> + BitXor_f_bitxor (self) (Constants_f_MAX); + }. + +#[globa] Instance t_Sub_502320750 : t_Sub ((t_U16)) ((t_U16)) := + { + 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)); + }. + +#[globa] Instance t_Not_669226601 : t_Not ((t_U16)) := + { + Not_f_Output := t_U16; + Not_f_not := fun (self : t_U16)=> + BitXor_f_bitxor (self) (Constants_f_MAX); + }. + +#[globa] Instance t_Sub_299023787 : t_Sub ((t_U8)) ((t_U8)) := + { + 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)); + }. + +#[globa] Instance t_Not_761019181 : t_Not ((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_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..a6b1ef40b --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I128_proofs.v @@ -0,0 +1,65 @@ +(* 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_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 new file mode 100644 index 000000000..9a349820b --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I16_proofs.v @@ -0,0 +1,65 @@ +(* 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_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 new file mode 100644 index 000000000..9ae26ec4a --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I32_proofs.v @@ -0,0 +1,65 @@ +(* 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_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 new file mode 100644 index 000000000..f0492b7d3 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I64_proofs.v @@ -0,0 +1,65 @@ +(* 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_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 new file mode 100644 index 000000000..55cc0bd73 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_I8_proofs.v @@ -0,0 +1,65 @@ +(* 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_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 new file mode 100644 index 000000000..795ef01c7 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U128_proofs.v @@ -0,0 +1,85 @@ +(* 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_interface_Int. +Export Core_Base_interface_Int. + +Lemma abstract_concretize_cancel (x : t_U128) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. + +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. + +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 new file mode 100644 index 000000000..c7dbc1090 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U16_proofs.v @@ -0,0 +1,85 @@ +(* 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_interface_Int. +Export Core_Base_interface_Int. + +Lemma abstract_concretize_cancel (x : t_U16) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. + +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. + +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 new file mode 100644 index 000000000..5b9ca519a --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U32_proofs.v @@ -0,0 +1,85 @@ +(* 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_interface_Int. +Export Core_Base_interface_Int. + +Lemma abstract_concretize_cancel (x : t_U32) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. + +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. + +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 new file mode 100644 index 000000000..a041c9fd2 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U64_proofs.v @@ -0,0 +1,85 @@ +(* 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_interface_Int. +Export Core_Base_interface_Int. + +Lemma abstract_concretize_cancel (x : t_U64) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. + +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. + +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 new file mode 100644 index 000000000..79cab78fc --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Base_interface_Int_U8_proofs.v @@ -0,0 +1,85 @@ +(* 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_interface_Int. +Export Core_Base_interface_Int. + +Lemma abstract_concretize_cancel (x : t_U8) : + -> + PartialEq_f_eq (Concretization_f_concretize (Abstraction_f_lift (Clone_f_clone (x)))) (x) = true. +Proof. Admitted. + +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. + +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 new file mode 100644 index 000000000..929548ba0 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Clone.v @@ -0,0 +1,21 @@ +(* 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. *) + +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 new file mode 100644 index 000000000..afe5cec36 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Cmp.v @@ -0,0 +1,170 @@ +(* 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_Option (t_Option). +Export Core_Option (t_Option). + +Definition discriminant_Ordering_Equal := + 0. + +Definition discriminant_Ordering_Greater := + 1. + +Inductive t_Ordering : Type := +| 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 => + true + | _ => + false + end. + +Definition impl__Ordering__is_gt (self : t_Ordering) : bool := + match self with + | Ordering_Greater => + true + | _ => + false + end. + +Definition impl__Ordering__is_lt (self : t_Ordering) : bool := + match self with + | Ordering_Less => + true + | _ => + false + end. + +Definition impl__Ordering__reverse (self : t_Ordering) : t_Ordering := + match self with + | Ordering_Less => + Ordering_Greater + | Ordering_Equal => + Ordering_Equal + | Ordering_Greater => + Ordering_Less + end. + +Definition discriminant_Ordering_Less := + -1. + +Definition 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 + end. + +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) : bool := + negb (match self with + | Ordering_Less => + true + | _ => + false + end). + +Definition impl__Ordering__is_le (self : t_Ordering) : bool := + negb (match self with + | Ordering_Greater => + true + | _ => + false + end). + +Definition impl__Ordering__is_ne (self : t_Ordering) : bool := + negb (match self with + | Ordering_Equal => + true + | _ => + false + end). + +#[global] Instance t_PartialEq_603824491 : t_PartialEq ((t_Ordering)) ((t_Ordering)) := + { + PartialEq_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_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 new file mode 100644 index 000000000..831daa404 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Convert.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_Marker. +Export Core_Marker. + +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_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 := + { + Into_f_into : v_Self -> v_T; + }. +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)) := + { + Into_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 new file mode 100644 index 000000000..4b1cbcbe0 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Fmt.v @@ -0,0 +1,59 @@ +(* 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 *) + +(* 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 new file mode 100644 index 000000000..71c9c44d7 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Intrinsics.v @@ -0,0 +1,252 @@ +(* 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_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 *) + +(* NotImplementedYet *) + +Notation "'add_with_overflow_i128'" := (add_with_overflow_i128). + +Notation "'add_with_overflow_i16'" := (add_with_overflow_i16). + +Notation "'add_with_overflow_i32'" := (add_with_overflow_i32). + +Notation "'add_with_overflow_i64'" := (add_with_overflow_i64). + +Notation "'add_with_overflow_i8'" := (add_with_overflow_i8). + +Notation "'add_with_overflow_isize'" := (add_with_overflow_isize). + +Notation "'unchecked_add_i128'" := (unchecked_add_i128). + +Notation "'unchecked_add_i16'" := (unchecked_add_i16). + +Notation "'unchecked_add_i32'" := (unchecked_add_i32). + +Notation "'unchecked_add_i64'" := (unchecked_add_i64). + +Notation "'unchecked_add_i8'" := (unchecked_add_i8). + +Notation "'unchecked_add_isize'" := (unchecked_add_isize). + +Notation "'unchecked_add_u128'" := (unchecked_add_u128). + +Notation "'unchecked_add_u16'" := (unchecked_add_u16). + +Notation "'unchecked_add_u32'" := (unchecked_add_u32). + +Notation "'unchecked_add_u64'" := (unchecked_add_u64). + +Notation "'unchecked_add_u8'" := (unchecked_add_u8). + +Notation "'unchecked_add_usize'" := (unchecked_add_usize). + +Notation "'add_with_overflow_u128'" := (add_with_overflow_u128). + +Notation "'add_with_overflow_u16'" := (add_with_overflow_u16). + +Notation "'add_with_overflow_u32'" := (add_with_overflow_u32). + +Notation "'add_with_overflow_u64'" := (add_with_overflow_u64). + +Notation "'add_with_overflow_u8'" := (add_with_overflow_u8). + +Notation "'add_with_overflow_usize'" := (add_with_overflow_usize). + +Notation "'unchecked_div_u128'" := (unchecked_div_u128). + +Notation "'unchecked_div_u16'" := (unchecked_div_u16). + +Notation "'unchecked_div_u32'" := (unchecked_div_u32). + +Notation "'unchecked_div_u64'" := (unchecked_div_u64). + +Notation "'unchecked_div_u8'" := (unchecked_div_u8). + +Notation "'unchecked_div_usize'" := (unchecked_div_usize). + +Notation "'wrapping_add_i128'" := (wrapping_add_i128). + +Notation "'wrapping_add_i16'" := (wrapping_add_i16). + +Notation "'wrapping_add_i32'" := (wrapping_add_i32). + +Notation "'wrapping_add_i64'" := (wrapping_add_i64). + +Notation "'wrapping_add_i8'" := (wrapping_add_i8). + +Notation "'wrapping_add_isize'" := (wrapping_add_isize). + +Notation "'wrapping_sub_i128'" := (wrapping_sub_i128). + +Notation "'wrapping_sub_i16'" := (wrapping_sub_i16). + +Notation "'wrapping_sub_i32'" := (wrapping_sub_i32). + +Notation "'wrapping_sub_i64'" := (wrapping_sub_i64). + +Notation "'wrapping_sub_i8'" := (wrapping_sub_i8). + +Notation "'wrapping_sub_isize'" := (wrapping_sub_isize). + +Notation "'unchecked_div_i128'" := (unchecked_div_i128). + +Notation "'unchecked_div_i16'" := (unchecked_div_i16). + +Notation "'unchecked_div_i32'" := (unchecked_div_i32). + +Notation "'unchecked_div_i64'" := (unchecked_div_i64). + +Notation "'unchecked_div_i8'" := (unchecked_div_i8). + +Notation "'unchecked_div_isize'" := (unchecked_div_isize). + +Notation "'wrapping_add_u128'" := (wrapping_add_u128). + +Notation "'wrapping_add_u16'" := (wrapping_add_u16). + +Notation "'wrapping_add_u32'" := (wrapping_add_u32). + +Notation "'wrapping_add_u64'" := (wrapping_add_u64). + +Notation "'wrapping_add_u8'" := (wrapping_add_u8). + +Notation "'wrapping_add_usize'" := (wrapping_add_usize). + +Notation "'wrapping_mul_i128'" := (wrapping_mul_i128). + +Notation "'wrapping_mul_i16'" := (wrapping_mul_i16). + +Notation "'wrapping_mul_i32'" := (wrapping_mul_i32). + +Notation "'wrapping_mul_i64'" := (wrapping_mul_i64). + +Notation "'wrapping_mul_i8'" := (wrapping_mul_i8). + +Notation "'wrapping_mul_isize'" := (wrapping_mul_isize). + +Notation "'wrapping_mul_u128'" := (wrapping_mul_u128). + +Notation "'wrapping_mul_u16'" := (wrapping_mul_u16). + +Notation "'wrapping_mul_u32'" := (wrapping_mul_u32). + +Notation "'wrapping_mul_u64'" := (wrapping_mul_u64). + +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 new file mode 100644 index 000000000..0a75b31d7 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter.v @@ -0,0 +1,77 @@ +(* 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 Self_Traits (t_Iterator). +Export Self_Traits (t_Iterator). + +From Core Require Import Self_Range (t_Step). +Export Self_Range (t_Step). + +From Core Require Import Self_Traits (t_TrustedStep). +Export Self_Traits (t_TrustedStep). + + + +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 new file mode 100644 index 000000000..64d56e9e3 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Range.v @@ -0,0 +1,224 @@ +(* 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 (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 new file mode 100644 index 000000000..e23436f51 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits.v @@ -0,0 +1,89 @@ +(* 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 Self_Collect (t_IntoIterator). +Export Self_Collect (t_IntoIterator). + +From Core Require Import Self_Exact_size (t_ExactSizeIterator). +Export Self_Exact_size (t_ExactSizeIterator). + +From Core Require Import Self_Iterator (t_Iterator). +Export Self_Iterator (t_Iterator). + + + +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 new file mode 100644 index 000000000..72ea07ca9 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Collect.v @@ -0,0 +1,85 @@ +(* 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_Iter_Traits (t_Iterator). +Export Core_Iter_Traits (t_Iterator). + +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 new file mode 100644 index 000000000..bcae322f5 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Exact_size.v @@ -0,0 +1,67 @@ +(* 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_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 new file mode 100644 index 000000000..2cef98822 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Iterator.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_Marker. +Export Core_Marker. + +From Core Require Import Core_Option. +Export Core_Option. + +From Core Require Import Core_Primitive. +Export Core_Primitive. + +From Core Require Import Core_Ops_Function. +Export Core_Ops_Function. + +Class t_Iterator (v_Self : Type) : Type := + { + Iterator_f_Item : Type; + _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; + }. +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 new file mode 100644 index 000000000..b68138666 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Iter_Traits_Marker.v @@ -0,0 +1,80 @@ +(* 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_Iter (t_Step). +Export Core_Iter (t_Step). + +Class t_TrustedFused (v_Self : Type) : Type := + { + }. +Arguments t_TrustedFused (_). + +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 new file mode 100644 index 000000000..49ff0e074 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Marker.v @@ -0,0 +1,46 @@ + +(* 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_Clone (t_Clone). +Export Core_Clone (t_Clone). + +Class t_Copy (v_Self : Type) `{t_Clone (v_Self)} : Type := + { + }. +Arguments t_Copy (_) {_}. + +Class t_Destruct (v_Self : Type) : Type := + { + }. +Arguments t_Destruct (_). + +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 := + { + }. +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 new file mode 100644 index 000000000..fcb768d78 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Num.v @@ -0,0 +1,498 @@ + +(* 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_interface. +Export Core_Base_interface. + +From Core Require Import Core_Primitive. +Export Core_Primitive. + +From Core Require Import Core_Intrinsics. +Export Core_Intrinsics. + +From Core Require Import Core_Ops_Index. +Export Core_Ops_Index. + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +Notation "'impl_10__from_le'" := (from_le715594649). + +Notation "'impl_10__to_le'" := (to_le902648378). + +Notation "'impl_7__from_le'" := (from_le793045973). + +Notation "'impl_7__to_le'" := (to_le1012469456). + +Notation "'impl_8__from_le'" := (from_le706338679). + +Notation "'impl_8__to_le'" := (to_le724624277). + +Notation "'impl_9__from_le'" := (from_le435089922). + +Notation "'impl_9__to_le'" := (to_le2703875). + +Notation "'impl_6__from_le'" := (from_le529489651). + +Notation "'impl_6__to_le'" := (to_le523556665). + +Notation "'impl_11__from_le'" := (from_le418743864). + +Notation "'impl_11__to_le'" := (to_le946822077). + +Notation "'impl__BITS'" := (v_BITS80497669). + +Notation "'impl__MAX'" := (v_MAX626626007). + +Notation "'impl__MIN'" := (v_MIN19747349). + +Notation "'impl__i16__BITS'" := (v_BITS421056295). + +Notation "'impl__i16__MAX'" := (v_MAX474501300). + +Notation "'impl__i16__MIN'" := (v_MIN776391606). + +Notation "'impl__i32__BITS'" := (v_BITS465526498). + +Notation "'impl__i32__MAX'" := (v_MAX106630818). + +Notation "'impl__i32__MIN'" := (v_MIN682967538). + +Notation "'impl__i64__BITS'" := (v_BITS419886578). + +Notation "'impl__i64__MAX'" := (v_MAX527043787). + +Notation "'impl__i64__MIN'" := (v_MIN654206259). + +Notation "'impl__i128__BITS'" := (v_BITS992667165). + +Notation "'impl__i128__MAX'" := (v_MAX375377319). + +Notation "'impl__i128__MIN'" := (v_MIN79612531). + +Notation "'impl__isize__BITS'" := (v_BITS211584016). + +Notation "'impl__isize__MAX'" := (v_MAX937003029). + +Notation "'impl__isize__MIN'" := (v_MIN1017039533). + +Notation "'impl_6__BITS'" := (v_BITS690311813). + +Notation "'impl_6__MAX'" := (v_MAX310118176). + +Notation "'impl_6__MIN'" := (v_MIN41851434). + +Notation "'impl_7__BITS'" := (v_BITS277333551). + +Notation "'impl_7__MAX'" := (v_MAX487295910). + +Notation "'impl_7__MIN'" := (v_MIN592300287). + +Notation "'impl_8__BITS'" := (v_BITS473478051). + +Notation "'impl_8__MAX'" := (v_MAX826434525). + +Notation "'impl_8__MIN'" := (v_MIN932777089). + +Notation "'impl_9__BITS'" := (v_BITS177666292). + +Notation "'impl_9__MAX'" := (v_MAX815180633). + +Notation "'impl_9__MIN'" := (v_MIN631333594). + +Notation "'impl_10__BITS'" := (v_BITS136999051). + +Notation "'impl_10__MAX'" := (v_MAX404543799). + +Notation "'impl_10__MIN'" := (v_MIN668621698). + +Notation "'impl_11__BITS'" := (v_BITS229952196). + +Notation "'impl_11__MAX'" := (v_MAX750570916). + +Notation "'impl_11__MIN'" := (v_MIN861571008). + +Notation "'impl__is_negative'" := (is_negative350273175). + +Notation "'impl__is_positive'" := (is_positive286955196). + +Notation "'impl__signum'" := (signum721334203). + +Notation "'impl__i16__is_negative'" := (is_negative477067241). + +Notation "'impl__i16__is_positive'" := (is_positive821581438). + +Notation "'impl__i16__signum'" := (signum243706004). + +Notation "'impl__i32__is_negative'" := (is_negative1035644813). + +Notation "'impl__i32__is_positive'" := (is_positive401652342). + +Notation "'impl__i32__signum'" := (signum323641039). + +Notation "'impl__i64__is_negative'" := (is_negative1066124578). + +Notation "'impl__i64__is_positive'" := (is_positive16569358). + +Notation "'impl__i64__signum'" := (signum582963664). + +Notation "'impl__i128__is_negative'" := (is_negative221698470). + +Notation "'impl__i128__is_positive'" := (is_positive883218309). + +Notation "'impl__i128__signum'" := (signum408800799). + +Notation "'impl__isize__is_negative'" := (is_negative693446369). + +Notation "'impl__isize__is_positive'" := (is_positive169998680). + +Notation "'impl__isize__signum'" := (signum91486536). + +Notation "'impl_6__checked_add'" := (checked_add268751055). + +Notation "'impl_7__checked_add'" := (checked_add132377399). + +Notation "'impl_8__checked_add'" := (checked_add985437730). + +Notation "'impl_9__checked_add'" := (checked_add586246465). + +Notation "'impl_10__checked_add'" := (checked_add218978451). + +Notation "'impl_11__checked_add'" := (checked_add984013567). + +Notation "'impl__wrapping_add'" := (wrapping_add634491935). + +Notation "'impl__wrapping_sub'" := (wrapping_sub973428293). + +Notation "'impl__wrapping_neg'" := (wrapping_neg400701205). + +Notation "'impl__wrapping_abs'" := (wrapping_abs400396545). + +Notation "'impl__i16__wrapping_add'" := (wrapping_add868559108). + +Notation "'impl__i16__wrapping_sub'" := (wrapping_sub189469152). + +Notation "'impl__i16__wrapping_neg'" := (wrapping_neg860505723). + +Notation "'impl__i16__wrapping_abs'" := (wrapping_abs229076826). + +Notation "'impl__i32__wrapping_add'" := (wrapping_add475006616). + +Notation "'impl__i32__wrapping_sub'" := (wrapping_sub298337071). + +Notation "'impl__i32__wrapping_neg'" := (wrapping_neg636433078). + +Notation "'impl__i32__wrapping_abs'" := (wrapping_abs729536875). + +Notation "'impl__i64__wrapping_add'" := (wrapping_add590074241). + +Notation "'impl__i64__wrapping_sub'" := (wrapping_sub334584751). + +Notation "'impl__i64__wrapping_neg'" := (wrapping_neg868282938). + +Notation "'impl__i64__wrapping_abs'" := (wrapping_abs285829312). + +Notation "'impl__i128__wrapping_add'" := (wrapping_add251385439). + +Notation "'impl__i128__wrapping_sub'" := (wrapping_sub681598071). + +Notation "'impl__i128__wrapping_neg'" := (wrapping_neg446546984). + +Notation "'impl__i128__wrapping_abs'" := (wrapping_abs281925696). + +Notation "'impl__isize__wrapping_add'" := (wrapping_add226040243). + +Notation "'impl__isize__wrapping_sub'" := (wrapping_sub698035192). + +Notation "'impl__isize__wrapping_neg'" := (wrapping_neg912291768). + +Notation "'impl__isize__wrapping_abs'" := (wrapping_abs347300819). + +Notation "'impl_6__checked_div'" := (checked_div508301931). + +Notation "'impl_6__overflowing_add'" := (overflowing_add708890057). + +Notation "'impl_7__checked_div'" := (checked_div614920780). + +Notation "'impl_7__overflowing_add'" := (overflowing_add1023344178). + +Notation "'impl_8__checked_div'" := (checked_div979383477). + +Notation "'impl_8__overflowing_add'" := (overflowing_add905744292). + +Notation "'impl_9__checked_div'" := (checked_div988689127). + +Notation "'impl_9__overflowing_add'" := (overflowing_add581983607). + +Notation "'impl_10__checked_div'" := (checked_div344106746). + +Notation "'impl_10__overflowing_add'" := (overflowing_add458293681). + +Notation "'impl_11__checked_div'" := (checked_div80223906). + +Notation "'impl_11__overflowing_add'" := (overflowing_add682280407). + +Notation "'impl__abs'" := (abs945505614). + +Notation "'impl__i16__abs'" := (abs581170970). + +Notation "'impl__i32__abs'" := (abs590464694). + +Notation "'impl__i64__abs'" := (abs654781043). + +Notation "'impl__i128__abs'" := (abs204417539). + +Notation "'impl__isize__abs'" := (abs220926056). + +Notation "'impl_6__wrapping_add'" := (wrapping_add480603777). + +Notation "'impl_6__wrapping_mul'" := (wrapping_mul885216284). + +Notation "'impl_7__wrapping_add'" := (wrapping_add124432709). + +Notation "'impl_7__wrapping_mul'" := (wrapping_mul14465189). + +Notation "'impl_8__wrapping_add'" := (wrapping_add1049665857). + +Notation "'impl_8__wrapping_mul'" := (wrapping_mul203346768). + +Notation "'impl_9__wrapping_add'" := (wrapping_add865565639). + +Notation "'impl_9__wrapping_mul'" := (wrapping_mul742978873). + +Notation "'impl_10__wrapping_add'" := (wrapping_add40844100). + +Notation "'impl_10__wrapping_mul'" := (wrapping_mul294115024). + +Notation "'impl_11__wrapping_add'" := (wrapping_add427637036). + +Notation "'impl_11__wrapping_mul'" := (wrapping_mul680896953). + +Notation "'impl_6__wrapping_sub'" := (wrapping_sub403906422). + +Notation "'impl_6__wrapping_neg'" := (wrapping_neg123212788). + +Notation "'impl_7__wrapping_sub'" := (wrapping_sub811251034). + +Notation "'impl_7__wrapping_neg'" := (wrapping_neg128555595). + +Notation "'impl_8__wrapping_sub'" := (wrapping_sub708953500). + +Notation "'impl_8__wrapping_neg'" := (wrapping_neg328220773). + +Notation "'impl_9__wrapping_sub'" := (wrapping_sub762520851). + +Notation "'impl_9__wrapping_neg'" := (wrapping_neg617136337). + +Notation "'impl_10__wrapping_sub'" := (wrapping_sub409310259). + +Notation "'impl_10__wrapping_neg'" := (wrapping_neg729451428). + +Notation "'impl_11__wrapping_sub'" := (wrapping_sub813101882). + +Notation "'impl_11__wrapping_neg'" := (wrapping_neg342773446). + +Notation "'impl_6__wrapping_div'" := (wrapping_div660080892). + +Notation "'impl_6__wrapping_div_euclid'" := (wrapping_div_euclid481233436). + +Notation "'impl_7__wrapping_div'" := (wrapping_div366977334). + +Notation "'impl_7__wrapping_div_euclid'" := (wrapping_div_euclid22267888). + +Notation "'impl_8__wrapping_div'" := (wrapping_div931150450). + +Notation "'impl_8__wrapping_div_euclid'" := (wrapping_div_euclid606291997). + +Notation "'impl_9__wrapping_div'" := (wrapping_div168427046). + +Notation "'impl_9__wrapping_div_euclid'" := (wrapping_div_euclid321252086). + +Notation "'impl_10__wrapping_div'" := (wrapping_div692427683). + +Notation "'impl_10__wrapping_div_euclid'" := (wrapping_div_euclid926334515). + +Notation "'impl_11__wrapping_div'" := (wrapping_div905768546). + +Notation "'impl_11__wrapping_div_euclid'" := (wrapping_div_euclid90317722). + +Notation "'impl_6__wrapping_rem'" := (wrapping_rem984569721). + +Notation "'impl_6__wrapping_rem_euclid'" := (wrapping_rem_euclid946579345). + +Notation "'impl_7__wrapping_rem'" := (wrapping_rem378598035). + +Notation "'impl_7__wrapping_rem_euclid'" := (wrapping_rem_euclid602402638). + +Notation "'impl_8__wrapping_rem'" := (wrapping_rem292009099). + +Notation "'impl_8__wrapping_rem_euclid'" := (wrapping_rem_euclid1020271291). + +Notation "'impl_9__wrapping_rem'" := (wrapping_rem390602260). + +Notation "'impl_9__wrapping_rem_euclid'" := (wrapping_rem_euclid839264546). + +Notation "'impl_10__wrapping_rem'" := (wrapping_rem332379920). + +Notation "'impl_10__wrapping_rem_euclid'" := (wrapping_rem_euclid646122423). + +Notation "'impl_11__wrapping_rem'" := (wrapping_rem333089373). + +Notation "'impl_11__wrapping_rem_euclid'" := (wrapping_rem_euclid769656504). + +Notation "'impl_6__rotate_left'" := (rotate_left792925914). + +Notation "'impl_6__rotate_right'" := (rotate_right166090082). + +Notation "'impl_7__rotate_left'" := (rotate_left297034175). + +Notation "'impl_7__rotate_right'" := (rotate_right138522246). + +Notation "'impl_8__rotate_left'" := (rotate_left823573251). + +Notation "'impl_8__rotate_right'" := (rotate_right869195717). + +Notation "'impl_9__rotate_left'" := (rotate_left618936072). + +Notation "'impl_9__rotate_right'" := (rotate_right1041614027). + +Notation "'impl_10__rotate_left'" := (rotate_left1065866885). + +Notation "'impl_10__rotate_right'" := (rotate_right591112338). + +Notation "'impl_11__rotate_left'" := (rotate_left996672710). + +Notation "'impl_11__rotate_right'" := (rotate_right442734174). + +(* Notation "'impl_6__count_ones'" := (count_ones202509899). *) + +(* Notation "'impl_6__leading_zeros'" := (leading_zeros75047366). *) + +(* Notation "'impl_6__swap_bytes'" := (swap_bytes657156997). *) + +(* Notation "'impl_6__from_be'" := (from_be746282521). *) + +(* Notation "'impl_6__to_be'" := (to_be972448780). *) + +(* Notation "'impl_6__trailing_zeros'" := (trailing_zeros572929871). *) + +(* Notation "'impl_7__count_ones'" := (count_ones91875752). *) + +(* Notation "'impl_7__leading_zeros'" := (leading_zeros462412478). *) + +(* Notation "'impl_7__swap_bytes'" := (swap_bytes926722059). *) + +(* Notation "'impl_7__from_be'" := (from_be510959665). *) + +(* Notation "'impl_7__to_be'" := (to_be551590602). *) + +(* Notation "'impl_7__trailing_zeros'" := (trailing_zeros421474733). *) + +(* Notation "'impl_8__count_ones'" := (count_ones776185738). *) + +(* Notation "'impl_8__leading_zeros'" := (leading_zeros698221972). *) + +(* Notation "'impl_8__swap_bytes'" := (swap_bytes320480126). *) + +(* Notation "'impl_8__from_be'" := (from_be664756649). *) + +(* Notation "'impl_8__to_be'" := (to_be82825962). *) + +(* Notation "'impl_8__trailing_zeros'" := (trailing_zeros1061560720). *) + +(* Notation "'impl_9__count_ones'" := (count_ones235885653). *) + +(* Notation "'impl_9__leading_zeros'" := (leading_zeros338302110). *) + +(* Notation "'impl_9__swap_bytes'" := (swap_bytes722254271). *) + +(* Notation "'impl_9__from_be'" := (from_be16013635). *) + +(* Notation "'impl_9__to_be'" := (to_be376714729). *) + +(* Notation "'impl_9__trailing_zeros'" := (trailing_zeros188346231). *) + +(* Notation "'impl_10__count_ones'" := (count_ones926736261). *) + +(* Notation "'impl_10__leading_zeros'" := (leading_zeros19644612). *) + +(* Notation "'impl_10__swap_bytes'" := (swap_bytes420879368). *) + +(* Notation "'impl_10__from_be'" := (from_be191085771). *) + +(* Notation "'impl_10__to_be'" := (to_be555075987). *) + +(* Notation "'impl_10__trailing_zeros'" := (trailing_zeros821715250). *) + +(* Notation "'impl_11__count_ones'" := (count_ones441645762). *) + +(* Notation "'impl_11__leading_zeros'" := (leading_zeros905233489). *) + +(* Notation "'impl_11__swap_bytes'" := (swap_bytes268673424). *) + +(* Notation "'impl_11__from_be'" := (from_be607978059). *) + +(* Notation "'impl_11__to_be'" := (to_be561847134). *) + +(* Notation "'impl_11__trailing_zeros'" := (trailing_zeros42066260). *) + +Notation "'impl__rem_euclid'" := (rem_euclid622298453). + +Notation "'impl__i16__rem_euclid'" := (rem_euclid158017644). + +Notation "'impl__i32__rem_euclid'" := (rem_euclid881249982). + +Notation "'impl__i64__rem_euclid'" := (rem_euclid1057082210). + +Notation "'impl__i128__rem_euclid'" := (rem_euclid254910751). + +Notation "'impl__isize__rem_euclid'" := (rem_euclid828379367). + +(* Notation "'impl_6__count_zeros'" := (count_zeros558337492). *) + +(* Notation "'impl_6__leading_ones'" := (leading_ones55148479). *) + +(* Notation "'impl_6__trailing_ones'" := (trailing_ones359778731). *) + +(* Notation "'impl_7__count_zeros'" := (count_zeros199825317). *) + +(* Notation "'impl_7__leading_ones'" := (leading_ones164277656). *) + +(* Notation "'impl_7__trailing_ones'" := (trailing_ones903944727). *) + +(* Notation "'impl_8__count_zeros'" := (count_zeros942566041). *) + +(* Notation "'impl_8__leading_ones'" := (leading_ones766486760). *) + +(* Notation "'impl_8__trailing_ones'" := (trailing_ones223371510). *) + +(* Notation "'impl_9__count_zeros'" := (count_zeros60346158). *) + +(* Notation "'impl_9__leading_ones'" := (leading_ones404666910). *) + +(* Notation "'impl_9__trailing_ones'" := (trailing_ones601201120). *) + +(* Notation "'impl_10__count_zeros'" := (count_zeros824862815). *) + +(* Notation "'impl_10__leading_ones'" := (leading_ones475503572). *) + +(* Notation "'impl_10__trailing_ones'" := (trailing_ones705845381). *) + +(* 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 new file mode 100644 index 000000000..4b1cbcbe0 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Num_Int_macros.v @@ -0,0 +1,59 @@ +(* 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 *) + +(* 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 new file mode 100644 index 000000000..ddc4bf8db --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Num_Uint_macros.v @@ -0,0 +1,15 @@ +(* 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. *) + +(* 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 new file mode 100644 index 000000000..753112299 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops.v @@ -0,0 +1,82 @@ +(* 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_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. +Export Core_Ops_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 *) + +(* 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 new file mode 100644 index 000000000..f76ce2826 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith.v @@ -0,0 +1,68 @@ +(* 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 (t_Sized). +Export Core_Marker (t_Sized). + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +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 (_) (_) {_}. + +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 (_) (_) {_}. + +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 (_) (_) {_}. + +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 new file mode 100644 index 000000000..0ce6ebbe7 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Arith_Impls_for_prims.v @@ -0,0 +1,241 @@ +(* 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_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). + + + +From Core Require Import Core_Primitive (t_i8). +Export Core_Primitive (t_i8). + +From Core Require Import Core_Primitive (t_i16). +Export Core_Primitive (t_i16). + +From Core Require Import Core_Primitive (t_i32). +Export Core_Primitive (t_i32). + +From Core Require Import Core_Primitive (t_i64). +Export Core_Primitive (t_i64). + +From Core Require Import Core_Primitive (t_i128). +Export Core_Primitive (t_i128). + +From Core Require Import Core_Primitive (t_isize). +Export Core_Primitive (t_isize). + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +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). + +Notation "'impl_12'" := (impl_12). + +Notation "'impl_13'" := (impl_13). + +Notation "'impl_14'" := (impl_14). + +Notation "'impl_15'" := (impl_15). + +Notation "'impl_16'" := (impl_16). + +Notation "'impl_17'" := (impl_17). + +Notation "'impl_24'" := (impl_24). + +Notation "'impl_25'" := (impl_25). + +Notation "'impl_26'" := (impl_26). + +Notation "'impl_27'" := (impl_27). + +Notation "'impl_28'" := (impl_28). + +Notation "'impl_29'" := (impl_29). + +Notation "'impl_6'" := (impl_6). + +Notation "'impl_7'" := (impl_7). + +Notation "'impl_8'" := (impl_8). + +Notation "'impl_9'" := (impl_9). + +Notation "'impl_10'" := (impl_10). + +Notation "'impl_11'" := (impl_11). + +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_54'" := (impl_54). + +Notation "'impl_55'" := (impl_55). + +Notation "'impl_56'" := (impl_56). + +Notation "'impl_57'" := (impl_57). + +Notation "'impl_58'" := (impl_58). + +Notation "'impl_59'" := (impl_59). + +Notation "'impl_18'" := (impl_18). + +Notation "'impl_19'" := (impl_19). + +Notation "'impl_20'" := (impl_20). + +Notation "'impl_21'" := (impl_21). + +Notation "'impl_22'" := (impl_22). + +Notation "'impl_23'" := (impl_23). + +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). + +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 new file mode 100644 index 000000000..3c779c97c --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit.v @@ -0,0 +1,66 @@ +(* 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 (t_Sized). +Export Core_Marker (t_Sized). + +(* NotImplementedYet *) + +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 (_) (_) {_}. + +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 (_) (_) {_}. + +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 (_) (_) {_}. + +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 new file mode 100644 index 000000000..cf1efa19d --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Bit_Impls_for_prims.v @@ -0,0 +1,317 @@ +(* 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_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). + + + +From Core Require Import Core_Primitive (t_i8). +Export Core_Primitive (t_i8). + +From Core Require Import Core_Primitive (t_i16). +Export Core_Primitive (t_i16). + +From Core Require Import Core_Primitive (t_i32). +Export Core_Primitive (t_i32). + +From Core Require Import Core_Primitive (t_i64). +Export Core_Primitive (t_i64). + +From Core Require Import Core_Primitive (t_i128). +Export Core_Primitive (t_i128). + +From Core Require Import Core_Primitive (t_isize). +Export Core_Primitive (t_isize). + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +Notation "'impl_84'" := (impl_84). + +Notation "'impl_85'" := (impl_85). + +Notation "'impl_86'" := (impl_86). + +Notation "'impl_87'" := (impl_87). + +Notation "'impl_88'" := (impl_88). + +Notation "'impl_89'" := (impl_89). + +Notation "'impl_6'" := (impl_6). + +Notation "'impl_7'" := (impl_7). + +Notation "'impl_8'" := (impl_8). + +Notation "'impl_9'" := (impl_9). + +Notation "'impl_10'" := (impl_10). + +Notation "'impl_11'" := (impl_11). + +Notation "'impl_12'" := (impl_12). + +Notation "'impl_13'" := (impl_13). + +Notation "'impl_14'" := (impl_14). + +Notation "'impl_15'" := (impl_15). + +Notation "'impl_16'" := (impl_16). + +Notation "'impl_17'" := (impl_17). + +Notation "'impl_18'" := (impl_18). + +Notation "'impl_19'" := (impl_19). + +Notation "'impl_20'" := (impl_20). + +Notation "'impl_21'" := (impl_21). + +Notation "'impl_22'" := (impl_22). + +Notation "'impl_23'" := (impl_23). + +Notation "'impl_24'" := (impl_24). + +Notation "'impl_25'" := (impl_25). + +Notation "'impl_26'" := (impl_26). + +Notation "'impl_27'" := (impl_27). + +Notation "'impl_28'" := (impl_28). + +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). + +Notation "'impl_53'" := (impl_53). + +Notation "'impl_54'" := (impl_54). + +Notation "'impl_55'" := (impl_55). + +Notation "'impl_56'" := (impl_56). + +Notation "'impl_57'" := (impl_57). + +Notation "'impl_58'" := (impl_58). + +Notation "'impl_59'" := (impl_59). + +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). + +Notation "'impl_66'" := (impl_66). + +Notation "'impl_67'" := (impl_67). + +Notation "'impl_68'" := (impl_68). + +Notation "'impl_69'" := (impl_69). + +Notation "'impl_70'" := (impl_70). + +Notation "'impl_71'" := (impl_71). + +Notation "'impl_72'" := (impl_72). + +Notation "'impl_73'" := (impl_73). + +Notation "'impl_74'" := (impl_74). + +Notation "'impl_75'" := (impl_75). + +Notation "'impl_76'" := (impl_76). + +Notation "'impl_77'" := (impl_77). + +Notation "'impl_78'" := (impl_78). + +Notation "'impl_79'" := (impl_79). + +Notation "'impl_80'" := (impl_80). + +Notation "'impl_81'" := (impl_81). + +Notation "'impl_82'" := (impl_82). + +Notation "'impl_83'" := (impl_83). + +Notation "'impl_90'" := (impl_90). + +Notation "'impl_91'" := (impl_91). + +Notation "'impl_92'" := (impl_92). + +Notation "'impl_93'" := (impl_93). + +Notation "'impl_94'" := (impl_94). + +Notation "'impl_95'" := (impl_95). + +Notation "'impl_96'" := (impl_96). + +Notation "'impl_97'" := (impl_97). + +Notation "'impl_98'" := (impl_98). + +Notation "'impl_99'" := (impl_99). + +Notation "'impl_100'" := (impl_100). + +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 new file mode 100644 index 000000000..e1f66c0a9 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Function.v @@ -0,0 +1,47 @@ +(* 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. +Export Core_Marker. + +(* NotImplementedYet *) + +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 (_) (_) {_} (* {_} {_} *). + + + +#[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_Ops_Index.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v new file mode 100644 index 000000000..9ff5aa568 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index.v @@ -0,0 +1,20 @@ +(* 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. *) + +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 new file mode 100644 index 000000000..e43ff9e4b --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Index_range.v @@ -0,0 +1,63 @@ +(* 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_Primitive. +Export Core_Primitive. + +From Core Require Import Core_Iter_Traits_Iterator. +Export Core_Iter_Traits_Iterator. + +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 (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 := 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_f_sub (IndexRange_f_end self) (IndexRange_f_start self). + +Program Instance t_Iterator_538767852 : t_Iterator ((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_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_Ops_Range.v b/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v new file mode 100644 index 000000000..e711f3c73 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Ops_Range.v @@ -0,0 +1,27 @@ +(* 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. +Export Core_Marker. + +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 new file mode 100644 index 000000000..a9e834b9e --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Option.v @@ -0,0 +1,84 @@ +(* 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_Clone. +Export Core_Clone. + +From Core Require Import Core_Marker (t_Sized). +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 -> _. +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_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 (_) => + true + | _ => + false + 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). *) + +(* 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 (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. *) diff --git a/proof-libs/coq/coq/generated-core/src/Core_Panicking.v b/proof-libs/coq/coq/generated-core/src/Core_Panicking.v new file mode 100644 index 000000000..42d61e406 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Panicking.v @@ -0,0 +1,30 @@ +(* 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. *) + +Inductive t_Never : Type := +. + +Definition t_Never_cast_to_repr (x : t_Never) : t_Never := + match x with + end. + +Definition never_to_any `{v_T : Type} (x : t_Never) : v_T := + (match x with + end). + +Definition panic (expr : string) {HFalse : t_Never} : t_Never := + never_to_any HFalse. + +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 new file mode 100644 index 000000000..68e97b241 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive.v @@ -0,0 +1,179 @@ +(* 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_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. + +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 "'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 new file mode 100644 index 000000000..86e23f37b --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion.v @@ -0,0 +1,110 @@ +(* 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_Primitive. +Export Core_Primitive. + +From Core Require Import Core_Cmp. +Export Core_Cmp. + +From Core Require Import Core_Convert. +Export Core_Convert. + +(* NotImplementedYet *) + +(* NotImplementedYet *) + +(* Notation "'impl_31'" := (impl_31). *) + +(* Notation "'impl_40'" := (impl_40). *) + +(* 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). *) + +(* Notation "'impl_6'" := (impl_6). *) + +(* Notation "'impl_7'" := (impl_7). *) + +(* Notation "'impl_8'" := (impl_8). *) + +(* Notation "'impl_9'" := (impl_9). *) + +(* Notation "'impl_10'" := (impl_10). *) + +(* Notation "'impl_11'" := (impl_11). *) + +(* Notation "'impl_12'" := (impl_12). *) + +(* Notation "'impl_13'" := (impl_13). *) + +(* Notation "'impl_14'" := (impl_14). *) + +(* Notation "'impl_15'" := (impl_15). *) + +(* Notation "'impl_16'" := (impl_16). *) + +(* Notation "'impl_17'" := (impl_17). *) + +(* Notation "'impl_18'" := (impl_18). *) + +(* Notation "'impl_19'" := (impl_19). *) + +(* Notation "'impl_20'" := (impl_20). *) + +(* Notation "'impl_21'" := (impl_21). *) + +(* Notation "'impl_22'" := (impl_22). *) + +(* Notation "'impl_23'" := (impl_23). *) + +(* Notation "'impl_24'" := (impl_24). *) + +(* Notation "'impl_25'" := (impl_25). *) + +(* Notation "'impl_26'" := (impl_26). *) + +(* Notation "'impl_27'" := (impl_27). *) + +(* Notation "'impl_28'" := (impl_28). *) + +(* Notation "'impl_29'" := (impl_29). *) + +(* Notation "'impl_30'" := (impl_30). *) + +(* 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_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 new file mode 100644 index 000000000..3fb3d3925 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Primitive_Number_conversion_i.v @@ -0,0 +1,110 @@ +(* 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 "'impl_31'" := (impl_31). *) + +(* Notation "'impl_40'" := (impl_40). *) + +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 *) + +(* NotImplementedYet *) + +(* 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). *) + +(* Notation "'impl_6'" := (impl_6). *) + +(* Notation "'impl_7'" := (impl_7). *) + +(* Notation "'impl_8'" := (impl_8). *) + +(* Notation "'impl_9'" := (impl_9). *) + +(* Notation "'impl_10'" := (impl_10). *) + +(* Notation "'impl_11'" := (impl_11). *) + +(* Notation "'impl_12'" := (impl_12). *) + +(* Notation "'impl_13'" := (impl_13). *) + +(* Notation "'impl_14'" := (impl_14). *) + +(* Notation "'impl_15'" := (impl_15). *) + +(* Notation "'impl_16'" := (impl_16). *) + +(* Notation "'impl_17'" := (impl_17). *) + +(* Notation "'impl_18'" := (impl_18). *) + +(* Notation "'impl_19'" := (impl_19). *) + +(* Notation "'impl_20'" := (impl_20). *) + +(* Notation "'impl_21'" := (impl_21). *) + +(* Notation "'impl_22'" := (impl_22). *) + +(* Notation "'impl_23'" := (impl_23). *) + +(* Notation "'impl_24'" := (impl_24). *) + +(* Notation "'impl_25'" := (impl_25). *) + +(* Notation "'impl_26'" := (impl_26). *) + +(* Notation "'impl_27'" := (impl_27). *) + +(* Notation "'impl_28'" := (impl_28). *) + +(* Notation "'impl_29'" := (impl_29). *) + +(* Notation "'impl_30'" := (impl_30). *) + +(* 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_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 new file mode 100644 index 000000000..d5caaaccf --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Result.v @@ -0,0 +1,30 @@ +(* 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_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 -> _ +| 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_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 new file mode 100644 index 000000000..8869d4239 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice.v @@ -0,0 +1,37 @@ +(* 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_Primitive. +Export Core_Primitive. + + + +From Core Require Import Core_Slice_Iter. +Export Core_Slice_Iter. + +From Core Require Import Core_Convert. +Export Core_Convert. + +(* 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 := + 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_Index.v b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index.v new file mode 100644 index 000000000..34f393591 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index.v @@ -0,0 +1,73 @@ +(* 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 (t_ops). +Export Core (t_ops). + +From Core Require Import Core_Primitive (t_Slice). +Export Core_Primitive (t_Slice). + +(* NotImplementedYet *) + +Notation "'v_SliceIndex'" := (v_SliceIndex). + +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 new file mode 100644 index 000000000..589bd659a --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Index_Private_slice_index.v @@ -0,0 +1,82 @@ +(* 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_Slice_Index_Ops. +Export Core_Slice_Index_Ops. + +Notation "'v_Sealed'" := (v_Sealed). + +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). + +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 new file mode 100644 index 000000000..e294a39bb --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter.v @@ -0,0 +1,41 @@ +(* 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. +Export Core_Marker. + +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 Iter_f_data {_} {_}. +Arguments Iter_f__marker {_} {_}. +#[export] Instance settable_t_Iter `{v_T : Type} `{t_Sized (v_T)} : Settable _ := + 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_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 new file mode 100644 index 000000000..136832dc8 --- /dev/null +++ b/proof-libs/coq/coq/generated-core/src/Core_Slice_Iter_Macros.v @@ -0,0 +1,63 @@ +(* 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 *) + +(* 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