(** * 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_reg_l p q r : add_carry p q = add_carry p r -> q = r.