Skip to content

Commit

Permalink
Merge PR coq#18192: Fixing confusion about idempotency of abs
Browse files Browse the repository at this point in the history
Reviewed-by: proux01
Ack-by: yannl35133
Co-authored-by: proux01 <[email protected]>
  • Loading branch information
coqbot-app[bot] and proux01 authored Oct 24, 2023
2 parents 684781f + 2a3d4cf commit b7c0814
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion theories/Numbers/Integer/Abstract/ZSgnAbs.v
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,14 @@ Proof.
intros n. destruct_max n; rewrite ? opp_involutive; auto with relations.
Qed.

Lemma abs_involutive : forall n, abs (abs n) == abs n.
Lemma abs_idemp : forall n, abs (abs n) == abs n.
Proof.
intros. apply abs_eq. apply abs_nonneg.
Qed.

#[deprecated(since="8.19", note="Use abs_idemp")]
Notation abs_involutive := abs_idemp.

Lemma abs_spec : forall n,
(0 <= n /\ abs n == n) \/ (n < 0 /\ abs n == -n).
Proof.
Expand Down

0 comments on commit b7c0814

Please sign in to comment.