Definition spec_fraction_encoding (a b : Z) : Q := Qmult a (Qinv b).Definition spec_positive_fraction_encoding (a b : Z) 
  (Ha : (0 < a)%Z) (Hb : (0 < b)%Z) :=
  Qpositive_mult (Z_to_Qpositive a Ha) (Qpositive_inv (Z_to_Qpositive b Hb)).Definition spec_positive_fraction_encoding1 (a b : Z) :=
  Q_tail (Qmult a (Qinv b)).Definition spec_positive_fraction_encoding2 (a b : Z) :=
  Qpositive_mult (Q_tail a) (Qpositive_inv (Q_tail b)).

Lemma spec_coding : forall m n : nat, Qpositive_c (S m) (S n) (S m + S n) = spec_positive_fraction_encoding1 (m + 1) (n + 1).