Definition Reval_expr := eval_pexpr  Rplus Rmult Rminus Ropp R_of_Rcst N.to_nat pow.
Definition Reval_pop2 (o:Op2) : R -> R -> Prop :=
match o with
| OpEq =>  @eq R
| OpNEq => fun x y  => ~ x = y
| OpLe => Rle
| OpGe => Rge
| OpLt => Rlt
| OpGt => Rgt
end.
Definition sumboolb {A B : Prop} (x : @sumbool A B) : bool :=
if x then true else false.
Definition Reval_bop2 (o : Op2) : R -> R -> bool :=
match o with
| OpEq  => fun x y => sumboolb (Req_dec_T x y)
| OpNEq => fun x y => negb (sumboolb (Req_dec_T x y))
| OpLe  => fun x y => (sumboolb (Rle_lt_dec x y))
| OpGe  => fun x y => (sumboolb (Rge_gt_dec x y))
| OpLt  => fun x y => (sumboolb (Rlt_le_dec x y))
| OpGt  => fun x y => (sumboolb (Rgt_dec x y))
end.

Lemma pop2_bop2 :
forall (op : Op2) (r1 r2 : R), is_true (Reval_bop2 op r1 r2) <-> Reval_pop2 op r1 r2.