Skip to content

Commit

Permalink
minor gen
Browse files Browse the repository at this point in the history
  • Loading branch information
affeldt-aist committed Jul 24, 2024
1 parent 167f766 commit d8fde79
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,19 @@

### Generalized

- in `constructive_ereal.v`:
+ lemmas `leeN2`, `lt2N2` generalized from `realDomainType` to `numDomainType`

### Deprecated

- in `reals.v`:
+ `floor_le` (use `ge_floor` instead)
+ `le_floor` (use `Num.Theory.floor_le` instead)
+ `le_ceil` (use `ceil_ge` instead)

- in `constructive_ereal.v`:
+ lemmas `lte_opp2`, `lee_opp2` (use `lteN2`, `leeN2` instead)

### Removed

- in `reals.v`:
Expand Down
36 changes: 18 additions & 18 deletions theories/constructive_ereal.v
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,20 @@ Lemma mule2n x : x *+ 2 = x + x. Proof. by []. Qed.

Lemma expe2 x : x ^+ 2 = x * x. Proof. by []. Qed.

Lemma leeN2 : {mono @oppe R : x y /~ x <= y}.
Proof.
move=> x y; case: x y => [?||] [?||] //; first by rewrite !lee_fin !lerN2.
by rewrite /Order.le/= realN.
by rewrite /Order.le/= realN.
Qed.

Lemma lteN2 : {mono @oppe R : x y /~ x < y}.
Proof.
move=> x y; case: x y => [?||] [?||] //; first by rewrite !lte_fin !ltrN2.
by rewrite /Order.lt/= realN.
by rewrite /Order.lt/= realN.
Qed.

End ERealOrderTheory.
#[global] Hint Resolve leeN10 lteN10 : core.

Expand Down Expand Up @@ -1733,8 +1747,6 @@ have := mule_eq_pinfty x (- y); rewrite muleN eqe_oppLR => ->.
by rewrite !eqe_oppLR lteNr lteNl oppe0 (orbC _ ((x == -oo) && _)).
Qed.

Lemma lteN2 x y : (- x < - y) = (y < x). Proof. by rewrite lteNl oppeK. Qed.

Lemma lteD a b x y : a < b -> x < y -> a + x < b + y.
Proof.
move: a b x y=> [a| |] [b| |] [x| |] [y| |]; rewrite ?(ltry,ltNyr)//.
Expand Down Expand Up @@ -2321,8 +2333,6 @@ move=> *; apply: (can_inj oppeK); apply: eq_infty => r.
by rewrite leeNr -EFinN.
Qed.

Lemma leeN2 x y : (- x <= - y) = (y <= x). Proof. by rewrite leeNl oppeK. Qed.

Lemma lee_abs x : x <= `|x|.
Proof. by move: x => [x| |]//=; rewrite lee_fin ler_norm. Qed.

Expand Down Expand Up @@ -2706,6 +2716,10 @@ Notation lte_le_add := lte_leD (only parsing).
Notation lee_lt_add := lee_ltD (only parsing).
#[deprecated(since="mathcomp-analysis 1.3.0", note="Use `lte_leB` instead.")]
Notation lte_le_sub := lte_leB (only parsing).
#[deprecated(since="mathcomp-analysis 1.3.0", note="Use leeN2 instead.")]
Notation lee_opp2 := leeN2 (only parsing).
#[deprecated(since="mathcomp-analysis 1.3.0", note="Use lteN2 instead.")]
Notation lte_opp2 := lteN2 (only parsing).

Module DualAddTheoryRealDomain.

Expand Down Expand Up @@ -3159,20 +3173,6 @@ Notation lte_le_dsub := lte_le_dD (only parsing).

End DualAddTheoryRealDomain.

Lemma lee_opp2 {R : numDomainType} : {mono @oppe R : x y /~ x <= y}.
Proof.
move=> x y;case: x y => [?||] [?||] //; first by rewrite !lee_fin !lerN2.
by rewrite /Order.le/= realN.
by rewrite /Order.le/= realN.
Qed.

Lemma lte_opp2 {R : numDomainType} : {mono @oppe R : x y /~ x < y}.
Proof.
move=> x y; case: x y => [?||] [?||] //; first by rewrite !lte_fin !ltrN2.
by rewrite /Order.lt/= realN.
by rewrite /Order.lt/= realN.
Qed.

Section realFieldType_lemmas.
Variable R : realFieldType.
Implicit Types x y : \bar R.
Expand Down

0 comments on commit d8fde79

Please sign in to comment.