From bac8d33a1500e8baff45cf543bf1bf30571fc14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Mon, 25 Sep 2023 21:02:50 +0200 Subject: [PATCH 01/13] trying to implement extraction of associated types' bounds' instances --- CoqOfRust/ink/ink.v | 245 ++++++- CoqOfRust/ink/ink_env.v | 838 +++++++++++++++++++++- CoqOfRust/ink/ink_storage_traits.v | 85 ++- CoqOfRust/ink/update_after_translation.py | 1 + coq-of-rust-config.json | 3 - lib/src/coq.rs | 84 +-- lib/src/top_level.rs | 768 ++++++++++++-------- 7 files changed, 1602 insertions(+), 422 deletions(-) diff --git a/CoqOfRust/ink/ink.v b/CoqOfRust/ink/ink.v index 3b7832b12..0af52ed18 100644 --- a/CoqOfRust/ink/ink.v +++ b/CoqOfRust/ink/ink.v @@ -312,7 +312,7 @@ Module reflect. Module ContractMessageDecoder. Class Trait (Self : Set) : Type := { Type_ : Set; - _ + __the_bounds_of_Type_ : Sigma `(parity_scale_codec.codec.Decode.Trait Type_) @@ -324,6 +324,24 @@ Module reflect. : Notation.DoubleColonType Self "Type_" := { Notation.double_colon_type := Type_; }. + Module The_Bounds_Of_Type_. + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) + : parity_scale_codec.codec.Decode.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End parity_scale_codec_codec_Decode. + Module ink_reflect_dispatch_ExecuteDispatchable. + Global Instance I `(Trait) + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End ink_reflect_dispatch_ExecuteDispatchable. + End The_Bounds_Of_Type_. End ContractMessageDecoder. Module DecodeDispatch. @@ -350,7 +368,7 @@ Module reflect. Module ContractConstructorDecoder. Class Trait (Self : Set) : Type := { Type_ : Set; - _ + __the_bounds_of_Type_ : Sigma `(ink.reflect.dispatch.DecodeDispatch.Trait Type_) @@ -362,6 +380,24 @@ Module reflect. : Notation.DoubleColonType Self "Type_" := { Notation.double_colon_type := Type_; }. + Module The_Bounds_Of_Type_. + Module ink_reflect_dispatch_DecodeDispatch. + Global Instance I `(Trait) + : ink.reflect.dispatch.DecodeDispatch.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End ink_reflect_dispatch_DecodeDispatch. + Module ink_reflect_dispatch_ExecuteDispatchable. + Global Instance I `(Trait) + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End ink_reflect_dispatch_ExecuteDispatchable. + End The_Bounds_Of_Type_. End ContractConstructorDecoder. End dispatch. @@ -663,7 +699,7 @@ Module codegen. Module TraitCallForwarder. Class Trait (Self : Set) : Type := { Forwarder : Set; - _ + __the_bounds_of_Forwarder : Sigma `(ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait @@ -675,12 +711,23 @@ Module codegen. : Notation.DoubleColonType Self "Forwarder" := { Notation.double_colon_type := Forwarder; }. + Module The_Bounds_Of_Forwarder. + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + Forwarder. + repeat + (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + try assumption). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarder. (* Module TraitCallForwarderFor. Class Trait (Self : Set) : Type := { Forwarder : Set; - _ + __the_bounds_of_Forwarder : Sigma `(ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait @@ -728,6 +775,17 @@ Module codegen. : Notation.Dot "build_mut" := { Notation.dot := build_mut; }. + Module The_Bounds_Of_Forwarder. + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + Forwarder. + repeat + (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + try assumption). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) End call_builder. @@ -1303,7 +1361,7 @@ Module trait_def. Module TraitCallForwarder. Class Trait (Self : Set) : Type := { Forwarder : Set; - _ + __the_bounds_of_Forwarder : Sigma `(ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait @@ -1315,12 +1373,23 @@ Module trait_def. : Notation.DoubleColonType Self "Forwarder" := { Notation.double_colon_type := Forwarder; }. + Module The_Bounds_Of_Forwarder. + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + Forwarder. + repeat + (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + try assumption). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarder. (* Module TraitCallForwarderFor. Class Trait (Self : Set) : Type := { Forwarder : Set; - _ + __the_bounds_of_Forwarder : Sigma `(ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait @@ -1366,6 +1435,17 @@ Module trait_def. : Notation.Dot "build_mut" := { Notation.dot := build_mut; }. + Module The_Bounds_Of_Forwarder. + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + Forwarder. + repeat + (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + try assumption). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) End call_builder. @@ -1409,7 +1489,7 @@ Module call_builder. Module TraitCallForwarder. Class Trait (Self : Set) : Type := { Forwarder : Set; - _ + __the_bounds_of_Forwarder : Sigma `(ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait @@ -1421,12 +1501,22 @@ Module call_builder. : Notation.DoubleColonType Self "Forwarder" := { Notation.double_colon_type := Forwarder; }. + Module The_Bounds_Of_Forwarder. + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. + repeat + (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + try assumption). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarder. (* Module TraitCallForwarderFor. Class Trait (Self : Set) : Type := { Forwarder : Set; - _ + __the_bounds_of_Forwarder : Sigma `(ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait @@ -1472,6 +1562,16 @@ Module call_builder. : Notation.Dot "build_mut" := { Notation.dot := build_mut; }. + Module The_Bounds_Of_Forwarder. + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. + repeat + (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + try assumption). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) End call_builder. @@ -1501,7 +1601,7 @@ End TraitCallBuilder. Module TraitCallForwarder. Class Trait (Self : Set) : Type := { Forwarder : Set; - _ + __the_bounds_of_Forwarder : Sigma `(ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder), @@ -1512,12 +1612,22 @@ Module TraitCallForwarder. : Notation.DoubleColonType Self "Forwarder" := { Notation.double_colon_type := Forwarder; }. + Module The_Bounds_Of_Forwarder. + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. + repeat + (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + try assumption). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarder. (* Module TraitCallForwarderFor. Class Trait (Self : Set) : Type := { Forwarder : Set; - _ + __the_bounds_of_Forwarder : Sigma `(ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder), @@ -1562,6 +1672,16 @@ End TraitCallForwarder. : Notation.Dot "build_mut" := { Notation.dot := build_mut; }. + Module The_Bounds_Of_Forwarder. + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. + repeat + (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + try assumption). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) Module trait_message. @@ -1868,7 +1988,7 @@ Module Wrap_dispatch_1. Module ContractMessageDecoder. Class Trait (Self : Set) : Type := { Type_ : Set; - _ + __the_bounds_of_Type_ : Sigma `(parity_scale_codec.codec.Decode.Trait Type_) @@ -1880,6 +2000,24 @@ Module Wrap_dispatch_1. : Notation.DoubleColonType Self "Type_" := { Notation.double_colon_type := Type_; }. + Module The_Bounds_Of_Type_. + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) + : parity_scale_codec.codec.Decode.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End parity_scale_codec_codec_Decode. + Module ink_reflect_dispatch_ExecuteDispatchable. + Global Instance I `(Trait) + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End ink_reflect_dispatch_ExecuteDispatchable. + End The_Bounds_Of_Type_. End ContractMessageDecoder. Module DecodeDispatch. @@ -1906,7 +2044,7 @@ Module Wrap_dispatch_1. Module ContractConstructorDecoder. Class Trait (Self : Set) : Type := { Type_ : Set; - _ + __the_bounds_of_Type_ : Sigma `(ink.reflect.dispatch.DecodeDispatch.Trait Type_) @@ -1918,6 +2056,24 @@ Module Wrap_dispatch_1. : Notation.DoubleColonType Self "Type_" := { Notation.double_colon_type := Type_; }. + Module The_Bounds_Of_Type_. + Module ink_reflect_dispatch_DecodeDispatch. + Global Instance I `(Trait) + : ink.reflect.dispatch.DecodeDispatch.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End ink_reflect_dispatch_DecodeDispatch. + Module ink_reflect_dispatch_ExecuteDispatchable. + Global Instance I `(Trait) + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End ink_reflect_dispatch_ExecuteDispatchable. + End The_Bounds_Of_Type_. End ContractConstructorDecoder. End dispatch. End Wrap_dispatch_1. @@ -2084,7 +2240,7 @@ Definition ConstructorOutputValue := @ConstructorOutputValue.t. Module ContractMessageDecoder. Class Trait (Self : Set) : Type := { Type_ : Set; - _ + __the_bounds_of_Type_ : Sigma `(parity_scale_codec.codec.Decode.Trait Type_) @@ -2096,12 +2252,27 @@ Module ContractMessageDecoder. : Notation.DoubleColonType Self "Type_" := { Notation.double_colon_type := Type_; }. + Module The_Bounds_Of_Type_. + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + Defined. + End parity_scale_codec_codec_Decode. + Module ink_reflect_dispatch_ExecuteDispatchable. + Global Instance I `(Trait) + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + Defined. + End ink_reflect_dispatch_ExecuteDispatchable. + End The_Bounds_Of_Type_. End ContractMessageDecoder. Module ContractConstructorDecoder. Class Trait (Self : Set) : Type := { Type_ : Set; - _ + __the_bounds_of_Type_ : Sigma `(ink.reflect.dispatch.DecodeDispatch.Trait Type_) @@ -2113,6 +2284,22 @@ Module ContractConstructorDecoder. : Notation.DoubleColonType Self "Type_" := { Notation.double_colon_type := Type_; }. + Module The_Bounds_Of_Type_. + Module ink_reflect_dispatch_DecodeDispatch. + Global Instance I `(Trait) + : ink.reflect.dispatch.DecodeDispatch.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + Defined. + End ink_reflect_dispatch_DecodeDispatch. + Module ink_reflect_dispatch_ExecuteDispatchable. + Global Instance I `(Trait) + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + Defined. + End ink_reflect_dispatch_ExecuteDispatchable. + End The_Bounds_Of_Type_. End ContractConstructorDecoder. Module ExecuteDispatchable. @@ -2395,13 +2582,26 @@ Module chain_extension. Module ChainExtension. Class Trait (Self : Set) : Type := { ErrorCode : Set; - _ : Sigma `(ink_env.chain_extension.FromStatusCode.Trait ErrorCode), unit; + __the_bounds_of_ErrorCode + : + Sigma `(ink_env.chain_extension.FromStatusCode.Trait ErrorCode), + unit; }. Global Instance Method_ErrorCode `(Trait) : Notation.DoubleColonType Self "ErrorCode" := { Notation.double_colon_type := ErrorCode; }. + Module The_Bounds_Of_ErrorCode. + Module ink_env_chain_extension_FromStatusCode. + Global Instance I `(Trait) + : ink_env.chain_extension.FromStatusCode.Trait ErrorCode. + repeat + (destruct __the_bounds_of_ErrorCode [? __the_bounds_of_ErrorCode] + try assumption). + Defined. + End ink_env_chain_extension_FromStatusCode. + End The_Bounds_Of_ErrorCode. End ChainExtension. Module private. @@ -2478,13 +2678,26 @@ End ChainExtensionInstance. Module ChainExtension. Class Trait (Self : Set) : Type := { ErrorCode : Set; - _ : Sigma `(ink_env.chain_extension.FromStatusCode.Trait ErrorCode), unit; + __the_bounds_of_ErrorCode + : + Sigma `(ink_env.chain_extension.FromStatusCode.Trait ErrorCode), + unit; }. Global Instance Method_ErrorCode `(Trait) : Notation.DoubleColonType Self "ErrorCode" := { Notation.double_colon_type := ErrorCode; }. + Module The_Bounds_Of_ErrorCode. + Module ink_env_chain_extension_FromStatusCode. + Global Instance I `(Trait) + : ink_env.chain_extension.FromStatusCode.Trait ErrorCode. + repeat + (destruct __the_bounds_of_ErrorCode [? __the_bounds_of_ErrorCode] + try assumption). + Defined. + End ink_env_chain_extension_FromStatusCode. + End The_Bounds_Of_ErrorCode. End ChainExtension. (* Module IsResultType. diff --git a/CoqOfRust/ink/ink_env.v b/CoqOfRust/ink/ink_env.v index ca329c37e..0abc75163 100644 --- a/CoqOfRust/ink/ink_env.v +++ b/CoqOfRust/ink/ink_env.v @@ -102,7 +102,7 @@ Module types. Module FromLittleEndian. Class Trait (Self : Set) : Type := { Bytes : Set; - _ + __the_bounds_of_Bytes : Sigma `(core.default.Default.Trait Bytes) @@ -120,6 +120,29 @@ Module types. : Notation.Dot "from_le_bytes" := { Notation.dot := from_le_bytes; }. + Module The_Bounds_Of_Bytes. + Module core_default_Default. + Global Instance I `(Trait) : core.default.Default.Trait Bytes. + repeat + (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] + try assumption). + Defined. + End core_default_Default. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait Bytes. + repeat + (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] + try assumption). + Defined. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait Bytes. + repeat + (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] + try assumption). + Defined. + End core_convert_AsMut. + End The_Bounds_Of_Bytes. End FromLittleEndian. Module AccountIdGuard. @@ -144,7 +167,7 @@ Module types. Class Trait (Self : Set) : Type := { MAX_EVENT_TOPICS `{H' : State.Trait} : usize; AccountId : Set; - _ + __the_bounds_of_AccountId : Sigma `(parity_scale_codec.codec.Codec.Trait AccountId) @@ -158,7 +181,7 @@ Module types. `(core.convert.AsMut.Trait AccountId (T := Slice u8)), unit; Balance : Set; - _ + __the_bounds_of_Balance : Sigma `(parity_scale_codec.codec.Codec.Trait Balance) @@ -172,7 +195,7 @@ Module types. `(ink_env.types.FromLittleEndian.Trait Balance), unit; Hash : Set; - _ + __the_bounds_of_Hash : Sigma `(parity_scale_codec.codec.Codec.Trait Hash) @@ -188,7 +211,7 @@ Module types. `(core.convert.AsMut.Trait Hash (T := Slice u8)), unit; Timestamp : Set; - _ + __the_bounds_of_Timestamp : Sigma `(parity_scale_codec.codec.Codec.Trait Timestamp) @@ -202,7 +225,7 @@ Module types. `(ink_env.types.FromLittleEndian.Trait Timestamp), unit; BlockNumber : Set; - _ + __the_bounds_of_BlockNumber : Sigma `(parity_scale_codec.codec.Codec.Trait BlockNumber) @@ -246,6 +269,311 @@ Module types. : Notation.DoubleColonType Self "ChainExtension" := { Notation.double_colon_type := ChainExtension; }. + Module The_Bounds_Of_AccountId. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End ink_env_types_CodecAsType. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_cmp_Eq. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_cmp_Ord. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_convert_AsMut. + End The_Bounds_Of_AccountId. + Module The_Bounds_Of_Balance. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End core_cmp_Eq. + Module ink_env_arithmetic_AtLeast32BitUnsigned. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. + Global Instance I `(Trait) + : ink_env.types.FromLittleEndian.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End ink_env_types_FromLittleEndian. + End The_Bounds_Of_Balance. + Module The_Bounds_Of_Hash. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_clone_Clone. + Module ink_primitives_types_Clear. + Global Instance I `(Trait) : ink_primitives.types.Clear.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End ink_primitives_types_Clear. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_cmp_Eq. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_cmp_Ord. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_convert_AsMut. + End The_Bounds_Of_Hash. + Module The_Bounds_Of_Timestamp. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End core_cmp_Eq. + Module ink_env_arithmetic_AtLeast32BitUnsigned. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. + Global Instance I `(Trait) + : ink_env.types.FromLittleEndian.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End ink_env_types_FromLittleEndian. + End The_Bounds_Of_Timestamp. + Module The_Bounds_Of_BlockNumber. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) + : ink_env.types.CodecAsType.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End core_cmp_Eq. + Module ink_env_arithmetic_AtLeast32BitUnsigned. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. + Global Instance I `(Trait) + : ink_env.types.FromLittleEndian.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End ink_env_types_FromLittleEndian. + End The_Bounds_Of_BlockNumber. End Environment. Module NoChainExtension. @@ -272,7 +600,7 @@ End types. Module FromLittleEndian. Class Trait (Self : Set) : Type := { Bytes : Set; - _ + __the_bounds_of_Bytes : Sigma `(core.default.Default.Trait Bytes) @@ -290,6 +618,26 @@ Module FromLittleEndian. : Notation.Dot "from_le_bytes" := { Notation.dot := from_le_bytes; }. + Module The_Bounds_Of_Bytes. + Module core_default_Default. + Global Instance I `(Trait) : core.default.Default.Trait Bytes. + repeat + (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] try assumption). + Defined. + End core_default_Default. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait Bytes. + repeat + (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] try assumption). + Defined. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait Bytes. + repeat + (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] try assumption). + Defined. + End core_convert_AsMut. + End The_Bounds_Of_Bytes. End FromLittleEndian. Module AccountIdGuard. @@ -314,7 +662,7 @@ Module Environment. Class Trait (Self : Set) : Type := { MAX_EVENT_TOPICS `{H' : State.Trait} : usize; AccountId : Set; - _ + __the_bounds_of_AccountId : Sigma `(parity_scale_codec.codec.Codec.Trait AccountId) @@ -328,7 +676,7 @@ Module Environment. `(core.convert.AsMut.Trait AccountId (T := Slice u8)), unit; Balance : Set; - _ + __the_bounds_of_Balance : Sigma `(parity_scale_codec.codec.Codec.Trait Balance) @@ -342,7 +690,7 @@ Module Environment. `(ink_env.types.FromLittleEndian.Trait Balance), unit; Hash : Set; - _ + __the_bounds_of_Hash : Sigma `(parity_scale_codec.codec.Codec.Trait Hash) @@ -358,7 +706,7 @@ Module Environment. `(core.convert.AsMut.Trait Hash (T := Slice u8)), unit; Timestamp : Set; - _ + __the_bounds_of_Timestamp : Sigma `(parity_scale_codec.codec.Codec.Trait Timestamp) @@ -372,7 +720,7 @@ Module Environment. `(ink_env.types.FromLittleEndian.Trait Timestamp), unit; BlockNumber : Set; - _ + __the_bounds_of_BlockNumber : Sigma `(parity_scale_codec.codec.Codec.Trait BlockNumber) @@ -416,6 +764,308 @@ Module Environment. : Notation.DoubleColonType Self "ChainExtension" := { Notation.double_colon_type := ChainExtension; }. + Module The_Bounds_Of_AccountId. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End ink_env_types_CodecAsType. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_cmp_Eq. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_cmp_Ord. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + try assumption). + Defined. + End core_convert_AsMut. + End The_Bounds_Of_AccountId. + Module The_Bounds_Of_Balance. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End core_cmp_Eq. + Module ink_env_arithmetic_AtLeast32BitUnsigned. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. + Global Instance I `(Trait) : ink_env.types.FromLittleEndian.Trait Balance. + repeat + (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + try assumption). + Defined. + End ink_env_types_FromLittleEndian. + End The_Bounds_Of_Balance. + Module The_Bounds_Of_Hash. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_clone_Clone. + Module ink_primitives_types_Clear. + Global Instance I `(Trait) : ink_primitives.types.Clear.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End ink_primitives_types_Clear. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_cmp_Eq. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_cmp_Ord. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait Hash. + repeat + (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + Defined. + End core_convert_AsMut. + End The_Bounds_Of_Hash. + Module The_Bounds_Of_Timestamp. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End core_cmp_Eq. + Module ink_env_arithmetic_AtLeast32BitUnsigned. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. + Global Instance I `(Trait) + : ink_env.types.FromLittleEndian.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + try assumption). + Defined. + End ink_env_types_FromLittleEndian. + End The_Bounds_Of_Timestamp. + Module The_Bounds_Of_BlockNumber. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End core_cmp_Eq. + Module ink_env_arithmetic_AtLeast32BitUnsigned. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. + Global Instance I `(Trait) + : ink_env.types.FromLittleEndian.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + try assumption). + Defined. + End ink_env_types_FromLittleEndian. + End The_Bounds_Of_BlockNumber. End Environment. Module NoChainExtension. @@ -442,13 +1092,21 @@ Module contract. Module ContractEnv. Class Trait (Self : Set) : Type := { Env : Set; - _ : Sigma `(ink_env.types.Environment.Trait Env), unit; + __the_bounds_of_Env : Sigma `(ink_env.types.Environment.Trait Env), unit; }. Global Instance Method_Env `(Trait) : Notation.DoubleColonType Self "Env" := { Notation.double_colon_type := Env; }. + Module The_Bounds_Of_Env. + Module ink_env_types_Environment. + Global Instance I `(Trait) : ink_env.types.Environment.Trait Env. + repeat + (destruct __the_bounds_of_Env [? __the_bounds_of_Env] try assumption). + Defined. + End ink_env_types_Environment. + End The_Bounds_Of_Env. End ContractEnv. Module ContractReference. @@ -675,7 +1333,10 @@ Module call. IS_RESULT `{H' : State.Trait} : bool; Output : Set; Error : Set; - _ : Sigma `(parity_scale_codec.codec.Decode.Trait Error), unit; + __the_bounds_of_Error + : + Sigma `(parity_scale_codec.codec.Decode.Trait Error), + unit; ok `{H' : State.Trait} : C -> M (H := H') Output; }. @@ -701,6 +1362,16 @@ Module call. := (axiom : M (H := H') (core.option.Option Output)); }. + Module The_Bounds_Of_Error. + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) + : parity_scale_codec.codec.Decode.Trait Error. + repeat + (destruct __the_bounds_of_Error [? __the_bounds_of_Error] + try assumption). + Defined. + End parity_scale_codec_codec_Decode. + End The_Bounds_Of_Error. End ConstructorReturnType. Module CreateParams. @@ -859,6 +1530,32 @@ Module call. (Args := Args) (Salt := Salt) (RetType := RetType). + + Parameter build_create : + forall + `{H' : State.Trait} + {ContractRef : Set} + `{ink_env.contract.ContractEnv.Trait ContractRef}, + M (H := H') + (ink_env.call.create_builder.CreateBuilder + (ink_env.contract.ContractEnv.Env (Self := ContractRef)) + ContractRef + (ink_env.call.common.Unset_ + (ink_env.types.Environment.Hash + (Self := ink_env.contract.ContractEnv.Env + (Self := ContractRef)))) + (ink_env.call.common.Unset_ u64) + (ink_env.call.common.Unset_ + (ink_env.types.Environment.Balance + (Self := ink_env.contract.ContractEnv.Env + (Self := ContractRef)))) + (ink_env.call.common.Unset_ + (ink_env.call.execution_input.ExecutionInput + ink_env.call.execution_input.EmptyArgumentList)) + (ink_env.call.common.Unset_ + ink_env.call.create_builder.state.Salt) + (ink_env.call.common.Unset_ + (ink_env.call.common.ReturnType unit))). End create_builder. End call. @@ -949,13 +1646,22 @@ Module hash. Class Trait (Self : Set) `{ink_env.hash.private.Sealed.Trait Self} : Type := { Type_ : Set; - _ : Sigma `(core.default.Default.Trait Type_), unit; + __the_bounds_of_Type_ : Sigma `(core.default.Default.Trait Type_), unit; }. Global Instance Method_Type_ `(Trait) : Notation.DoubleColonType Self "Type_" := { Notation.double_colon_type := Type_; }. + Module The_Bounds_Of_Type_. + Module core_default_Default. + Global Instance I `(Trait) : core.default.Default.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End core_default_Default. + End The_Bounds_Of_Type_. End HashOutput. Module CryptoHash. @@ -1105,7 +1811,10 @@ Module topics. Module Topics. Class Trait (Self : Set) : Type := { RemainingTopics : Set; - _ : Sigma `(ink_env.topics.EventTopicsAmount.Trait RemainingTopics), unit; + __the_bounds_of_RemainingTopics + : + Sigma `(ink_env.topics.EventTopicsAmount.Trait RemainingTopics), + unit; topics `{H' : State.Trait} {E B : Set} @@ -1130,6 +1839,16 @@ Module topics. := topics (E := E) (B := B) (H'0 := H'0) (H'1 := H'1); }. + Module The_Bounds_Of_RemainingTopics. + Module ink_env_topics_EventTopicsAmount. + Global Instance I `(Trait) + : ink_env.topics.EventTopicsAmount.Trait RemainingTopics. + repeat + (destruct __the_bounds_of_RemainingTopics [? __the_bounds_of_RemainingTopics] + try assumption). + Defined. + End ink_env_topics_EventTopicsAmount. + End The_Bounds_Of_RemainingTopics. End Topics. Module PrefixedValue. @@ -4174,7 +4893,10 @@ Module create_builder. IS_RESULT `{H' : State.Trait} : bool; Output : Set; Error : Set; - _ : Sigma `(parity_scale_codec.codec.Decode.Trait Error), unit; + __the_bounds_of_Error + : + Sigma `(parity_scale_codec.codec.Decode.Trait Error), + unit; ok `{H' : State.Trait} : C -> M (H := H') Output; }. @@ -4200,6 +4922,16 @@ Module create_builder. := (axiom : M (H := H') (core.option.Option Output)); }. + Module The_Bounds_Of_Error. + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) + : parity_scale_codec.codec.Decode.Trait Error. + repeat + (destruct __the_bounds_of_Error [? __the_bounds_of_Error] + try assumption). + Defined. + End parity_scale_codec_codec_Decode. + End The_Bounds_Of_Error. End ConstructorReturnType. Module CreateParams. @@ -4352,6 +5084,30 @@ Module create_builder. (Args := Args) (Salt := Salt) (RetType := RetType). + + Parameter build_create : + forall + `{H' : State.Trait} + {ContractRef : Set} + `{ink_env.contract.ContractEnv.Trait ContractRef}, + M (H := H') + (ink_env.call.create_builder.CreateBuilder + (ink_env.contract.ContractEnv.Env (Self := ContractRef)) + ContractRef + (ink_env.call.common.Unset_ + (ink_env.types.Environment.Hash + (Self := ink_env.contract.ContractEnv.Env + (Self := ContractRef)))) + (ink_env.call.common.Unset_ u64) + (ink_env.call.common.Unset_ + (ink_env.types.Environment.Balance + (Self := ink_env.contract.ContractEnv.Env + (Self := ContractRef)))) + (ink_env.call.common.Unset_ + (ink_env.call.execution_input.ExecutionInput + ink_env.call.execution_input.EmptyArgumentList)) + (ink_env.call.common.Unset_ ink_env.call.create_builder.state.Salt) + (ink_env.call.common.Unset_ (ink_env.call.common.ReturnType unit))). End create_builder. Module state. @@ -4387,7 +5143,10 @@ Module ConstructorReturnType. IS_RESULT `{H' : State.Trait} : bool; Output : Set; Error : Set; - _ : Sigma `(parity_scale_codec.codec.Decode.Trait Error), unit; + __the_bounds_of_Error + : + Sigma `(parity_scale_codec.codec.Decode.Trait Error), + unit; ok `{H' : State.Trait} : C -> M (H := H') Output; }. @@ -4413,6 +5172,14 @@ Module ConstructorReturnType. := (axiom : M (H := H') (core.option.Option Output)); }. + Module The_Bounds_Of_Error. + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Error. + repeat + (destruct __the_bounds_of_Error [? __the_bounds_of_Error] try assumption). + Defined. + End parity_scale_codec_codec_Decode. + End The_Bounds_Of_Error. End ConstructorReturnType. Module CreateParams. @@ -5002,12 +5769,20 @@ End IsResultTypeSealed. Module ContractEnv. Class Trait (Self : Set) : Type := { Env : Set; - _ : Sigma `(ink_env.types.Environment.Trait Env), unit; + __the_bounds_of_Env : Sigma `(ink_env.types.Environment.Trait Env), unit; }. Global Instance Method_Env `(Trait) : Notation.DoubleColonType Self "Env" := { Notation.double_colon_type := Env; }. + Module The_Bounds_Of_Env. + Module ink_env_types_Environment. + Global Instance I `(Trait) : ink_env.types.Environment.Trait Env. + repeat + (destruct __the_bounds_of_Env [? __the_bounds_of_Env] try assumption). + Defined. + End ink_env_types_Environment. + End The_Bounds_Of_Env. End ContractEnv. Module ContractReference. @@ -5196,13 +5971,21 @@ Definition AccountError := AccountError.t. Module HashOutput. Class Trait (Self : Set) `{ink_env.hash.private.Sealed.Trait Self} : Type := { Type_ : Set; - _ : Sigma `(core.default.Default.Trait Type_), unit; + __the_bounds_of_Type_ : Sigma `(core.default.Default.Trait Type_), unit; }. Global Instance Method_Type_ `(Trait) : Notation.DoubleColonType Self "Type_" := { Notation.double_colon_type := Type_; }. + Module The_Bounds_Of_Type_. + Module core_default_Default. + Global Instance I `(Trait) : core.default.Default.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + Defined. + End core_default_Default. + End The_Bounds_Of_Type_. End HashOutput. Module CryptoHash. @@ -5364,7 +6147,10 @@ End EventTopicsAmount. Module Topics. Class Trait (Self : Set) : Type := { RemainingTopics : Set; - _ : Sigma `(ink_env.topics.EventTopicsAmount.Trait RemainingTopics), unit; + __the_bounds_of_RemainingTopics + : + Sigma `(ink_env.topics.EventTopicsAmount.Trait RemainingTopics), + unit; topics `{H' : State.Trait} {E B : Set} @@ -5389,6 +6175,16 @@ Module Topics. := topics (E := E) (B := B) (H'0 := H'0) (H'1 := H'1); }. + Module The_Bounds_Of_RemainingTopics. + Module ink_env_topics_EventTopicsAmount. + Global Instance I `(Trait) + : ink_env.topics.EventTopicsAmount.Trait RemainingTopics. + repeat + (destruct __the_bounds_of_RemainingTopics [? __the_bounds_of_RemainingTopics] + try assumption). + Defined. + End ink_env_topics_EventTopicsAmount. + End The_Bounds_Of_RemainingTopics. End Topics. Module PrefixedValue. diff --git a/CoqOfRust/ink/ink_storage_traits.v b/CoqOfRust/ink/ink_storage_traits.v index cf286fd71..c68a192f2 100644 --- a/CoqOfRust/ink/ink_storage_traits.v +++ b/CoqOfRust/ink/ink_storage_traits.v @@ -161,9 +161,12 @@ Module storage. `{ink_storage_traits.storage.StorageKey.Trait Key} : Type := { Type_ : Set; - _ : Sigma `(ink_storage_traits.storage.Storable.Trait Type_), unit; + __the_bounds_of_Type_ + : + Sigma `(ink_storage_traits.storage.Storable.Trait Type_), + unit; PreferredKey : Set; - _ + __the_bounds_of_PreferredKey : Sigma `(ink_storage_traits.storage.StorageKey.Trait PreferredKey), unit; @@ -177,6 +180,26 @@ Module storage. : Notation.DoubleColonType Self "PreferredKey" := { Notation.double_colon_type := PreferredKey; }. + Module The_Bounds_Of_Type_. + Module ink_storage_traits_storage_Storable. + Global Instance I `(Trait) + : ink_storage_traits.storage.Storable.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End ink_storage_traits_storage_Storable. + End The_Bounds_Of_Type_. + Module The_Bounds_Of_PreferredKey. + Module ink_storage_traits_storage_StorageKey. + Global Instance I `(Trait) + : ink_storage_traits.storage.StorageKey.Trait PreferredKey. + repeat + (destruct __the_bounds_of_PreferredKey [? __the_bounds_of_PreferredKey] + try assumption). + Defined. + End ink_storage_traits_storage_StorageKey. + End The_Bounds_Of_PreferredKey. End StorableHint. Module AutoStorableHint. @@ -186,13 +209,26 @@ Module storage. `{ink_storage_traits.storage.StorageKey.Trait Key} : Type := { Type_ : Set; - _ : Sigma `(ink_storage_traits.storage.Storable.Trait Type_), unit; + __the_bounds_of_Type_ + : + Sigma `(ink_storage_traits.storage.Storable.Trait Type_), + unit; }. Global Instance Method_Type_ `(Trait) : Notation.DoubleColonType Self "Type_" := { Notation.double_colon_type := Type_; }. + Module The_Bounds_Of_Type_. + Module ink_storage_traits_storage_Storable. + Global Instance I `(Trait) + : ink_storage_traits.storage.Storable.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + try assumption). + Defined. + End ink_storage_traits_storage_Storable. + End The_Bounds_Of_Type_. End AutoStorableHint. End storage. @@ -283,9 +319,15 @@ Module StorableHint. `{ink_storage_traits.storage.StorageKey.Trait Key} : Type := { Type_ : Set; - _ : Sigma `(ink_storage_traits.storage.Storable.Trait Type_), unit; + __the_bounds_of_Type_ + : + Sigma `(ink_storage_traits.storage.Storable.Trait Type_), + unit; PreferredKey : Set; - _ : Sigma `(ink_storage_traits.storage.StorageKey.Trait PreferredKey), unit; + __the_bounds_of_PreferredKey + : + Sigma `(ink_storage_traits.storage.StorageKey.Trait PreferredKey), + unit; }. Global Instance Method_Type_ `(Trait) @@ -296,6 +338,25 @@ Module StorableHint. : Notation.DoubleColonType Self "PreferredKey" := { Notation.double_colon_type := PreferredKey; }. + Module The_Bounds_Of_Type_. + Module ink_storage_traits_storage_Storable. + Global Instance I `(Trait) + : ink_storage_traits.storage.Storable.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + Defined. + End ink_storage_traits_storage_Storable. + End The_Bounds_Of_Type_. + Module The_Bounds_Of_PreferredKey. + Module ink_storage_traits_storage_StorageKey. + Global Instance I `(Trait) + : ink_storage_traits.storage.StorageKey.Trait PreferredKey. + repeat + (destruct __the_bounds_of_PreferredKey [? __the_bounds_of_PreferredKey] + try assumption). + Defined. + End ink_storage_traits_storage_StorageKey. + End The_Bounds_Of_PreferredKey. End StorableHint. Module AutoStorableHint. @@ -305,13 +366,25 @@ Module AutoStorableHint. `{ink_storage_traits.storage.StorageKey.Trait Key} : Type := { Type_ : Set; - _ : Sigma `(ink_storage_traits.storage.Storable.Trait Type_), unit; + __the_bounds_of_Type_ + : + Sigma `(ink_storage_traits.storage.Storable.Trait Type_), + unit; }. Global Instance Method_Type_ `(Trait) : Notation.DoubleColonType Self "Type_" := { Notation.double_colon_type := Type_; }. + Module The_Bounds_Of_Type_. + Module ink_storage_traits_storage_Storable. + Global Instance I `(Trait) + : ink_storage_traits.storage.Storable.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + Defined. + End ink_storage_traits_storage_Storable. + End The_Bounds_Of_Type_. End AutoStorableHint. Module layout. diff --git a/CoqOfRust/ink/update_after_translation.py b/CoqOfRust/ink/update_after_translation.py index 935243fd7..d9787102a 100644 --- a/CoqOfRust/ink/update_after_translation.py +++ b/CoqOfRust/ink/update_after_translation.py @@ -63,6 +63,7 @@ def update_ink_engine(): Require CoqOfRust.ink.parity_scale_codec.""", content, ) + # the part below removes a duplicated module that caused a name conflict content = content.replace( """ Module Error. diff --git a/coq-of-rust-config.json b/coq-of-rust-config.json index 97d5fb57c..d18910307 100644 --- a/coq-of-rust-config.json +++ b/coq-of-rust-config.json @@ -95,9 +95,6 @@ "CallBuilder": { "move": "up", "before": "build_call" }, "Call": { "move": "up", "before": "build_call" } }, - "top_level::call::create_builder": { - "build_create": { "move": "up" } - }, "top_level::chain_extension": { "private": { "move": "up", "before": "IsResultType" } } diff --git a/lib/src/coq.rs b/lib/src/coq.rs index 6e3c09a64..9ddd67a56 100644 --- a/lib/src/coq.rs +++ b/lib/src/coq.rs @@ -87,7 +87,7 @@ pub(crate) struct Instance<'a> { name: String, parameters: Vec>, class: Expression<'a>, - bulid_expr: Expression<'a>, + bulid_expr: Option>, proof_lines: Vec>, } @@ -365,67 +365,6 @@ impl<'a> TopLevelItem<'a> { TopLevelItem::Section(section) => section.to_doc(), } } - - /// creates a module with the translation of the given trait - pub(crate) fn trait_module( - name: &'a str, - ty_params: &[(String, Option>)], - predicates: &[ArgDecl<'a>], - bounds: &[ArgDecl<'a>], - items: &[ClassFieldDef<'a>], - instances: &[Instance<'a>], - ) -> Self { - TopLevelItem::Module(Module::new( - name, - TopLevel::concat(&[ - TopLevel::locally_unset_primitive_projections_if( - items.is_empty(), - &[TopLevelItem::Class(Class::new( - "Trait", - &[ - vec![ArgDecl::new( - &ArgDeclVar::Simple { - idents: vec!["Self".to_string()], - ty: Some(Expression::Set), - }, - ArgSpecKind::Explicit, - )], - bounds.to_vec(), - if ty_params.is_empty() { - vec![] - } else { - vec![ArgDecl::new( - &ArgDeclVar::Simple { - idents: ty_params - .iter() - .map(|(ty, default)| { - match default { - // @TODO: implement the translation of type parameters with default - Some(_default) => ["(* TODO *) ", ty].concat(), - None => ty.to_string(), - } - }) - .collect(), - ty: Some(Expression::Set), - }, - ArgSpecKind::Implicit, - )] - }, - predicates.to_vec(), - ] - .concat(), - items.to_vec(), - ))], - ), - TopLevel { - items: instances - .iter() - .map(|i| TopLevelItem::Instance(i.to_owned())) - .collect(), - }, - ]), - )) - } } impl<'a> Module<'a> { @@ -585,11 +524,11 @@ impl<'a> Context<'a> { impl<'a> Class<'a> { /// produces a new coq typeclass definition - pub(crate) fn new(name: &str, params: &[ArgDecl<'a>], items: Vec>) -> Self { + pub(crate) fn new(name: &str, params: &[ArgDecl<'a>], items: &[ClassFieldDef<'a>]) -> Self { Class { name: name.to_owned(), params: params.to_owned(), - items, + items: items.to_owned(), } } @@ -638,7 +577,7 @@ impl<'a> Instance<'a> { name: &str, parameters: &[ArgDecl<'a>], class: Expression<'a>, - bulid_expr: &Expression<'a>, + bulid_expr: &Option>, proof_lines: Vec>, ) -> Self { Instance { @@ -673,10 +612,19 @@ impl<'a> Instance<'a> { }, ]), line(), - nest([text(": "), self.class.to_doc(false), line(), text(":= ")]), + nest([ + concat([text(": "), self.class.to_doc(false)]), + if self.bulid_expr.is_some() { + concat([line(), text(":= ")]) + } else { + text(".") + }, + ]), ]), - self.bulid_expr.to_doc(false), - text("."), + match &self.bulid_expr { + Some(build_expr) => concat([build_expr.to_doc(false), text(".")]), + None => nil(), + }, if self.proof_lines.is_empty() { nil() } else { diff --git a/lib/src/top_level.rs b/lib/src/top_level.rs index 4cdc79ba0..5ed8c5477 100644 --- a/lib/src/top_level.rs +++ b/lib/src/top_level.rs @@ -41,7 +41,7 @@ struct FnSigAndBody { } #[derive(Clone, Debug, Eq, Hash, PartialEq)] -enum TraitItem { +enum TraitItemData { Definition { ty_params: Vec, where_predicates: Vec, @@ -151,13 +151,7 @@ enum TopLevelItem { counter: u64, items: Vec, }, - Trait { - name: String, - ty_params: Vec<(String, Option>)>, - predicates: Vec, - bounds: Vec, - body: Vec<(String, TraitItem)>, - }, + Trait(Trait), TraitImpl { generic_tys: Vec, ty_params: Vec>, @@ -179,6 +173,21 @@ struct TypeStructStruct { is_dead_code: bool, } +#[derive(Clone, Debug, Eq, Hash, PartialEq)] +struct TraitItem { + item_name: String, + item_data: TraitItemData, +} + +#[derive(Clone, Debug, Eq, Hash, PartialEq)] +struct Trait { + name: String, + ty_params: Vec<(String, Option>)>, + predicates: Vec, + bounds: Vec, + body: Vec, +} + #[derive(Clone, Debug, Eq, Hash, PartialEq)] pub struct TopLevel(Vec); @@ -450,7 +459,7 @@ fn compile_top_level_item(tcx: &TyCtxt, env: &mut Env, item: &Item) -> Vec vec![TopLevelItem::Error("Union".to_string())], ItemKind::Trait(_, _, generics, generic_bounds, items) => { - vec![TopLevelItem::Trait { + vec![TopLevelItem::Trait(Trait { name, ty_params: get_ty_params(env, generics), predicates: get_where_predicates(tcx, env, generics), @@ -463,10 +472,14 @@ fn compile_top_level_item(tcx: &TyCtxt, env: &mut Env, item: &Item) -> Vec { vec![TopLevelItem::Error("TraitAlias".to_string())] @@ -863,15 +876,15 @@ fn compile_trait_item_body( ty_params: Vec, where_predicates: Vec, item: &rustc_hir::TraitItem, -) -> TraitItem { +) -> TraitItemData { match &item.kind { - TraitItemKind::Const(ty, _) => TraitItem::Definition { + TraitItemKind::Const(ty, _) => TraitItemData::Definition { ty_params, where_predicates, ty: compile_type(env, ty), }, TraitItemKind::Fn(fn_sig, trait_fn) => match trait_fn { - TraitFn::Required(_) => TraitItem::Definition { + TraitFn::Required(_) => TraitItemData::Definition { ty_params, where_predicates, ty: compile_fn_decl(env, fn_sig.decl), @@ -880,7 +893,7 @@ fn compile_trait_item_body( let env_tcx = env.tcx; let fn_sig_and_body = get_hir_fn_sig_and_body(&env_tcx, fn_sig, body_id); let signature_and_body = compile_fn_sig_and_body(env, &fn_sig_and_body, "arg"); - TraitItem::DefinitionWithDefault { + TraitItemData::DefinitionWithDefault { ty_params, where_predicates, signature_and_body, @@ -895,7 +908,7 @@ fn compile_trait_item_body( emit_warning_with_note(env, span, warning_msg, note_msg); } let generic_bounds = compile_generic_bounds(tcx, env, generic_bounds); - TraitItem::Type(generic_bounds) + TraitItemData::Type(generic_bounds) } } } @@ -1006,34 +1019,37 @@ impl FnSigAndBody { } } -fn mt_trait_item(body: TraitItem) -> TraitItem { - match body { - TraitItem::Definition { - ty_params, - where_predicates, - ty, - } => TraitItem::Definition { - ty_params, - where_predicates, - ty: mt_ty(ty), - }, - TraitItem::Type(x) => TraitItem::Type(x), // @TODO apply MT - TraitItem::DefinitionWithDefault { - ty_params, - where_predicates, - signature_and_body, - } => TraitItem::DefinitionWithDefault { - ty_params, - where_predicates, - signature_and_body: signature_and_body.mt(), - }, +impl TraitItem { + fn mt(&self) -> Self { + TraitItem { + item_name: self.item_name.to_owned(), + item_data: match self.item_data.to_owned() { + TraitItemData::Definition { + ty_params, + where_predicates, + ty, + } => TraitItemData::Definition { + ty_params, + where_predicates, + ty: mt_ty(ty), + }, + TraitItemData::Type(x) => TraitItemData::Type(x), // @TODO apply MT + TraitItemData::DefinitionWithDefault { + ty_params, + where_predicates, + signature_and_body, + } => TraitItemData::DefinitionWithDefault { + ty_params, + where_predicates, + signature_and_body: signature_and_body.mt(), + }, + }, + } } } -fn mt_trait_items(body: Vec<(String, TraitItem)>) -> Vec<(String, TraitItem)> { - body.into_iter() - .map(|(s, item)| (s, mt_trait_item(item))) - .collect() +fn mt_trait_items(body: Vec) -> Vec { + body.into_iter().map(|trait_item| trait_item.mt()).collect() } /// Monad transform for [TopLevelItem] @@ -1074,19 +1090,19 @@ fn mt_top_level_item(item: TopLevelItem) -> TopLevelItem { counter, items: mt_impl_items(items), }, - TopLevelItem::Trait { + TopLevelItem::Trait(Trait { name, ty_params, predicates, bounds, body, - } => TopLevelItem::Trait { + }) => TopLevelItem::Trait(Trait { name, ty_params, predicates, bounds, body: mt_trait_items(body), - }, + }), TopLevelItem::TraitImpl { generic_tys, ty_params, @@ -1879,7 +1895,7 @@ impl TopLevelItem { no_implicit: false, } .apply(&coq::Expression::just_name(&i.to_string())), - &coq::Expression::Record { + &Some(coq::Expression::Record { fields: vec![coq::Field::new( &Path::new(&["Notation", "dot"]), &[coq::ArgDecl::new( @@ -1902,7 +1918,7 @@ impl TopLevelItem { )], &coq::Expression::just_name(&format!("x{i}")), )], - }, + }), vec![], )) }) @@ -1994,261 +2010,7 @@ impl TopLevelItem { ))]) .to_doc() } - TopLevelItem::Trait { - name, - ty_params, - predicates, - bounds, - body, - } => coq::TopLevelItem::trait_module( - name, - &ty_params - .iter() - .map(|(ty, default)| { - ( - ty.to_owned(), - default.as_ref().map(|default| default.to_coq()), - ) - }) - .collect::>(), - &predicates - .iter() - .map(|predicate| predicate.to_coq()) - .collect::>(), - &bounds - .iter() - .map(|bound| { - bound.to_coq( - coq::Expression::just_name("Self"), - coq::ArgSpecKind::Implicit, - ) - }) - .collect::>(), - &body.iter() - .map(|(name, item)| match item { - TraitItem::Definition { - ty_params, - where_predicates, - ty, - } => vec![coq::ClassFieldDef::new( - &Some(name.to_owned()), - &[ - vec![coq::ArgDecl::monadic_typeclass_parameter()], - if ty_params.is_empty() { - vec![] - } else { - vec![coq::ArgDecl::new( - &coq::ArgDeclVar::Simple { - idents: ty_params.to_owned(), - ty: Some(coq::Expression::Set), - }, - coq::ArgSpecKind::Implicit, - )] - }, - where_predicates - .iter() - .enumerate() - .map(|(i, predicate)| { - predicate.to_coq().add_var(&["H'".to_string(), i.to_string()].concat()) - }) - .collect(), - ] - .concat(), - &ty.to_coq(), - )], - TraitItem::DefinitionWithDefault { .. } => vec![], - TraitItem::Type(bounds) => [ - vec![coq::ClassFieldDef::new( - &Some(name.to_owned()), - &[], - &coq::Expression::Set, - )], - if bounds.is_empty() { - vec![] - } else { - vec![coq::ClassFieldDef::new( - &None, - &[], - &coq::Expression::SigmaType { - args: bounds - .iter() - .map(|bound| { - bound.to_coq( - coq::Expression::just_name(name), - coq::ArgSpecKind::Explicit, - ) - }) - .collect::>(), - image: Box::new(coq::Expression::Unit), - }, - )] - }, - ] - .concat(), - }) - .concat(), - &body.iter() - .map(|(name, item)| match item { - TraitItem::Definition { - ty_params, - where_predicates, - ty: _, - } => coq::Instance::new( - false, - &format!("Method_{name}"), - &[ - coq::ArgDecl::monadic_typeclass_parameter(), - coq::ArgDecl::new( - &coq::ArgDeclVar::Generalized { - idents: vec![], - ty: coq::Expression::just_name("Trait"), - }, - coq::ArgSpecKind::Explicit, - ), - ], - coq::Expression::Variable { - ident: Path::new(&["Notation", "Dot"]), - no_implicit: false, - } - .apply(&coq::Expression::String(name.to_owned())), - &coq::Expression::Record { - fields: vec![coq::Field::new( - &Path::new(&["Notation", "dot"]), - &[ - if ty_params.is_empty() { - vec![] - } else { - vec![coq::ArgDecl::of_ty_params(ty_params, coq::ArgSpecKind::Implicit)] - }, - where_predicates - .iter() - .enumerate() - .map(|(i, predicate)| { - predicate.to_coq().add_var(&["H'".to_string(), i.to_string()].concat()) - }) - .collect(), - ] - .concat(), - &coq::Expression::just_name(name) - .apply_many_args( - &ty_params - .iter() - .map(|ty_param| { - (Some(ty_param.to_owned()), coq::Expression::just_name(ty_param)) - }) - .collect::>(), - ) - .apply_many_args( - &where_predicates - .iter() - .enumerate() - .map(|(i, _)| { - let var_name = ["H'".to_string(), i.to_string()].concat(); - (Some(var_name.clone()), coq::Expression::just_name(&var_name)) - }) - .collect::>() - ), - )], - }, - vec![], - ), - TraitItem::Type { .. } => coq::Instance::new( - false, - &format!("Method_{name}"), - &[coq::ArgDecl::new( - &coq::ArgDeclVar::Generalized { - idents: vec![], - ty: coq::Expression::just_name("Trait"), - }, - coq::ArgSpecKind::Explicit, - )], - coq::Expression::Variable { - ident: Path::new(&["Notation", "DoubleColonType"]), - no_implicit: false, - } - .apply(&coq::Expression::just_name("Self")) - .apply(&coq::Expression::String(name.to_owned())), - &coq::Expression::Record { - fields: vec![coq::Field::new( - &Path::new(&["Notation", "double_colon_type"]), - &[], - &coq::Expression::just_name(name), - )], - }, - vec![], - ), - TraitItem::DefinitionWithDefault { - ty_params, - where_predicates, - signature_and_body, - } => coq::Instance::new( - false, - &format!("Method_{name}"), - &[ - coq::ArgDecl::monadic_typeclass_parameter(), - coq::ArgDecl::new( - &coq::ArgDeclVar::Generalized { - idents: vec![], - ty: coq::Expression::just_name("Trait"), - }, - coq::ArgSpecKind::Explicit, - ), - ], - coq::Expression::Variable { - ident: Path::new(&["Notation", "Dot"]), - no_implicit: false, - } - .apply(&coq::Expression::String(name.to_owned())), - &coq::Expression::Record { - fields: vec![coq::Field::new( - &Path::new(&["Notation", "dot"]), - &[ - if ty_params.is_empty() { - vec![] - } else { - vec![coq::ArgDecl::of_ty_params(ty_params, coq::ArgSpecKind::Implicit)] - }, - where_predicates - .iter() - .map(|predicate| predicate.to_coq()) - .collect(), - signature_and_body - .args - .iter() - .map(|(name, ty)| { - coq::ArgDecl::new( - &coq::ArgDeclVar::Simple { - idents: vec![name.to_owned()], - ty: Some(ty.to_coq()), - }, - coq::ArgSpecKind::Explicit, - ) - }) - .collect::>(), - ] - .concat(), - &coq::Expression::Code(group([ - text("("), - match &signature_and_body.body { - None => text("axiom"), - Some(body) => body.to_doc(false), - }, - line(), - nest([ - text(":"), - line(), - signature_and_body.ret_ty.to_doc(false), - text(")"), - ]), - ])), - )], - }, - vec![], - ), - }) - .collect::>(), - ) - .to_doc(), + TopLevelItem::Trait(tr) => tr.to_doc(), TopLevelItem::TraitImpl { generic_tys, ty_params, @@ -2318,7 +2080,7 @@ impl TopLevelItem { }) .collect::>(), ), - &if items.is_empty() { + &Some(if items.is_empty() { coq::Expression::Variable { ident: Path::concat(&[ of_trait.to_owned(), @@ -2344,7 +2106,7 @@ impl TopLevelItem { }) .collect::>(), } - }, + }), if *has_predicates_on_assoc_ty { vec![text("eauto.")] } else { @@ -2454,7 +2216,7 @@ impl TypeStructStruct { no_implicit: false, } .apply(&coq::Expression::just_name("t")), - &coq::Expression::just_name("axiom"), + &Some(coq::Expression::just_name("axiom")), vec![], ), ) @@ -2583,7 +2345,7 @@ impl TypeStructStruct { .apply(&coq::Expression::String( name.to_owned(), )), - &coq::Expression::Record { + &Some(coq::Expression::Record { fields: vec![coq::Field::new( &Path::new(&["Notation", "dot"]), &projection_pattern, @@ -2591,7 +2353,7 @@ impl TypeStructStruct { "x{i}" )), )], - }, + }), vec![], )), coq::TopLevelItem::Instance(coq::Instance::new( @@ -2609,7 +2371,7 @@ impl TypeStructStruct { coq::Expression::just_name("t"), coq::Expression::String(name.to_owned()), ]), - &coq::Expression::Record { + &Some(coq::Expression::Record { fields: vec![coq::Field::new( &Path::new(&[ "Notation", @@ -2620,7 +2382,7 @@ impl TypeStructStruct { "x{i}" )), )], - }, + }), vec![], )), ] @@ -2674,6 +2436,396 @@ impl TypeStructStruct { } } +impl Trait { + fn to_doc(&self) -> Doc { + let Trait { + name, + ty_params, + predicates, + bounds, + body, + } = self; + + let items = &body + .iter() + .map(|item| match &item.item_data { + TraitItemData::Definition { + ty_params, + where_predicates, + ty, + } => vec![coq::ClassFieldDef::new( + &Some(item.item_name.to_owned()), + &[ + vec![coq::ArgDecl::monadic_typeclass_parameter()], + if ty_params.is_empty() { + vec![] + } else { + vec![coq::ArgDecl::new( + &coq::ArgDeclVar::Simple { + idents: ty_params.to_owned(), + ty: Some(coq::Expression::Set), + }, + coq::ArgSpecKind::Implicit, + )] + }, + where_predicates + .iter() + .enumerate() + .map(|(i, predicate)| { + predicate + .to_coq() + .add_var(&["H'".to_string(), i.to_string()].concat()) + }) + .collect(), + ] + .concat(), + &ty.to_coq(), + )], + TraitItemData::DefinitionWithDefault { .. } => vec![], + TraitItemData::Type(bounds) => [ + vec![coq::ClassFieldDef::new( + &Some(item.item_name.to_owned()), + &[], + &coq::Expression::Set, + )], + if bounds.is_empty() { + vec![] + } else { + vec![coq::ClassFieldDef::new( + &Some(["__the_bounds_of_", &item.item_name].concat()), + &[], + &coq::Expression::SigmaType { + args: bounds + .iter() + .map(|bound| { + bound.to_coq( + coq::Expression::just_name(&item.item_name), + coq::ArgSpecKind::Explicit, + ) + }) + .collect::>(), + image: Box::new(coq::Expression::Unit), + }, + )] + }, + ] + .concat(), + }) + .concat(); + + coq::TopLevelItem::Module(coq::Module::new( + name, + coq::TopLevel::concat(&[ + coq::TopLevel::locally_unset_primitive_projections_if( + items.is_empty(), + &[coq::TopLevelItem::Class(coq::Class::new( + "Trait", + &[ + vec![coq::ArgDecl::new( + &coq::ArgDeclVar::Simple { + idents: vec!["Self".to_string()], + ty: Some(coq::Expression::Set), + }, + coq::ArgSpecKind::Explicit, + )], + bounds + .iter() + .map(|bound| { + bound.to_coq( + coq::Expression::just_name("Self"), + coq::ArgSpecKind::Implicit, + ) + }) + .collect(), + if ty_params.is_empty() { + vec![] + } else { + vec![coq::ArgDecl::new( + &coq::ArgDeclVar::Simple { + idents: ty_params + .iter() + .map(|(ty, default)| { + match default { + // @TODO: implement the translation of type parameters with default + Some(_default) => ["(* TODO *) ", ty].concat(), + None => ty.to_string(), + } + }) + .collect(), + ty: Some(coq::Expression::Set), + }, + coq::ArgSpecKind::Implicit, + )] + }, + predicates + .iter() + .map(|predicate| predicate.to_coq()) + .collect(), + ] + .concat(), + items, + ))], + ), + coq::TopLevel::new( + &body + .iter() + .map(|item| match &item.item_data { + TraitItemData::Definition { + ty_params, + where_predicates, + ty: _, + } => coq::Instance::new( + false, + &["Method_", &item.item_name].concat(), + &[ + coq::ArgDecl::monadic_typeclass_parameter(), + coq::ArgDecl::new( + &coq::ArgDeclVar::Generalized { + idents: vec![], + ty: coq::Expression::just_name("Trait"), + }, + coq::ArgSpecKind::Explicit, + ), + ], + coq::Expression::Variable { + ident: Path::new(&["Notation", "Dot"]), + no_implicit: false, + } + .apply(&coq::Expression::String(item.item_name.to_owned())), + &Some(coq::Expression::Record { + fields: vec![coq::Field::new( + &Path::new(&["Notation", "dot"]), + &[ + if ty_params.is_empty() { + vec![] + } else { + vec![coq::ArgDecl::of_ty_params( + ty_params, + coq::ArgSpecKind::Implicit, + )] + }, + where_predicates + .iter() + .enumerate() + .map(|(i, predicate)| { + predicate.to_coq().add_var( + &["H'".to_string(), i.to_string()].concat(), + ) + }) + .collect(), + ] + .concat(), + &coq::Expression::just_name(&item.item_name) + .apply_many_args( + &ty_params + .iter() + .map(|ty_param| { + ( + Some(ty_param.to_owned()), + coq::Expression::just_name(ty_param), + ) + }) + .collect::>(), + ) + .apply_many_args( + &where_predicates + .iter() + .enumerate() + .map(|(i, _)| { + let var_name = + ["H'".to_string(), i.to_string()] + .concat(); + ( + Some(var_name.clone()), + coq::Expression::just_name(&var_name), + ) + }) + .collect::>(), + ), + )], + }), + vec![], + ), + TraitItemData::Type { .. } => coq::Instance::new( + false, + &["Method_", &item.item_name].concat(), + &[coq::ArgDecl::new( + &coq::ArgDeclVar::Generalized { + idents: vec![], + ty: coq::Expression::just_name("Trait"), + }, + coq::ArgSpecKind::Explicit, + )], + coq::Expression::Variable { + ident: Path::new(&["Notation", "DoubleColonType"]), + no_implicit: false, + } + .apply(&coq::Expression::just_name("Self")) + .apply(&coq::Expression::String(item.item_name.to_owned())), + &Some(coq::Expression::Record { + fields: vec![coq::Field::new( + &Path::new(&["Notation", "double_colon_type"]), + &[], + &coq::Expression::just_name(&item.item_name), + )], + }), + vec![], + ), + TraitItemData::DefinitionWithDefault { + ty_params, + where_predicates, + signature_and_body, + } => coq::Instance::new( + false, + &["Method_", &item.item_name].concat(), + &[ + coq::ArgDecl::monadic_typeclass_parameter(), + coq::ArgDecl::new( + &coq::ArgDeclVar::Generalized { + idents: vec![], + ty: coq::Expression::just_name("Trait"), + }, + coq::ArgSpecKind::Explicit, + ), + ], + coq::Expression::Variable { + ident: Path::new(&["Notation", "Dot"]), + no_implicit: false, + } + .apply(&coq::Expression::String(item.item_name.to_owned())), + &Some(coq::Expression::Record { + fields: vec![coq::Field::new( + &Path::new(&["Notation", "dot"]), + &[ + if ty_params.is_empty() { + vec![] + } else { + vec![coq::ArgDecl::of_ty_params( + ty_params, + coq::ArgSpecKind::Implicit, + )] + }, + where_predicates + .iter() + .map(|predicate| predicate.to_coq()) + .collect(), + signature_and_body + .args + .iter() + .map(|(name, ty)| { + coq::ArgDecl::new( + &coq::ArgDeclVar::Simple { + idents: vec![name.to_owned()], + ty: Some(ty.to_coq()), + }, + coq::ArgSpecKind::Explicit, + ) + }) + .collect::>(), + ] + .concat(), + &coq::Expression::Code(group([ + text("("), + match &signature_and_body.body { + None => text("axiom"), + Some(body) => body.to_doc(false), + }, + line(), + nest([ + text(":"), + line(), + signature_and_body.ret_ty.to_doc(false), + text(")"), + ]), + ])), + )], + }), + vec![], + ), + }) + .map(|i| coq::TopLevelItem::Instance(i.to_owned())) + .collect_vec(), + ), + // extraction of the trait instances + coq::TopLevel::new( + &body + .iter() + .filter_map(|item| match &item.item_data { + TraitItemData::Definition { .. } + | TraitItemData::DefinitionWithDefault { .. } => None, + TraitItemData::Type(bounds) => { + if bounds.is_empty() { + None + } else { + Some(coq::TopLevelItem::Module(coq::Module::new( + &[ + "The_Bounds_Of_", + &item.item_name, + ] + .concat(), + coq::TopLevel::new( + &bounds + .iter() + .map(|bound| coq::TopLevelItem::Module(coq::Module::new( + &bound.name.to_name(), + coq::TopLevel::new(&[ + coq::TopLevelItem::Instance(coq::Instance::new( + false, + "I", + &[coq::ArgDecl::new( + &coq::ArgDeclVar::Generalized { + idents: vec![], + ty: coq::Expression::just_name("Trait"), + }, + coq::ArgSpecKind::Explicit, + )], + coq::Expression::Variable { + ident: Path::concat(&[ + bound.name.to_owned(), + Path::new(&["Trait"]), + ]), + no_implicit: false, + } + .apply(&coq::Expression::just_name(&item.item_name)), + &None, + { + let proj_name = ["__the_bounds_of_", &item.item_name].concat(); + vec![concat([ + text("repeat"), + line(), + group([ + text("("), + text([ + "destruct ", + &proj_name, + " [? ", + &proj_name, + "]", + ].concat()), + line(), + text("try assumption"), + text(")"), + ]), + text("."), + ])] + }, + )), + ]), + ))) + .collect_vec(), + ), + ))) + } + }, + }) + .collect_vec(), + ), + ]), + )) + .to_doc() + } +} + impl TopLevel { // function returns TopLevelItem::TypeStructStruct (comparing name) fn find_tli_by_name(&self, self_ty: &CoqType) -> Option<&TopLevelItem> { From 335b5af1748619345fcabd9b81d547dc7298582c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Tue, 26 Sep 2023 18:02:00 +0200 Subject: [PATCH 02/13] changes to collect supertraits --- CoqOfRust/ink/ink.v | 48 ++++--- CoqOfRust/ink/ink_env.v | 224 ++++++++++++++++------------- CoqOfRust/ink/ink_storage_traits.v | 14 +- lib/src/env.rs | 4 +- lib/src/path.rs | 8 +- lib/src/top_level.rs | 79 +++++++--- 6 files changed, 228 insertions(+), 149 deletions(-) diff --git a/CoqOfRust/ink/ink.v b/CoqOfRust/ink/ink.v index 0af52ed18..31ecf4295 100644 --- a/CoqOfRust/ink/ink.v +++ b/CoqOfRust/ink/ink.v @@ -329,7 +329,7 @@ Module reflect. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End parity_scale_codec_codec_Decode. @@ -337,7 +337,7 @@ Module reflect. Global Instance I `(Trait) : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End ink_reflect_dispatch_ExecuteDispatchable. @@ -385,7 +385,7 @@ Module reflect. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End ink_reflect_dispatch_DecodeDispatch. @@ -393,7 +393,7 @@ Module reflect. Global Instance I `(Trait) : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End ink_reflect_dispatch_ExecuteDispatchable. @@ -717,7 +717,7 @@ Module codegen. : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. repeat - (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; try assumption). Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. @@ -781,7 +781,7 @@ Module codegen. : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. repeat - (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; try assumption). Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. @@ -1379,7 +1379,7 @@ Module trait_def. : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. repeat - (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; try assumption). Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. @@ -1441,7 +1441,7 @@ Module trait_def. : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. repeat - (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; try assumption). Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. @@ -1506,7 +1506,7 @@ Module call_builder. Global Instance I `(Trait) : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. repeat - (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; try assumption). Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. @@ -1567,7 +1567,7 @@ Module call_builder. Global Instance I `(Trait) : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. repeat - (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; try assumption). Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. @@ -1617,7 +1617,7 @@ Module TraitCallForwarder. Global Instance I `(Trait) : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. repeat - (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; try assumption). Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. @@ -1677,7 +1677,7 @@ End TraitCallForwarder. Global Instance I `(Trait) : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. repeat - (destruct __the_bounds_of_Forwarder [? __the_bounds_of_Forwarder] + (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; try assumption). Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. @@ -2005,7 +2005,7 @@ Module Wrap_dispatch_1. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End parity_scale_codec_codec_Decode. @@ -2013,7 +2013,7 @@ Module Wrap_dispatch_1. Global Instance I `(Trait) : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End ink_reflect_dispatch_ExecuteDispatchable. @@ -2061,7 +2061,7 @@ Module Wrap_dispatch_1. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End ink_reflect_dispatch_DecodeDispatch. @@ -2069,7 +2069,7 @@ Module Wrap_dispatch_1. Global Instance I `(Trait) : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End ink_reflect_dispatch_ExecuteDispatchable. @@ -2256,14 +2256,16 @@ Module ContractMessageDecoder. Module parity_scale_codec_codec_Decode. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). Defined. End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_ExecuteDispatchable. Global Instance I `(Trait) : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). Defined. End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. @@ -2289,14 +2291,16 @@ Module ContractConstructorDecoder. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). Defined. End ink_reflect_dispatch_DecodeDispatch. Module ink_reflect_dispatch_ExecuteDispatchable. Global Instance I `(Trait) : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). Defined. End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. @@ -2597,7 +2601,7 @@ Module chain_extension. Global Instance I `(Trait) : ink_env.chain_extension.FromStatusCode.Trait ErrorCode. repeat - (destruct __the_bounds_of_ErrorCode [? __the_bounds_of_ErrorCode] + (destruct __the_bounds_of_ErrorCode as [? __the_bounds_of_ErrorCode]; try assumption). Defined. End ink_env_chain_extension_FromStatusCode. @@ -2693,7 +2697,7 @@ Module ChainExtension. Global Instance I `(Trait) : ink_env.chain_extension.FromStatusCode.Trait ErrorCode. repeat - (destruct __the_bounds_of_ErrorCode [? __the_bounds_of_ErrorCode] + (destruct __the_bounds_of_ErrorCode as [? __the_bounds_of_ErrorCode]; try assumption). Defined. End ink_env_chain_extension_FromStatusCode. diff --git a/CoqOfRust/ink/ink_env.v b/CoqOfRust/ink/ink_env.v index 0abc75163..704f255b9 100644 --- a/CoqOfRust/ink/ink_env.v +++ b/CoqOfRust/ink/ink_env.v @@ -124,21 +124,21 @@ Module types. Module core_default_Default. Global Instance I `(Trait) : core.default.Default.Trait Bytes. repeat - (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] + (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; try assumption). Defined. End core_default_Default. Module core_convert_AsRef. Global Instance I `(Trait) : core.convert.AsRef.Trait Bytes. repeat - (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] + (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; try assumption). Defined. End core_convert_AsRef. Module core_convert_AsMut. Global Instance I `(Trait) : core.convert.AsMut.Trait Bytes. repeat - (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] + (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; try assumption). Defined. End core_convert_AsMut. @@ -274,56 +274,56 @@ Module types. Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End ink_env_types_CodecAsType. Module core_clone_Clone. Global Instance I `(Trait) : core.clone.Clone.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_clone_Clone. Module core_cmp_PartialEq. Global Instance I `(Trait) : core.cmp.PartialEq.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_cmp_PartialEq. Module core_cmp_Eq. Global Instance I `(Trait) : core.cmp.Eq.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_cmp_Eq. Module core_cmp_Ord. Global Instance I `(Trait) : core.cmp.Ord.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_cmp_Ord. Module core_convert_AsRef. Global Instance I `(Trait) : core.convert.AsRef.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_convert_AsRef. Module core_convert_AsMut. Global Instance I `(Trait) : core.convert.AsMut.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_convert_AsMut. @@ -333,42 +333,42 @@ Module types. Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. Global Instance I `(Trait) : core.marker.Copy.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End core_marker_Copy. Module core_clone_Clone. Global Instance I `(Trait) : core.clone.Clone.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End core_clone_Clone. Module core_cmp_PartialEq. Global Instance I `(Trait) : core.cmp.PartialEq.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End core_cmp_PartialEq. Module core_cmp_Eq. Global Instance I `(Trait) : core.cmp.Eq.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End core_cmp_Eq. @@ -376,7 +376,7 @@ Module types. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. @@ -384,7 +384,7 @@ Module types. Global Instance I `(Trait) : ink_env.types.FromLittleEndian.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End ink_env_types_FromLittleEndian. @@ -393,61 +393,71 @@ Module types. Module parity_scale_codec_codec_Codec. Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. Global Instance I `(Trait) : core.marker.Copy.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_marker_Copy. Module core_clone_Clone. Global Instance I `(Trait) : core.clone.Clone.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_clone_Clone. Module ink_primitives_types_Clear. Global Instance I `(Trait) : ink_primitives.types.Clear.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End ink_primitives_types_Clear. Module core_cmp_PartialEq. Global Instance I `(Trait) : core.cmp.PartialEq.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_cmp_PartialEq. Module core_cmp_Eq. Global Instance I `(Trait) : core.cmp.Eq.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_cmp_Eq. Module core_cmp_Ord. Global Instance I `(Trait) : core.cmp.Ord.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_cmp_Ord. Module core_convert_AsRef. Global Instance I `(Trait) : core.convert.AsRef.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_convert_AsRef. Module core_convert_AsMut. Global Instance I `(Trait) : core.convert.AsMut.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_convert_AsMut. End The_Bounds_Of_Hash. @@ -456,42 +466,42 @@ Module types. Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. Global Instance I `(Trait) : core.marker.Copy.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End core_marker_Copy. Module core_clone_Clone. Global Instance I `(Trait) : core.clone.Clone.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End core_clone_Clone. Module core_cmp_PartialEq. Global Instance I `(Trait) : core.cmp.PartialEq.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End core_cmp_PartialEq. Module core_cmp_Eq. Global Instance I `(Trait) : core.cmp.Eq.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End core_cmp_Eq. @@ -499,7 +509,7 @@ Module types. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. @@ -507,7 +517,7 @@ Module types. Global Instance I `(Trait) : ink_env.types.FromLittleEndian.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End ink_env_types_FromLittleEndian. @@ -517,7 +527,7 @@ Module types. Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End parity_scale_codec_codec_Codec. @@ -525,35 +535,35 @@ Module types. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. Global Instance I `(Trait) : core.marker.Copy.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End core_marker_Copy. Module core_clone_Clone. Global Instance I `(Trait) : core.clone.Clone.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End core_clone_Clone. Module core_cmp_PartialEq. Global Instance I `(Trait) : core.cmp.PartialEq.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End core_cmp_PartialEq. Module core_cmp_Eq. Global Instance I `(Trait) : core.cmp.Eq.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End core_cmp_Eq. @@ -561,7 +571,7 @@ Module types. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. @@ -569,7 +579,7 @@ Module types. Global Instance I `(Trait) : ink_env.types.FromLittleEndian.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End ink_env_types_FromLittleEndian. @@ -622,19 +632,22 @@ Module FromLittleEndian. Module core_default_Default. Global Instance I `(Trait) : core.default.Default.Trait Bytes. repeat - (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] try assumption). + (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; + try assumption). Defined. End core_default_Default. Module core_convert_AsRef. Global Instance I `(Trait) : core.convert.AsRef.Trait Bytes. repeat - (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] try assumption). + (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; + try assumption). Defined. End core_convert_AsRef. Module core_convert_AsMut. Global Instance I `(Trait) : core.convert.AsMut.Trait Bytes. repeat - (destruct __the_bounds_of_Bytes [? __the_bounds_of_Bytes] try assumption). + (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; + try assumption). Defined. End core_convert_AsMut. End The_Bounds_Of_Bytes. @@ -769,56 +782,56 @@ Module Environment. Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End ink_env_types_CodecAsType. Module core_clone_Clone. Global Instance I `(Trait) : core.clone.Clone.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_clone_Clone. Module core_cmp_PartialEq. Global Instance I `(Trait) : core.cmp.PartialEq.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_cmp_PartialEq. Module core_cmp_Eq. Global Instance I `(Trait) : core.cmp.Eq.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_cmp_Eq. Module core_cmp_Ord. Global Instance I `(Trait) : core.cmp.Ord.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_cmp_Ord. Module core_convert_AsRef. Global Instance I `(Trait) : core.convert.AsRef.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_convert_AsRef. Module core_convert_AsMut. Global Instance I `(Trait) : core.convert.AsMut.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId [? __the_bounds_of_AccountId] + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; try assumption). Defined. End core_convert_AsMut. @@ -827,42 +840,42 @@ Module Environment. Module parity_scale_codec_codec_Codec. Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. Global Instance I `(Trait) : core.marker.Copy.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End core_marker_Copy. Module core_clone_Clone. Global Instance I `(Trait) : core.clone.Clone.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End core_clone_Clone. Module core_cmp_PartialEq. Global Instance I `(Trait) : core.cmp.PartialEq.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End core_cmp_PartialEq. Module core_cmp_Eq. Global Instance I `(Trait) : core.cmp.Eq.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End core_cmp_Eq. @@ -870,14 +883,14 @@ Module Environment. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. Module ink_env_types_FromLittleEndian. Global Instance I `(Trait) : ink_env.types.FromLittleEndian.Trait Balance. repeat - (destruct __the_bounds_of_Balance [? __the_bounds_of_Balance] + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; try assumption). Defined. End ink_env_types_FromLittleEndian. @@ -886,61 +899,71 @@ Module Environment. Module parity_scale_codec_codec_Codec. Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. Global Instance I `(Trait) : core.marker.Copy.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_marker_Copy. Module core_clone_Clone. Global Instance I `(Trait) : core.clone.Clone.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_clone_Clone. Module ink_primitives_types_Clear. Global Instance I `(Trait) : ink_primitives.types.Clear.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End ink_primitives_types_Clear. Module core_cmp_PartialEq. Global Instance I `(Trait) : core.cmp.PartialEq.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_cmp_PartialEq. Module core_cmp_Eq. Global Instance I `(Trait) : core.cmp.Eq.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_cmp_Eq. Module core_cmp_Ord. Global Instance I `(Trait) : core.cmp.Ord.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_cmp_Ord. Module core_convert_AsRef. Global Instance I `(Trait) : core.convert.AsRef.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_convert_AsRef. Module core_convert_AsMut. Global Instance I `(Trait) : core.convert.AsMut.Trait Hash. repeat - (destruct __the_bounds_of_Hash [? __the_bounds_of_Hash] try assumption). + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). Defined. End core_convert_AsMut. End The_Bounds_Of_Hash. @@ -949,42 +972,42 @@ Module Environment. Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. Global Instance I `(Trait) : core.marker.Copy.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End core_marker_Copy. Module core_clone_Clone. Global Instance I `(Trait) : core.clone.Clone.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End core_clone_Clone. Module core_cmp_PartialEq. Global Instance I `(Trait) : core.cmp.PartialEq.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End core_cmp_PartialEq. Module core_cmp_Eq. Global Instance I `(Trait) : core.cmp.Eq.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End core_cmp_Eq. @@ -992,7 +1015,7 @@ Module Environment. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. @@ -1000,7 +1023,7 @@ Module Environment. Global Instance I `(Trait) : ink_env.types.FromLittleEndian.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp [? __the_bounds_of_Timestamp] + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; try assumption). Defined. End ink_env_types_FromLittleEndian. @@ -1010,42 +1033,42 @@ Module Environment. Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. Global Instance I `(Trait) : core.marker.Copy.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End core_marker_Copy. Module core_clone_Clone. Global Instance I `(Trait) : core.clone.Clone.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End core_clone_Clone. Module core_cmp_PartialEq. Global Instance I `(Trait) : core.cmp.PartialEq.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End core_cmp_PartialEq. Module core_cmp_Eq. Global Instance I `(Trait) : core.cmp.Eq.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End core_cmp_Eq. @@ -1053,7 +1076,7 @@ Module Environment. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. @@ -1061,7 +1084,7 @@ Module Environment. Global Instance I `(Trait) : ink_env.types.FromLittleEndian.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber [? __the_bounds_of_BlockNumber] + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. End ink_env_types_FromLittleEndian. @@ -1103,7 +1126,8 @@ Module contract. Module ink_env_types_Environment. Global Instance I `(Trait) : ink_env.types.Environment.Trait Env. repeat - (destruct __the_bounds_of_Env [? __the_bounds_of_Env] try assumption). + (destruct __the_bounds_of_Env as [? __the_bounds_of_Env]; + try assumption). Defined. End ink_env_types_Environment. End The_Bounds_Of_Env. @@ -1367,7 +1391,7 @@ Module call. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Error. repeat - (destruct __the_bounds_of_Error [? __the_bounds_of_Error] + (destruct __the_bounds_of_Error as [? __the_bounds_of_Error]; try assumption). Defined. End parity_scale_codec_codec_Decode. @@ -1657,7 +1681,7 @@ Module hash. Module core_default_Default. Global Instance I `(Trait) : core.default.Default.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End core_default_Default. @@ -1844,7 +1868,7 @@ Module topics. Global Instance I `(Trait) : ink_env.topics.EventTopicsAmount.Trait RemainingTopics. repeat - (destruct __the_bounds_of_RemainingTopics [? __the_bounds_of_RemainingTopics] + (destruct __the_bounds_of_RemainingTopics as [? __the_bounds_of_RemainingTopics]; try assumption). Defined. End ink_env_topics_EventTopicsAmount. @@ -4927,7 +4951,7 @@ Module create_builder. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Error. repeat - (destruct __the_bounds_of_Error [? __the_bounds_of_Error] + (destruct __the_bounds_of_Error as [? __the_bounds_of_Error]; try assumption). Defined. End parity_scale_codec_codec_Decode. @@ -5176,7 +5200,8 @@ Module ConstructorReturnType. Module parity_scale_codec_codec_Decode. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Error. repeat - (destruct __the_bounds_of_Error [? __the_bounds_of_Error] try assumption). + (destruct __the_bounds_of_Error as [? __the_bounds_of_Error]; + try assumption). Defined. End parity_scale_codec_codec_Decode. End The_Bounds_Of_Error. @@ -5779,7 +5804,7 @@ Module ContractEnv. Module ink_env_types_Environment. Global Instance I `(Trait) : ink_env.types.Environment.Trait Env. repeat - (destruct __the_bounds_of_Env [? __the_bounds_of_Env] try assumption). + (destruct __the_bounds_of_Env as [? __the_bounds_of_Env]; try assumption). Defined. End ink_env_types_Environment. End The_Bounds_Of_Env. @@ -5982,7 +6007,8 @@ Module HashOutput. Module core_default_Default. Global Instance I `(Trait) : core.default.Default.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). Defined. End core_default_Default. End The_Bounds_Of_Type_. @@ -6180,7 +6206,7 @@ Module Topics. Global Instance I `(Trait) : ink_env.topics.EventTopicsAmount.Trait RemainingTopics. repeat - (destruct __the_bounds_of_RemainingTopics [? __the_bounds_of_RemainingTopics] + (destruct __the_bounds_of_RemainingTopics as [? __the_bounds_of_RemainingTopics]; try assumption). Defined. End ink_env_topics_EventTopicsAmount. diff --git a/CoqOfRust/ink/ink_storage_traits.v b/CoqOfRust/ink/ink_storage_traits.v index c68a192f2..f9041cb9b 100644 --- a/CoqOfRust/ink/ink_storage_traits.v +++ b/CoqOfRust/ink/ink_storage_traits.v @@ -185,7 +185,7 @@ Module storage. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End ink_storage_traits_storage_Storable. @@ -195,7 +195,7 @@ Module storage. Global Instance I `(Trait) : ink_storage_traits.storage.StorageKey.Trait PreferredKey. repeat - (destruct __the_bounds_of_PreferredKey [? __the_bounds_of_PreferredKey] + (destruct __the_bounds_of_PreferredKey as [? __the_bounds_of_PreferredKey]; try assumption). Defined. End ink_storage_traits_storage_StorageKey. @@ -224,7 +224,7 @@ Module storage. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; try assumption). Defined. End ink_storage_traits_storage_Storable. @@ -343,7 +343,8 @@ Module StorableHint. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. @@ -352,7 +353,7 @@ Module StorableHint. Global Instance I `(Trait) : ink_storage_traits.storage.StorageKey.Trait PreferredKey. repeat - (destruct __the_bounds_of_PreferredKey [? __the_bounds_of_PreferredKey] + (destruct __the_bounds_of_PreferredKey as [? __the_bounds_of_PreferredKey]; try assumption). Defined. End ink_storage_traits_storage_StorageKey. @@ -381,7 +382,8 @@ Module AutoStorableHint. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ [? __the_bounds_of_Type_] try assumption). + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. diff --git a/lib/src/env.rs b/lib/src/env.rs index a34587f20..f7060e276 100644 --- a/lib/src/env.rs +++ b/lib/src/env.rs @@ -1,4 +1,5 @@ use crate::configuration::*; +use crate::path::Path; use crate::ty::*; use rustc_middle::ty::TyCtxt; @@ -6,7 +7,7 @@ use std::collections::HashMap; /// The environment used for the translation steps, holding various state /// information -pub(crate) struct Env<'a> { +pub(crate) struct Env<'a, 'b> { /// We use a counter for the disambiguation of several impls for the same /// type pub(crate) impl_counter: HashMap, @@ -18,4 +19,5 @@ pub(crate) struct Env<'a> { pub(crate) reorder_map: HashMap>, /// the configuration read or default if no config file is found pub(crate) configuration: Configuration, + pub(crate) supertraits: &'b mut HashMap>, } diff --git a/lib/src/path.rs b/lib/src/path.rs index b07399fa8..4b1505d10 100644 --- a/lib/src/path.rs +++ b/lib/src/path.rs @@ -163,7 +163,7 @@ pub(crate) fn compile_qpath(env: &Env, qpath: &QPath) -> Path { #[allow(dead_code)] /// returns generics for the given path pub(crate) fn get_path_generics<'a>( - env: &Env<'a>, + env: &Env<'a, '_>, path: &rustc_hir::Path, ) -> Option<&'a rustc_middle::ty::Generics> { path.res @@ -272,4 +272,10 @@ impl Path { .collect(), } } + + pub(crate) fn push(&self, segment: S) -> Self { + let mut path = self.clone(); + path.segments.push(segment.to_string()); + path + } } diff --git a/lib/src/top_level.rs b/lib/src/top_level.rs index 5ed8c5477..0080896db 100644 --- a/lib/src/top_level.rs +++ b/lib/src/top_level.rs @@ -305,7 +305,12 @@ fn deduplicate_top_level_items(items: Vec) -> Vec { /// - [rustc_middle::hir::map::Map] is intuitively the type for hir environments /// - Method [body] allows retrievient the body of an identifier [body_id] in an /// hir environment [hir] -fn compile_top_level_item(tcx: &TyCtxt, env: &mut Env, item: &Item) -> Vec { +fn compile_top_level_item( + tcx: &TyCtxt, + env: &mut Env, + item: &Item, + path: Path, +) -> Vec { let name = to_valid_coq_name(item.ident.name.to_string()); if env.axiomatize { let def_id = item.owner_id.to_def_id(); @@ -371,7 +376,8 @@ fn compile_top_level_item(tcx: &TyCtxt, env: &mut Env, item: &Item) -> Vec Vec vec![TopLevelItem::Error("Union".to_string())], ItemKind::Trait(_, _, generics, generic_bounds, items) => { + collect_supertraits(env, generic_bounds, path); vec![TopLevelItem::Trait(Trait { name, ty_params: get_ty_params(env, generics), @@ -561,6 +568,24 @@ fn compile_top_level_item(tcx: &TyCtxt, env: &mut Env, item: &Item) -> Vec { + Some(compile_path(env, ptraitref.trait_ref.path)) + }, + // @TODO: should we include GenericBound::LangItemTrait ? + GenericBound::LangItemTrait { .. } + // we ignore lifetimes + | GenericBound::Outlives { .. } => None, + }) + .collect(); + env.supertraits.insert(path, supertraits); +} + /// returns a pair of function signature and its body fn get_hir_fn_sig_and_body<'a>( tcx: &'a TyCtxt, @@ -745,7 +770,7 @@ fn trait_bound_to_where_predicate(bound: TraitBound, ty: Box) -> WhereP WherePredicate { bound, ty } } -/// [compile_generic_bounds] compiles generic bounds in [compile_trait_item_body] +/// [compile_generic_bounds] compiles generic bounds fn compile_generic_bounds( tcx: &TyCtxt, env: &Env, @@ -913,14 +938,23 @@ fn compile_trait_item_body( } } -fn compile_top_level(tcx: &TyCtxt, opts: TopLevelOptions) -> TopLevel { +fn compile_top_level( + tcx: &TyCtxt, + opts: TopLevelOptions, + supertraits_map: &mut HashMap>, +) -> TopLevel { + let file = opts.filename; + // the path to the item being compiled + let path = Path::new(&[file.clone()]); + let mut env = Env { impl_counter: HashMap::new(), tcx: *tcx, axiomatize: opts.axiomatize, - file: opts.filename, + file, reorder_map: HashMap::new(), configuration: get_configuration(&opts.configuration_file), + supertraits: supertraits_map, }; let mut results: Vec = tcx.hir().items().collect(); @@ -931,7 +965,7 @@ fn compile_top_level(tcx: &TyCtxt, opts: TopLevelOptions) -> TopLevel { .iter() .flat_map(|item_id| { let item = tcx.hir().item(*item_id); - compile_top_level_item(tcx, &mut env, item) + compile_top_level_item(tcx, &mut env, item, path.clone()) }) .collect(), ); @@ -954,9 +988,10 @@ pub(crate) fn top_level_to_coq(tcx: &TyCtxt, opts: TopLevelOptions) -> String { axiomatize: opts.axiomatize || configuration.axiomatize, ..opts }; - let top_level = compile_top_level(tcx, opts); + let mut supertraits_map = HashMap::new(); + let top_level = compile_top_level(tcx, opts, &mut supertraits_map); let top_level = mt_top_level(top_level); - top_level.to_pretty(LINE_WIDTH) + top_level.to_pretty(LINE_WIDTH, &supertraits_map) } // additional check. can be eliminated when all possible cases will be covered @@ -1564,7 +1599,7 @@ impl WherePredicate { impl TraitBound { /// Get the generics for the trait - fn compile(tcx: &TyCtxt, env: &Env, ptraitref: &rustc_hir::PolyTraitRef) -> TraitBound { + fn compile(tcx: &TyCtxt, env: &Env, ptraitref: &rustc_hir::PolyTraitRef) -> Self { TraitBound { name: compile_path(env, ptraitref.trait_ref.path), ty_params: get_ty_params_with_default_status( @@ -1627,7 +1662,6 @@ impl TraitTyParamValue { } } - #[allow(dead_code)] fn to_coq_type(&self) -> Box { match self { TraitTyParamValue::JustValue { name: _, ty } => ty.to_owned(), @@ -1637,13 +1671,14 @@ impl TraitTyParamValue { } } -struct ToDocContext<'a> { +struct ToDocContext<'a, 'b> { extra_data: Option<&'a TopLevelItem>, previous_module_names: Vec, + supertraits_map: &'b HashMap>, } impl TopLevelItem { - fn to_doc<'a>(&'a self, to_doc_context: ToDocContext<'a>) -> Doc { + fn to_doc<'a>(&'a self, to_doc_context: ToDocContext<'a, '_>) -> Doc { match self { TopLevelItem::Const { name, ty, value } => match value { None => coq::TopLevel::new(&[ @@ -1698,7 +1733,7 @@ impl TopLevelItem { vec![coq::TopLevelItem::Module(coq::Module::new_with_repeat( name, nb_previous_occurrences_of_module_name, - coq::TopLevel::new(&[coq::TopLevelItem::Code(body.to_doc())]), + coq::TopLevel::new(&[coq::TopLevelItem::Code(body.to_doc(to_doc_context.supertraits_map))]), ))], ] .concat(), @@ -2010,7 +2045,7 @@ impl TopLevelItem { ))]) .to_doc() } - TopLevelItem::Trait(tr) => tr.to_doc(), + TopLevelItem::Trait(tr) => tr.to_doc(to_doc_context.supertraits_map), TopLevelItem::TraitImpl { generic_tys, ty_params, @@ -2437,7 +2472,7 @@ impl TypeStructStruct { } impl Trait { - fn to_doc(&self) -> Doc { + fn to_doc(&self, _supertraits_map: &HashMap>) -> Doc { let Trait { name, ty_params, @@ -2798,9 +2833,9 @@ impl Trait { text([ "destruct ", &proj_name, - " [? ", + " as [? ", &proj_name, - "]", + "];", ].concat()), line(), text("try assumption"), @@ -2826,6 +2861,9 @@ impl Trait { } } +// @TODO +//fn collect_supertraits_in_order + impl TopLevel { // function returns TopLevelItem::TypeStructStruct (comparing name) fn find_tli_by_name(&self, self_ty: &CoqType) -> Option<&TopLevelItem> { @@ -2844,7 +2882,7 @@ impl TopLevel { }) } - fn to_doc(&self) -> Doc { + fn to_doc(&self, supertraits_map: &HashMap>) -> Doc { // check if there is a Debug Trait implementation in the code (#[derive(Debug)]) // for a TopLevelItem::TypeStructStruct (@TODO extend to cover more cases) // if "yes" - get both TopLevelItems (Struct itself and TraitImpl for it) @@ -2891,6 +2929,7 @@ impl TopLevel { let to_doc_context = ToDocContext { extra_data, previous_module_names: previous_module_names.clone(), + supertraits_map, }; let doc = item.to_doc(to_doc_context); if let TopLevelItem::Module { name, .. } = item { @@ -2902,9 +2941,9 @@ impl TopLevel { ) } - pub fn to_pretty(&self, width: usize) -> String { + pub fn to_pretty(&self, width: usize, supertraits_map: &HashMap>) -> String { let mut w = Vec::new(); - self.to_doc().render(width, &mut w).unwrap(); + self.to_doc(supertraits_map).render(width, &mut w).unwrap(); format!("{}{}\n", HEADER, String::from_utf8(w).unwrap()) } } From b8643961e3f3826d7e06c4531aae4afb1c46c1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Tue, 26 Sep 2023 18:46:45 +0200 Subject: [PATCH 03/13] add a separate file for generic algorithms --- lib/src/algs.rs | 22 ++++++++++++++++++++++ lib/src/lib.rs | 1 + 2 files changed, 23 insertions(+) create mode 100644 lib/src/algs.rs diff --git a/lib/src/algs.rs b/lib/src/algs.rs new file mode 100644 index 000000000..a37863dd2 --- /dev/null +++ b/lib/src/algs.rs @@ -0,0 +1,22 @@ +use std::collections::{HashMap, HashSet}; + +type DirectedGraph = HashMap>; + +/// changes the direction of edges in a given directed graph +pub(crate) fn reverse_graph(graph: DirectedGraph) -> DirectedGraph +where + K: core::clone::Clone + std::cmp::Eq + std::hash::Hash, +{ + let mut reversed = HashMap::new(); + + for (src, dests) in graph { + for dest in dests { + reversed + .entry(dest) + .or_insert(HashSet::new()) + .insert(src.clone()); + } + } + + reversed +} diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 56ee1101c..9d5bb6f83 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -15,6 +15,7 @@ extern crate rustc_middle; extern crate rustc_session; extern crate rustc_span; +pub mod algs; pub mod callbacks; pub mod configuration; pub mod coq; From 03b0b87e1efd3ccfb1cf39e21f9aba3544248319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Wed, 27 Sep 2023 09:44:49 +0200 Subject: [PATCH 04/13] more functions in algs.rs --- lib/src/algs.rs | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/lib/src/algs.rs b/lib/src/algs.rs index a37863dd2..9c068872e 100644 --- a/lib/src/algs.rs +++ b/lib/src/algs.rs @@ -1,11 +1,28 @@ -use std::collections::{HashMap, HashSet}; +use std::collections::{HashMap, HashSet, VecDeque}; -type DirectedGraph = HashMap>; +type DirectedGraph = HashMap>; + +pub(crate) fn find_last(start: V, graph: DirectedGraph) -> V +where + V: core::clone::Clone + std::cmp::Eq + std::hash::Hash, +{ + let mut current_last = start; + let mut queue = VecDeque::new(); + + while let Some(vertices) = graph.get(¤t_last) { + for v in vertices { + queue.push_back(v); + } + current_last = queue.pop_front(); + } + + current_last +} /// changes the direction of edges in a given directed graph -pub(crate) fn reverse_graph(graph: DirectedGraph) -> DirectedGraph +pub(crate) fn reverse_graph(graph: DirectedGraph) -> DirectedGraph where - K: core::clone::Clone + std::cmp::Eq + std::hash::Hash, + V: core::clone::Clone + std::cmp::Eq + std::hash::Hash, { let mut reversed = HashMap::new(); @@ -20,3 +37,11 @@ where reversed } + +#[inline] +pub(crate) fn to_set(v: &[A]) -> HashSet +where + A: core::clone::Clone + std::cmp::Eq + std::hash::Hash, +{ + v.into_iter().map(|x| x.to_owned()).collect() +} From 8ca788ae5027dcc801ed59ef4e56f7e7eba7d295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Wed, 27 Sep 2023 10:00:29 +0200 Subject: [PATCH 05/13] fixed an error in algs.rs --- lib/src/algs.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/src/algs.rs b/lib/src/algs.rs index 9c068872e..76902765f 100644 --- a/lib/src/algs.rs +++ b/lib/src/algs.rs @@ -6,17 +6,21 @@ pub(crate) fn find_last(start: V, graph: DirectedGraph) -> V where V: core::clone::Clone + std::cmp::Eq + std::hash::Hash, { - let mut current_last = start; + let mut current_last = &start; let mut queue = VecDeque::new(); - while let Some(vertices) = graph.get(¤t_last) { + while let Some(vertices) = graph.get(current_last) { for v in vertices { queue.push_back(v); } - current_last = queue.pop_front(); + if let Some(new_last) = queue.pop_front() { + current_last = new_last; + } else { + break; + } } - current_last + current_last.to_owned() } /// changes the direction of edges in a given directed graph From 0fd0be28070be3fbf96d876492c4c71071b1d73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Wed, 27 Sep 2023 10:59:11 +0200 Subject: [PATCH 06/13] add a function in in algs.rs --- lib/src/algs.rs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/lib/src/algs.rs b/lib/src/algs.rs index 76902765f..8a50003b1 100644 --- a/lib/src/algs.rs +++ b/lib/src/algs.rs @@ -2,6 +2,42 @@ use std::collections::{HashMap, HashSet, VecDeque}; type DirectedGraph = HashMap>; +#[inline] +/// assigns `new` to `*old` if `*old < new` +fn assign_if_greater(old: &mut A, new: A) +where + A: std::cmp::PartialOrd, +{ + if *old < new { + *old = new + } +} + +pub(crate) fn longest_paths_length<'a, V>(start: &'a V, graph: &'a DirectedGraph) -> HashMap<&'a V, u32> +where + V: core::clone::Clone + std::cmp::Eq + std::hash::Hash, +{ + let mut distances = HashMap::new(); + let mut queue = VecDeque::new(); + queue.push_back((start, 0u32)); + + while let Some((current, dist)) = queue.pop_front() { + if let Some(vertices) = graph.get(current) { + for v in vertices { + let new_dist = dist + 1; + distances + .entry(v) + .and_modify(|old_dist| assign_if_greater(old_dist, new_dist)) + .or_insert(new_dist); + + queue.push_back((v, new_dist)); + } + } + } + + distances +} + pub(crate) fn find_last(start: V, graph: DirectedGraph) -> V where V: core::clone::Clone + std::cmp::Eq + std::hash::Hash, From f242695468219ce318c5f8fd1a5f5fbd81adbee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Wed, 27 Sep 2023 12:06:58 +0200 Subject: [PATCH 07/13] replaced HashMap with TopologicalSort in the type of supertraits_map --- Cargo.lock | 7 +++++++ lib/Cargo.toml | 1 + lib/src/algs.rs | 3 ++- lib/src/env.rs | 3 ++- lib/src/lib.rs | 1 - lib/src/top_level.rs | 29 ++++++++++++++--------------- 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ab5db75b6..442da4539 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,6 +128,7 @@ dependencies = [ "serde", "serde_json", "toml", + "topological-sort", "walkdir", ] @@ -517,6 +518,12 @@ dependencies = [ "serde", ] +[[package]] +name = "topological-sort" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea68304e134ecd095ac6c3574494fc62b909f416c4fca77e440530221e549d3d" + [[package]] name = "typed-arena" version = "2.0.2" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 712c3a966..7f4e20043 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -15,6 +15,7 @@ pretty = "0.11.3" serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } toml = "0.5.8" +topological-sort = "0.2.2" walkdir = "2.3.2" [package.metadata.rust-analyzer] diff --git a/lib/src/algs.rs b/lib/src/algs.rs index 8a50003b1..ebdc20484 100644 --- a/lib/src/algs.rs +++ b/lib/src/algs.rs @@ -1,4 +1,4 @@ -use std::collections::{HashMap, HashSet, VecDeque}; +/*use std::collections::{HashMap, HashSet, VecDeque}; type DirectedGraph = HashMap>; @@ -85,3 +85,4 @@ where { v.into_iter().map(|x| x.to_owned()).collect() } +*/ \ No newline at end of file diff --git a/lib/src/env.rs b/lib/src/env.rs index f7060e276..f6ede034c 100644 --- a/lib/src/env.rs +++ b/lib/src/env.rs @@ -4,6 +4,7 @@ use crate::ty::*; use rustc_middle::ty::TyCtxt; use std::collections::HashMap; +use topological_sort::TopologicalSort; /// The environment used for the translation steps, holding various state /// information @@ -19,5 +20,5 @@ pub(crate) struct Env<'a, 'b> { pub(crate) reorder_map: HashMap>, /// the configuration read or default if no config file is found pub(crate) configuration: Configuration, - pub(crate) supertraits: &'b mut HashMap>, + pub(crate) supertraits: &'b mut TopologicalSort, } diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 9d5bb6f83..56ee1101c 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -15,7 +15,6 @@ extern crate rustc_middle; extern crate rustc_session; extern crate rustc_span; -pub mod algs; pub mod callbacks; pub mod configuration; pub mod coq; diff --git a/lib/src/top_level.rs b/lib/src/top_level.rs index 0080896db..0b2fbcab3 100644 --- a/lib/src/top_level.rs +++ b/lib/src/top_level.rs @@ -19,6 +19,7 @@ use std::collections::HashMap; use std::collections::HashSet; use std::iter::repeat; use std::string::ToString; +use topological_sort::TopologicalSort; pub(crate) struct TopLevelOptions { pub(crate) configuration_file: String, @@ -570,20 +571,18 @@ fn compile_top_level_item( /// inserts paths of all immediate supertraits of a trait with /// the given generic_bounds to [env.supertraits] -fn collect_supertraits(env: &mut Env, generic_bounds: &GenericBounds, path: Path) { - let supertraits = generic_bounds - .iter() - .filter_map(|generic_bound| match generic_bound { +fn collect_supertraits(env: &mut Env, generic_bounds: GenericBounds, path: Path) { + for generic_bound in generic_bounds { + match generic_bound { GenericBound::Trait(ptraitref, _) => { - Some(compile_path(env, ptraitref.trait_ref.path)) + env.supertraits.add_dependency(path.clone(), compile_path(env, ptraitref.trait_ref.path)); }, // @TODO: should we include GenericBound::LangItemTrait ? GenericBound::LangItemTrait { .. } // we ignore lifetimes - | GenericBound::Outlives { .. } => None, - }) - .collect(); - env.supertraits.insert(path, supertraits); + | GenericBound::Outlives { .. } => (), + } + } } /// returns a pair of function signature and its body @@ -941,7 +940,7 @@ fn compile_trait_item_body( fn compile_top_level( tcx: &TyCtxt, opts: TopLevelOptions, - supertraits_map: &mut HashMap>, + supertraits_map: &mut TopologicalSort, ) -> TopLevel { let file = opts.filename; // the path to the item being compiled @@ -988,7 +987,7 @@ pub(crate) fn top_level_to_coq(tcx: &TyCtxt, opts: TopLevelOptions) -> String { axiomatize: opts.axiomatize || configuration.axiomatize, ..opts }; - let mut supertraits_map = HashMap::new(); + let mut supertraits_map = TopologicalSort::new(); let top_level = compile_top_level(tcx, opts, &mut supertraits_map); let top_level = mt_top_level(top_level); top_level.to_pretty(LINE_WIDTH, &supertraits_map) @@ -1674,7 +1673,7 @@ impl TraitTyParamValue { struct ToDocContext<'a, 'b> { extra_data: Option<&'a TopLevelItem>, previous_module_names: Vec, - supertraits_map: &'b HashMap>, + supertraits_map: &'b TopologicalSort, } impl TopLevelItem { @@ -2472,7 +2471,7 @@ impl TypeStructStruct { } impl Trait { - fn to_doc(&self, _supertraits_map: &HashMap>) -> Doc { + fn to_doc(&self, _supertraits_map: &TopologicalSort) -> Doc { let Trait { name, ty_params, @@ -2882,7 +2881,7 @@ impl TopLevel { }) } - fn to_doc(&self, supertraits_map: &HashMap>) -> Doc { + fn to_doc(&self, supertraits_map: &TopologicalSort) -> Doc { // check if there is a Debug Trait implementation in the code (#[derive(Debug)]) // for a TopLevelItem::TypeStructStruct (@TODO extend to cover more cases) // if "yes" - get both TopLevelItems (Struct itself and TraitImpl for it) @@ -2941,7 +2940,7 @@ impl TopLevel { ) } - pub fn to_pretty(&self, width: usize, supertraits_map: &HashMap>) -> String { + pub fn to_pretty(&self, width: usize, supertraits_map: &TopologicalSort) -> String { let mut w = Vec::new(); self.to_doc(supertraits_map).render(width, &mut w).unwrap(); format!("{}{}\n", HEADER, String::from_utf8(w).unwrap()) From 28cbe0dc0d589e8825ec545505a22c98f46a0e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Wed, 27 Sep 2023 17:30:32 +0200 Subject: [PATCH 08/13] implement printing traits, topologically sorted --- CoqOfRust/ink/ink.v | 23 + CoqOfRust/ink/ink_env.v | 1104 +++++++++++++++++++++++++++- CoqOfRust/ink/ink_storage_traits.v | 28 + lib/src/algs.rs | 51 +- lib/src/env.rs | 5 +- lib/src/lib.rs | 1 + lib/src/top_level.rs | 185 +++-- 7 files changed, 1324 insertions(+), 73 deletions(-) diff --git a/CoqOfRust/ink/ink.v b/CoqOfRust/ink/ink.v index 31ecf4295..b022d9926 100644 --- a/CoqOfRust/ink/ink.v +++ b/CoqOfRust/ink/ink.v @@ -381,6 +381,14 @@ Module reflect. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) + : parity_scale_codec.codec.Decode.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). + Defined. + End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. @@ -2057,6 +2065,14 @@ Module Wrap_dispatch_1. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) + : parity_scale_codec.codec.Decode.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). + Defined. + End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. @@ -2287,6 +2303,13 @@ Module ContractConstructorDecoder. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). + Defined. + End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. diff --git a/CoqOfRust/ink/ink_env.v b/CoqOfRust/ink/ink_env.v index 704f255b9..e30735d8d 100644 --- a/CoqOfRust/ink/ink_env.v +++ b/CoqOfRust/ink/ink_env.v @@ -278,6 +278,20 @@ Module types. try assumption). Defined. End parity_scale_codec_codec_Codec. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; + try assumption). + Defined. + End scale_encode_EncodeAsType. + Module scale_decode_DecodeAsType. + Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; + try assumption). + Defined. + End scale_decode_DecodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. repeat @@ -337,6 +351,20 @@ Module types. try assumption). Defined. End parity_scale_codec_codec_Codec. + Module scale_decode_DecodeAsType. + Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End scale_decode_DecodeAsType. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. repeat @@ -372,6 +400,164 @@ Module types. try assumption). Defined. End core_cmp_Eq. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End num_traits_sign_Unsigned. + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_Sub. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_Div. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End num_traits_bounds_Bounded. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_cmp_Ord. + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_convert_TryInto. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_DivAssign. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_SubAssign. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_convert_From. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_marker_Sized. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End num_traits_identities_One. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_Mul. + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End num_traits_identities_Zero. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_cmp_PartialOrd. + Module num_traits_ops_checked_CheckedMul. + Global Instance I `(Trait) + : num_traits.ops.checked.CheckedMul.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End num_traits_ops_checked_CheckedMul. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_MulAssign. + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_AddAssign. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_convert_TryFrom. + Module ink_env_arithmetic_Saturating. + Global Instance I `(Trait) + : ink_env.arithmetic.Saturating.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End ink_env_arithmetic_Saturating. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_Add. + Module ink_env_arithmetic_BaseArithmetic. + Global Instance I `(Trait) + : ink_env.arithmetic.BaseArithmetic.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End ink_env_arithmetic_BaseArithmetic. + Module ink_env_arithmetic_AtLeast32Bit. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32Bit.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. @@ -397,6 +583,20 @@ Module types. try assumption). Defined. End parity_scale_codec_codec_Codec. + Module scale_decode_DecodeAsType. + Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Hash. + repeat + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). + Defined. + End scale_decode_DecodeAsType. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Hash. + repeat + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). + Defined. + End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. repeat @@ -470,6 +670,20 @@ Module types. try assumption). Defined. End parity_scale_codec_codec_Codec. + Module scale_decode_DecodeAsType. + Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End scale_decode_DecodeAsType. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. repeat @@ -505,6 +719,164 @@ Module types. try assumption). Defined. End core_cmp_Eq. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_DivAssign. + Module num_traits_ops_checked_CheckedMul. + Global Instance I `(Trait) + : num_traits.ops.checked.CheckedMul.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End num_traits_ops_checked_CheckedMul. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_MulAssign. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_cmp_PartialOrd. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_Add. + Module ink_env_arithmetic_Saturating. + Global Instance I `(Trait) + : ink_env.arithmetic.Saturating.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End ink_env_arithmetic_Saturating. + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_AddAssign. + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_Sub. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_marker_Sized. + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End num_traits_identities_Zero. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_SubAssign. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End num_traits_bounds_Bounded. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End num_traits_sign_Unsigned. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End num_traits_identities_One. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_Mul. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_convert_From. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_convert_TryFrom. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_Div. + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_convert_TryInto. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_cmp_Ord. + Module ink_env_arithmetic_BaseArithmetic. + Global Instance I `(Trait) + : ink_env.arithmetic.BaseArithmetic.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End ink_env_arithmetic_BaseArithmetic. + Module ink_env_arithmetic_AtLeast32Bit. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32Bit.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. @@ -531,6 +903,22 @@ Module types. try assumption). Defined. End parity_scale_codec_codec_Codec. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) + : scale_encode.EncodeAsType.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End scale_encode_EncodeAsType. + Module scale_decode_DecodeAsType. + Global Instance I `(Trait) + : scale_decode.DecodeAsType.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End scale_decode_DecodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. @@ -567,22 +955,183 @@ Module types. try assumption). Defined. End core_cmp_Eq. - Module ink_env_arithmetic_AtLeast32BitUnsigned. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_convert_TryFrom. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_Add. + Module num_traits_identities_Zero. Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. + : num_traits.identities.Zero.Trait BlockNumber. repeat (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. - End ink_env_arithmetic_AtLeast32BitUnsigned. - Module ink_env_types_FromLittleEndian. + End num_traits_identities_Zero. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_SubAssign. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_MulAssign. + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_AddAssign. + Module ink_env_arithmetic_Saturating. Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait BlockNumber. + : ink_env.arithmetic.Saturating.Trait BlockNumber. repeat (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; try assumption). Defined. - End ink_env_types_FromLittleEndian. + End ink_env_arithmetic_Saturating. + Module num_traits_ops_checked_CheckedMul. + Global Instance I `(Trait) + : num_traits.ops.checked.CheckedMul.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End num_traits_ops_checked_CheckedMul. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) + : num_traits.bounds.Bounded.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End num_traits_bounds_Bounded. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_Mul. + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_Sub. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_DivAssign. + Module num_traits_identities_One. + Global Instance I `(Trait) + : num_traits.identities.One.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End num_traits_identities_One. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_cmp_PartialOrd. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_Div. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_cmp_Ord. + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_convert_TryInto. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_marker_Sized. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_convert_From. + Module ink_env_arithmetic_BaseArithmetic. + Global Instance I `(Trait) + : ink_env.arithmetic.BaseArithmetic.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End ink_env_arithmetic_BaseArithmetic. + Module ink_env_arithmetic_AtLeast32Bit. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32Bit.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32Bit. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End num_traits_sign_Unsigned. + Module ink_env_arithmetic_AtLeast32BitUnsigned. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. + Global Instance I `(Trait) + : ink_env.types.FromLittleEndian.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End ink_env_types_FromLittleEndian. End The_Bounds_Of_BlockNumber. End Environment. @@ -786,6 +1335,20 @@ Module Environment. try assumption). Defined. End parity_scale_codec_codec_Codec. + Module scale_decode_DecodeAsType. + Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; + try assumption). + Defined. + End scale_decode_DecodeAsType. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait AccountId. + repeat + (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; + try assumption). + Defined. + End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. repeat @@ -844,6 +1407,20 @@ Module Environment. try assumption). Defined. End parity_scale_codec_codec_Codec. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End scale_encode_EncodeAsType. + Module scale_decode_DecodeAsType. + Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End scale_decode_DecodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. repeat @@ -879,6 +1456,163 @@ Module Environment. try assumption). Defined. End core_cmp_Eq. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_Add. + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_AddAssign. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End num_traits_sign_Unsigned. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_cmp_PartialOrd. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End num_traits_bounds_Bounded. + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_convert_TryInto. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_marker_Sized. + Module ink_env_arithmetic_Saturating. + Global Instance I `(Trait) : ink_env.arithmetic.Saturating.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End ink_env_arithmetic_Saturating. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_SubAssign. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_convert_From. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_cmp_Ord. + Module num_traits_ops_checked_CheckedMul. + Global Instance I `(Trait) + : num_traits.ops.checked.CheckedMul.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End num_traits_ops_checked_CheckedMul. + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End num_traits_identities_Zero. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_DivAssign. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_MulAssign. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_Div. + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_Sub. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_ops_arith_Mul. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End core_convert_TryFrom. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End num_traits_identities_One. + Module ink_env_arithmetic_BaseArithmetic. + Global Instance I `(Trait) + : ink_env.arithmetic.BaseArithmetic.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End ink_env_arithmetic_BaseArithmetic. + Module ink_env_arithmetic_AtLeast32Bit. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32Bit.Trait Balance. + repeat + (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. @@ -903,6 +1637,20 @@ Module Environment. try assumption). Defined. End parity_scale_codec_codec_Codec. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Hash. + repeat + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). + Defined. + End scale_encode_EncodeAsType. + Module scale_decode_DecodeAsType. + Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Hash. + repeat + (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; + try assumption). + Defined. + End scale_decode_DecodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. repeat @@ -976,6 +1724,20 @@ Module Environment. try assumption). Defined. End parity_scale_codec_codec_Codec. + Module scale_decode_DecodeAsType. + Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End scale_decode_DecodeAsType. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. repeat @@ -1011,6 +1773,164 @@ Module Environment. try assumption). Defined. End core_cmp_Eq. + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_Sub. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_cmp_Ord. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End num_traits_identities_One. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_Mul. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_SubAssign. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_Div. + Module num_traits_ops_checked_CheckedMul. + Global Instance I `(Trait) + : num_traits.ops.checked.CheckedMul.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End num_traits_ops_checked_CheckedMul. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_cmp_PartialOrd. + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End num_traits_identities_Zero. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_MulAssign. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_DivAssign. + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_AddAssign. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_convert_From. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_ops_arith_Add. + Module ink_env_arithmetic_Saturating. + Global Instance I `(Trait) + : ink_env.arithmetic.Saturating.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End ink_env_arithmetic_Saturating. + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_convert_TryInto. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End num_traits_bounds_Bounded. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End num_traits_sign_Unsigned. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_convert_TryFrom. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End core_marker_Sized. + Module ink_env_arithmetic_BaseArithmetic. + Global Instance I `(Trait) + : ink_env.arithmetic.BaseArithmetic.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End ink_env_arithmetic_BaseArithmetic. + Module ink_env_arithmetic_AtLeast32Bit. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32Bit.Trait Timestamp. + repeat + (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. @@ -1037,6 +1957,20 @@ Module Environment. try assumption). Defined. End parity_scale_codec_codec_Codec. + Module scale_decode_DecodeAsType. + Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End scale_decode_DecodeAsType. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. repeat @@ -1072,6 +2006,164 @@ Module Environment. try assumption). Defined. End core_cmp_Eq. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_Mul. + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End num_traits_identities_Zero. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_convert_TryFrom. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_DivAssign. + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_AddAssign. + Module num_traits_ops_checked_CheckedMul. + Global Instance I `(Trait) + : num_traits.ops.checked.CheckedMul.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End num_traits_ops_checked_CheckedMul. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End num_traits_bounds_Bounded. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End num_traits_sign_Unsigned. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_MulAssign. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_cmp_Ord. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End num_traits_identities_One. + Module ink_env_arithmetic_Saturating. + Global Instance I `(Trait) + : ink_env.arithmetic.Saturating.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End ink_env_arithmetic_Saturating. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_cmp_PartialOrd. + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_convert_TryInto. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_Add. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_SubAssign. + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_Sub. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_marker_Sized. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_ops_arith_Div. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End core_convert_From. + Module ink_env_arithmetic_BaseArithmetic. + Global Instance I `(Trait) + : ink_env.arithmetic.BaseArithmetic.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End ink_env_arithmetic_BaseArithmetic. + Module ink_env_arithmetic_AtLeast32Bit. + Global Instance I `(Trait) + : ink_env.arithmetic.AtLeast32Bit.Trait BlockNumber. + repeat + (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; + try assumption). + Defined. + End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. diff --git a/CoqOfRust/ink/ink_storage_traits.v b/CoqOfRust/ink/ink_storage_traits.v index f9041cb9b..c7f3cdbad 100644 --- a/CoqOfRust/ink/ink_storage_traits.v +++ b/CoqOfRust/ink/ink_storage_traits.v @@ -181,6 +181,13 @@ Module storage. Notation.double_colon_type := PreferredKey; }. Module The_Bounds_Of_Type_. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). + Defined. + End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. @@ -220,6 +227,13 @@ Module storage. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). + Defined. + End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. @@ -339,6 +353,13 @@ Module StorableHint. Notation.double_colon_type := PreferredKey; }. Module The_Bounds_Of_Type_. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). + Defined. + End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. @@ -378,6 +399,13 @@ Module AutoStorableHint. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Type_. + repeat + (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; + try assumption). + Defined. + End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. diff --git a/lib/src/algs.rs b/lib/src/algs.rs index ebdc20484..f3170221d 100644 --- a/lib/src/algs.rs +++ b/lib/src/algs.rs @@ -1,8 +1,51 @@ -/*use std::collections::{HashMap, HashSet, VecDeque}; +use std::collections::{HashMap, HashSet, VecDeque}; +use topological_sort::TopologicalSort; -type DirectedGraph = HashMap>; +/// a type of directed graphs +pub(crate) struct DirectedGraph(HashMap>); -#[inline] +impl DirectedGraph +where + V: std::clone::Clone + std::cmp::Eq + std::hash::Hash, +{ + pub(crate) fn of_hashmap(hm: &HashMap>) -> Self { + DirectedGraph(hm.to_owned()) + } + + /// if `graph` is a directed acyclic graph, + /// creates a subgraph with all descendants of `starts` + pub(crate) fn get_subgraph_of(&self, start: &V) -> DirectedGraph { + let mut result = HashMap::new(); + let mut queue = VecDeque::new(); + queue.push_back(start); + + while let Some(vertex) = queue.pop_front() { + if let Some(succs) = self.0.get(vertex) { + result.entry(vertex.clone()).or_insert(succs.clone()); + + for succ in succs { + queue.push_back(succ) + } + } + } + + DirectedGraph(result) + } + + /// topologically sort the graph + pub(crate) fn to_topological_sort(&self) -> TopologicalSort { + self.0 + .iter() + .fold(&mut TopologicalSort::new(), |result, (prec, succs)| { + succs.iter().fold(result, |result, succ| { + result.add_dependency(succ.to_owned(), prec.to_owned()); + result + }) + }) + .clone() + } +} +/*#[inline] /// assigns `new` to `*old` if `*old < new` fn assign_if_greater(old: &mut A, new: A) where @@ -85,4 +128,4 @@ where { v.into_iter().map(|x| x.to_owned()).collect() } -*/ \ No newline at end of file +*/ diff --git a/lib/src/env.rs b/lib/src/env.rs index f6ede034c..0c4a30a31 100644 --- a/lib/src/env.rs +++ b/lib/src/env.rs @@ -3,8 +3,7 @@ use crate::path::Path; use crate::ty::*; use rustc_middle::ty::TyCtxt; -use std::collections::HashMap; -use topological_sort::TopologicalSort; +use std::collections::{HashMap, HashSet}; /// The environment used for the translation steps, holding various state /// information @@ -20,5 +19,5 @@ pub(crate) struct Env<'a, 'b> { pub(crate) reorder_map: HashMap>, /// the configuration read or default if no config file is found pub(crate) configuration: Configuration, - pub(crate) supertraits: &'b mut TopologicalSort, + pub(crate) supertraits: &'b mut HashMap>, } diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 56ee1101c..9d5bb6f83 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -15,6 +15,7 @@ extern crate rustc_middle; extern crate rustc_session; extern crate rustc_span; +pub mod algs; pub mod callbacks; pub mod configuration; pub mod coq; diff --git a/lib/src/top_level.rs b/lib/src/top_level.rs index 0b2fbcab3..6a03a183c 100644 --- a/lib/src/top_level.rs +++ b/lib/src/top_level.rs @@ -1,3 +1,4 @@ +use crate::algs; use crate::configuration::*; use crate::coq; use crate::env::*; @@ -19,7 +20,6 @@ use std::collections::HashMap; use std::collections::HashSet; use std::iter::repeat; use std::string::ToString; -use topological_sort::TopologicalSort; pub(crate) struct TopLevelOptions { pub(crate) configuration_file: String, @@ -466,7 +466,7 @@ fn compile_top_level_item( } ItemKind::Union(_, _) => vec![TopLevelItem::Error("Union".to_string())], ItemKind::Trait(_, _, generics, generic_bounds, items) => { - collect_supertraits(env, generic_bounds, path); + collect_supertraits(env, generic_bounds, path.push(name.clone())); vec![TopLevelItem::Trait(Trait { name, ty_params: get_ty_params(env, generics), @@ -571,18 +571,21 @@ fn compile_top_level_item( /// inserts paths of all immediate supertraits of a trait with /// the given generic_bounds to [env.supertraits] -fn collect_supertraits(env: &mut Env, generic_bounds: GenericBounds, path: Path) { - for generic_bound in generic_bounds { - match generic_bound { +fn collect_supertraits(env: &mut Env, generic_bounds: &GenericBounds, path: Path) { + eprintln!("{:?}\n", path); + let supertraits = generic_bounds + .iter() + .filter_map(|generic_bound| match generic_bound { GenericBound::Trait(ptraitref, _) => { - env.supertraits.add_dependency(path.clone(), compile_path(env, ptraitref.trait_ref.path)); + Some(compile_path(env, ptraitref.trait_ref.path)) }, // @TODO: should we include GenericBound::LangItemTrait ? GenericBound::LangItemTrait { .. } // we ignore lifetimes - | GenericBound::Outlives { .. } => (), - } - } + | GenericBound::Outlives { .. } => None, + }) + .collect(); + env.supertraits.insert(path, supertraits); } /// returns a pair of function signature and its body @@ -940,7 +943,7 @@ fn compile_trait_item_body( fn compile_top_level( tcx: &TyCtxt, opts: TopLevelOptions, - supertraits_map: &mut TopologicalSort, + supertraits_map: &mut HashMap>, ) -> TopLevel { let file = opts.filename; // the path to the item being compiled @@ -987,7 +990,7 @@ pub(crate) fn top_level_to_coq(tcx: &TyCtxt, opts: TopLevelOptions) -> String { axiomatize: opts.axiomatize || configuration.axiomatize, ..opts }; - let mut supertraits_map = TopologicalSort::new(); + let mut supertraits_map = HashMap::new(); let top_level = compile_top_level(tcx, opts, &mut supertraits_map); let top_level = mt_top_level(top_level); top_level.to_pretty(LINE_WIDTH, &supertraits_map) @@ -1673,7 +1676,7 @@ impl TraitTyParamValue { struct ToDocContext<'a, 'b> { extra_data: Option<&'a TopLevelItem>, previous_module_names: Vec, - supertraits_map: &'b TopologicalSort, + supertraits_map: &'b HashMap>, } impl TopLevelItem { @@ -2471,7 +2474,7 @@ impl TypeStructStruct { } impl Trait { - fn to_doc(&self, _supertraits_map: &TopologicalSort) -> Doc { + fn to_doc(&self, supertraits_map: &HashMap>) -> Doc { let Trait { name, ty_params, @@ -2800,52 +2803,110 @@ impl Trait { coq::TopLevel::new( &bounds .iter() - .map(|bound| coq::TopLevelItem::Module(coq::Module::new( - &bound.name.to_name(), - coq::TopLevel::new(&[ - coq::TopLevelItem::Instance(coq::Instance::new( - false, - "I", - &[coq::ArgDecl::new( - &coq::ArgDeclVar::Generalized { - idents: vec![], - ty: coq::Expression::just_name("Trait"), - }, - coq::ArgSpecKind::Explicit, - )], - coq::Expression::Variable { - ident: Path::concat(&[ - bound.name.to_owned(), - Path::new(&["Trait"]), - ]), - no_implicit: false, - } - .apply(&coq::Expression::just_name(&item.item_name)), - &None, - { - let proj_name = ["__the_bounds_of_", &item.item_name].concat(); - vec![concat([ - text("repeat"), - line(), - group([ - text("("), - text([ - "destruct ", - &proj_name, - " as [? ", - &proj_name, - "];", - ].concat()), - line(), - text("try assumption"), - text(")"), + .flat_map(|bound| { + let topological_sort = algs::DirectedGraph::of_hashmap(supertraits_map) + .get_subgraph_of(&bound.name) + .to_topological_sort(); + if topological_sort.is_empty() { + vec![coq::TopLevelItem::Module(coq::Module::new( + &bound.name.to_name(), + coq::TopLevel::new(&[ + coq::TopLevelItem::Instance(coq::Instance::new( + false, + "I", + &[coq::ArgDecl::new( + &coq::ArgDeclVar::Generalized { + idents: vec![], + ty: coq::Expression::just_name("Trait"), + }, + coq::ArgSpecKind::Explicit, + )], + coq::Expression::Variable { + ident: Path::concat(&[ + bound.name.to_owned(), + Path::new(&["Trait"]), + ]), + no_implicit: false, + } + .apply(&coq::Expression::just_name(&item.item_name)), + &None, + { + let proj_name = ["__the_bounds_of_", &item.item_name].concat(); + vec![concat([ + text("repeat"), + line(), + group([ + text("("), + text([ + "destruct ", + &proj_name, + " as [? ", + &proj_name, + "];", + ].concat()), + line(), + text("try assumption"), + text(")"), + ]), + text("."), + ])] + }, + )), + ]), + ))] + } else { + topological_sort + .map(|bound| { + coq::TopLevelItem::Module(coq::Module::new( + &bound.to_name(), + coq::TopLevel::new(&[ + coq::TopLevelItem::Instance(coq::Instance::new( + false, + "I", + &[coq::ArgDecl::new( + &coq::ArgDeclVar::Generalized { + idents: vec![], + ty: coq::Expression::just_name("Trait"), + }, + coq::ArgSpecKind::Explicit, + )], + coq::Expression::Variable { + ident: Path::concat(&[ + bound, + Path::new(&["Trait"]), + ]), + no_implicit: false, + } + .apply(&coq::Expression::just_name(&item.item_name)), + &None, + { + let proj_name = ["__the_bounds_of_", &item.item_name].concat(); + vec![concat([ + text("repeat"), + line(), + group([ + text("("), + text([ + "destruct ", + &proj_name, + " as [? ", + &proj_name, + "];", + ].concat()), + line(), + text("try assumption"), + text(")"), + ]), + text("."), + ])] + }, + )), ]), - text("."), - ])] - }, - )), - ]), - ))) + )) + }) + .collect() + } + }) .collect_vec(), ), ))) @@ -2881,7 +2942,7 @@ impl TopLevel { }) } - fn to_doc(&self, supertraits_map: &TopologicalSort) -> Doc { + fn to_doc(&self, supertraits_map: &HashMap>) -> Doc { // check if there is a Debug Trait implementation in the code (#[derive(Debug)]) // for a TopLevelItem::TypeStructStruct (@TODO extend to cover more cases) // if "yes" - get both TopLevelItems (Struct itself and TraitImpl for it) @@ -2940,7 +3001,11 @@ impl TopLevel { ) } - pub fn to_pretty(&self, width: usize, supertraits_map: &TopologicalSort) -> String { + pub fn to_pretty( + &self, + width: usize, + supertraits_map: &HashMap>, + ) -> String { let mut w = Vec::new(); self.to_doc(supertraits_map).render(width, &mut w).unwrap(); format!("{}{}\n", HEADER, String::from_utf8(w).unwrap()) From b02768d663e9d618d84e8110cf7b9ac632e33abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Wed, 27 Sep 2023 18:06:47 +0200 Subject: [PATCH 09/13] saving the state of work --- CoqOfRust/ink/ink.v | 195 +-- CoqOfRust/ink/ink_env.v | 1869 ++++++++-------------------- CoqOfRust/ink/ink_storage_traits.v | 54 +- lib/src/top_level.rs | 51 +- 4 files changed, 578 insertions(+), 1591 deletions(-) diff --git a/CoqOfRust/ink/ink.v b/CoqOfRust/ink/ink.v index b022d9926..8cbee4c11 100644 --- a/CoqOfRust/ink/ink.v +++ b/CoqOfRust/ink/ink.v @@ -325,22 +325,7 @@ Module reflect. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) - : parity_scale_codec.codec.Decode.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End parity_scale_codec_codec_Decode. - Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End ink_reflect_dispatch_ExecuteDispatchable. + End The_Bounds_Of_Type_. End ContractMessageDecoder. @@ -384,27 +369,18 @@ Module reflect. Module parity_scale_codec_codec_Decode. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + Defined. End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_reflect_dispatch_DecodeDispatch. - Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. End ContractConstructorDecoder. End dispatch. @@ -720,15 +696,7 @@ Module codegen. Notation.double_colon_type := Forwarder; }. Module The_Bounds_Of_Forwarder. - Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait - Forwarder. - repeat - (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; - try assumption). - Defined. - End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarder. @@ -784,15 +752,7 @@ Module codegen. Notation.dot := build_mut; }. Module The_Bounds_Of_Forwarder. - Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait - Forwarder. - repeat - (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; - try assumption). - Defined. - End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) End call_builder. @@ -1382,15 +1342,7 @@ Module trait_def. Notation.double_colon_type := Forwarder; }. Module The_Bounds_Of_Forwarder. - Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait - Forwarder. - repeat - (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; - try assumption). - Defined. - End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarder. @@ -1444,15 +1396,7 @@ Module trait_def. Notation.dot := build_mut; }. Module The_Bounds_Of_Forwarder. - Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait - Forwarder. - repeat - (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; - try assumption). - Defined. - End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) End call_builder. @@ -1510,14 +1454,7 @@ Module call_builder. Notation.double_colon_type := Forwarder; }. Module The_Bounds_Of_Forwarder. - Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. - repeat - (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; - try assumption). - Defined. - End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarder. @@ -1571,14 +1508,7 @@ Module call_builder. Notation.dot := build_mut; }. Module The_Bounds_Of_Forwarder. - Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. - repeat - (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; - try assumption). - Defined. - End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) End call_builder. @@ -1621,14 +1551,7 @@ Module TraitCallForwarder. Notation.double_colon_type := Forwarder; }. Module The_Bounds_Of_Forwarder. - Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. - repeat - (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; - try assumption). - Defined. - End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarder. @@ -1681,14 +1604,7 @@ End TraitCallForwarder. Notation.dot := build_mut; }. Module The_Bounds_Of_Forwarder. - Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. - repeat - (destruct __the_bounds_of_Forwarder as [? __the_bounds_of_Forwarder]; - try assumption). - Defined. - End ink_codegen_trait_def_call_builder_TraitCallBuilder. + End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) @@ -2009,22 +1925,7 @@ Module Wrap_dispatch_1. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) - : parity_scale_codec.codec.Decode.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End parity_scale_codec_codec_Decode. - Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End ink_reflect_dispatch_ExecuteDispatchable. + End The_Bounds_Of_Type_. End ContractMessageDecoder. @@ -2068,27 +1969,18 @@ Module Wrap_dispatch_1. Module parity_scale_codec_codec_Decode. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + Defined. End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_reflect_dispatch_DecodeDispatch. - Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. End ContractConstructorDecoder. End dispatch. @@ -2269,21 +2161,7 @@ Module ContractMessageDecoder. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End parity_scale_codec_codec_Decode. - Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End ink_reflect_dispatch_ExecuteDispatchable. + End The_Bounds_Of_Type_. End ContractMessageDecoder. @@ -2305,27 +2183,18 @@ Module ContractConstructorDecoder. Module The_Bounds_Of_Type_. Module parity_scale_codec_codec_Decode. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + Defined. End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_reflect_dispatch_DecodeDispatch. - Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. End ContractConstructorDecoder. @@ -2620,14 +2489,7 @@ Module chain_extension. Notation.double_colon_type := ErrorCode; }. Module The_Bounds_Of_ErrorCode. - Module ink_env_chain_extension_FromStatusCode. - Global Instance I `(Trait) - : ink_env.chain_extension.FromStatusCode.Trait ErrorCode. - repeat - (destruct __the_bounds_of_ErrorCode as [? __the_bounds_of_ErrorCode]; - try assumption). - Defined. - End ink_env_chain_extension_FromStatusCode. + End The_Bounds_Of_ErrorCode. End ChainExtension. @@ -2716,14 +2578,7 @@ Module ChainExtension. Notation.double_colon_type := ErrorCode; }. Module The_Bounds_Of_ErrorCode. - Module ink_env_chain_extension_FromStatusCode. - Global Instance I `(Trait) - : ink_env.chain_extension.FromStatusCode.Trait ErrorCode. - repeat - (destruct __the_bounds_of_ErrorCode as [? __the_bounds_of_ErrorCode]; - try assumption). - Defined. - End ink_env_chain_extension_FromStatusCode. + End The_Bounds_Of_ErrorCode. End ChainExtension. diff --git a/CoqOfRust/ink/ink_env.v b/CoqOfRust/ink/ink_env.v index e30735d8d..f87a1e983 100644 --- a/CoqOfRust/ink/ink_env.v +++ b/CoqOfRust/ink/ink_env.v @@ -121,27 +121,7 @@ Module types. Notation.dot := from_le_bytes; }. Module The_Bounds_Of_Bytes. - Module core_default_Default. - Global Instance I `(Trait) : core.default.Default.Trait Bytes. - repeat - (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; - try assumption). - Defined. - End core_default_Default. - Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait Bytes. - repeat - (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; - try assumption). - Defined. - End core_convert_AsRef. - Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait Bytes. - repeat - (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; - try assumption). - Defined. - End core_convert_AsMut. + End The_Bounds_Of_Bytes. End FromLittleEndian. @@ -270,868 +250,497 @@ Module types. Notation.double_colon_type := ChainExtension; }. Module The_Bounds_Of_AccountId. - Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End parity_scale_codec_codec_Codec. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). + Defined. End scale_encode_EncodeAsType. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). + Defined. End scale_decode_DecodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_clone_Clone. - Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_cmp_PartialEq. - Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_cmp_Eq. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_cmp_Ord. - Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_convert_AsRef. - Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_convert_AsMut. End The_Bounds_Of_AccountId. Module The_Bounds_Of_Balance. - Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Balance. + Defined. - End parity_scale_codec_codec_Codec. + End scale_encode_EncodeAsType. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End scale_decode_DecodeAsType. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_marker_Copy. - Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_clone_Clone. - Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. + Defined. - End core_cmp_PartialEq. - Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + End core_ops_arith_AddAssign. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. + Defined. - End core_cmp_Eq. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + End core_cmp_Ord. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait Balance. + Defined. - End num_traits_sign_Unsigned. + End core_ops_arith_Add. Module core_ops_arith_Sub. Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_ops_arith_Sub. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_ops_arith_Div. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End num_traits_bounds_Bounded. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Module ink_env_arithmetic_Saturating. + Global Instance I `(Trait) + : ink_env.arithmetic.Saturating.Trait Balance. + Defined. - End core_cmp_Ord. + End ink_env_arithmetic_Saturating. Module core_convert_TryInto. Global Instance I `(Trait) : core.convert.TryInto.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_convert_TryInto. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. + Defined. - End core_ops_arith_DivAssign. + End num_traits_identities_Zero. Module core_ops_arith_SubAssign. Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_ops_arith_SubAssign. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_convert_From. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_marker_Sized. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End num_traits_identities_One. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_ops_arith_Mul. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait Balance. + Defined. - End num_traits_identities_Zero. + End core_ops_arith_Div. Module core_cmp_PartialOrd. Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_cmp_PartialOrd. Module num_traits_ops_checked_CheckedMul. Global Instance I `(Trait) : num_traits.ops.checked.CheckedMul.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End num_traits_ops_checked_CheckedMul. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_ops_arith_MulAssign. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. + Defined. - End core_ops_arith_AddAssign. + End core_ops_arith_DivAssign. Module core_convert_TryFrom. Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_convert_TryFrom. - Module ink_env_arithmetic_Saturating. - Global Instance I `(Trait) - : ink_env.arithmetic.Saturating.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait Balance. + Defined. - End ink_env_arithmetic_Saturating. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + End core_ops_arith_Mul. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Balance. + Defined. - End core_ops_arith_Add. + End core_convert_From. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Balance. + + Defined. + End num_traits_bounds_Bounded. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. + + Defined. + End core_ops_arith_MulAssign. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. + + Defined. + End num_traits_identities_One. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. + + Defined. + End num_traits_sign_Unsigned. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait Balance. repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait Balance. repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. - Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End ink_env_types_FromLittleEndian. End The_Bounds_Of_Balance. Module The_Bounds_Of_Hash. - Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End parity_scale_codec_codec_Codec. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). + Defined. End scale_decode_DecodeAsType. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). + Defined. End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_marker_Copy. - Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_clone_Clone. - Module ink_primitives_types_Clear. - Global Instance I `(Trait) : ink_primitives.types.Clear.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End ink_primitives_types_Clear. - Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_cmp_PartialEq. - Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_cmp_Eq. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_cmp_Ord. - Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_convert_AsRef. - Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_convert_AsMut. End The_Bounds_Of_Hash. Module The_Bounds_Of_Timestamp. - Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End parity_scale_codec_codec_Codec. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End scale_decode_DecodeAsType. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. + Defined. - End core_marker_Copy. - Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + End core_ops_arith_Sub. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Timestamp. + Defined. - End core_clone_Clone. - Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + End core_convert_From. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. + Defined. - End core_cmp_PartialEq. - Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + End num_traits_identities_One. + Module ink_env_arithmetic_Saturating. + Global Instance I `(Trait) + : ink_env.arithmetic.Saturating.Trait Timestamp. + + Defined. + End ink_env_arithmetic_Saturating. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. + + Defined. + End core_cmp_Ord. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait Timestamp. + Defined. - End core_cmp_Eq. + End core_ops_arith_Mul. Module core_ops_arith_DivAssign. Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End core_ops_arith_DivAssign. - Module num_traits_ops_checked_CheckedMul. - Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End num_traits_ops_checked_CheckedMul. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. + Defined. - End core_ops_arith_MulAssign. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_cmp_PartialOrd. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_ops_arith_Add. - Module ink_env_arithmetic_Saturating. - Global Instance I `(Trait) - : ink_env.arithmetic.Saturating.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End ink_env_arithmetic_Saturating. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + End num_traits_sign_Unsigned. + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. + Defined. - End core_ops_arith_AddAssign. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + End core_convert_TryInto. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. + Defined. - End core_ops_arith_Sub. + End num_traits_bounds_Bounded. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End core_marker_Sized. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Timestamp. + + Defined. + End core_ops_arith_MulAssign. Module num_traits_identities_Zero. Global Instance I `(Trait) : num_traits.identities.Zero.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End num_traits_identities_Zero. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. + + Defined. + End core_ops_arith_Add. Module core_ops_arith_SubAssign. Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End core_ops_arith_SubAssign. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End num_traits_bounds_Bounded. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End num_traits_sign_Unsigned. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End num_traits_identities_One. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_ops_arith_Mul. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. + Defined. - End core_convert_From. + End core_ops_arith_AddAssign. Module core_convert_TryFrom. Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End core_convert_TryFrom. Module core_ops_arith_Div. Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End core_ops_arith_Div. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Module num_traits_ops_checked_CheckedMul. + Global Instance I `(Trait) + : num_traits.ops.checked.CheckedMul.Trait Timestamp. + Defined. - End core_convert_TryInto. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + End num_traits_ops_checked_CheckedMul. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. + Defined. - End core_cmp_Ord. + End core_cmp_PartialOrd. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. - Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End ink_env_types_FromLittleEndian. End The_Bounds_Of_Timestamp. Module The_Bounds_Of_BlockNumber. - Module parity_scale_codec_codec_Codec. + Module scale_decode_DecodeAsType. Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + : scale_decode.DecodeAsType.Trait BlockNumber. + Defined. - End parity_scale_codec_codec_Codec. + End scale_decode_DecodeAsType. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End scale_encode_EncodeAsType. - Module scale_decode_DecodeAsType. - Global Instance I `(Trait) - : scale_decode.DecodeAsType.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End scale_decode_DecodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_marker_Copy. - Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_clone_Clone. - Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_cmp_PartialEq. - Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_cmp_Eq. Module core_convert_TryFrom. Global Instance I `(Trait) : core.convert.TryFrom.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_convert_TryFrom. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_ops_arith_Add. - Module num_traits_identities_Zero. - Global Instance I `(Trait) - : num_traits.identities.Zero.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End num_traits_identities_Zero. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_ops_arith_SubAssign. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_ops_arith_MulAssign. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_ops_arith_AddAssign. - Module ink_env_arithmetic_Saturating. + Module num_traits_identities_One. Global Instance I `(Trait) - : ink_env.arithmetic.Saturating.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + : num_traits.identities.One.Trait BlockNumber. + Defined. - End ink_env_arithmetic_Saturating. + End num_traits_identities_One. Module num_traits_ops_checked_CheckedMul. Global Instance I `(Trait) : num_traits.ops.checked.CheckedMul.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End num_traits_ops_checked_CheckedMul. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) - : num_traits.bounds.Bounded.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End num_traits_bounds_Bounded. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_ops_arith_Mul. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_ops_arith_Sub. Module core_ops_arith_DivAssign. Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_ops_arith_DivAssign. - Module num_traits_identities_One. - Global Instance I `(Trait) - : num_traits.identities.One.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End num_traits_identities_One. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. + Defined. - End core_cmp_PartialOrd. + End core_marker_Sized. Module core_ops_arith_Div. Global Instance I `(Trait) : core.ops.arith.Div.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_ops_arith_Div. Module core_cmp_Ord. Global Instance I `(Trait) : core.cmp.Ord.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_cmp_Ord. + Module ink_env_arithmetic_Saturating. + Global Instance I `(Trait) + : ink_env.arithmetic.Saturating.Trait BlockNumber. + + Defined. + End ink_env_arithmetic_Saturating. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. + + Defined. + End num_traits_sign_Unsigned. + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. + + Defined. + End core_ops_arith_Sub. Module core_convert_TryInto. Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_convert_TryInto. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait BlockNumber. + Defined. - End core_marker_Sized. + End core_ops_arith_Add. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait BlockNumber. + + Defined. + End core_ops_arith_SubAssign. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. + + Defined. + End core_ops_arith_MulAssign. + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. + + Defined. + End core_ops_arith_AddAssign. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. + + Defined. + End core_ops_arith_Mul. Module core_convert_From. Global Instance I `(Trait) : core.convert.From.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_convert_From. + Module num_traits_identities_Zero. + Global Instance I `(Trait) + : num_traits.identities.Zero.Trait BlockNumber. + + Defined. + End num_traits_identities_Zero. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) + : num_traits.bounds.Bounded.Trait BlockNumber. + + Defined. + End num_traits_bounds_Bounded. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. + + Defined. + End core_cmp_PartialOrd. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End num_traits_sign_Unsigned. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End ink_env_arithmetic_AtLeast32BitUnsigned. - Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait BlockNumber. + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End ink_env_types_FromLittleEndian. + End ink_env_arithmetic_AtLeast32BitUnsigned. End The_Bounds_Of_BlockNumber. End Environment. @@ -1178,27 +787,7 @@ Module FromLittleEndian. Notation.dot := from_le_bytes; }. Module The_Bounds_Of_Bytes. - Module core_default_Default. - Global Instance I `(Trait) : core.default.Default.Trait Bytes. - repeat - (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; - try assumption). - Defined. - End core_default_Default. - Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait Bytes. - repeat - (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; - try assumption). - Defined. - End core_convert_AsRef. - Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait Bytes. - repeat - (destruct __the_bounds_of_Bytes as [? __the_bounds_of_Bytes]; - try assumption). - Defined. - End core_convert_AsMut. + End The_Bounds_Of_Bytes. End FromLittleEndian. @@ -1327,859 +916,490 @@ Module Environment. Notation.double_colon_type := ChainExtension; }. Module The_Bounds_Of_AccountId. - Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End parity_scale_codec_codec_Codec. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). + Defined. End scale_decode_DecodeAsType. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). + Defined. End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_clone_Clone. - Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_cmp_PartialEq. - Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_cmp_Eq. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_cmp_Ord. - Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_convert_AsRef. - Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [? __the_bounds_of_AccountId]; - try assumption). - Defined. - End core_convert_AsMut. End The_Bounds_Of_AccountId. Module The_Bounds_Of_Balance. - Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End parity_scale_codec_codec_Codec. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End scale_encode_EncodeAsType. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End scale_decode_DecodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Balance. + Defined. - End core_marker_Copy. - Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + End core_convert_From. + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. + Defined. - End core_clone_Clone. - Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + End num_traits_identities_Zero. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. + Defined. - End core_cmp_PartialEq. - Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + End core_cmp_PartialOrd. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. + Defined. - End core_cmp_Eq. + End num_traits_sign_Unsigned. Module core_ops_arith_Add. Global Instance I `(Trait) : core.ops.arith.Add.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_ops_arith_Add. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_ops_arith_AddAssign. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. + Defined. - End num_traits_sign_Unsigned. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + End core_ops_arith_DivAssign. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. + Defined. - End core_cmp_PartialOrd. + End core_convert_TryFrom. Module num_traits_bounds_Bounded. Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End num_traits_bounds_Bounded. Module core_convert_TryInto. Global Instance I `(Trait) : core.convert.TryInto.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_convert_TryInto. + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. + + Defined. + End core_ops_arith_Sub. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. + + Defined. + End core_ops_arith_MulAssign. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. + + Defined. + End core_cmp_Ord. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_marker_Sized. Module ink_env_arithmetic_Saturating. Global Instance I `(Trait) : ink_env.arithmetic.Saturating.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End ink_env_arithmetic_Saturating. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait Balance. + + Defined. + End core_ops_arith_Div. Module core_ops_arith_SubAssign. Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_ops_arith_SubAssign. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_convert_From. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. + Defined. - End core_cmp_Ord. + End core_ops_arith_AddAssign. Module num_traits_ops_checked_CheckedMul. Global Instance I `(Trait) : num_traits.ops.checked.CheckedMul.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End num_traits_ops_checked_CheckedMul. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End num_traits_identities_Zero. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_ops_arith_DivAssign. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_ops_arith_MulAssign. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_ops_arith_Div. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_ops_arith_Sub. Module core_ops_arith_Mul. Global Instance I `(Trait) : core.ops.arith.Mul.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End core_ops_arith_Mul. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End core_convert_TryFrom. Module num_traits_identities_One. Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + Defined. End num_traits_identities_One. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait Balance. repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait Balance. repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. - Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) : ink_env.types.FromLittleEndian.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [? __the_bounds_of_Balance]; - try assumption). - Defined. - End ink_env_types_FromLittleEndian. End The_Bounds_Of_Balance. Module The_Bounds_Of_Hash. - Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End parity_scale_codec_codec_Codec. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). + Defined. End scale_encode_EncodeAsType. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). + Defined. End scale_decode_DecodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_marker_Copy. - Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_clone_Clone. - Module ink_primitives_types_Clear. - Global Instance I `(Trait) : ink_primitives.types.Clear.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End ink_primitives_types_Clear. - Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_cmp_PartialEq. - Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_cmp_Eq. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_cmp_Ord. - Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_convert_AsRef. - Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [? __the_bounds_of_Hash]; - try assumption). - Defined. - End core_convert_AsMut. End The_Bounds_Of_Hash. Module The_Bounds_Of_Timestamp. - Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End parity_scale_codec_codec_Codec. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End scale_decode_DecodeAsType. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_marker_Copy. - Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_clone_Clone. - Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_cmp_PartialEq. - Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_cmp_Eq. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Timestamp. + Defined. - End core_ops_arith_Sub. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + End core_convert_From. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Timestamp. + Defined. - End core_cmp_Ord. + End core_marker_Sized. Module num_traits_identities_One. Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End num_traits_identities_One. Module core_ops_arith_Mul. Global Instance I `(Trait) : core.ops.arith.Mul.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End core_ops_arith_Mul. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. + + Defined. + End core_ops_arith_DivAssign. Module core_ops_arith_SubAssign. Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + + Defined. + End core_ops_arith_SubAssign. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. + + Defined. + End core_cmp_PartialOrd. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. + + Defined. + End core_cmp_Ord. + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. + + Defined. + End core_convert_TryInto. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. + + Defined. + End core_ops_arith_Div. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. + + Defined. + End core_ops_arith_Add. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. + Defined. - End core_ops_arith_SubAssign. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + End core_convert_TryFrom. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. + Defined. - End core_ops_arith_Div. + End num_traits_bounds_Bounded. Module num_traits_ops_checked_CheckedMul. Global Instance I `(Trait) : num_traits.ops.checked.CheckedMul.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End num_traits_ops_checked_CheckedMul. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_cmp_PartialOrd. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End num_traits_identities_Zero. Module core_ops_arith_MulAssign. Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End core_ops_arith_MulAssign. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_ops_arith_DivAssign. Module core_ops_arith_AddAssign. Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End core_ops_arith_AddAssign. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_convert_From. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait Timestamp. + Defined. - End core_ops_arith_Add. + End num_traits_identities_Zero. Module ink_env_arithmetic_Saturating. Global Instance I `(Trait) : ink_env.arithmetic.Saturating.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End ink_env_arithmetic_Saturating. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_convert_TryInto. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End num_traits_bounds_Bounded. Module num_traits_sign_Unsigned. Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Defined. End num_traits_sign_Unsigned. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End core_convert_TryFrom. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. + Defined. - End core_marker_Sized. + End core_ops_arith_Sub. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. - Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [? __the_bounds_of_Timestamp]; - try assumption). - Defined. - End ink_env_types_FromLittleEndian. End The_Bounds_Of_Timestamp. Module The_Bounds_Of_BlockNumber. - Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait BlockNumber. + Defined. - End parity_scale_codec_codec_Codec. + End scale_encode_EncodeAsType. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End scale_decode_DecodeAsType. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_marker_Copy. - Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_clone_Clone. - Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_cmp_PartialEq. - Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_cmp_Eq. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_ops_arith_Mul. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. + Defined. - End num_traits_identities_Zero. + End core_ops_arith_Sub. Module core_convert_TryFrom. Global Instance I `(Trait) : core.convert.TryFrom.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_convert_TryFrom. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_ops_arith_DivAssign. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. + Defined. - End core_ops_arith_AddAssign. - Module num_traits_ops_checked_CheckedMul. - Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + End core_marker_Sized. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait BlockNumber. + Defined. - End num_traits_ops_checked_CheckedMul. + End num_traits_identities_One. Module num_traits_bounds_Bounded. Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End num_traits_bounds_Bounded. Module num_traits_sign_Unsigned. Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End num_traits_sign_Unsigned. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_ops_arith_MulAssign. Module core_cmp_Ord. Global Instance I `(Trait) : core.cmp.Ord.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_cmp_Ord. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. + Defined. - End num_traits_identities_One. - Module ink_env_arithmetic_Saturating. + End core_ops_arith_MulAssign. + Module num_traits_ops_checked_CheckedMul. Global Instance I `(Trait) - : ink_env.arithmetic.Saturating.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End ink_env_arithmetic_Saturating. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + : num_traits.ops.checked.CheckedMul.Trait BlockNumber. + Defined. - End core_cmp_PartialOrd. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + End num_traits_ops_checked_CheckedMul. + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait BlockNumber. + Defined. - End core_convert_TryInto. + End num_traits_identities_Zero. Module core_ops_arith_Add. Global Instance I `(Trait) : core.ops.arith.Add.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_ops_arith_Add. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. + + Defined. + End core_ops_arith_Mul. Module core_ops_arith_SubAssign. Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_ops_arith_SubAssign. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End core_ops_arith_Sub. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait BlockNumber. + Defined. - End core_marker_Sized. + End core_convert_From. Module core_ops_arith_Div. Global Instance I `(Trait) : core.ops.arith.Div.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Defined. End core_ops_arith_Div. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. + Defined. - End core_convert_From. + End core_convert_TryInto. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait BlockNumber. + + Defined. + End core_ops_arith_DivAssign. + Module ink_env_arithmetic_Saturating. + Global Instance I `(Trait) + : ink_env.arithmetic.Saturating.Trait BlockNumber. + + Defined. + End ink_env_arithmetic_Saturating. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. + + Defined. + End core_cmp_PartialOrd. + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. + + Defined. + End core_ops_arith_AddAssign. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. - Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [? __the_bounds_of_BlockNumber]; - try assumption). - Defined. - End ink_env_types_FromLittleEndian. End The_Bounds_Of_BlockNumber. End Environment. @@ -2215,13 +1435,7 @@ Module contract. Notation.double_colon_type := Env; }. Module The_Bounds_Of_Env. - Module ink_env_types_Environment. - Global Instance I `(Trait) : ink_env.types.Environment.Trait Env. - repeat - (destruct __the_bounds_of_Env as [? __the_bounds_of_Env]; - try assumption). - Defined. - End ink_env_types_Environment. + End The_Bounds_Of_Env. End ContractEnv. @@ -2479,14 +1693,7 @@ Module call. (axiom : M (H := H') (core.option.Option Output)); }. Module The_Bounds_Of_Error. - Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) - : parity_scale_codec.codec.Decode.Trait Error. - repeat - (destruct __the_bounds_of_Error as [? __the_bounds_of_Error]; - try assumption). - Defined. - End parity_scale_codec_codec_Decode. + End The_Bounds_Of_Error. End ConstructorReturnType. @@ -2770,13 +1977,7 @@ Module hash. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - Module core_default_Default. - Global Instance I `(Trait) : core.default.Default.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End core_default_Default. + End The_Bounds_Of_Type_. End HashOutput. @@ -2956,14 +2157,7 @@ Module topics. topics (E := E) (B := B) (H'0 := H'0) (H'1 := H'1); }. Module The_Bounds_Of_RemainingTopics. - Module ink_env_topics_EventTopicsAmount. - Global Instance I `(Trait) - : ink_env.topics.EventTopicsAmount.Trait RemainingTopics. - repeat - (destruct __the_bounds_of_RemainingTopics as [? __the_bounds_of_RemainingTopics]; - try assumption). - Defined. - End ink_env_topics_EventTopicsAmount. + End The_Bounds_Of_RemainingTopics. End Topics. @@ -6039,14 +5233,7 @@ Module create_builder. (axiom : M (H := H') (core.option.Option Output)); }. Module The_Bounds_Of_Error. - Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) - : parity_scale_codec.codec.Decode.Trait Error. - repeat - (destruct __the_bounds_of_Error as [? __the_bounds_of_Error]; - try assumption). - Defined. - End parity_scale_codec_codec_Decode. + End The_Bounds_Of_Error. End ConstructorReturnType. @@ -6289,13 +5476,7 @@ Module ConstructorReturnType. (axiom : M (H := H') (core.option.Option Output)); }. Module The_Bounds_Of_Error. - Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Error. - repeat - (destruct __the_bounds_of_Error as [? __the_bounds_of_Error]; - try assumption). - Defined. - End parity_scale_codec_codec_Decode. + End The_Bounds_Of_Error. End ConstructorReturnType. @@ -6893,12 +6074,7 @@ Module ContractEnv. Notation.double_colon_type := Env; }. Module The_Bounds_Of_Env. - Module ink_env_types_Environment. - Global Instance I `(Trait) : ink_env.types.Environment.Trait Env. - repeat - (destruct __the_bounds_of_Env as [? __the_bounds_of_Env]; try assumption). - Defined. - End ink_env_types_Environment. + End The_Bounds_Of_Env. End ContractEnv. @@ -7096,13 +6272,7 @@ Module HashOutput. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - Module core_default_Default. - Global Instance I `(Trait) : core.default.Default.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). - Defined. - End core_default_Default. + End The_Bounds_Of_Type_. End HashOutput. @@ -7294,14 +6464,7 @@ Module Topics. topics (E := E) (B := B) (H'0 := H'0) (H'1 := H'1); }. Module The_Bounds_Of_RemainingTopics. - Module ink_env_topics_EventTopicsAmount. - Global Instance I `(Trait) - : ink_env.topics.EventTopicsAmount.Trait RemainingTopics. - repeat - (destruct __the_bounds_of_RemainingTopics as [? __the_bounds_of_RemainingTopics]; - try assumption). - Defined. - End ink_env_topics_EventTopicsAmount. + End The_Bounds_Of_RemainingTopics. End Topics. diff --git a/CoqOfRust/ink/ink_storage_traits.v b/CoqOfRust/ink/ink_storage_traits.v index c7f3cdbad..5fe119dfb 100644 --- a/CoqOfRust/ink/ink_storage_traits.v +++ b/CoqOfRust/ink/ink_storage_traits.v @@ -183,29 +183,21 @@ Module storage. Module The_Bounds_Of_Type_. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + Defined. End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. Module The_Bounds_Of_PreferredKey. - Module ink_storage_traits_storage_StorageKey. - Global Instance I `(Trait) - : ink_storage_traits.storage.StorageKey.Trait PreferredKey. - repeat - (destruct __the_bounds_of_PreferredKey as [? __the_bounds_of_PreferredKey]; - try assumption). - Defined. - End ink_storage_traits_storage_StorageKey. + End The_Bounds_Of_PreferredKey. End StorableHint. @@ -229,17 +221,16 @@ Module storage. Module The_Bounds_Of_Type_. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + Defined. End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. @@ -355,29 +346,21 @@ Module StorableHint. Module The_Bounds_Of_Type_. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + Defined. End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. Module The_Bounds_Of_PreferredKey. - Module ink_storage_traits_storage_StorageKey. - Global Instance I `(Trait) - : ink_storage_traits.storage.StorageKey.Trait PreferredKey. - repeat - (destruct __the_bounds_of_PreferredKey as [? __the_bounds_of_PreferredKey]; - try assumption). - Defined. - End ink_storage_traits_storage_StorageKey. + End The_Bounds_Of_PreferredKey. End StorableHint. @@ -401,17 +384,16 @@ Module AutoStorableHint. Module The_Bounds_Of_Type_. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + Defined. End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. repeat - (destruct __the_bounds_of_Type_ as [? __the_bounds_of_Type_]; - try assumption). + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. diff --git a/lib/src/top_level.rs b/lib/src/top_level.rs index 6a03a183c..5f41daf5b 100644 --- a/lib/src/top_level.rs +++ b/lib/src/top_level.rs @@ -2804,12 +2804,16 @@ impl Trait { &bounds .iter() .flat_map(|bound| { - let topological_sort = algs::DirectedGraph::of_hashmap(supertraits_map) + let mut topological_sort = algs::DirectedGraph::of_hashmap(supertraits_map) .get_subgraph_of(&bound.name) .to_topological_sort(); - if topological_sort.is_empty() { - vec![coq::TopLevelItem::Module(coq::Module::new( - &bound.name.to_name(), + // traits with no supertraits + let base_traits = topological_sort.pop_all(); + base_traits + .into_iter() + .map(|bound| { + coq::TopLevelItem::Module(coq::Module::new( + &bound.to_name(), coq::TopLevel::new(&[ coq::TopLevelItem::Instance(coq::Instance::new( false, @@ -2823,38 +2827,19 @@ impl Trait { )], coq::Expression::Variable { ident: Path::concat(&[ - bound.name.to_owned(), + bound, Path::new(&["Trait"]), ]), no_implicit: false, } .apply(&coq::Expression::just_name(&item.item_name)), &None, - { - let proj_name = ["__the_bounds_of_", &item.item_name].concat(); - vec![concat([ - text("repeat"), - line(), - group([ - text("("), - text([ - "destruct ", - &proj_name, - " as [? ", - &proj_name, - "];", - ].concat()), - line(), - text("try assumption"), - text(")"), - ]), - text("."), - ])] - }, + vec![text("")], )), ]), - ))] - } else { + )) + }) + .chain( topological_sort .map(|bound| { coq::TopLevelItem::Module(coq::Module::new( @@ -2889,12 +2874,14 @@ impl Trait { text([ "destruct ", &proj_name, - " as [? ", + " as [x ", &proj_name, "];", ].concat()), line(), - text("try assumption"), + text("try assumption;"), + line(), + text("try destruct x"), text(")"), ]), text("."), @@ -2904,8 +2891,8 @@ impl Trait { ]), )) }) - .collect() - } + .collect_vec() + ) }) .collect_vec(), ), From 407258804006c001e96ae666d41ce431cd1e03d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Thu, 28 Sep 2023 12:59:13 +0200 Subject: [PATCH 10/13] saving the state of work: used 'all:' in tactics --- CoqOfRust/ink/ink.v | 39 +- CoqOfRust/ink/ink_env.v | 1542 ++++++++++++++++++---------- CoqOfRust/ink/ink_storage_traits.v | 52 +- lib/src/top_level.rs | 137 +-- 4 files changed, 1088 insertions(+), 682 deletions(-) diff --git a/CoqOfRust/ink/ink.v b/CoqOfRust/ink/ink.v index 8cbee4c11..da4d320de 100644 --- a/CoqOfRust/ink/ink.v +++ b/CoqOfRust/ink/ink.v @@ -369,16 +369,19 @@ Module reflect. Module parity_scale_codec_codec_Decode. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. - + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_reflect_dispatch_DecodeDispatch. End The_Bounds_Of_Type_. @@ -1969,16 +1972,19 @@ Module Wrap_dispatch_1. Module parity_scale_codec_codec_Decode. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. - + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_reflect_dispatch_DecodeDispatch. End The_Bounds_Of_Type_. @@ -2183,16 +2189,19 @@ Module ContractConstructorDecoder. Module The_Bounds_Of_Type_. Module parity_scale_codec_codec_Decode. Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. - + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) : ink.reflect.dispatch.DecodeDispatch.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_reflect_dispatch_DecodeDispatch. End The_Bounds_Of_Type_. diff --git a/CoqOfRust/ink/ink_env.v b/CoqOfRust/ink/ink_env.v index f87a1e983..97f7b644b 100644 --- a/CoqOfRust/ink/ink_env.v +++ b/CoqOfRust/ink/ink_env.v @@ -250,340 +250,484 @@ Module types. Notation.double_colon_type := ChainExtension; }. Module The_Bounds_Of_AccountId. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait AccountId. - - Defined. - End scale_encode_EncodeAsType. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait AccountId. - + all: repeat + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; + try assumption; + try destruct x). Defined. End scale_decode_DecodeAsType. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait AccountId. + all: repeat + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; + try assumption; + try destruct x). + Defined. + End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. End The_Bounds_Of_AccountId. Module The_Bounds_Of_Balance. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End scale_encode_EncodeAsType. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End scale_decode_DecodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. - + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_ops_arith_AddAssign. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. - + End num_traits_sign_Unsigned. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_cmp_Ord. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait Balance. - + End core_convert_TryFrom. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_ops_arith_Add. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. - + End core_cmp_PartialOrd. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_ops_arith_Sub. + End core_ops_arith_DivAssign. + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End num_traits_identities_Zero. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_MulAssign. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End num_traits_identities_One. Module ink_env_arithmetic_Saturating. Global Instance I `(Trait) : ink_env.arithmetic.Saturating.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_Saturating. Module core_convert_TryInto. Global Instance I `(Trait) : core.convert.TryInto.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End core_convert_TryInto. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. - - Defined. - End num_traits_identities_Zero. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Balance. - + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_ops_arith_SubAssign. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Balance. - + End core_ops_arith_Mul. + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_marker_Sized. + End core_ops_arith_Sub. Module core_ops_arith_Div. Global Instance I `(Trait) : core.ops.arith.Div.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End core_ops_arith_Div. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. - + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_cmp_PartialOrd. + End core_convert_From. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_SubAssign. Module num_traits_ops_checked_CheckedMul. Global Instance I `(Trait) : num_traits.ops.checked.CheckedMul.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End num_traits_ops_checked_CheckedMul. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. - - Defined. - End core_ops_arith_DivAssign. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. - - Defined. - End core_convert_TryFrom. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait Balance. - + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_ops_arith_Mul. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Balance. - + End core_cmp_Ord. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_convert_From. + End core_marker_Sized. Module num_traits_bounds_Bounded. Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End num_traits_bounds_Bounded. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. - - Defined. - End core_ops_arith_MulAssign. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. - + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End num_traits_identities_One. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. - + End core_ops_arith_AddAssign. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End num_traits_sign_Unsigned. + End core_ops_arith_Add. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. End The_Bounds_Of_Balance. Module The_Bounds_Of_Hash. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Hash. - + all: repeat + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; + try assumption; + try destruct x). Defined. End scale_decode_DecodeAsType. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Hash. - + all: repeat + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; + try assumption; + try destruct x). Defined. End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. End The_Bounds_Of_Hash. Module The_Bounds_Of_Timestamp. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End scale_decode_DecodeAsType. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. + Module num_traits_ops_checked_CheckedMul. + Global Instance I `(Trait) + : num_traits.ops.checked.CheckedMul.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End num_traits_ops_checked_CheckedMul. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_MulAssign. + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_AddAssign. Module core_ops_arith_Sub. Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End core_ops_arith_Sub. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Timestamp. - + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End core_convert_From. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. - + End core_marker_Sized. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End num_traits_identities_One. + End num_traits_bounds_Bounded. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End core_cmp_Ord. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_Div. Module ink_env_arithmetic_Saturating. Global Instance I `(Trait) : ink_env.arithmetic.Saturating.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_Saturating. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. - + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End core_cmp_Ord. + End core_ops_arith_Add. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End core_convert_From. Module core_ops_arith_Mul. Global Instance I `(Trait) : core.ops.arith.Mul.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End core_ops_arith_Mul. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. - + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End core_ops_arith_DivAssign. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. - + End core_convert_TryFrom. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End num_traits_sign_Unsigned. + End core_cmp_PartialOrd. Module core_convert_TryInto. Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End core_convert_TryInto. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. - + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End num_traits_bounds_Bounded. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Timestamp. - + End num_traits_identities_One. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End core_marker_Sized. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Timestamp. - + End core_ops_arith_SubAssign. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End core_ops_arith_MulAssign. + End core_ops_arith_DivAssign. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End num_traits_sign_Unsigned. Module num_traits_identities_Zero. Global Instance I `(Trait) : num_traits.identities.Zero.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End num_traits_identities_Zero. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. - - Defined. - End core_ops_arith_Add. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Timestamp. - - Defined. - End core_ops_arith_SubAssign. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. - - Defined. - End core_ops_arith_AddAssign. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. - - Defined. - End core_convert_TryFrom. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. - - Defined. - End core_ops_arith_Div. - Module num_traits_ops_checked_CheckedMul. - Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait Timestamp. - - Defined. - End num_traits_ops_checked_CheckedMul. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. - - Defined. - End core_cmp_PartialOrd. - Module ink_env_arithmetic_BaseArithmetic. - Global Instance I `(Trait) - : ink_env.arithmetic.BaseArithmetic.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Module ink_env_arithmetic_BaseArithmetic. + Global Instance I `(Trait) + : ink_env.arithmetic.BaseArithmetic.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. End The_Bounds_Of_Timestamp. @@ -591,154 +735,220 @@ Module types. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End scale_decode_DecodeAsType. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait BlockNumber. - - Defined. - End core_convert_TryFrom. - Module num_traits_identities_One. - Global Instance I `(Trait) - : num_traits.identities.One.Trait BlockNumber. - - Defined. - End num_traits_identities_One. - Module num_traits_ops_checked_CheckedMul. - Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait BlockNumber. - - Defined. - End num_traits_ops_checked_CheckedMul. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait BlockNumber. - - Defined. - End core_ops_arith_DivAssign. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. - + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_marker_Sized. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait BlockNumber. - + End core_ops_arith_Sub. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_ops_arith_Div. + End core_ops_arith_MulAssign. Module core_cmp_Ord. Global Instance I `(Trait) : core.cmp.Ord.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End core_cmp_Ord. + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End core_convert_TryInto. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) + : num_traits.bounds.Bounded.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End num_traits_bounds_Bounded. Module ink_env_arithmetic_Saturating. Global Instance I `(Trait) : ink_env.arithmetic.Saturating.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_Saturating. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. - + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End num_traits_sign_Unsigned. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. - + End core_cmp_PartialOrd. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_ops_arith_Sub. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. - + End core_ops_arith_Div. + Module num_traits_identities_Zero. + Global Instance I `(Trait) + : num_traits.identities.Zero.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_convert_TryInto. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait BlockNumber. - + End num_traits_identities_Zero. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_ops_arith_Add. + End core_convert_TryFrom. Module core_ops_arith_SubAssign. Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End core_ops_arith_SubAssign. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. - + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_ops_arith_MulAssign. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. - + End core_marker_Sized. + Module num_traits_identities_One. + Global Instance I `(Trait) + : num_traits.identities.One.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_ops_arith_AddAssign. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. - + End num_traits_identities_One. + Module num_traits_ops_checked_CheckedMul. + Global Instance I `(Trait) + : num_traits.ops.checked.CheckedMul.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_ops_arith_Mul. + End num_traits_ops_checked_CheckedMul. + Module core_ops_arith_Add. + Global Instance I `(Trait) : core.ops.arith.Add.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_Add. Module core_convert_From. Global Instance I `(Trait) : core.convert.From.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End core_convert_From. - Module num_traits_identities_Zero. - Global Instance I `(Trait) - : num_traits.identities.Zero.Trait BlockNumber. - + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End num_traits_identities_Zero. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) - : num_traits.bounds.Bounded.Trait BlockNumber. - + End core_ops_arith_Mul. + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End num_traits_bounds_Bounded. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. - + End core_ops_arith_AddAssign. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_cmp_PartialOrd. + End num_traits_sign_Unsigned. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_DivAssign. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. End The_Bounds_Of_BlockNumber. @@ -918,486 +1128,696 @@ Module Environment. Module The_Bounds_Of_AccountId. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait AccountId. - + all: repeat + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; + try assumption; + try destruct x). Defined. End scale_decode_DecodeAsType. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait AccountId. - + all: repeat + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; + try assumption; + try destruct x). Defined. End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. - repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. End The_Bounds_Of_AccountId. Module The_Bounds_Of_Balance. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Balance. - - Defined. - End scale_encode_EncodeAsType. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End scale_decode_DecodeAsType. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Balance. - - Defined. - End core_convert_From. Module num_traits_identities_Zero. Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End num_traits_identities_Zero. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. - + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_cmp_PartialOrd. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. - + End core_ops_arith_Sub. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End num_traits_sign_Unsigned. + End num_traits_identities_One. Module core_ops_arith_Add. Global Instance I `(Trait) : core.ops.arith.Add.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End core_ops_arith_Add. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. - - Defined. - End core_ops_arith_DivAssign. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. - - Defined. - End core_convert_TryFrom. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Balance. - - Defined. - End num_traits_bounds_Bounded. Module core_convert_TryInto. Global Instance I `(Trait) : core.convert.TryInto.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End core_convert_TryInto. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. - - Defined. - End core_ops_arith_Sub. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. - + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_ops_arith_MulAssign. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. - + End core_convert_From. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End core_cmp_Ord. + End core_ops_arith_SubAssign. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End core_marker_Sized. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_MulAssign. Module ink_env_arithmetic_Saturating. Global Instance I `(Trait) : ink_env.arithmetic.Saturating.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_Saturating. Module core_ops_arith_Div. Global Instance I `(Trait) : core.ops.arith.Div.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End core_ops_arith_Div. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Balance. - - Defined. - End core_ops_arith_SubAssign. Module core_ops_arith_AddAssign. Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End core_ops_arith_AddAssign. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End core_cmp_PartialOrd. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End num_traits_bounds_Bounded. Module num_traits_ops_checked_CheckedMul. Global Instance I `(Trait) : num_traits.ops.checked.CheckedMul.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End num_traits_ops_checked_CheckedMul. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End core_cmp_Ord. Module core_ops_arith_Mul. Global Instance I `(Trait) : core.ops.arith.Mul.Trait Balance. - + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End core_ops_arith_Mul. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. - + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. - End num_traits_identities_One. + End num_traits_sign_Unsigned. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End core_convert_TryFrom. + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_DivAssign. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. - repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. End The_Bounds_Of_Balance. Module The_Bounds_Of_Hash. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Hash. - + all: repeat + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; + try assumption; + try destruct x). Defined. End scale_encode_EncodeAsType. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Hash. - + all: repeat + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; + try assumption; + try destruct x). Defined. End scale_decode_DecodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. - repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. End The_Bounds_Of_Hash. Module The_Bounds_Of_Timestamp. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End scale_decode_DecodeAsType. Module scale_encode_EncodeAsType. Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Timestamp. - + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End core_convert_From. + End core_ops_arith_Div. + Module num_traits_bounds_Bounded. + Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End num_traits_bounds_Bounded. + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End num_traits_identities_Zero. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End core_marker_Sized. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. - - Defined. - End num_traits_identities_One. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait Timestamp. - - Defined. - End core_ops_arith_Mul. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. - + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End core_ops_arith_DivAssign. + End core_ops_arith_AddAssign. Module core_ops_arith_SubAssign. Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End core_ops_arith_SubAssign. + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End core_convert_TryInto. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End core_convert_TryFrom. + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_Sub. Module core_cmp_PartialOrd. Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End core_cmp_PartialOrd. Module core_cmp_Ord. Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End core_cmp_Ord. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. - - Defined. - End core_convert_TryInto. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. - + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End core_ops_arith_Div. + End num_traits_sign_Unsigned. Module core_ops_arith_Add. Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End core_ops_arith_Add. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. - - Defined. - End core_convert_TryFrom. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. - - Defined. - End num_traits_bounds_Bounded. - Module num_traits_ops_checked_CheckedMul. - Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait Timestamp. - + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End num_traits_ops_checked_CheckedMul. + End num_traits_identities_One. Module core_ops_arith_MulAssign. Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End core_ops_arith_MulAssign. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. - + Module num_traits_ops_checked_CheckedMul. + Global Instance I `(Trait) + : num_traits.ops.checked.CheckedMul.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End core_ops_arith_AddAssign. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait Timestamp. - + End num_traits_ops_checked_CheckedMul. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End num_traits_identities_Zero. + End core_convert_From. Module ink_env_arithmetic_Saturating. Global Instance I `(Trait) : ink_env.arithmetic.Saturating.Trait Timestamp. - + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_Saturating. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. - + Module core_ops_arith_DivAssign. + Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End num_traits_sign_Unsigned. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. - + End core_ops_arith_DivAssign. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait Timestamp. + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. - End core_ops_arith_Sub. + End core_ops_arith_Mul. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. - repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. End The_Bounds_Of_Timestamp. Module The_Bounds_Of_BlockNumber. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait BlockNumber. - - Defined. - End scale_encode_EncodeAsType. Module scale_decode_DecodeAsType. Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End scale_decode_DecodeAsType. + Module scale_encode_EncodeAsType. + Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End scale_encode_EncodeAsType. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. - - Defined. - End core_ops_arith_Sub. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait BlockNumber. - - Defined. - End core_convert_TryFrom. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. - - Defined. - End core_marker_Sized. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait BlockNumber. - - Defined. - End num_traits_identities_One. Module num_traits_bounds_Bounded. Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End num_traits_bounds_Bounded. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. - + Module core_ops_arith_AddAssign. + Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End num_traits_sign_Unsigned. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait BlockNumber. - + End core_ops_arith_AddAssign. + Module core_ops_arith_SubAssign. + Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_cmp_Ord. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. - + End core_ops_arith_SubAssign. + Module core_ops_arith_Div. + Global Instance I `(Trait) : core.ops.arith.Div.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_ops_arith_MulAssign. + End core_ops_arith_Div. + Module num_traits_identities_Zero. + Global Instance I `(Trait) : num_traits.identities.Zero.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End num_traits_identities_Zero. Module num_traits_ops_checked_CheckedMul. Global Instance I `(Trait) : num_traits.ops.checked.CheckedMul.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End num_traits_ops_checked_CheckedMul. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait BlockNumber. - - Defined. - End num_traits_identities_Zero. Module core_ops_arith_Add. Global Instance I `(Trait) : core.ops.arith.Add.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End core_ops_arith_Add. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. - - Defined. - End core_ops_arith_Mul. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait BlockNumber. - - Defined. - End core_ops_arith_SubAssign. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait BlockNumber. - + Module core_ops_arith_Sub. + Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_convert_From. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait BlockNumber. - + End core_ops_arith_Sub. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_ops_arith_Div. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. - + End core_cmp_Ord. + Module core_cmp_PartialOrd. + Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_convert_TryInto. + End core_cmp_PartialOrd. Module core_ops_arith_DivAssign. Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End core_ops_arith_DivAssign. + Module core_ops_arith_Mul. + Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_Mul. Module ink_env_arithmetic_Saturating. Global Instance I `(Trait) : ink_env.arithmetic.Saturating.Trait BlockNumber. - + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_Saturating. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. - + Module core_convert_TryInto. + Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_cmp_PartialOrd. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. - + End core_convert_TryInto. + Module core_marker_Sized. + Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. - End core_ops_arith_AddAssign. + End core_marker_Sized. + Module core_ops_arith_MulAssign. + Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End core_ops_arith_MulAssign. + Module core_convert_TryFrom. + Global Instance I `(Trait) : core.convert.TryFrom.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End core_convert_TryFrom. + Module num_traits_sign_Unsigned. + Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End num_traits_sign_Unsigned. + Module num_traits_identities_One. + Global Instance I `(Trait) : num_traits.identities.One.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End num_traits_identities_One. + Module core_convert_From. + Global Instance I `(Trait) : core.convert.From.Trait BlockNumber. + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). + Defined. + End core_convert_From. Module ink_env_arithmetic_BaseArithmetic. Global Instance I `(Trait) : ink_env.arithmetic.BaseArithmetic.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_BaseArithmetic. Module ink_env_arithmetic_AtLeast32Bit. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32Bit.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32Bit. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. - repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + try assumption; + try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. End The_Bounds_Of_BlockNumber. diff --git a/CoqOfRust/ink/ink_storage_traits.v b/CoqOfRust/ink/ink_storage_traits.v index 5fe119dfb..69771dc5f 100644 --- a/CoqOfRust/ink/ink_storage_traits.v +++ b/CoqOfRust/ink/ink_storage_traits.v @@ -183,16 +183,19 @@ Module storage. Module The_Bounds_Of_Type_. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. @@ -221,16 +224,19 @@ Module storage. Module The_Bounds_Of_Type_. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. @@ -346,16 +352,19 @@ Module StorableHint. Module The_Bounds_Of_Type_. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. @@ -384,16 +393,19 @@ Module AutoStorableHint. Module The_Bounds_Of_Type_. Module core_marker_Sized. Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. - repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. diff --git a/lib/src/top_level.rs b/lib/src/top_level.rs index 5f41daf5b..f541752d9 100644 --- a/lib/src/top_level.rs +++ b/lib/src/top_level.rs @@ -2804,95 +2804,60 @@ impl Trait { &bounds .iter() .flat_map(|bound| { - let mut topological_sort = algs::DirectedGraph::of_hashmap(supertraits_map) + algs::DirectedGraph::of_hashmap(supertraits_map) .get_subgraph_of(&bound.name) - .to_topological_sort(); - // traits with no supertraits - let base_traits = topological_sort.pop_all(); - base_traits - .into_iter() + .to_topological_sort() .map(|bound| { - coq::TopLevelItem::Module(coq::Module::new( - &bound.to_name(), - coq::TopLevel::new(&[ - coq::TopLevelItem::Instance(coq::Instance::new( - false, - "I", - &[coq::ArgDecl::new( - &coq::ArgDeclVar::Generalized { - idents: vec![], - ty: coq::Expression::just_name("Trait"), - }, - coq::ArgSpecKind::Explicit, - )], - coq::Expression::Variable { - ident: Path::concat(&[ - bound, - Path::new(&["Trait"]), - ]), - no_implicit: false, - } - .apply(&coq::Expression::just_name(&item.item_name)), - &None, - vec![text("")], - )), - ]), - )) - }) - .chain( - topological_sort - .map(|bound| { - coq::TopLevelItem::Module(coq::Module::new( - &bound.to_name(), - coq::TopLevel::new(&[ - coq::TopLevelItem::Instance(coq::Instance::new( - false, - "I", - &[coq::ArgDecl::new( - &coq::ArgDeclVar::Generalized { - idents: vec![], - ty: coq::Expression::just_name("Trait"), - }, - coq::ArgSpecKind::Explicit, - )], - coq::Expression::Variable { - ident: Path::concat(&[ - bound, - Path::new(&["Trait"]), - ]), - no_implicit: false, - } - .apply(&coq::Expression::just_name(&item.item_name)), - &None, - { - let proj_name = ["__the_bounds_of_", &item.item_name].concat(); - vec![concat([ - text("repeat"), - line(), - group([ - text("("), - text([ - "destruct ", - &proj_name, - " as [x ", - &proj_name, - "];", - ].concat()), - line(), - text("try assumption;"), - line(), - text("try destruct x"), - text(")"), - ]), - text("."), - ])] + coq::TopLevelItem::Module(coq::Module::new( + &bound.to_name(), + coq::TopLevel::new(&[ + coq::TopLevelItem::Instance(coq::Instance::new( + false, + "I", + &[coq::ArgDecl::new( + &coq::ArgDeclVar::Generalized { + idents: vec![], + ty: coq::Expression::just_name("Trait"), }, - )), - ]), - )) - }) - .collect_vec() - ) + coq::ArgSpecKind::Explicit, + )], + coq::Expression::Variable { + ident: Path::concat(&[ + bound, + Path::new(&["Trait"]), + ]), + no_implicit: false, + } + .apply(&coq::Expression::just_name(&item.item_name)), + &None, + { + let proj_name = ["__the_bounds_of_", &item.item_name].concat(); + vec![nest([ + text("all: repeat"), + line(), + group([ + text("("), + text([ + "destruct ", + &proj_name, + " as [x ", + &proj_name, + "];", + ].concat()), + line(), + text("try assumption;"), + line(), + text("try destruct x"), + text(")"), + ]), + text("."), + ])] + }, + )), + ]), + )) + }) + .collect_vec() }) .collect_vec(), ), From a2a6f2f45162a11a09a6ecce24853d831875ee47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Fri, 29 Sep 2023 12:52:13 +0200 Subject: [PATCH 11/13] testing another solution: restore the code not using the supertraits_map --- CoqOfRust/ink/ink.v | 197 +++- CoqOfRust/ink/ink_env.v | 1363 ++++++++-------------------- CoqOfRust/ink/ink_storage_traits.v | 52 +- lib/src/lib.rs | 1 - lib/src/top_level.rs | 107 +-- 5 files changed, 628 insertions(+), 1092 deletions(-) diff --git a/CoqOfRust/ink/ink.v b/CoqOfRust/ink/ink.v index da4d320de..07a9ba248 100644 --- a/CoqOfRust/ink/ink.v +++ b/CoqOfRust/ink/ink.v @@ -325,7 +325,24 @@ Module reflect. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) + : parity_scale_codec.codec.Decode.Trait Type_. + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). + Defined. + End parity_scale_codec_codec_Decode. + Module ink_reflect_dispatch_ExecuteDispatchable. + Global Instance I `(Trait) + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). + Defined. + End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. End ContractMessageDecoder. @@ -366,24 +383,24 @@ Module reflect. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - Module parity_scale_codec_codec_Decode. + Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) - : parity_scale_codec.codec.Decode.Trait Type_. + : ink.reflect.dispatch.DecodeDispatch.Trait Type_. all: repeat (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; try assumption; try destruct x). Defined. - End parity_scale_codec_codec_Decode. - Module ink_reflect_dispatch_DecodeDispatch. + End ink_reflect_dispatch_DecodeDispatch. + Module ink_reflect_dispatch_ExecuteDispatchable. Global Instance I `(Trait) - : ink.reflect.dispatch.DecodeDispatch.Trait Type_. + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. all: repeat (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; try assumption; try destruct x). Defined. - End ink_reflect_dispatch_DecodeDispatch. + End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. End ContractConstructorDecoder. End dispatch. @@ -699,7 +716,16 @@ Module codegen. Notation.double_colon_type := Forwarder; }. Module The_Bounds_Of_Forwarder. - + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + Forwarder. + all: repeat + (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; + try assumption; + try destruct x). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. End TraitCallForwarder. @@ -755,7 +781,16 @@ Module codegen. Notation.dot := build_mut; }. Module The_Bounds_Of_Forwarder. - + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + Forwarder. + all: repeat + (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; + try assumption; + try destruct x). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) End call_builder. @@ -1345,7 +1380,16 @@ Module trait_def. Notation.double_colon_type := Forwarder; }. Module The_Bounds_Of_Forwarder. - + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + Forwarder. + all: repeat + (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; + try assumption; + try destruct x). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. End TraitCallForwarder. @@ -1399,7 +1443,16 @@ Module trait_def. Notation.dot := build_mut; }. Module The_Bounds_Of_Forwarder. - + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + Forwarder. + all: repeat + (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; + try assumption; + try destruct x). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) End call_builder. @@ -1457,7 +1510,15 @@ Module call_builder. Notation.double_colon_type := Forwarder; }. Module The_Bounds_Of_Forwarder. - + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. + all: repeat + (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; + try assumption; + try destruct x). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. End TraitCallForwarder. @@ -1511,7 +1572,15 @@ Module call_builder. Notation.dot := build_mut; }. Module The_Bounds_Of_Forwarder. - + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. + all: repeat + (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; + try assumption; + try destruct x). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) End call_builder. @@ -1554,7 +1623,15 @@ Module TraitCallForwarder. Notation.double_colon_type := Forwarder; }. Module The_Bounds_Of_Forwarder. - + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. + all: repeat + (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; + try assumption; + try destruct x). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. End TraitCallForwarder. @@ -1607,7 +1684,15 @@ End TraitCallForwarder. Notation.dot := build_mut; }. Module The_Bounds_Of_Forwarder. - + Module ink_codegen_trait_def_call_builder_TraitCallBuilder. + Global Instance I `(Trait) + : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. + all: repeat + (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; + try assumption; + try destruct x). + Defined. + End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. End TraitCallForwarderFor. *) @@ -1928,7 +2013,24 @@ Module Wrap_dispatch_1. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) + : parity_scale_codec.codec.Decode.Trait Type_. + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). + Defined. + End parity_scale_codec_codec_Decode. + Module ink_reflect_dispatch_ExecuteDispatchable. + Global Instance I `(Trait) + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). + Defined. + End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. End ContractMessageDecoder. @@ -1969,24 +2071,24 @@ Module Wrap_dispatch_1. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - Module parity_scale_codec_codec_Decode. + Module ink_reflect_dispatch_DecodeDispatch. Global Instance I `(Trait) - : parity_scale_codec.codec.Decode.Trait Type_. + : ink.reflect.dispatch.DecodeDispatch.Trait Type_. all: repeat (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; try assumption; try destruct x). Defined. - End parity_scale_codec_codec_Decode. - Module ink_reflect_dispatch_DecodeDispatch. + End ink_reflect_dispatch_DecodeDispatch. + Module ink_reflect_dispatch_ExecuteDispatchable. Global Instance I `(Trait) - : ink.reflect.dispatch.DecodeDispatch.Trait Type_. + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. all: repeat (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; try assumption; try destruct x). Defined. - End ink_reflect_dispatch_DecodeDispatch. + End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. End ContractConstructorDecoder. End dispatch. @@ -2167,7 +2269,23 @@ Module ContractMessageDecoder. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). + Defined. + End parity_scale_codec_codec_Decode. + Module ink_reflect_dispatch_ExecuteDispatchable. + Global Instance I `(Trait) + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). + Defined. + End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. End ContractMessageDecoder. @@ -2187,23 +2305,24 @@ Module ContractConstructorDecoder. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. + Module ink_reflect_dispatch_DecodeDispatch. + Global Instance I `(Trait) + : ink.reflect.dispatch.DecodeDispatch.Trait Type_. all: repeat (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; try assumption; try destruct x). Defined. - End parity_scale_codec_codec_Decode. - Module ink_reflect_dispatch_DecodeDispatch. + End ink_reflect_dispatch_DecodeDispatch. + Module ink_reflect_dispatch_ExecuteDispatchable. Global Instance I `(Trait) - : ink.reflect.dispatch.DecodeDispatch.Trait Type_. + : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. all: repeat (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; try assumption; try destruct x). Defined. - End ink_reflect_dispatch_DecodeDispatch. + End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. End ContractConstructorDecoder. @@ -2498,7 +2617,15 @@ Module chain_extension. Notation.double_colon_type := ErrorCode; }. Module The_Bounds_Of_ErrorCode. - + Module ink_env_chain_extension_FromStatusCode. + Global Instance I `(Trait) + : ink_env.chain_extension.FromStatusCode.Trait ErrorCode. + all: repeat + (destruct __the_bounds_of_ErrorCode as [x __the_bounds_of_ErrorCode]; + try assumption; + try destruct x). + Defined. + End ink_env_chain_extension_FromStatusCode. End The_Bounds_Of_ErrorCode. End ChainExtension. @@ -2587,7 +2714,15 @@ Module ChainExtension. Notation.double_colon_type := ErrorCode; }. Module The_Bounds_Of_ErrorCode. - + Module ink_env_chain_extension_FromStatusCode. + Global Instance I `(Trait) + : ink_env.chain_extension.FromStatusCode.Trait ErrorCode. + all: repeat + (destruct __the_bounds_of_ErrorCode as [x __the_bounds_of_ErrorCode]; + try assumption; + try destruct x). + Defined. + End ink_env_chain_extension_FromStatusCode. End The_Bounds_Of_ErrorCode. End ChainExtension. diff --git a/CoqOfRust/ink/ink_env.v b/CoqOfRust/ink/ink_env.v index 97f7b644b..075517fc6 100644 --- a/CoqOfRust/ink/ink_env.v +++ b/CoqOfRust/ink/ink_env.v @@ -121,7 +121,30 @@ Module types. Notation.dot := from_le_bytes; }. Module The_Bounds_Of_Bytes. - + Module core_default_Default. + Global Instance I `(Trait) : core.default.Default.Trait Bytes. + all: repeat + (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; + try assumption; + try destruct x). + Defined. + End core_default_Default. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait Bytes. + all: repeat + (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; + try assumption; + try destruct x). + Defined. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait Bytes. + all: repeat + (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; + try assumption; + try destruct x). + Defined. + End core_convert_AsMut. End The_Bounds_Of_Bytes. End FromLittleEndian. @@ -250,22 +273,15 @@ Module types. Notation.double_colon_type := ChainExtension; }. Module The_Bounds_Of_AccountId. - Module scale_decode_DecodeAsType. - Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). - Defined. - End scale_decode_DecodeAsType. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait AccountId. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait AccountId. all: repeat (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End scale_encode_EncodeAsType. + End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. all: repeat @@ -274,239 +290,133 @@ Module types. try destruct x). Defined. End ink_env_types_CodecAsType. - End The_Bounds_Of_AccountId. - Module The_Bounds_Of_Balance. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End scale_encode_EncodeAsType. - Module scale_decode_DecodeAsType. - Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Balance. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End scale_decode_DecodeAsType. - Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End ink_env_types_CodecAsType. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End num_traits_sign_Unsigned. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_convert_TryFrom. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_cmp_PartialOrd. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_DivAssign. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End num_traits_identities_Zero. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_MulAssign. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End num_traits_identities_One. - Module ink_env_arithmetic_Saturating. - Global Instance I `(Trait) - : ink_env.arithmetic.Saturating.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End ink_env_arithmetic_Saturating. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End core_convert_TryInto. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait Balance. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End core_ops_arith_Mul. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End core_ops_arith_Sub. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait Balance. + End core_cmp_Eq. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End core_ops_arith_Div. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Balance. + End core_cmp_Ord. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End core_convert_From. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Balance. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End core_ops_arith_SubAssign. - Module num_traits_ops_checked_CheckedMul. + End core_convert_AsMut. + End The_Bounds_Of_AccountId. + Module The_Bounds_Of_Balance. + Module parity_scale_codec_codec_Codec. Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait Balance. + : parity_scale_codec.codec.Codec.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End num_traits_ops_checked_CheckedMul. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_cmp_Ord. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Balance. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End core_marker_Sized. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Balance. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End num_traits_bounds_Bounded. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End core_ops_arith_AddAssign. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait Balance. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End core_ops_arith_Add. - Module ink_env_arithmetic_BaseArithmetic. - Global Instance I `(Trait) - : ink_env.arithmetic.BaseArithmetic.Trait Balance. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_BaseArithmetic. - Module ink_env_arithmetic_AtLeast32Bit. + End core_cmp_Eq. + Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32Bit.Trait Balance. + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_AtLeast32Bit. - Module ink_env_arithmetic_AtLeast32BitUnsigned. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. + : ink_env.types.FromLittleEndian.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_AtLeast32BitUnsigned. + End ink_env_types_FromLittleEndian. End The_Bounds_Of_Balance. Module The_Bounds_Of_Hash. - Module scale_decode_DecodeAsType. - Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Hash. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Hash. all: repeat (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End scale_decode_DecodeAsType. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). - Defined. - End scale_encode_EncodeAsType. + End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. all: repeat @@ -515,212 +425,121 @@ Module types. try destruct x). Defined. End ink_env_types_CodecAsType. - End The_Bounds_Of_Hash. - Module The_Bounds_Of_Timestamp. - Module scale_decode_DecodeAsType. - Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End scale_decode_DecodeAsType. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End scale_encode_EncodeAsType. - Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End ink_env_types_CodecAsType. - Module num_traits_ops_checked_CheckedMul. - Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait Timestamp. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End num_traits_ops_checked_CheckedMul. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_ops_arith_MulAssign. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_ops_arith_AddAssign. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. + End core_clone_Clone. + Module ink_primitives_types_Clear. + Global Instance I `(Trait) : ink_primitives.types.Clear.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_ops_arith_Sub. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Timestamp. + End ink_primitives_types_Clear. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_marker_Sized. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End num_traits_bounds_Bounded. + End core_cmp_Eq. Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. + Global Instance I `(Trait) : core.cmp.Ord.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. End core_cmp_Ord. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Div. - Module ink_env_arithmetic_Saturating. - Global Instance I `(Trait) - : ink_env.arithmetic.Saturating.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End ink_env_arithmetic_Saturating. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Add. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End core_convert_From. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait Timestamp. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Mul. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End core_convert_TryFrom. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End core_cmp_PartialOrd. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_convert_TryInto. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End num_traits_identities_One. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Timestamp. + End core_convert_AsMut. + End The_Bounds_Of_Hash. + Module The_Bounds_Of_Timestamp. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End core_ops_arith_SubAssign. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End core_ops_arith_DivAssign. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End num_traits_sign_Unsigned. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait Timestamp. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End num_traits_identities_Zero. - Module ink_env_arithmetic_BaseArithmetic. - Global Instance I `(Trait) - : ink_env.arithmetic.BaseArithmetic.Trait Timestamp. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_BaseArithmetic. - Module ink_env_arithmetic_AtLeast32Bit. - Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32Bit.Trait Timestamp. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_AtLeast32Bit. + End core_cmp_Eq. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. @@ -730,26 +549,26 @@ Module types. try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. - End The_Bounds_Of_Timestamp. - Module The_Bounds_Of_BlockNumber. - Module scale_decode_DecodeAsType. + Module ink_env_types_FromLittleEndian. Global Instance I `(Trait) - : scale_decode.DecodeAsType.Trait BlockNumber. + : ink_env.types.FromLittleEndian.Trait Timestamp. all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; + (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End scale_decode_DecodeAsType. - Module scale_encode_EncodeAsType. + End ink_env_types_FromLittleEndian. + End The_Bounds_Of_Timestamp. + Module The_Bounds_Of_BlockNumber. + Module parity_scale_codec_codec_Codec. Global Instance I `(Trait) - : scale_encode.EncodeAsType.Trait BlockNumber. + : parity_scale_codec.codec.Codec.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End scale_encode_EncodeAsType. + End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. @@ -759,198 +578,56 @@ Module types. try destruct x). Defined. End ink_env_types_CodecAsType. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Sub. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End core_ops_arith_MulAssign. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait BlockNumber. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End core_cmp_Ord. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End core_convert_TryInto. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) - : num_traits.bounds.Bounded.Trait BlockNumber. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End num_traits_bounds_Bounded. - Module ink_env_arithmetic_Saturating. - Global Instance I `(Trait) - : ink_env.arithmetic.Saturating.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End ink_env_arithmetic_Saturating. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_cmp_PartialOrd. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Div. - Module num_traits_identities_Zero. - Global Instance I `(Trait) - : num_traits.identities.Zero.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End num_traits_identities_Zero. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_convert_TryFrom. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_SubAssign. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_marker_Sized. - Module num_traits_identities_One. - Global Instance I `(Trait) - : num_traits.identities.One.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End num_traits_identities_One. - Module num_traits_ops_checked_CheckedMul. - Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End num_traits_ops_checked_CheckedMul. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Add. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_convert_From. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Mul. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_AddAssign. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End num_traits_sign_Unsigned. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_DivAssign. - Module ink_env_arithmetic_BaseArithmetic. - Global Instance I `(Trait) - : ink_env.arithmetic.BaseArithmetic.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End ink_env_arithmetic_BaseArithmetic. - Module ink_env_arithmetic_AtLeast32Bit. + End core_cmp_Eq. + Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32Bit.Trait BlockNumber. + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_AtLeast32Bit. - Module ink_env_arithmetic_AtLeast32BitUnsigned. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. + : ink_env.types.FromLittleEndian.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_AtLeast32BitUnsigned. + End ink_env_types_FromLittleEndian. End The_Bounds_Of_BlockNumber. End Environment. @@ -997,7 +674,30 @@ Module FromLittleEndian. Notation.dot := from_le_bytes; }. Module The_Bounds_Of_Bytes. - + Module core_default_Default. + Global Instance I `(Trait) : core.default.Default.Trait Bytes. + all: repeat + (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; + try assumption; + try destruct x). + Defined. + End core_default_Default. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait Bytes. + all: repeat + (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; + try assumption; + try destruct x). + Defined. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait Bytes. + all: repeat + (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; + try assumption; + try destruct x). + Defined. + End core_convert_AsMut. End The_Bounds_Of_Bytes. End FromLittleEndian. @@ -1126,22 +826,15 @@ Module Environment. Notation.double_colon_type := ChainExtension; }. Module The_Bounds_Of_AccountId. - Module scale_decode_DecodeAsType. - Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). - Defined. - End scale_decode_DecodeAsType. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait AccountId. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait AccountId. all: repeat (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End scale_encode_EncodeAsType. + End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. all: repeat @@ -1150,211 +843,104 @@ Module Environment. try destruct x). Defined. End ink_env_types_CodecAsType. - End The_Bounds_Of_AccountId. - Module The_Bounds_Of_Balance. - Module scale_decode_DecodeAsType. - Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End scale_decode_DecodeAsType. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End scale_encode_EncodeAsType. - Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End ink_env_types_CodecAsType. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End num_traits_identities_Zero. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Sub. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End num_traits_identities_One. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Add. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_convert_TryInto. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_convert_From. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Balance. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_SubAssign. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_marker_Sized. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_MulAssign. - Module ink_env_arithmetic_Saturating. - Global Instance I `(Trait) : ink_env.arithmetic.Saturating.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). - Defined. - End ink_env_arithmetic_Saturating. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End core_ops_arith_Div. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Balance. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End core_ops_arith_AddAssign. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Balance. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End core_cmp_PartialOrd. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Balance. + End core_cmp_Eq. + Module core_cmp_Ord. + Global Instance I `(Trait) : core.cmp.Ord.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End num_traits_bounds_Bounded. - Module num_traits_ops_checked_CheckedMul. - Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait Balance. + End core_cmp_Ord. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End num_traits_ops_checked_CheckedMul. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Balance. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait AccountId. all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; + (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; try assumption; try destruct x). Defined. - End core_cmp_Ord. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait Balance. + End core_convert_AsMut. + End The_Bounds_Of_AccountId. + Module The_Bounds_Of_Balance. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End core_ops_arith_Mul. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Balance. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End num_traits_sign_Unsigned. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait Balance. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End core_convert_TryFrom. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Balance. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End core_ops_arith_DivAssign. - Module ink_env_arithmetic_BaseArithmetic. - Global Instance I `(Trait) - : ink_env.arithmetic.BaseArithmetic.Trait Balance. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_BaseArithmetic. - Module ink_env_arithmetic_AtLeast32Bit. - Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32Bit.Trait Balance. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Balance. all: repeat (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_AtLeast32Bit. + End core_cmp_Eq. Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. @@ -1364,24 +950,24 @@ Module Environment. try destruct x). Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. - End The_Bounds_Of_Balance. - Module The_Bounds_Of_Hash. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Hash. + Module ink_env_types_FromLittleEndian. + Global Instance I `(Trait) : ink_env.types.FromLittleEndian.Trait Balance. all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; + (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; try assumption; try destruct x). Defined. - End scale_encode_EncodeAsType. - Module scale_decode_DecodeAsType. - Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Hash. + End ink_env_types_FromLittleEndian. + End The_Bounds_Of_Balance. + Module The_Bounds_Of_Hash. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Hash. all: repeat (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End scale_decode_DecodeAsType. + End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. all: repeat @@ -1390,239 +976,150 @@ Module Environment. try destruct x). Defined. End ink_env_types_CodecAsType. - End The_Bounds_Of_Hash. - Module The_Bounds_Of_Timestamp. - Module scale_decode_DecodeAsType. - Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End scale_decode_DecodeAsType. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End scale_encode_EncodeAsType. - Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End ink_env_types_CodecAsType. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Div. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End num_traits_bounds_Bounded. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End num_traits_identities_Zero. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End core_marker_Sized. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_AddAssign. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait Timestamp. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_ops_arith_SubAssign. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait Timestamp. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_convert_TryInto. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait Timestamp. + End core_clone_Clone. + Module ink_primitives_types_Clear. + Global Instance I `(Trait) : ink_primitives.types.Clear.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_convert_TryFrom. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait Timestamp. + End ink_primitives_types_Clear. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_ops_arith_Sub. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait Timestamp. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_cmp_PartialOrd. + End core_cmp_Eq. Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Timestamp. + Global Instance I `(Trait) : core.cmp.Ord.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. End core_cmp_Ord. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End num_traits_sign_Unsigned. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait Timestamp. + Module core_convert_AsRef. + Global Instance I `(Trait) : core.convert.AsRef.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Add. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End num_traits_identities_One. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait Timestamp. + End core_convert_AsRef. + Module core_convert_AsMut. + Global Instance I `(Trait) : core.convert.AsMut.Trait Hash. all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; + (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; try assumption; try destruct x). Defined. - End core_ops_arith_MulAssign. - Module num_traits_ops_checked_CheckedMul. + End core_convert_AsMut. + End The_Bounds_Of_Hash. + Module The_Bounds_Of_Timestamp. + Module parity_scale_codec_codec_Codec. Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait Timestamp. + : parity_scale_codec.codec.Codec.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End num_traits_ops_checked_CheckedMul. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait Timestamp. + End parity_scale_codec_codec_Codec. + Module ink_env_types_CodecAsType. + Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End core_convert_From. - Module ink_env_arithmetic_Saturating. - Global Instance I `(Trait) - : ink_env.arithmetic.Saturating.Trait Timestamp. + End ink_env_types_CodecAsType. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_Saturating. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait Timestamp. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End core_ops_arith_DivAssign. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait Timestamp. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End core_ops_arith_Mul. - Module ink_env_arithmetic_BaseArithmetic. - Global Instance I `(Trait) - : ink_env.arithmetic.BaseArithmetic.Trait Timestamp. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_BaseArithmetic. - Module ink_env_arithmetic_AtLeast32Bit. + End core_cmp_Eq. + Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32Bit.Trait Timestamp. + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_AtLeast32Bit. - Module ink_env_arithmetic_AtLeast32BitUnsigned. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. + : ink_env.types.FromLittleEndian.Trait Timestamp. all: repeat (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_AtLeast32BitUnsigned. + End ink_env_types_FromLittleEndian. End The_Bounds_Of_Timestamp. Module The_Bounds_Of_BlockNumber. - Module scale_decode_DecodeAsType. - Global Instance I `(Trait) : scale_decode.DecodeAsType.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End scale_decode_DecodeAsType. - Module scale_encode_EncodeAsType. - Global Instance I `(Trait) : scale_encode.EncodeAsType.Trait BlockNumber. + Module parity_scale_codec_codec_Codec. + Global Instance I `(Trait) + : parity_scale_codec.codec.Codec.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End scale_encode_EncodeAsType. + End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. all: repeat @@ -1631,195 +1128,56 @@ Module Environment. try destruct x). Defined. End ink_env_types_CodecAsType. - Module num_traits_bounds_Bounded. - Global Instance I `(Trait) : num_traits.bounds.Bounded.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End num_traits_bounds_Bounded. - Module core_ops_arith_AddAssign. - Global Instance I `(Trait) : core.ops.arith.AddAssign.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_AddAssign. - Module core_ops_arith_SubAssign. - Global Instance I `(Trait) : core.ops.arith.SubAssign.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_SubAssign. - Module core_ops_arith_Div. - Global Instance I `(Trait) : core.ops.arith.Div.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Div. - Module num_traits_identities_Zero. - Global Instance I `(Trait) : num_traits.identities.Zero.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End num_traits_identities_Zero. - Module num_traits_ops_checked_CheckedMul. - Global Instance I `(Trait) - : num_traits.ops.checked.CheckedMul.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End num_traits_ops_checked_CheckedMul. - Module core_ops_arith_Add. - Global Instance I `(Trait) : core.ops.arith.Add.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Add. - Module core_ops_arith_Sub. - Global Instance I `(Trait) : core.ops.arith.Sub.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Sub. - Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_cmp_Ord. - Module core_cmp_PartialOrd. - Global Instance I `(Trait) : core.cmp.PartialOrd.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_cmp_PartialOrd. - Module core_ops_arith_DivAssign. - Global Instance I `(Trait) : core.ops.arith.DivAssign.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_DivAssign. - Module core_ops_arith_Mul. - Global Instance I `(Trait) : core.ops.arith.Mul.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_Mul. - Module ink_env_arithmetic_Saturating. - Global Instance I `(Trait) - : ink_env.arithmetic.Saturating.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End ink_env_arithmetic_Saturating. - Module core_convert_TryInto. - Global Instance I `(Trait) : core.convert.TryInto.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_convert_TryInto. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_marker_Sized. - Module core_ops_arith_MulAssign. - Global Instance I `(Trait) : core.ops.arith.MulAssign.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End core_ops_arith_MulAssign. - Module core_convert_TryFrom. - Global Instance I `(Trait) : core.convert.TryFrom.Trait BlockNumber. + Module core_marker_Copy. + Global Instance I `(Trait) : core.marker.Copy.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End core_convert_TryFrom. - Module num_traits_sign_Unsigned. - Global Instance I `(Trait) : num_traits.sign.Unsigned.Trait BlockNumber. + End core_marker_Copy. + Module core_clone_Clone. + Global Instance I `(Trait) : core.clone.Clone.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End num_traits_sign_Unsigned. - Module num_traits_identities_One. - Global Instance I `(Trait) : num_traits.identities.One.Trait BlockNumber. + End core_clone_Clone. + Module core_cmp_PartialEq. + Global Instance I `(Trait) : core.cmp.PartialEq.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End num_traits_identities_One. - Module core_convert_From. - Global Instance I `(Trait) : core.convert.From.Trait BlockNumber. + End core_cmp_PartialEq. + Module core_cmp_Eq. + Global Instance I `(Trait) : core.cmp.Eq.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End core_convert_From. - Module ink_env_arithmetic_BaseArithmetic. - Global Instance I `(Trait) - : ink_env.arithmetic.BaseArithmetic.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). - Defined. - End ink_env_arithmetic_BaseArithmetic. - Module ink_env_arithmetic_AtLeast32Bit. + End core_cmp_Eq. + Module ink_env_arithmetic_AtLeast32BitUnsigned. Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32Bit.Trait BlockNumber. + : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_AtLeast32Bit. - Module ink_env_arithmetic_AtLeast32BitUnsigned. + End ink_env_arithmetic_AtLeast32BitUnsigned. + Module ink_env_types_FromLittleEndian. Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. + : ink_env.types.FromLittleEndian.Trait BlockNumber. all: repeat (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; try assumption; try destruct x). Defined. - End ink_env_arithmetic_AtLeast32BitUnsigned. + End ink_env_types_FromLittleEndian. End The_Bounds_Of_BlockNumber. End Environment. @@ -1855,7 +1213,14 @@ Module contract. Notation.double_colon_type := Env; }. Module The_Bounds_Of_Env. - + Module ink_env_types_Environment. + Global Instance I `(Trait) : ink_env.types.Environment.Trait Env. + all: repeat + (destruct __the_bounds_of_Env as [x __the_bounds_of_Env]; + try assumption; + try destruct x). + Defined. + End ink_env_types_Environment. End The_Bounds_Of_Env. End ContractEnv. @@ -2113,7 +1478,15 @@ Module call. (axiom : M (H := H') (core.option.Option Output)); }. Module The_Bounds_Of_Error. - + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) + : parity_scale_codec.codec.Decode.Trait Error. + all: repeat + (destruct __the_bounds_of_Error as [x __the_bounds_of_Error]; + try assumption; + try destruct x). + Defined. + End parity_scale_codec_codec_Decode. End The_Bounds_Of_Error. End ConstructorReturnType. @@ -2397,7 +1770,14 @@ Module hash. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - + Module core_default_Default. + Global Instance I `(Trait) : core.default.Default.Trait Type_. + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). + Defined. + End core_default_Default. End The_Bounds_Of_Type_. End HashOutput. @@ -2577,7 +1957,15 @@ Module topics. topics (E := E) (B := B) (H'0 := H'0) (H'1 := H'1); }. Module The_Bounds_Of_RemainingTopics. - + Module ink_env_topics_EventTopicsAmount. + Global Instance I `(Trait) + : ink_env.topics.EventTopicsAmount.Trait RemainingTopics. + all: repeat + (destruct __the_bounds_of_RemainingTopics as [x __the_bounds_of_RemainingTopics]; + try assumption; + try destruct x). + Defined. + End ink_env_topics_EventTopicsAmount. End The_Bounds_Of_RemainingTopics. End Topics. @@ -5653,7 +5041,15 @@ Module create_builder. (axiom : M (H := H') (core.option.Option Output)); }. Module The_Bounds_Of_Error. - + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) + : parity_scale_codec.codec.Decode.Trait Error. + all: repeat + (destruct __the_bounds_of_Error as [x __the_bounds_of_Error]; + try assumption; + try destruct x). + Defined. + End parity_scale_codec_codec_Decode. End The_Bounds_Of_Error. End ConstructorReturnType. @@ -5896,7 +5292,14 @@ Module ConstructorReturnType. (axiom : M (H := H') (core.option.Option Output)); }. Module The_Bounds_Of_Error. - + Module parity_scale_codec_codec_Decode. + Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Error. + all: repeat + (destruct __the_bounds_of_Error as [x __the_bounds_of_Error]; + try assumption; + try destruct x). + Defined. + End parity_scale_codec_codec_Decode. End The_Bounds_Of_Error. End ConstructorReturnType. @@ -6494,7 +5897,14 @@ Module ContractEnv. Notation.double_colon_type := Env; }. Module The_Bounds_Of_Env. - + Module ink_env_types_Environment. + Global Instance I `(Trait) : ink_env.types.Environment.Trait Env. + all: repeat + (destruct __the_bounds_of_Env as [x __the_bounds_of_Env]; + try assumption; + try destruct x). + Defined. + End ink_env_types_Environment. End The_Bounds_Of_Env. End ContractEnv. @@ -6692,7 +6102,14 @@ Module HashOutput. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - + Module core_default_Default. + Global Instance I `(Trait) : core.default.Default.Trait Type_. + all: repeat + (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; + try assumption; + try destruct x). + Defined. + End core_default_Default. End The_Bounds_Of_Type_. End HashOutput. @@ -6884,7 +6301,15 @@ Module Topics. topics (E := E) (B := B) (H'0 := H'0) (H'1 := H'1); }. Module The_Bounds_Of_RemainingTopics. - + Module ink_env_topics_EventTopicsAmount. + Global Instance I `(Trait) + : ink_env.topics.EventTopicsAmount.Trait RemainingTopics. + all: repeat + (destruct __the_bounds_of_RemainingTopics as [x __the_bounds_of_RemainingTopics]; + try assumption; + try destruct x). + Defined. + End ink_env_topics_EventTopicsAmount. End The_Bounds_Of_RemainingTopics. End Topics. diff --git a/CoqOfRust/ink/ink_storage_traits.v b/CoqOfRust/ink/ink_storage_traits.v index 69771dc5f..ceb3f3aff 100644 --- a/CoqOfRust/ink/ink_storage_traits.v +++ b/CoqOfRust/ink/ink_storage_traits.v @@ -181,14 +181,6 @@ Module storage. Notation.double_colon_type := PreferredKey; }. Module The_Bounds_Of_Type_. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). - Defined. - End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. @@ -200,7 +192,15 @@ Module storage. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. Module The_Bounds_Of_PreferredKey. - + Module ink_storage_traits_storage_StorageKey. + Global Instance I `(Trait) + : ink_storage_traits.storage.StorageKey.Trait PreferredKey. + all: repeat + (destruct __the_bounds_of_PreferredKey as [x __the_bounds_of_PreferredKey]; + try assumption; + try destruct x). + Defined. + End ink_storage_traits_storage_StorageKey. End The_Bounds_Of_PreferredKey. End StorableHint. @@ -222,14 +222,6 @@ Module storage. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). - Defined. - End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. @@ -350,14 +342,6 @@ Module StorableHint. Notation.double_colon_type := PreferredKey; }. Module The_Bounds_Of_Type_. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). - Defined. - End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. @@ -369,7 +353,15 @@ Module StorableHint. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. Module The_Bounds_Of_PreferredKey. - + Module ink_storage_traits_storage_StorageKey. + Global Instance I `(Trait) + : ink_storage_traits.storage.StorageKey.Trait PreferredKey. + all: repeat + (destruct __the_bounds_of_PreferredKey as [x __the_bounds_of_PreferredKey]; + try assumption; + try destruct x). + Defined. + End ink_storage_traits_storage_StorageKey. End The_Bounds_Of_PreferredKey. End StorableHint. @@ -391,14 +383,6 @@ Module AutoStorableHint. Notation.double_colon_type := Type_; }. Module The_Bounds_Of_Type_. - Module core_marker_Sized. - Global Instance I `(Trait) : core.marker.Sized.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). - Defined. - End core_marker_Sized. Module ink_storage_traits_storage_Storable. Global Instance I `(Trait) : ink_storage_traits.storage.Storable.Trait Type_. diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 9d5bb6f83..56ee1101c 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -15,7 +15,6 @@ extern crate rustc_middle; extern crate rustc_session; extern crate rustc_span; -pub mod algs; pub mod callbacks; pub mod configuration; pub mod coq; diff --git a/lib/src/top_level.rs b/lib/src/top_level.rs index f541752d9..4fd9a6d34 100644 --- a/lib/src/top_level.rs +++ b/lib/src/top_level.rs @@ -1,4 +1,3 @@ -use crate::algs; use crate::configuration::*; use crate::coq; use crate::env::*; @@ -2474,7 +2473,7 @@ impl TypeStructStruct { } impl Trait { - fn to_doc(&self, supertraits_map: &HashMap>) -> Doc { + fn to_doc(&self, _supertraits_map: &HashMap>) -> Doc { let Trait { name, ty_params, @@ -2803,61 +2802,55 @@ impl Trait { coq::TopLevel::new( &bounds .iter() - .flat_map(|bound| { - algs::DirectedGraph::of_hashmap(supertraits_map) - .get_subgraph_of(&bound.name) - .to_topological_sort() - .map(|bound| { - coq::TopLevelItem::Module(coq::Module::new( - &bound.to_name(), - coq::TopLevel::new(&[ - coq::TopLevelItem::Instance(coq::Instance::new( - false, - "I", - &[coq::ArgDecl::new( - &coq::ArgDeclVar::Generalized { - idents: vec![], - ty: coq::Expression::just_name("Trait"), - }, - coq::ArgSpecKind::Explicit, - )], - coq::Expression::Variable { - ident: Path::concat(&[ - bound, - Path::new(&["Trait"]), - ]), - no_implicit: false, - } - .apply(&coq::Expression::just_name(&item.item_name)), - &None, - { - let proj_name = ["__the_bounds_of_", &item.item_name].concat(); - vec![nest([ - text("all: repeat"), - line(), - group([ - text("("), - text([ - "destruct ", - &proj_name, - " as [x ", - &proj_name, - "];", - ].concat()), - line(), - text("try assumption;"), - line(), - text("try destruct x"), - text(")"), - ]), - text("."), - ])] - }, - )), - ]), - )) - }) - .collect_vec() + .map(|bound| { + coq::TopLevelItem::Module(coq::Module::new( + &bound.name.to_name(), + coq::TopLevel::new(&[ + coq::TopLevelItem::Instance(coq::Instance::new( + false, + "I", + &[coq::ArgDecl::new( + &coq::ArgDeclVar::Generalized { + idents: vec![], + ty: coq::Expression::just_name("Trait"), + }, + coq::ArgSpecKind::Explicit, + )], + coq::Expression::Variable { + ident: Path::concat(&[ + bound.name.to_owned(), + Path::new(&["Trait"]), + ]), + no_implicit: false, + } + .apply(&coq::Expression::just_name(&item.item_name)), + &None, + { + let proj_name = ["__the_bounds_of_", &item.item_name].concat(); + vec![nest([ + text("all: repeat"), + line(), + group([ + text("("), + text([ + "destruct ", + &proj_name, + " as [x ", + &proj_name, + "];", + ].concat()), + line(), + text("try assumption;"), + line(), + text("try destruct x"), + text(")"), + ]), + text("."), + ])] + }, + )), + ]), + )) }) .collect_vec(), ), From 15c0ebd6debfc66c87811fd8cdab3b2e19686935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Fri, 29 Sep 2023 22:43:36 +0200 Subject: [PATCH 12/13] save the state of work --- CoqOfRust/core/convert.v | 6 +- CoqOfRust/ink/ink.v | 539 +++++-- CoqOfRust/ink/ink_env.v | 2302 +++++++++++++++++++++------- CoqOfRust/ink/ink_storage_traits.v | 140 +- lib/src/coq.rs | 16 +- lib/src/render.rs | 5 + lib/src/top_level.rs | 160 +- 7 files changed, 2438 insertions(+), 730 deletions(-) diff --git a/CoqOfRust/core/convert.v b/CoqOfRust/core/convert.v index c66a28d35..8b4a1b39c 100644 --- a/CoqOfRust/core/convert.v +++ b/CoqOfRust/core/convert.v @@ -40,7 +40,7 @@ where } *) Module AsMut. - Class Trait (Self T : Set) : Set := { + Class Trait (Self : Set) {T : Set} : Set := { as_mut : mut_ref Self -> mut_ref T; }. End AsMut. @@ -55,13 +55,13 @@ where } *) Module AsRef. - Class Trait (Self T : Set) : Set := { + Class Trait (Self : Set) {T : Set} : Set := { as_ref : ref Self -> ref T; }. End AsRef. Module Impl_AsRef_for_string. - Global Instance I : convert.AsRef.Trait string string := { + Global Instance I : convert.AsRef.Trait string (T := string) := { as_ref self := self; }. End Impl_AsRef_for_string. diff --git a/CoqOfRust/ink/ink.v b/CoqOfRust/ink/ink.v index 07a9ba248..81b769ca4 100644 --- a/CoqOfRust/ink/ink.v +++ b/CoqOfRust/ink/ink.v @@ -326,21 +326,40 @@ Module reflect. }. Module The_Bounds_Of_Type_. Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) - : parity_scale_codec.codec.Decode.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Decode.Trait (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.reflect.dispatch.ExecuteDispatchable.Trait + (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. @@ -384,21 +403,41 @@ Module reflect. }. Module The_Bounds_Of_Type_. Module ink_reflect_dispatch_DecodeDispatch. - Global Instance I `(Trait) - : ink.reflect.dispatch.DecodeDispatch.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.reflect.dispatch.DecodeDispatch.Trait + (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_reflect_dispatch_DecodeDispatch. Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.reflect.dispatch.ExecuteDispatchable.Trait + (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. @@ -717,13 +756,28 @@ Module codegen. }. Module The_Bounds_Of_Forwarder. Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait - Forwarder. - all: repeat - (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + (Forwarder (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]); + assumption. Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. @@ -782,13 +836,28 @@ Module codegen. }. Module The_Bounds_Of_Forwarder. Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait - Forwarder. - all: repeat - (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + (Forwarder (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]); + assumption. Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. @@ -1381,13 +1450,28 @@ Module trait_def. }. Module The_Bounds_Of_Forwarder. Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait - Forwarder. - all: repeat - (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + (Forwarder (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]); + assumption. Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. @@ -1444,13 +1528,28 @@ Module trait_def. }. Module The_Bounds_Of_Forwarder. Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait - Forwarder. - all: repeat - (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + (Forwarder (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]); + assumption. Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. @@ -1511,12 +1610,28 @@ Module call_builder. }. Module The_Bounds_Of_Forwarder. Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. - all: repeat - (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + (Forwarder (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]); + assumption. Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. @@ -1573,12 +1688,28 @@ Module call_builder. }. Module The_Bounds_Of_Forwarder. Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. - all: repeat - (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + (Forwarder (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]); + assumption. Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. @@ -1624,12 +1755,28 @@ Module TraitCallForwarder. }. Module The_Bounds_Of_Forwarder. Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. - all: repeat - (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + (Forwarder (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]); + assumption. Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. @@ -1685,12 +1832,28 @@ End TraitCallForwarder. }. Module The_Bounds_Of_Forwarder. Module ink_codegen_trait_def_call_builder_TraitCallBuilder. - Global Instance I `(Trait) - : ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait Forwarder. - all: repeat - (destruct __the_bounds_of_Forwarder as [x __the_bounds_of_Forwarder]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.codegen.trait_def.call_builder.TraitCallBuilder.Trait + (Forwarder (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Forwarder0 + as + [? __the_bounds_of_Forwarder0]); + assumption. Defined. End ink_codegen_trait_def_call_builder_TraitCallBuilder. End The_Bounds_Of_Forwarder. @@ -2014,21 +2177,40 @@ Module Wrap_dispatch_1. }. Module The_Bounds_Of_Type_. Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) - : parity_scale_codec.codec.Decode.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Decode.Trait (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.reflect.dispatch.ExecuteDispatchable.Trait + (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. @@ -2072,21 +2254,41 @@ Module Wrap_dispatch_1. }. Module The_Bounds_Of_Type_. Module ink_reflect_dispatch_DecodeDispatch. - Global Instance I `(Trait) - : ink.reflect.dispatch.DecodeDispatch.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.reflect.dispatch.DecodeDispatch.Trait + (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_reflect_dispatch_DecodeDispatch. Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.reflect.dispatch.ExecuteDispatchable.Trait + (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. @@ -2270,20 +2472,38 @@ Module ContractMessageDecoder. }. Module The_Bounds_Of_Type_. Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Decode.Trait (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End parity_scale_codec_codec_Decode. Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.reflect.dispatch.ExecuteDispatchable.Trait + (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. @@ -2306,21 +2526,38 @@ Module ContractConstructorDecoder. }. Module The_Bounds_Of_Type_. Module ink_reflect_dispatch_DecodeDispatch. - Global Instance I `(Trait) - : ink.reflect.dispatch.DecodeDispatch.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.reflect.dispatch.DecodeDispatch.Trait (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_reflect_dispatch_DecodeDispatch. Module ink_reflect_dispatch_ExecuteDispatchable. - Global Instance I `(Trait) - : ink.reflect.dispatch.ExecuteDispatchable.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink.reflect.dispatch.ExecuteDispatchable.Trait + (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_reflect_dispatch_ExecuteDispatchable. End The_Bounds_Of_Type_. @@ -2618,12 +2855,28 @@ Module chain_extension. }. Module The_Bounds_Of_ErrorCode. Module ink_env_chain_extension_FromStatusCode. - Global Instance I `(Trait) - : ink_env.chain_extension.FromStatusCode.Trait ErrorCode. - all: repeat - (destruct __the_bounds_of_ErrorCode as [x __the_bounds_of_ErrorCode]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.chain_extension.FromStatusCode.Trait + (ErrorCode (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_ErrorCode0 + as + [? __the_bounds_of_ErrorCode0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_ErrorCode0 + as + [? __the_bounds_of_ErrorCode0]); + assumption. Defined. End ink_env_chain_extension_FromStatusCode. End The_Bounds_Of_ErrorCode. @@ -2715,12 +2968,28 @@ Module ChainExtension. }. Module The_Bounds_Of_ErrorCode. Module ink_env_chain_extension_FromStatusCode. - Global Instance I `(Trait) - : ink_env.chain_extension.FromStatusCode.Trait ErrorCode. - all: repeat - (destruct __the_bounds_of_ErrorCode as [x __the_bounds_of_ErrorCode]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.chain_extension.FromStatusCode.Trait + (ErrorCode (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_ErrorCode0 + as + [? __the_bounds_of_ErrorCode0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_ErrorCode0 + as + [? __the_bounds_of_ErrorCode0]); + assumption. Defined. End ink_env_chain_extension_FromStatusCode. End The_Bounds_Of_ErrorCode. diff --git a/CoqOfRust/ink/ink_env.v b/CoqOfRust/ink/ink_env.v index 075517fc6..f84161b3b 100644 --- a/CoqOfRust/ink/ink_env.v +++ b/CoqOfRust/ink/ink_env.v @@ -122,27 +122,57 @@ Module types. }. Module The_Bounds_Of_Bytes. Module core_default_Default. - Global Instance I `(Trait) : core.default.Default.Trait Bytes. - all: repeat - (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.default.Default.Trait (Bytes (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]); + assumption. Defined. End core_default_Default. Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait Bytes. - all: repeat - (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsRef.Trait (Bytes (Trait := _Tr)) (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]); + assumption. Defined. End core_convert_AsRef. Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait Bytes. - all: repeat - (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsMut.Trait (Bytes (Trait := _Tr)) (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]); + assumption. Defined. End core_convert_AsMut. End The_Bounds_Of_Bytes. @@ -274,358 +304,931 @@ Module types. }. Module The_Bounds_Of_AccountId. Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Codec.Trait (AccountId (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.CodecAsType.Trait (AccountId (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End ink_env_types_CodecAsType. Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.clone.Clone.Trait (AccountId (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_clone_Clone. Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.PartialEq.Trait (AccountId (Trait := _Tr)) + (Rhs := core.cmp.PartialEq.Default.Rhs Self)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_cmp_PartialEq. Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.Eq.Trait (AccountId (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_cmp_Eq. Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.Ord.Trait (AccountId (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_cmp_Ord. Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsRef.Trait (AccountId (Trait := _Tr)) + (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_convert_AsRef. Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsMut.Trait (AccountId (Trait := _Tr)) + (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_convert_AsMut. End The_Bounds_Of_AccountId. Module The_Bounds_Of_Balance. Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Codec.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Balance0 + as + [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.CodecAsType.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Balance0 + as + [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.marker.Copy.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Balance0 + as + [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End core_marker_Copy. Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.clone.Clone.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Balance0 + as + [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End core_clone_Clone. Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.PartialEq.Trait (Balance (Trait := _Tr)) + (Rhs := core.cmp.PartialEq.Default.Rhs Self)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Balance0 + as + [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End core_cmp_PartialEq. Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.cmp.Eq.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Balance0 + as + [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End core_cmp_Eq. Module ink_env_arithmetic_AtLeast32BitUnsigned. - Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.arithmetic.AtLeast32BitUnsigned.Trait + (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Balance0 + as + [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.FromLittleEndian.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Balance0 + as + [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End ink_env_types_FromLittleEndian. End The_Bounds_Of_Balance. Module The_Bounds_Of_Hash. Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Codec.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.CodecAsType.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.marker.Copy.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_marker_Copy. Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.clone.Clone.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_clone_Clone. Module ink_primitives_types_Clear. - Global Instance I `(Trait) : ink_primitives.types.Clear.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_primitives.types.Clear.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End ink_primitives_types_Clear. Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.PartialEq.Trait (Hash (Trait := _Tr)) + (Rhs := core.cmp.PartialEq.Default.Rhs Self)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_cmp_PartialEq. Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.cmp.Eq.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_cmp_Eq. Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.cmp.Ord.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_cmp_Ord. Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsRef.Trait (Hash (Trait := _Tr)) (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_convert_AsRef. Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsMut.Trait (Hash (Trait := _Tr)) (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_convert_AsMut. End The_Bounds_Of_Hash. Module The_Bounds_Of_Timestamp. Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Codec.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.CodecAsType.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.marker.Copy.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End core_marker_Copy. Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.clone.Clone.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End core_clone_Clone. Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.PartialEq.Trait (Timestamp (Trait := _Tr)) + (Rhs := core.cmp.PartialEq.Default.Rhs Self)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End core_cmp_PartialEq. Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.Eq.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End core_cmp_Eq. Module ink_env_arithmetic_AtLeast32BitUnsigned. - Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.arithmetic.AtLeast32BitUnsigned.Trait + (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.FromLittleEndian.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End ink_env_types_FromLittleEndian. End The_Bounds_Of_Timestamp. Module The_Bounds_Of_BlockNumber. Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Codec.Trait + (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. - Global Instance I `(Trait) - : ink_env.types.CodecAsType.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.CodecAsType.Trait (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.marker.Copy.Trait (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End core_marker_Copy. Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.clone.Clone.Trait (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End core_clone_Clone. Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.PartialEq.Trait (BlockNumber (Trait := _Tr)) + (Rhs := core.cmp.PartialEq.Default.Rhs Self)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End core_cmp_PartialEq. Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.Eq.Trait (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End core_cmp_Eq. Module ink_env_arithmetic_AtLeast32BitUnsigned. - Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.arithmetic.AtLeast32BitUnsigned.Trait + (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.FromLittleEndian.Trait + (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End ink_env_types_FromLittleEndian. End The_Bounds_Of_BlockNumber. @@ -675,27 +1278,54 @@ Module FromLittleEndian. }. Module The_Bounds_Of_Bytes. Module core_default_Default. - Global Instance I `(Trait) : core.default.Default.Trait Bytes. - all: repeat - (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.default.Default.Trait (Bytes (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]); + assumption. Defined. End core_default_Default. Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait Bytes. - all: repeat - (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsRef.Trait (Bytes (Trait := _Tr)) (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]); + assumption. Defined. End core_convert_AsRef. Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait Bytes. - all: repeat - (destruct __the_bounds_of_Bytes as [x __the_bounds_of_Bytes]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsMut.Trait (Bytes (Trait := _Tr)) (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Bytes0 as [? __the_bounds_of_Bytes0]); + assumption. Defined. End core_convert_AsMut. End The_Bounds_Of_Bytes. @@ -827,355 +1457,895 @@ Module Environment. }. Module The_Bounds_Of_AccountId. Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Codec.Trait (AccountId (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.CodecAsType.Trait (AccountId (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End ink_env_types_CodecAsType. Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.clone.Clone.Trait (AccountId (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_clone_Clone. Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.PartialEq.Trait (AccountId (Trait := _Tr)) + (Rhs := core.cmp.PartialEq.Default.Rhs Self)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_cmp_PartialEq. Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.cmp.Eq.Trait (AccountId (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_cmp_Eq. Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.cmp.Ord.Trait (AccountId (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_cmp_Ord. Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsRef.Trait (AccountId (Trait := _Tr)) + (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_convert_AsRef. Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait AccountId. - all: repeat - (destruct __the_bounds_of_AccountId as [x __the_bounds_of_AccountId]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsMut.Trait (AccountId (Trait := _Tr)) + (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_AccountId0 + as + [? __the_bounds_of_AccountId0]); + assumption. Defined. End core_convert_AsMut. End The_Bounds_Of_AccountId. Module The_Bounds_Of_Balance. Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Codec.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.CodecAsType.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.marker.Copy.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End core_marker_Copy. Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.clone.Clone.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End core_clone_Clone. Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.PartialEq.Trait (Balance (Trait := _Tr)) + (Rhs := core.cmp.PartialEq.Default.Rhs Self)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End core_cmp_PartialEq. Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.cmp.Eq.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End core_cmp_Eq. Module ink_env_arithmetic_AtLeast32BitUnsigned. - Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.arithmetic.AtLeast32BitUnsigned.Trait + (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) : ink_env.types.FromLittleEndian.Trait Balance. - all: repeat - (destruct __the_bounds_of_Balance as [x __the_bounds_of_Balance]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.FromLittleEndian.Trait (Balance (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Balance0 as [? __the_bounds_of_Balance0]); + assumption. Defined. End ink_env_types_FromLittleEndian. End The_Bounds_Of_Balance. Module The_Bounds_Of_Hash. Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) : parity_scale_codec.codec.Codec.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Codec.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.CodecAsType.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.marker.Copy.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_marker_Copy. Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.clone.Clone.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_clone_Clone. Module ink_primitives_types_Clear. - Global Instance I `(Trait) : ink_primitives.types.Clear.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_primitives.types.Clear.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End ink_primitives_types_Clear. Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.PartialEq.Trait (Hash (Trait := _Tr)) + (Rhs := core.cmp.PartialEq.Default.Rhs Self)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_cmp_PartialEq. Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.cmp.Eq.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_cmp_Eq. Module core_cmp_Ord. - Global Instance I `(Trait) : core.cmp.Ord.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.cmp.Ord.Trait (Hash (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_cmp_Ord. Module core_convert_AsRef. - Global Instance I `(Trait) : core.convert.AsRef.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsRef.Trait (Hash (Trait := _Tr)) (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_convert_AsRef. Module core_convert_AsMut. - Global Instance I `(Trait) : core.convert.AsMut.Trait Hash. - all: repeat - (destruct __the_bounds_of_Hash as [x __the_bounds_of_Hash]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.convert.AsMut.Trait (Hash (Trait := _Tr)) (T := Slice u8)); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Hash0 as [? __the_bounds_of_Hash0]); + assumption. Defined. End core_convert_AsMut. End The_Bounds_Of_Hash. Module The_Bounds_Of_Timestamp. Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Codec.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.CodecAsType.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.marker.Copy.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End core_marker_Copy. Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.clone.Clone.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End core_clone_Clone. Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.PartialEq.Trait (Timestamp (Trait := _Tr)) + (Rhs := core.cmp.PartialEq.Default.Rhs Self)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End core_cmp_PartialEq. Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve eapply (core.cmp.Eq.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End core_cmp_Eq. Module ink_env_arithmetic_AtLeast32BitUnsigned. - Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.arithmetic.AtLeast32BitUnsigned.Trait + (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait Timestamp. - all: repeat - (destruct __the_bounds_of_Timestamp as [x __the_bounds_of_Timestamp]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.FromLittleEndian.Trait (Timestamp (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_Timestamp0 + as + [? __the_bounds_of_Timestamp0]); + assumption. Defined. End ink_env_types_FromLittleEndian. End The_Bounds_Of_Timestamp. Module The_Bounds_Of_BlockNumber. Module parity_scale_codec_codec_Codec. - Global Instance I `(Trait) - : parity_scale_codec.codec.Codec.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Codec.Trait (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End parity_scale_codec_codec_Codec. Module ink_env_types_CodecAsType. - Global Instance I `(Trait) : ink_env.types.CodecAsType.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.CodecAsType.Trait (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End ink_env_types_CodecAsType. Module core_marker_Copy. - Global Instance I `(Trait) : core.marker.Copy.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.marker.Copy.Trait (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End core_marker_Copy. Module core_clone_Clone. - Global Instance I `(Trait) : core.clone.Clone.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.clone.Clone.Trait (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End core_clone_Clone. Module core_cmp_PartialEq. - Global Instance I `(Trait) : core.cmp.PartialEq.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.PartialEq.Trait (BlockNumber (Trait := _Tr)) + (Rhs := core.cmp.PartialEq.Default.Rhs Self)); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End core_cmp_PartialEq. Module core_cmp_Eq. - Global Instance I `(Trait) : core.cmp.Eq.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.cmp.Eq.Trait (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End core_cmp_Eq. Module ink_env_arithmetic_AtLeast32BitUnsigned. - Global Instance I `(Trait) - : ink_env.arithmetic.AtLeast32BitUnsigned.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.arithmetic.AtLeast32BitUnsigned.Trait + (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End ink_env_arithmetic_AtLeast32BitUnsigned. Module ink_env_types_FromLittleEndian. - Global Instance I `(Trait) - : ink_env.types.FromLittleEndian.Trait BlockNumber. - all: repeat - (destruct __the_bounds_of_BlockNumber as [x __the_bounds_of_BlockNumber]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.FromLittleEndian.Trait (BlockNumber (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_BlockNumber0 + as + [? __the_bounds_of_BlockNumber0]); + assumption. Defined. End ink_env_types_FromLittleEndian. End The_Bounds_Of_BlockNumber. @@ -1214,11 +2384,20 @@ Module contract. }. Module The_Bounds_Of_Env. Module ink_env_types_Environment. - Global Instance I `(Trait) : ink_env.types.Environment.Trait Env. - all: repeat - (destruct __the_bounds_of_Env as [x __the_bounds_of_Env]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.Environment.Trait (Env (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Env0 as [? __the_bounds_of_Env0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Env0 as [? __the_bounds_of_Env0]); + assumption. Defined. End ink_env_types_Environment. End The_Bounds_Of_Env. @@ -1479,12 +2658,21 @@ Module call. }. Module The_Bounds_Of_Error. Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) - : parity_scale_codec.codec.Decode.Trait Error. - all: repeat - (destruct __the_bounds_of_Error as [x __the_bounds_of_Error]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Decode.Trait (Error (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Error0 as [? __the_bounds_of_Error0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Error0 as [? __the_bounds_of_Error0]); + assumption. Defined. End parity_scale_codec_codec_Decode. End The_Bounds_Of_Error. @@ -1771,11 +2959,21 @@ Module hash. }. Module The_Bounds_Of_Type_. Module core_default_Default. - Global Instance I `(Trait) : core.default.Default.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.default.Default.Trait (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End core_default_Default. End The_Bounds_Of_Type_. @@ -1958,12 +3156,28 @@ Module topics. }. Module The_Bounds_Of_RemainingTopics. Module ink_env_topics_EventTopicsAmount. - Global Instance I `(Trait) - : ink_env.topics.EventTopicsAmount.Trait RemainingTopics. - all: repeat - (destruct __the_bounds_of_RemainingTopics as [x __the_bounds_of_RemainingTopics]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.topics.EventTopicsAmount.Trait + (RemainingTopics (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_RemainingTopics0 + as + [? __the_bounds_of_RemainingTopics0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_RemainingTopics0 + as + [? __the_bounds_of_RemainingTopics0]); + assumption. Defined. End ink_env_topics_EventTopicsAmount. End The_Bounds_Of_RemainingTopics. @@ -5042,12 +6256,21 @@ Module create_builder. }. Module The_Bounds_Of_Error. Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) - : parity_scale_codec.codec.Decode.Trait Error. - all: repeat - (destruct __the_bounds_of_Error as [x __the_bounds_of_Error]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Decode.Trait (Error (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Error0 as [? __the_bounds_of_Error0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Error0 as [? __the_bounds_of_Error0]); + assumption. Defined. End parity_scale_codec_codec_Decode. End The_Bounds_Of_Error. @@ -5293,11 +6516,20 @@ Module ConstructorReturnType. }. Module The_Bounds_Of_Error. Module parity_scale_codec_codec_Decode. - Global Instance I `(Trait) : parity_scale_codec.codec.Decode.Trait Error. - all: repeat - (destruct __the_bounds_of_Error as [x __the_bounds_of_Error]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (parity_scale_codec.codec.Decode.Trait (Error (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Error0 as [? __the_bounds_of_Error0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Error0 as [? __the_bounds_of_Error0]); + assumption. Defined. End parity_scale_codec_codec_Decode. End The_Bounds_Of_Error. @@ -5898,11 +7130,20 @@ Module ContractEnv. }. Module The_Bounds_Of_Env. Module ink_env_types_Environment. - Global Instance I `(Trait) : ink_env.types.Environment.Trait Env. - all: repeat - (destruct __the_bounds_of_Env as [x __the_bounds_of_Env]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.types.Environment.Trait (Env (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Env0 as [? __the_bounds_of_Env0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Env0 as [? __the_bounds_of_Env0]); + assumption. Defined. End ink_env_types_Environment. End The_Bounds_Of_Env. @@ -6103,11 +7344,20 @@ Module HashOutput. }. Module The_Bounds_Of_Type_. Module core_default_Default. - Global Instance I `(Trait) : core.default.Default.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (core.default.Default.Trait (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End core_default_Default. End The_Bounds_Of_Type_. @@ -6302,12 +7552,28 @@ Module Topics. }. Module The_Bounds_Of_RemainingTopics. Module ink_env_topics_EventTopicsAmount. - Global Instance I `(Trait) - : ink_env.topics.EventTopicsAmount.Trait RemainingTopics. - all: repeat - (destruct __the_bounds_of_RemainingTopics as [x __the_bounds_of_RemainingTopics]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_env.topics.EventTopicsAmount.Trait + (RemainingTopics (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_RemainingTopics0 + as + [? __the_bounds_of_RemainingTopics0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_RemainingTopics0 + as + [? __the_bounds_of_RemainingTopics0]); + assumption. Defined. End ink_env_topics_EventTopicsAmount. End The_Bounds_Of_RemainingTopics. diff --git a/CoqOfRust/ink/ink_storage_traits.v b/CoqOfRust/ink/ink_storage_traits.v index ceb3f3aff..c773ad410 100644 --- a/CoqOfRust/ink/ink_storage_traits.v +++ b/CoqOfRust/ink/ink_storage_traits.v @@ -182,23 +182,49 @@ Module storage. }. Module The_Bounds_Of_Type_. Module ink_storage_traits_storage_Storable. - Global Instance I `(Trait) - : ink_storage_traits.storage.Storable.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_storage_traits.storage.Storable.Trait + (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. Module The_Bounds_Of_PreferredKey. Module ink_storage_traits_storage_StorageKey. - Global Instance I `(Trait) - : ink_storage_traits.storage.StorageKey.Trait PreferredKey. - all: repeat - (destruct __the_bounds_of_PreferredKey as [x __the_bounds_of_PreferredKey]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_storage_traits.storage.StorageKey.Trait + (PreferredKey (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_PreferredKey0 + as + [? __the_bounds_of_PreferredKey0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_PreferredKey0 + as + [? __the_bounds_of_PreferredKey0]); + assumption. Defined. End ink_storage_traits_storage_StorageKey. End The_Bounds_Of_PreferredKey. @@ -223,12 +249,22 @@ Module storage. }. Module The_Bounds_Of_Type_. Module ink_storage_traits_storage_Storable. - Global Instance I `(Trait) - : ink_storage_traits.storage.Storable.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_storage_traits.storage.Storable.Trait + (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. @@ -343,23 +379,47 @@ Module StorableHint. }. Module The_Bounds_Of_Type_. Module ink_storage_traits_storage_Storable. - Global Instance I `(Trait) - : ink_storage_traits.storage.Storable.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_storage_traits.storage.Storable.Trait (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. Module The_Bounds_Of_PreferredKey. Module ink_storage_traits_storage_StorageKey. - Global Instance I `(Trait) - : ink_storage_traits.storage.StorageKey.Trait PreferredKey. - all: repeat - (destruct __the_bounds_of_PreferredKey as [x __the_bounds_of_PreferredKey]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_storage_traits.storage.StorageKey.Trait + (PreferredKey (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct + __the_bounds_of_PreferredKey0 + as + [? __the_bounds_of_PreferredKey0]; + try assumption). + all: + compute; + destruct _Tr; + repeat + (destruct + __the_bounds_of_PreferredKey0 + as + [? __the_bounds_of_PreferredKey0]); + assumption. Defined. End ink_storage_traits_storage_StorageKey. End The_Bounds_Of_PreferredKey. @@ -384,12 +444,20 @@ Module AutoStorableHint. }. Module The_Bounds_Of_Type_. Module ink_storage_traits_storage_Storable. - Global Instance I `(Trait) - : ink_storage_traits.storage.Storable.Trait Type_. - all: repeat - (destruct __the_bounds_of_Type_ as [x __the_bounds_of_Type_]; - try assumption; - try destruct x). + Global Instance I `(_Tr : Trait) + : ltac:(unshelve + eapply + (ink_storage_traits.storage.Storable.Trait (Type_ (Trait := _Tr))); + compute; + destruct _Tr; + repeat + destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]; + try assumption). + all: + compute; + destruct _Tr; + repeat (destruct __the_bounds_of_Type_0 as [? __the_bounds_of_Type_0]); + assumption. Defined. End ink_storage_traits_storage_Storable. End The_Bounds_Of_Type_. diff --git a/lib/src/coq.rs b/lib/src/coq.rs index 9ddd67a56..4d9b90a0e 100644 --- a/lib/src/coq.rs +++ b/lib/src/coq.rs @@ -816,8 +816,12 @@ impl<'a> Expression<'a> { } pub(crate) fn just_name(name: &str) -> Self { + Expression::single_var(&Path::new(&[name])) + } + + pub(crate) fn single_var(path: &Path) -> Self { Expression::Variable { - ident: Path::new(&[name]), + ident: path.to_owned(), no_implicit: false, } } @@ -877,6 +881,16 @@ impl<'a> Expression<'a> { None => Expression::Unit, } } + + #[allow(dead_code)] + pub(crate) fn some() -> Self { + Expression::just_name("Some") + } + + #[allow(dead_code)] + pub(crate) fn none() -> Self { + Expression::just_name("None") + } } impl<'a> Field<'a> { diff --git a/lib/src/render.rs b/lib/src/render.rs index 953607f23..fccfd1a86 100644 --- a/lib/src/render.rs +++ b/lib/src/render.rs @@ -16,6 +16,11 @@ pub(crate) fn curly_brackets(doc: RcDoc<()>) -> RcDoc<()> { RcDoc::concat([RcDoc::text("{"), doc, RcDoc::text("}")]) } +/// encloses an expression in square brackets +pub(crate) fn square_brackets(doc: RcDoc<()>) -> RcDoc<()> { + RcDoc::concat([RcDoc::text("["), doc, RcDoc::text("]")]) +} + /// encloses an expression in regular brackets pub(crate) fn round_brackets(doc: RcDoc<()>) -> RcDoc<()> { RcDoc::concat([RcDoc::text("("), doc, RcDoc::text(")")]) diff --git a/lib/src/top_level.rs b/lib/src/top_level.rs index 4fd9a6d34..1cb6844bd 100644 --- a/lib/src/top_level.rs +++ b/lib/src/top_level.rs @@ -1627,21 +1627,7 @@ impl TraitBound { args: self .ty_params .iter() - .map(|ty_param| match *ty_param.to_owned() { - TraitTyParamValue::JustValue { name, ty } - | TraitTyParamValue::ValWithDef { name, ty } => { - (Some(name), ty.to_coq()) - } - TraitTyParamValue::JustDefault { name } => ( - Some(name.clone()), - coq::Expression::Code(concat([ - self.name.to_doc(), - text(".Default."), - text(name), - ])) - .apply(&coq::Expression::just_name("Self")), - ), - }) + .map(|ty_param| ty_param.to_coq_arg_value(&self.name)) .collect(), }, }, @@ -1650,6 +1636,23 @@ impl TraitBound { } } +impl TraitTyParamValue { + fn to_coq_arg_value<'a>(&self, bound_name: &Path) -> (Option, coq::Expression<'a>) { + match self { + TraitTyParamValue::JustValue { name, ty } + | TraitTyParamValue::ValWithDef { name, ty } => (Some(name.to_owned()), ty.to_coq()), + TraitTyParamValue::JustDefault { name } => ( + Some(name.clone()), + coq::Expression::single_var(&Path::concat(&[ + bound_name.to_owned(), + Path::new(&["Default", name]), + ])) + .apply(&coq::Expression::just_name("Self")), + ), + } + } +} + impl TraitTyParamValue { #[allow(dead_code)] // @TODO fn to_doc(&self) -> Doc { @@ -2793,6 +2796,12 @@ impl Trait { if bounds.is_empty() { None } else { + let proj_name = [ + "__the_bounds_of_", + &item.item_name, + "0", + ] + .concat(); Some(coq::TopLevelItem::Module(coq::Module::new( &[ "The_Bounds_Of_", @@ -2803,6 +2812,14 @@ impl Trait { &bounds .iter() .map(|bound| { + let local_trait_name = "_Tr"; + let item_for_the_trait = coq::Expression::just_name( + &item.item_name + ) + .apply_arg( + &Some("Trait".to_string()), + &coq::Expression::just_name(local_trait_name), + ); coq::TopLevelItem::Module(coq::Module::new( &bound.name.to_name(), coq::TopLevel::new(&[ @@ -2811,39 +2828,108 @@ impl Trait { "I", &[coq::ArgDecl::new( &coq::ArgDeclVar::Generalized { - idents: vec![], + idents: vec!["_Tr".to_string()], ty: coq::Expression::just_name("Trait"), }, coq::ArgSpecKind::Explicit, )], - coq::Expression::Variable { - ident: Path::concat(&[ - bound.name.to_owned(), - Path::new(&["Trait"]), - ]), - no_implicit: false, - } - .apply(&coq::Expression::just_name(&item.item_name)), + coq::Expression::Code(nest([ + text("ltac:"), + round_brackets(group([ + group([ + text("unshelve"), + line(), + text("eapply"), + line(), + coq::Expression::Variable { + ident: Path::concat(&[ + bound.name.to_owned(), + Path::new(&["Trait"]), + ]), + no_implicit: false, + } + .apply( + &item_for_the_trait, + ) + .apply_many_args( + &bound.ty_params + .iter() + .map(|ty_param| { + ty_param.to_coq_arg_value(&bound.name) + }) + .collect_vec(), + ) + .to_doc(true), + text(";"), + ]), + line(), + text("compute;"), + line(), + group([ + text("destruct"), + line(), + text("_Tr"), + text(";"), + ]), + line(), + nest([ + text("repeat"), + line(), + group([ + group([ + text("destruct"), + line(), + text(proj_name.clone()), + line(), + text("as"), + line(), + square_brackets(nest([ + text("?"), + line(), + text(proj_name.clone()), + ])), + text(";"), + ]), + line(), + group([ + text("try"), + line(), + text("assumption"), + ]), + ]), + ]), + ])), + ])), &None, { - let proj_name = ["__the_bounds_of_", &item.item_name].concat(); vec![nest([ - text("all: repeat"), + text("all:"), line(), group([ - text("("), - text([ - "destruct ", - &proj_name, - " as [x ", - &proj_name, - "];", - ].concat()), + text("compute;"), + line(), + text("destruct _Tr;"), line(), - text("try assumption;"), + nest([ + text("repeat"), + line(), + round_brackets(group([ + text("destruct"), + line(), + text(proj_name.clone()), + line(), + text("as"), + line(), + square_brackets(nest([ + text("?"), + line(), + text(proj_name.clone()), + ])), + ])), + ]), + text(";"), line(), - text("try destruct x"), - text(")"), + text("assumption"), ]), text("."), ])] From 354907421827f9810fa3b525015e7728f63b1f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kr=C3=B3likowski?= Date: Fri, 29 Sep 2023 22:55:32 +0200 Subject: [PATCH 13/13] add the content of experiments --- tmp/experiment.v | 175 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 tmp/experiment.v diff --git a/tmp/experiment.v b/tmp/experiment.v new file mode 100644 index 000000000..5c8c34cdf --- /dev/null +++ b/tmp/experiment.v @@ -0,0 +1,175 @@ +Notation "'Sigma' x .. y , p" := (sigT (fun x => .. (sigT (fun y => p)) ..)) + (at level 200, x binder, right associativity, + format "'[' 'Sigma' '/ ' x .. y , '/ ' p ']'") + : type_scope. + + +Class supersuperclass (Self : Set) : Type := {}. +Class superclass (Self : Set) `{supersuperclass Self} : Type := { + some_other_ty : Set; + some_other_field : some_other_ty; +}. +Class class (Self : Set) `{superclass Self} : Type := { + some_ty : Set; + some_field : some_ty; +}. + +Class assoc_ty_class (Self : Set) : Type := { + ty : Set; + __ty_bound : Sigma `(class ty), unit; +}. +Compute ty. + +Definition Ty'' `(assoc_ty_class) : Type. + unshelve eapply class; try exact (ty (assoc_ty_class := H)); compute; destruct H as [ty __ty_bound']; +repeat (destruct __ty_bound' as [? __ty_bound']; try assumption). +Defined. +Print Ty''. + +Definition I'' `{H : assoc_ty_class} : Ty'' H. +compute in *. + destruct H as [ty __ty_bound']. + destruct __ty_bound' as [? __ty_bound']. + destruct __ty_bound' as [? __ty_bound']. + destruct __ty_bound' as [? __ty_bound']. + exact x1. +Defined. +Parameter IC' : forall Self `(superclass Self), class Self. +Global Existing Instance IC'. + +Section Sec. + Parameter Self : Set. + Parameter I''' : forall `{superclass Self}, class Self. + Global Instance I'''' `(superclass Self) : class Self := I'''. +End Sec. + +Parameter function : forall (T : Set) `{C : class T}, Set. + +Global Instance I''''' Self `(H : class Self) : class Self := H. + +Module Sec'. +Section Sec'. +Context (Self : Set). +Context `(H : class Self). +Global Instance I'''''' : class Self := H. +End Sec'. +End Sec'. + +Ltac t n := exact n. +Check ltac:(t tt). + +Print Instances class. +Global Hint Resolve I'' : typeclass_instances. + +Ltac t' H := unshelve eapply class; try exact (ty (assoc_ty_class := H)); compute; destruct H as [ty __ty_bound']; +repeat (destruct __ty_bound' as [? __ty_bound']; try assumption). + +Check fun `(H : assoc_ty_class) => ltac:(t' H). +Global Instance II `(H : assoc_ty_class) : ltac:(t' H) := I''. +Global Hint Resolve II : typeclass_instances. +Print II. +Check II ?[H] : class ty. +Print function. + +Print Instances class. + +Section s. +Context `(H : assoc_ty_class). + +Definition T : Set := ty. +Global Instance GI : ltac:(unshelve eapply class; try exact (ty (assoc_ty_class := H)); compute; destruct H; +repeat (destruct __ty_bound0 as [? __ty_bound0]; try assumption)). +compute. destruct H. +repeat (destruct __ty_bound0 as [? __ty_bound0]). assumption. +Defined. +Print GI. + +Parameter f : forall x `{class x}, Set. +(* Parameter x : f T. *) + +Print Instances superclass. +End s. + +(* Definition T : Set := ty. *) + +(* I'm trying to make this work v *) +(* ____________________| *) +(* vvv *) +Parameter obj : forall `{H : assoc_ty_class}, function (ty (assoc_ty_class := H)). + +Section X. +Context `(H : assoc_ty_class). +Definition S : Type. + destruct H as [ty __ty_bound]. + repeat + (destruct __ty_bound as [? __ty_bound]; + try apply (class ty)). +Defined. +Compute S. + +Definition S' : Sigma T : Type, T. + destruct H as [ty __ty_bound']. + destruct __ty_bound' as [? __ty_bound']. + destruct __ty_bound' as [? __ty_bound']. + destruct __ty_bound' as [? __ty_bound']. + eapply existT. + exact x1. +Defined. + +(* Global Instance I : S. + *) +Compute S'. +Compute projT2 S'. +Compute projT1 S'. +End X. +Compute fun `(H : assoc_ty_class) => (fun '({| ty := x; __ty_bound := y |}) => projT1 (S' {| ty := x; __ty_bound := y |})) H. +Compute fun '({| ty := x; __ty_bound := y |}) => projT1 (S' {| ty := x; __ty_bound := y |}). +Compute fun `(H : assoc_ty_class) => projT1 (S' H). + +Check fun '({| ty := x; __ty_bound := y |}) => {| ty := x; __ty_bound := y |}. +Compute (fun `(H : assoc_ty_class) => let '{| ty := x; __ty_bound := y |} := H in + (projT2 (S' {| ty := x; __ty_bound := y |}) : projT1 (S' {| ty := x; __ty_bound := y |}))) + : forall `(H : assoc_ty_class), let '{| ty := x; __ty_bound := y |} := H in projT1 (S' {| ty := x; __ty_bound := y |}). +Compute fun `(H : assoc_ty_class) => projT2 (S' H). + +Definition Ty `(H : assoc_ty_class) : Type. + unshelve eapply function. + - exact ty. + - destruct H. now compute. + - destruct H. now compute. + - destruct H. now compute. +Defined. +Compute Ty. + +Definition Ty' `(H : assoc_ty_class) : Type. + unshelve eapply (another_class ty). + - exact Self. + - easy. + - easy. + - easy. + - easy. +Defined. +Print Ty'. + +(* apply (fun `(H : assoc_ty_class) (x : forall (T : Set) `(H : assoc_ty_class), Type) => forall (T : Set) `(H : assoc_ty_class), x T H) with Self. +Defined. *) + +Parameter object' : forall (T : Set) `(H : assoc_ty_class), Ty H. +Compute object'. + +Definition I' `(H : assoc_ty_class) : Ty' H. + easy. +Defined. + +Parameter object : forall (T : Set) `(H : assoc_ty_class), + let '{| ty := x; __ty_bound := y |} := H in function ty (C := projT2 (S' {| ty := x; __ty_bound := y |})). + +(* Goal forall `(H : assoc_ty_class), let '{| ty := x; __ty_bound := y |} := H in projT1 (S' H) = class x. *) +(* intros. compute. destruct H. destruct __ty_bound0. destruct s. destruct s. *) +Parameter object : forall '({| ty := x; __ty_bound := y |}), function x (C := projT2 (S' {| ty := x; __ty_bound := y |})). + +Check fun '({| ty := x; __ty_bound := y |}) => {| ty := x; __ty_bound := y |}. +Compute fun '({| ty := x; __ty_bound := y |}) => (projT2 (S' {| ty := x; __ty_bound := y |}) : projT1 (S' {| ty := x; __ty_bound := y |})). +Compute fun `(H : assoc_ty_class) => projT2 (S' H). + +Parameter object : forall (T : Set) '({| ty := x; __ty_bound := y |}), function ty (C := projT1 (projT2 (S' {| ty := x; __ty_bound := y |}))).