Notation "0" := rO : R_scope.Notation "1" := rI : R_scope.Infix "+" := radd : R_scope.Infix "-" := rsub : R_scope.Infix "*" := rmul : R_scope.Infix "/" := rdiv : R_scope.Notation "- x" := (ropp x) : R_scope.Notation "/ x" := (rinv x) : R_scope.Infix "==" := req (at level 70, no associativity) : R_scope.(* Field properties *)
Record almost_field_theory : Prop := mk_afield {
 AF_AR : almost_ring_theory rO rI radd rmul rsub ropp req;
 AF_1_neq_0 : ~ 1 == 0;
 AFdiv_def : forall p q, p / q == p * / q;
 AFinv_l : forall p, ~ p == 0 ->  / p * p == 1
}.(* Field properties *)
Record almost_field_theory : Prop := mk_afield {
 AF_AR : almost_ring_theory rO rI radd rmul rsub ropp req;
 AF_1_neq_0 : ~ 1 == 0;
 AFdiv_def : forall p q, p / q == p * / q;
 AFinv_l : forall p, ~ p == 0 ->  / p * p == 1
}.(* Field properties *)
Record almost_field_theory : Prop := mk_afield {
 AF_AR : almost_ring_theory rO rI radd rmul rsub ropp req;
 AF_1_neq_0 : ~ 1 == 0;
 AFdiv_def : forall p q, p / q == p * / q;
 AFinv_l : forall p, ~ p == 0 ->  / p * p == 1
}.(* Field properties *)
Record almost_field_theory : Prop := mk_afield {
 AF_AR : almost_ring_theory rO rI radd rmul rsub ropp req;
 AF_1_neq_0 : ~ 1 == 0;
 AFdiv_def : forall p q, p / q == p * / q;
 AFinv_l : forall p, ~ p == 0 ->  / p * p == 1
}.(* Field properties *)
Record almost_field_theory : Prop := mk_afield {
 AF_AR : almost_ring_theory rO rI radd rmul rsub ropp req;
 AF_1_neq_0 : ~ 1 == 0;
 AFdiv_def : forall p q, p / q == p * / q;
 AFinv_l : forall p, ~ p == 0 ->  / p * p == 1
}.(* Field properties *)
Record almost_field_theory : Prop := mk_afield {
 AF_AR : almost_ring_theory rO rI radd rmul rsub ropp req;
 AF_1_neq_0 : ~ 1 == 0;
 AFdiv_def : forall p q, p / q == p * / q;
 AFinv_l : forall p, ~ p == 0 ->  / p * p == 1
}.Add Morphism radd with signature (req ==> req ==> req) as radd_ext.Add Morphism rmul with signature (req ==> req ==> req) as rmul_ext.Add Morphism ropp with signature (req ==> req) as ropp_ext.Add Morphism rsub with signature (req ==> req ==> req) as rsub_ext.Add Morphism rinv with signature (req ==> req) as rinv_ext.Notation "0" := cO : C_scope.Notation "1" := cI : C_scope.Infix "+" := cadd : C_scope.Infix "-" := csub : C_scope.Infix "*" := cmul : C_scope.Notation "- x" := (copp x) : C_scope.Infix "=?" := ceqb : C_scope.Notation "[ x ]" := (phi x) (at level 0).

(* Specifications: *)
Lemma ceqb_spec c c' : BoolSpec ([c] == [c']) True (c =? c')%coef.