proposition: Lemma nat_int_lt_plus x y : x < y <-> exists z, y = x + 1 + naturals_to_semiring N R z.
proof: Proof. split. - intros E. destruct ((fst (nat_int_le_plus x y) (lt_le _ _ E))) as [z0 Ez]. destruct (naturals.case z0) as [E1|[z E1]];rewrite E1 in *;clear z0 E1. + rewrite preserves_0, plus_0_r in Ez. destruct (lt_ne_flip x y);trivial. + exists z. rewrite (preserves_plus (A:=N)), preserves_1, plus_assoc in Ez. trivial. - intros [z Ez]. rewrite Ez. apply nonneg_plus_lt_compat_r. + apply to_semiring_nonneg. + apply pos_plus_lt_compat_r; solve_propholds. Qed.
imports: HoTT.Classes.interfaces.abstract_algebra HoTT.Classes.interfaces.orders HoTT.Classes.theory.naturals HoTT.Classes.theory.rings HoTT.Classes.orders.semirings