Equations
Instances For
Equations
- val.toByteArray = ffi.ByteArray.zeroes { toBitVec := 32 - โ(BE val.toNat).size } ++ BE val.toNat
Instances For
@[reducible, inline]
Equations
Instances For
Equations
- EvmYul.AccountAddress.size = 1461501637330902918203684832716283019655932542976
Instances For
@[reducible, inline]
Instances For
Equations
- EvmYul.instOrdAccountAddress = { compare := fun (aโ aโ : EvmYul.AccountAddress) => compare โaโ โaโ }
Equations
- EvmYul.instInhabitedAccountAddress = { default := Fin.ofNat 0 }
Equations
Instances For
Equations
Instances For
Equations
- EvmYul.AccountAddress.instOfNat = { ofNat := Fin.ofNat n }
Equations
- a.toByteArray = ffi.ByteArray.zeroes { toBitVec := 20 - โ(BE โa).size } ++ BE โa
Instances For
Equations
- EvmYul.hexOfByte byte = hexDigitRepr (byte.toNat >>> 4 &&& 15) ++ hexDigitRepr (byte.toNat &&& 15)
Instances For
Equations
- EvmYul.toHex bytes = ByteArray.foldl (fun (acc : String) (byte : UInt8) => acc ++ EvmYul.hexOfByte byte) "" bytes
Instances For
Equations
- EvmYul.instReprByteArray_evmYul = { reprPrec := fun (s : ByteArray) (x : โ) => Std.Format.text (EvmYul.toHex s) }
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
- EvmYul.Primop.Quaternary = (EvmYul.UInt256 โ EvmYul.UInt256 โ EvmYul.UInt256 โ EvmYul.UInt256 โ EvmYul.UInt256)
Instances For
TODO(rework later to a sane version)
Equations
- One or more equations did not get rendered due to their size.
Equations
- Option.option dflt f none = dflt
- Option.option dflt f (some x_1) = f x_1
Instances For
Equations
- Option.toExceptWith dflt x = Option.option (Except.error dflt) Except.ok x
Instances For
TODO - Well this is ever so slightly unfortunate. It appears to be the case that some (all?) definitions that have C++ implementations use 64bit-width integers to hold numeric arguments.
When this assumption is broken, e.g. n : Nat := 2^64
, the Lean (4.9.0) gives
inernal out of memory error.
This implementation works around the issue at the price of using a slower implementation in case either of the arguments is too big.
Equations
Instances For
Equations
Equations
- instToStringBlob = { toString := Blob.toString }
Equations
Instances For
Equations
- ByteArray.ofBlob self = do let chunks โ mapM ofHex? (List.toChunks 2 (String.toList self)) pure { data := chunks.toArray }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.