diff options
author | 2016-06-23 13:01:07 -0700 | |
---|---|---|
committer | 2016-06-23 13:01:07 -0700 | |
commit | 169485012c8f1f0697300a7140b6d3546e605c01 (patch) | |
tree | 8b69ce6edb1814458103323fcf6497976947a951 /src/Algebra.v | |
parent | 2f804f60377f36cbaa5bb0447a8c185626c540d9 (diff) |
Make [nsatz_contradict] better at inequalities
Diffstat (limited to 'src/Algebra.v')
-rw-r--r-- | src/Algebra.v | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/Algebra.v b/src/Algebra.v index baa676b64..d7b684760 100644 --- a/src/Algebra.v +++ b/src/Algebra.v @@ -225,7 +225,21 @@ Module Group. intros ? Hx Ho. assert (Hxo: x * inv x = id) by (rewrite right_inverse; reflexivity). rewrite Ho, right_identity in Hxo. intuition. - Qed. + Qed. + + Lemma neq_inv_nonzero : forall x, x <> inv x -> x <> id. + Proof. + intros ? Hx Hi; apply Hx. + rewrite Hi. + symmetry; apply inv_id. + Qed. + + Lemma inv_neq_nonzero : forall x, inv x <> x -> x <> id. + Proof. + intros ? Hx Hi; apply Hx. + rewrite Hi. + apply inv_id. + Qed. Section ZeroNeqOne. Context {one} `{is_zero_neq_one T eq id one}. @@ -613,13 +627,7 @@ Ltac field_algebra := try solve [neq01 |trivial - |apply Ring.opp_nonzero_nonzero;trivial - |match goal with - | [ H : not (?eq ?zero (?opp ?zero)) |- _ ] - => exfalso; apply H; nsatz - | [ H : not (?eq (?opp ?zero) ?zero) |- _ ] - => exfalso; apply H; nsatz - end]. + |apply Ring.opp_nonzero_nonzero;trivial]. Section Example. Context {F zero one opp add sub mul inv div} `{F_field:field F eq zero one opp add sub mul inv div}. |