FinMatrix.CoqExt.RExt.RExtOpp


Require Export RExtBase.

Basic automation

Additional properties

r1 - (- r2) = r1 + r2
Lemma Rsub_opp r1 r2 : r1 - (- r2) = r1 + r2.
Proof. ra. Qed.
Hint Rewrite Rsub_opp : R.

(- r)² = r²
Lemma Rsqr_opp : forall r : R, (- r = r².
Proof. intros. rewrite <- Rsqr_neg. auto. Qed.
Hint Rewrite Rsqr_opp : R.

  • ((- r) * r) = r²
Lemma Ropp_Rmul_Ropp_l : forall (r : R), - ((- r) * r) = r².
Proof. intros. cbv. ring. Qed.
Hint Rewrite Ropp_Rmul_Ropp_l : R.

  • (r * (- r)) = r²
Lemma Ropp_Rmul_Ropp_r : forall (r : R), - (r * (- r)) = r².
Proof. intros. cbv. ring. Qed.
Hint Rewrite Ropp_Rmul_Ropp_r : R.

(- 1) * r = - r
Lemma Rmult_neg1_l : forall r : R, (- 1) * r = - r.
Proof. intros. lra. Qed.
Hint Rewrite Rmult_neg1_l : R.

r * (- 1) = - r
Lemma Rmult_neg1_r : forall r : R, r * (- 1) = - r.
Proof. intros. lra. Qed.
Hint Rewrite Rmult_neg1_r : R.

Extra automation