Source/Packages

Model.Word32

packages/foundation/standard/src/Model/Word32.alpha

481 lines41 declarations16.9 KiBSHA-256 56a6cf48ff83

def · lines 208–228

modelWord32ToNatural

Full file
208def modelWord32ToNatural =
209  (lambda unrestricted value : (family ModelWord32) .
210    eliminate
211      ModelWord32
212      (lambda unrestricted current : (family ModelWord32) . Nat)
213      value
214      (branch
215        ModelWord32Value
216        b0
217        b1
218        b2
219        b3
220        .
221        then (naturalAdd (byte-to-nat b0))
222          (naturalMultiply byteNaturalTwoHundredFiftySix)
223          (naturalAdd (byte-to-nat b1))
224          (naturalMultiply byteNaturalTwoHundredFiftySix)
225          (naturalAdd (byte-to-nat b2))
226          (naturalMultiply byteNaturalTwoHundredFiftySix)
227          byte-to-nat
228          b3))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.