Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
affeldt-aist committed Jun 4, 2020
1 parent e5165bd commit 0a999b9
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 55 deletions.
7 changes: 3 additions & 4 deletions CHANGELOG_UNRELEASED.md
Expand Up @@ -11,10 +11,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Added

- in `ssrnum.v`, new lemmas:
+ `gt_norm_eqF`
+ `{real_,}gtr_norm`, `{real_,}gtrNnorm`, `{real_,}ger_norm`, `{real_,}gerNnorm`
+ `{real_,}ltr_dist_addl`, `{real_,}ler_dist_addl`, `{real_,}ltr_distr_addl`, `{real_,}ler_distr_addl`,
`{real_,}ltr_dist_subl`, `{real_,}ler_dist_subl`, `{real_,}ltr_distr_subr`, `{real_,}ler_distr_subr`
+ `{real_,}ltr_normlW`, `{real_,}ltrNnormlW`, `{real_,}ler_normlW`, `{real_,}lerNnormlW`
+ `{real_,}ltr_distl_addr`, `{real_,}ler_distl_addr`, `{real_,}ltr_distl_addrC`, `{real_,}ler_distl_addrC`,
`{real_,}ltr_distl_subl`, `{real_,}ler_distl_subl`, `{real_,}ltr_distl_sublC`, `{real_,}ler_distl_sublC`

### Changed

