def inv
import bend-collections-laws-math@1.0.0.0/proofs/lib/u32div.bend as U32divimport Base
import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/spec/numeric.bend as S
34# the long-division invariant of a partial result r for the prefix a
35def inv(+m: Nat, +a: Word(m), +bn: Nat, r: Word(m) & U32) -> Type:
36 {Nat.add(Nat.mul(S.unsigned(m, dq(m, r)), bn), v(dr(m, r))) == S.unsigned(m, a) : Nat} & {Nat.is_lt(v(dr(m, r)), bn) == True{} : Bool}
Uses (12)
Used by (9)
- bend-collections-laws-math@1.0.0.0/proofs/lib/u32div:dm_fin
- bend-collections-laws-math@1.0.0.0/proofs/lib/u32div:fin_false
- bend-collections-laws-math@1.0.0.0/proofs/lib/u32div:fin_ge
- bend-collections-laws-math@1.0.0.0/proofs/lib/u32div:fin_lt
- bend-collections-laws-math@1.0.0.0/proofs/lib/u32div:fin_true
- …