diff --git a/test/kontrol/lido-lemmas.k b/test/kontrol/lido-lemmas.k index a52e9066..77d719cf 100644 --- a/test/kontrol/lido-lemmas.k +++ b/test/kontrol/lido-lemmas.k @@ -403,6 +403,37 @@ module LIDO-LEMMAS requires X =Int pow256 [concrete(X), simplification] + rule lengthBytes ( #padToWidth ( 32 , #asByteStack ( VALUE ) ) ) => 32 + requires #rangeUInt(256, VALUE) + [simplification] + + rule bool2Word ( X ) <=Int 1 => true + [simplification, smt-lemma] + + rule chop ( X -Int Y ) => X -Int Y + requires #rangeUInt(256, X) + andBool #rangeUInt(256, Y) + andBool Y <=Int X + [simplification] + + rule X -Int Y <=Int Z => true + requires X <=Int Z + andBool 0 <=Int Y + [simplification, smt-lemma] + + rule X modInt pow256 => X + requires 0 <=Int X + andBool X <=Int maxUInt128 + [simplification] + + rule X *Int Y true + requires #rangeUInt(256, X) + andBool #rangeUInt(256, Y) + andBool #rangeUInt(256, Z) + andBool X runLemma ( lengthBytes ( #padToWidth ( 32 , #asByteStack ( ( ( ( ( ( ?WORD0:Int *Int VV0_amount_114b9705:Int ) /Int ?WORD:Int ) +Int ?WORD8:Int ) |Int #asWord ( #buf ( 16 , ?WORD9:Int ) +Bytes b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" ) ) /Int pow128 ) ) ) ) ) => doneLemma ( 32 ) ... + endmodule \ No newline at end of file