(** * Logical Predicates *)

Definition eq := @Logic.eq positive.Definition eq_equiv := @eq_equivalence positive.Definition lt x y := (x ?= y) = Lt.Definition gt x y := (x ?= y) = Gt.Definition le x y := (x ?= y) <> Gt.Definition ge x y := (x ?= y) <> Lt.Infix "<=" := Pos.le : positive_scope.Infix "<" := Pos.lt : positive_scope.Infix ">=" := Pos.ge : positive_scope.Infix ">" := Pos.gt : positive_scope.Notation "x <= y <= z" := (x <= y /\ y <= z) : positive_scope.Notation "x <= y < z" := (x <= y /\ y < z) : positive_scope.Notation "x < y < z" := (x < y /\ y < z) : positive_scope.Notation "x < y <= z" := (x < y /\ y <= z) : positive_scope.

Lemma add_carry_add p q r s : add_carry p r = add_carry q s -> p + r = q + s.