Definition fraction_set : SET.Definition addfraction_fun (x y : fraction_set) : fraction_set :=
  Build_fraction
    (sgroup_law R (ring_mult (num x) (den y)) (ring_mult (num y) (den x)))
    (ring_mult (den x) (den y))
    (INTEGRAL_DOMAIN_prop_rev (den_prf x) (den_prf y)).Definition opfraction_fun (x : fraction_set) : fraction_set :=
  Build_fraction (group_inverse R (num x)) (den x) (den_prf x).Definition multfraction_fun (x y : fraction_set) : fraction_set :=
  Build_fraction (ring_mult (num x) (num y)) (ring_mult (den x) (den y))
    (INTEGRAL_DOMAIN_prop_rev (den_prf x) (den_prf y)).Definition fraction1 : fraction_set :=
  Build_fraction (ring_unit R) (ring_unit R) diff10.

(* Specifications: *)
Lemma addfraction_law_l : forall x x' y : fraction_set, Equal x x' -> Equal (addfraction_fun x y) (addfraction_fun x' y).
Lemma addfraction_fun_com : forall x y : fraction_set, Equal (addfraction_fun x y) (addfraction_fun y x).
Lemma addfraction_law_r : forall x y y' : fraction_set, Equal y y' -> Equal (addfraction_fun x y) (addfraction_fun x y').
Lemma addfraction_law : fun2_compatible addfraction_fun.
Lemma multfraction_dist_l : forall x y z : fraction_set, Equal (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)).
Lemma multfraction_com : forall x y : fraction_set, Equal (multfraction_fun x y) (multfraction_fun y x).