Skip to content

Commit

Permalink
Using not_symmetry that is already in MathClasses
Browse files Browse the repository at this point in the history
  • Loading branch information
ndcroos committed Jul 31, 2024
1 parent 6841062 commit 9da54fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions implementations/stdlib_rationals.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Require
MathClasses.implementations.stdlib_binary_integers Coq.setoid_ring.Field Coq.QArith.Qfield MathClasses.theory.rationals .
Require Import
Require Import MathClasses.misc.stdpp_tactics
Coq.ZArith.ZArith
Coq.setoid_ring.Ring Coq.QArith.QArith_base Coq.QArith.Qabs Coq.QArith.Qpower
MathClasses.interfaces.abstract_algebra MathClasses.interfaces.rationals
Expand Down Expand Up @@ -61,15 +61,15 @@ Program Instance Q_to_fracZ: Cast Q (Frac Z) := λ x, frac (Qnum x) (Zpos (Qden

#[global]
Instance: Proper ((=) ==> (=)) Q_to_fracZ.
Proof. intros ? ? E. easy. Qed.
Proof. intros ? ? E. done. Qed.

#[global]
Instance: SemiRing_Morphism Q_to_fracZ.
Proof. repeat (split; try apply _). Qed.

#[global]
Instance: Injective Q_to_fracZ.
Proof. split; try apply _. intros ? ? E. easy. Qed.
Proof. split; try apply _. intros ? ? E. done. Qed.

#[global]
Instance: RationalsToFrac Q := rationals.alt_to_frac Q_to_fracZ.
Expand All @@ -92,7 +92,7 @@ Proof.
exact Qle_antisym.
apply (rings.from_ring_order (Rle:=Q_le)).
repeat (split; try apply _).
intros. apply Qplus_le_compat. now apply Qle_refl. easy.
intros. apply Qplus_le_compat. now apply Qle_refl. done.
intros. now apply Qmult_le_0_compat.
Qed.

Expand All @@ -110,7 +110,7 @@ Proof.
rapply (semirings.dec_full_pseudo_srorder (R:=Q)).
split.
intro. split. now apply Zorder.Zlt_le_weak. now apply Zorder.Zlt_not_eq.
intros [E1 E2]. destruct (Zorder.Zle_lt_or_eq _ _ E1). easy. now destruct E2.
intros [E1 E2]. destruct (Zorder.Zle_lt_or_eq _ _ E1). done. now destruct E2.
Qed.

#[global]
Expand Down
4 changes: 1 addition & 3 deletions misc/stdpp_tactics.v
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
Require Import MathClasses.misc.util.
From Coq Require Export RelationClasses Relation_Definitions Lia.

Module FastDoneTactic.

Lemma not_symmetry {A} `{R : relation A, !Symmetric R} x y : ~ R x y -> ~ R y x.
Proof. intuition. Qed.

Ltac fast_done :=
solve
[ eassumption
Expand Down

0 comments on commit 9da54fe

Please sign in to comment.