Definition const_beq a b :=
match a, b with
| fN c1, fN c2 => beq_nat c1 c2
| fZ c1, fZ c2 => Zbool.Zeq_bool c1 c2
| fPos c1, fPos c2 =>  BinPos.Pos.eqb c1 c2
| fCtype c1, fCtype c2 => expr.eqb_type c1 c2
| fCexpr c1, fCexpr c2 => expr_beq c1 c2
| fenv c1, fenv c2 => ptree_cmp c1 c2 expr.eqb_type
| fllrr c1, fllrr c2 => match c1, c2 with | efield_lemmas.LLLL, efield_lemmas.LLLL | efield_lemmas.RRRR, efield_lemmas.RRRR => true | _, _ => false end
| _, _ => false
end.Instance const_rel_dec : RelDec (@eq const) := { rel_dec := const_beq }.Definition beq_z_true : forall a b, Zbool.Zeq_bool a b = true -> a = b.

Lemma const_beq_sound : forall a b, const_beq a b = true -> a = b.