Inductive Type polynomial := Pvar : idx -> polynomial | Pconst : A -> polynomial | Pplus : polynomial -> polynomial -> polynomial | Pmult : polynomial -> polynomial -> polynomial | Popp : polynomial -> polynomial.
Definition polynomial_simplify := [...] Definition interp : (varmap A) -> (polynomial A) -> A := [...]
Theorem polynomial_simplify_correct : (v:(varmap A))(p:polynomial) (interp v (polynomial_simplify p)) ==(interp v p).
(interp v ap)
. Then we
replace it by (interp v (polynomial_simplify ap))
, using the
main correctness theorem and we reduce it to a concrete expression
p', which is the concrete normal form of
p. This is summarized in this diagram:p | ®bdi | (interp v ap) |
=(by the main correctness theorem) | ||
p' | ¬bdi | (interp v (polynomial_simplify ap)) |