def encoded_shift
stelliferous@0.0.2.0 · proofs/u32_shift.bend:49
import stelliferous@0.0.2.0/proofs/u32_shift.bend as U32Shift
import Base
import stelliferous@0.0.2.0/proofs/natural_addition.bend as Addition
import stelliferous@0.0.2.0/proofs/word_arithmetic.bend as WordArithmetic
import stelliferous@0.0.2.0/proofs/bounded_u32_arithmetic.bend as Arithmetic
49def encoded_shift(+w: Word(32n)) -> {U32{Word.shl(32n,w)} == U32.from_nat(Nat.double(Word.to_nat(32n,w))) : U32}:
50 %WordArithmetic.double_word(32n,w) : {U32{_} == U32.from_nat(Nat.double(Word.to_nat(32n,w))) : U32}
51 %Addition.double(Word.to_nat(32n,w)) : {U32{Word.add(32n,w,w)} == U32.from_nat(_) : U32}
52 Arithmetic.native_add(U32{w},U32{w})