From d4009edb53ab7780bc85d83ccf01c6920c7f09e1 Mon Sep 17 00:00:00 2001 From: Raphaƫl Monat Date: Tue, 3 Oct 2017 16:19:37 +0200 Subject: Add Qeq_bool_sym: Qeq_bool x y = Qeq_bool y x. --- theories/QArith/QArith_base.v | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'theories') diff --git a/theories/QArith/QArith_base.v b/theories/QArith/QArith_base.v index a19f9f902..16963b021 100644 --- a/theories/QArith/QArith_base.v +++ b/theories/QArith/QArith_base.v @@ -171,6 +171,19 @@ Proof. auto with qarith. Qed. +Lemma Qeq_bool_sym x y: Qeq_bool x y = Qeq_bool y x. +Proof. + case_eq (Qeq_bool x y); intros H_eq_xy. + - unfold Qeq_bool in *. + rewrite <- Zeq_is_eq_bool in H_eq_xy. + rewrite H_eq_xy; symmetry. + rewrite <- Zeq_is_eq_bool; auto. + - apply Zeq_bool_neq in H_eq_xy. + case_eq (Qeq_bool y x); intros H_eq_yx. + + apply Zeq_is_eq_bool in H_eq_yx; congruence. + + auto. +Qed. + Hint Resolve Qnot_eq_sym : qarith. (** * Addition, multiplication and opposite *) -- cgit v1.2.3