def digit_result
import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/wide.bend as Wideimport Base
61def digit_result(p: Nat, q: Word(p), r: U32, subtract: Bool) -> Division<1n+p>:
62 match subtract:
63 case False{}:
64 Div{WCon{False{}, q}, r}
65 case True{}:
66 Div{WCon{True{}, q}, U32.sub(r, 1000000)}
Uses (7)
Used by (4)
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/wide:digit_compare
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/division_invariant:result
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/division_value:result_form
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/division_value:result_value