End Evaluation.
Section Algebra.
(* Compatibility with evaluation *)

(* Specifications: *)
Lemma poly_add_compat : forall pl pr var, eval var (poly_add pl pr) = xorb (eval var pl) (eval var pr).
Lemma poly_mul_cst_compat : forall v p var,
eval var (poly_mul_cst v p) = andb v (eval var p).
Lemma poly_mul_mon_compat : forall i p var,
eval var (poly_mul_mon i p) = (list_nth i var false && eval var p).
Lemma poly_mul_compat : forall pl pr var, eval var (poly_mul pl pr) = andb (eval var pl) (eval var pr).
#[local]
Hint Extern 5 =>
match goal with
| [ |- (Pos.max ?x ?y <= ?z)%positive ] =>
apply Pos.max_case_strong; intros; lia
| [ |- (?z <= Pos.max ?x ?y)%positive ] =>
apply Pos.max_case_strong; intros; lia
| [ |- (Pos.max ?x ?y < ?z)%positive ] =>
apply Pos.max_case_strong; intros; lia
| [ |- (?z < Pos.max ?x ?y)%positive ] =>
apply Pos.max_case_strong; intros; lia
| _ => lia
end : core.