Expand Down
10 changes: 7 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -124,16 +124,20 @@ Abbreviations are in the header of the file which introduces them. We list here
- `g` -- a group argument.
- `I` -- left/right injectivity, as in `addbI : right_injective addb.`
-- alternatively predicate or set intersection, as in `predI.`
- `l` -- the left-hand of an operation, as in `andb_orl : left_distributive andb orb.`
- `l` -- the left-hand of an operation, as in
+ `andb_orl : left_distributive andb orb.`
+ `ltr_norml x y : (`|x| < y) = (- y < x < y).`
- `L` -- the left-hand of a relation, as in `ltn_subrL : n - m < n = (0 < m) && (0 < n).`
- `LR` -- moving an operator from the left-hand to the right-hand of an relation, as in `leq_subLR : (m - n <= p) = (m <= n + p).`
- `N` or `n` -- boolean negation, as in `andbN : a && (~~ a) = false.`
- `n` -- alternatively, it is a natural number argument.
- `N` -- alternatively ring negation, as in `mulNr : (- x) * y = - (x * y).`
- `P` -- a characteristic property, often a reflection lemma, as in
`andP : reflect (a /\ b) (a && b)`.
- `r` -- a right-hand operation, as `orb_andr : right_distributive orb andb.`
-- alternatively, it is a ring argument.
- `r` -- a right-hand operation, as in
+ `orb_andr : right_distributive orb andb.`
+ `ler_normr x y : (x <= `|y|) = (x <= y) || (x <= - y).`
+ alternatively, it is a ring argument.
- `R` -- the right-hand of a relation, as in `ltn_subrR : n < n - m = false`.
- `RL` -- moving an operator from the right-hand to the left-hand of an relation, as in `ltn_subRL : (n < p - m) = (m + n < p).`
- `T` or `t` -- boolean truth, as in `andbT: right_id true andb.`
Expand Down
90 changes: 42 additions & 48 deletions mathcomp/algebra/ssrnum.v
Expand Up @@ -2896,16 +2896,16 @@ Qed.

Definition real_lter_normr := (real_ler_normr, real_ltr_normr).

Lemma real_gtr_norm x y : x \is real -> `|x| < y -> x < y.
Lemma real_ltr_normlW x y : x \is real -> `|x| < y -> x < y.
Proof. by move=> ?; case/real_ltr_normlP. Qed.

Lemma real_gtrNnorm x y : x \is real -> `|x| < y -> - y < x.
Lemma real_ltrNnormlW x y : x \is real -> `|x| < y -> - y < x.
Proof. by move=> ?; case/real_ltr_normlP => //; rewrite ltr_oppl. Qed.

Lemma real_ger_norm x y : x \is real -> `|x| <= y -> x <= y.
Lemma real_ler_normlW x y : x \is real -> `|x| <= y -> x <= y.
Proof. by move=> ?; case/real_ler_normlP. Qed.

Lemma real_gerNnorm x y : x \is real -> `|x| <= y -> - y <= x.
Lemma real_lerNnormlW x y : x \is real -> `|x| <= y -> - y <= x.
Proof. by move=> ?; case/real_ler_normlP => //; rewrite ler_oppl. Qed.

Lemma real_ler_distl x y e :
Expand All @@ -2918,29 +2918,29 @@ Proof. by move=> Rxy; rewrite real_lter_norml // !lter_sub_addl. Qed.

Definition real_lter_distl := (real_ler_distl, real_ltr_distl).

Lemma real_ltr_dist_addl x y e : x - y \is real -> `|x - y| < e -> x < y + e.
Lemma real_ltr_distl_addr x y e : x - y \is real -> `|x - y| < e -> x < y + e.
Proof. by move=> ?; rewrite real_ltr_distl // => /andP[]. Qed.

Lemma real_ler_dist_addl x y e : x - y \is real -> `|x - y| <= e -> x <= y + e.
Lemma real_ler_distl_addr x y e : x - y \is real -> `|x - y| <= e -> x <= y + e.
Proof. by move=> ?; rewrite real_ler_distl // => /andP[]. Qed.

Lemma real_ltr_distr_addl x y e : x - y \is real -> `|x - y| < e -> y < x + e.
Proof. by rewrite realBC (distrC x) => ? /real_ltr_dist_addl; apply. Qed.
Lemma real_ltr_distl_addrC x y e : x - y \is real -> `|x - y| < e -> y < x + e.
Proof. by rewrite realBC (distrC x) => ? /real_ltr_distl_addr; apply. Qed.

Lemma real_ler_distr_addl x y e : x - y \is real -> `|x - y| <= e -> y <= x + e.
Proof. by rewrite realBC distrC => ? /real_ler_dist_addl; apply. Qed.
Lemma real_ler_distl_addrC x y e : x - y \is real -> `|x - y| <= e -> y <= x + e.
Proof. by rewrite realBC distrC => ? /real_ler_distl_addr; apply. Qed.

Lemma real_ltr_dist_subl x y e : x - y \is real -> `|x - y| < e -> x - e < y.
Proof. by move/real_ltr_dist_addl; rewrite ltr_sub_addr; apply. Qed.
Lemma real_ltr_distl_subl x y e : x - y \is real -> `|x - y| < e -> x - e < y.
Proof. by move/real_ltr_distl_addr; rewrite ltr_sub_addr; apply. Qed.

Lemma real_ler_dist_subl x y e : x - y \is real -> `|x - y| <= e -> x - e <= y.
Proof. by move/real_ler_dist_addl; rewrite ler_sub_addr; apply. Qed.
Lemma real_ler_distl_subl x y e : x - y \is real -> `|x - y| <= e -> x - e <= y.
Proof. by move/real_ler_distl_addr; rewrite ler_sub_addr; apply. Qed.

Lemma real_ltr_distr_subr x y e : x - y \is real -> `|x - y| < e -> y - e < x.
Proof. by rewrite realBC distrC => ? /real_ltr_dist_subl; apply. Qed.
Lemma real_ltr_distl_sublC x y e : x - y \is real -> `|x - y| < e -> y - e < x.
Proof. by rewrite realBC distrC => ? /real_ltr_distl_subl; apply. Qed.

Lemma real_ler_distr_subr x y e : x - y \is real -> `|x - y| <= e -> y - e <= x.
Proof. by rewrite realBC distrC => ? /real_ler_dist_subl; apply. Qed.
Lemma real_ler_distl_sublC x y e : x - y \is real -> `|x - y| <= e -> y - e <= x.
Proof. by rewrite realBC distrC => ? /real_ler_distl_subl; apply. Qed.

(* GG: pointless duplication }-( *)
Lemma eqr_norm_id x : (`|x| == x) = (0 <= x). Proof. by rewrite ger0_def. Qed.
Expand Down Expand Up @@ -3774,59 +3774,53 @@ Lemma ltr_normlP x y : reflect ((-x < y) * (x < y)) (`|x| < y).
Proof. exact: real_ltr_normlP. Qed.
Arguments ltr_normlP {x y}.

Lemma gtr_norm x y : `|x| < y -> x < y. Proof. exact: real_gtr_norm. Qed.
Lemma ltr_normlW x y : `|x| < y -> x < y. Proof. exact: real_ltr_normlW. Qed.

Lemma gtrNnorm x y : `|x| < y -> - y < x. Proof. exact: real_gtrNnorm. Qed.
Lemma ltrNnormlW x y : `|x| < y -> - y < x. Proof. exact: real_ltrNnormlW. Qed.

Lemma ger_norm x y : `|x| <= y -> x <= y. Proof. exact: real_ger_norm. Qed.
Lemma ler_normlW x y : `|x| <= y -> x <= y. Proof. exact: real_ler_normlW. Qed.

Lemma gerNnorm x y : `|x| <= y -> - y <= x. Proof. exact: real_gerNnorm. Qed.
Lemma lerNnormlW x y : `|x| <= y -> - y <= x. Proof. exact: real_lerNnormlW. Qed.

Lemma ler_normr x y : (x <= `|y|) = (x <= y) || (x <= - y).
Proof. by rewrite leNgt ltr_norml negb_and -!leNgt orbC ler_oppr. Qed.
Proof. exact: real_ler_normr. Qed.

Lemma ltr_normr x y : (x < `|y|) = (x < y) || (x < - y).
Proof. by rewrite ltNge ler_norml negb_and -!ltNge orbC ltr_oppr. Qed.
Proof. exact: real_ltr_normr. Qed.

Definition lter_normr := (ler_normr, ltr_normr).

Lemma ler_distl x y e : (`|x - y| <= e) = (y - e <= x <= y + e).
Proof. by rewrite lter_norml !lter_sub_addl. Qed.
Proof. exact: real_ler_distl. Qed.

Lemma ltr_distl x y e : (`|x - y| < e) = (y - e < x < y + e).
Proof. by rewrite lter_norml !lter_sub_addl. Qed.
Proof. exact: real_ltr_distl. Qed.

Definition lter_distl := (ler_distl, ltr_distl).

Lemma ltr_dist_addl x y e : `|x - y| < e -> x < y + e.
Proof. exact: real_ltr_dist_addl. Qed.
Lemma ltr_distl_addr x y e : `|x - y| < e -> x < y + e.
Proof. exact: real_ltr_distl_addr. Qed.

Lemma ler_dist_addl x y e : `|x - y| <= e -> x <= y + e.
Proof. exact: real_ler_dist_addl. Qed.
Lemma ler_distl_addr x y e : `|x - y| <= e -> x <= y + e.
Proof. exact: real_ler_distl_addr. Qed.

Lemma ltr_distr_addl x y e : `|x - y| < e -> y < x + e.
Proof. exact: real_ltr_distr_addl. Qed.
Lemma ltr_distl_addrC x y e : `|x - y| < e -> y < x + e.
Proof. exact: real_ltr_distl_addrC. Qed.

Lemma ler_distr_addl x y e : `|x - y| <= e -> y <= x + e.
Proof. exact: real_ler_distr_addl. Qed.
Lemma ler_distl_addrC x y e : `|x - y| <= e -> y <= x + e.
Proof. exact: real_ler_distl_addrC. Qed.

Lemma ltr_dist_subl x y e : `|x - y| < e -> x - e < y.
Proof. exact: real_ltr_dist_subl. Qed.
Lemma ltr_distl_subl x y e : `|x - y| < e -> x - e < y.
Proof. exact: real_ltr_distl_subl. Qed.

Lemma ler_dist_subl x y e : `|x - y| <= e -> x - e <= y.
Proof. exact: real_ler_dist_subl. Qed.
Lemma ler_distl_subl x y e : `|x - y| <= e -> x - e <= y.
Proof. exact: real_ler_distl_subl. Qed.

Lemma ltr_distr_subr x y e : `|x - y| < e -> y - e < x.
Proof. exact: real_ltr_distr_subr. Qed.
Lemma ltr_distl_sublC x y e : `|x - y| < e -> y - e < x.
Proof. exact: real_ltr_distl_sublC. Qed.

Lemma ler_distr_subr x y e : `|x - y| <= e -> y - e <= x.
Proof. exact: real_ler_distr_subr. Qed.

Lemma gt_norm_eqF (x y : R) : `|x| < y -> (x == - y = false) * (x == y = false).
Proof.
move=> x1; split; last by rewrite lt_eqF // (le_lt_trans (ler_norm _) x1).
by move: x1; rewrite ltr_norml => /andP[? ?]; rewrite gt_eqF.
Qed.
Lemma ler_distl_subrC x y e : `|x - y| <= e -> y - e <= x.
Proof. exact: real_ler_distl_sublC. Qed.

Lemma exprn_even_ge0 n x : ~~ odd n -> 0 <= x ^+ n.
Proof. by move=> even_n; rewrite real_exprn_even_ge0 ?num_real. Qed.
Expand Down

0 comments on commit 0a999b9

Please sign in to comment.