LAWS_text.bend

bend-osdev-word64@0.1.1.0 · 11 lines · 1 definition

1# bend-osdev-word64's law of decimal text, for every input: W64.show reads
2# back as the value. Proved in PROOF_text.bend.
3import Base
4import bend-osdev-u32@0.1.0.0/u32.bend as U
5import bend-osdev-word64@0.1.1.0/word64.bend as W
6
7# Decimal text: the digits of W64.show(a), read back one by one (Base's
8# Nat.read.go, the reader without Nat.read's 2^48 gate), are the value.
9law show_reads:
10  for +a: W.W64
11  {Nat.read.go(W.W64.show(a), 0n) == Some{W.W64.to_nat(a)} : Maybe<&2, Nat>}