Example of a setoid: Q+

Setoid

We will examine the subsetoid of positive rationals of the setoid of rational numbers.

Multiplication

Inverse

Special multiplication and inverse

We define multdiv2: (x,y) ↦ xy/2.
And its inverse multdiv4: x ↦ 4/x.

Definition mult4 := projected_bin_fun _ _ _ Qpos_mult_is_bin_fun (4#1)%Qpos.

Definition divmult4 := compose_CSetoid_fun _ _ _ Qpos_inv_op mult4.