Variable A : Set. Variable C : (Ring_Constants A). Variable T : (Ring_Theory C). Inductive Set polynom := Pvar : idx -> polynom | Pconst : A -> polynom | Pplus : polynom -> polynom -> polynom | Pmult : polynom -> polynom -> polynom | Popp : polynom -> polynom.
Definition polynom_simplify : polynom -> (spolynom A) := [...] Definition interp : varmap -> (polynnom A) -> A := [...]
Theorem polynom_simplify_correct : (v:(varmap A))(p:polynom) (interp C v (polynom_simplify p)) = (interp C v p).
(interp A C v ap)
. Then we
replace it by (interp A C v (polynom\_simplify ap))
, using the
main correctness theorem and we reduce it to a concrete expression
p', which is precisely the normalized form of
p. This is explained in this diagram:p | ®bdi | (interp A C v ap) |
=(by the main correctness theorem) | ||
p' | ¬bdi | (interp A C v (polynom_simplify ap)) |