proposition: Lemma Qpos_le_lt_min : forall a b : Q+, ' a <= ' b -> exists c ca cb, a = c + ca /\ b = c + cb.
proof: Proof. intros a b E. exists (a/2),(a/2). simple refine (exist _ _ _);simpl. - exists (' (a / 2) + (' b - ' a)). apply nonneg_plus_lt_compat_r. + apply (snd (flip_nonneg_minus _ _)). trivial. + solve_propholds. - split. + apply pos_split2. + apply pos_eq. unfold cast at 2;simpl. unfold cast at 3;simpl. set (a':=a/2);rewrite (pos_split2 a);unfold a';clear a'. ring_tac.ring_with_integers (NatPair.Z nat). Qed.
imports: HoTT.Classes.implementations.peano_naturals HoTT.Classes.implementations.natpair_integers HoTT.Classes.interfaces.abstract_algebra HoTT.Classes.interfaces.naturals HoTT.Classes.interfaces.rationals HoTT.Classes.interfaces.orders HoTT.Classes.theory.groups HoTT.Classes.theory.integers HoTT.Classes.theory.dec_fields HoTT.Classes.orders.sum HoTT.Classes.orders.dec_fields HoTT.Classes.orders.lattices HoTT.Classes.theory.additional_operations HoTT.Classes.tactics.ring_quote HoTT.Classes.tactics.ring_tac