Skip to content

Commit f7bdce3

Browse files
hoheinzollernproux01
authored andcommitted
simplified subset_itvl and subset_itvr
1 parent 5f8df06 commit f7bdce3

File tree

2 files changed

+10
-31
lines changed

2 files changed

+10
-31
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
- in `mathcomp_extra.v`:
6060
+ lemmas `intrN`, `real_floor_itv`, `real_ge_floor`, `real_ceil_itv`
6161

62+
- in `set_interval.v`:
63+
+ lemma `subset_itv`
64+
6265
### Changed
6366

6467
- file `nsatz_realtype.v` moved from `reals` to `reals-stdlib` package

classical/set_interval.v

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Local Open Scope ring_scope.
4040
(** definitions and lemmas to make a bridge between MathComp intervals and
4141
classical sets *)
4242
Section set_itv_porderType.
43-
Variables (d : Order.disp_t) (T : porderType d).
43+
Variables (disp : Order.disp_t) (T : porderType disp).
4444
Implicit Types (i j : interval T) (x y : T) (a : itv_bound T).
4545

4646
Definition neitv i := [set` i] != set0.
@@ -77,39 +77,15 @@ Qed.
7777

7878
Lemma subset_itvl (a b c : itv_bound T) : (b <= c)%O ->
7979
[set` Interval a b] `<=` [set` Interval a c].
80-
Proof.
81-
case: c => [[|] c bc x/=|[//|_] x/=].
82-
- rewrite !in_itv/= => /andP[->/=].
83-
case: b bc => [[|]/=|[|]//] b bc.
84-
by move=> /lt_le_trans; exact.
85-
by move=> /le_lt_trans; exact.
86-
- rewrite !in_itv/= => /andP[->/=].
87-
case: b bc => [[|]/=|[|]//] b bc.
88-
by move=> /ltW /le_trans; apply.
89-
by move=> /le_trans; apply.
90-
- by move: x; rewrite le_ninfty => /eqP ->.
91-
- by rewrite !in_itv/=; case: a => [[|]/=|[|]//] a /andP[->].
92-
Qed.
80+
Proof. by move=> /subitvPr /subsetP h; apply/subsetP => x /h. Qed.
9381

9482
Lemma subset_itvr (a b c : itv_bound T) : (c <= a)%O ->
9583
[set` Interval a b] `<=` [set` Interval c b].
96-
Proof.
97-
move=> ac x/=; rewrite !in_itv/= => /andP[ax ->]; rewrite andbT.
98-
move: c a ax ac => [[|] c [[|]/= a ax|[|]//=]|[//|]]; rewrite ?bnd_simp.
99-
- by move=> /le_trans; exact.
100-
- by move=> /le_trans; apply; exact/ltW.
101-
- by move=> /lt_le_trans; exact.
102-
- by move=> /le_lt_trans; exact.
103-
- by move=> [[|]|[|]//].
104-
Qed.
84+
Proof. by move=> /subitvPl /subsetP h; apply/subsetP => x /h. Qed.
10585

106-
Lemma subset_itvW_bound (x y z u : itv_bound T) :
107-
(x <= y)%O -> (z <= u)%O -> [set` Interval y z] `<=` [set` Interval x u].
108-
Proof.
109-
move=> xy zu.
110-
by apply: (@subset_trans _ [set` Interval x z]);
111-
[exact: subset_itvr | exact: subset_itvl].
112-
Qed.
86+
Lemma subset_itv (a b c d : itv_bound T) : (c <= a)%O -> (b <= d)%O ->
87+
[set` Interval a b] `<=` [set` Interval c d].
88+
Proof. by move=> ac bd; apply/(subset_trans (subset_itvl _))/subset_itvr. Qed.
11389

11490
Lemma subset_itvScc (a b : itv_bound T) (c e : T) :
11591
(BLeft c <= a)%O -> (b <= BRight e)%O ->
@@ -236,7 +212,7 @@ by rewrite andbT; split => //; exact/nesym/eqP.
236212
Qed.
237213

238214
End set_itv_porderType.
239-
Arguments neitv {d T} _.
215+
Arguments neitv {disp T} _.
240216
#[deprecated(since="mathcomp-analysis 1.4.0", note="renamed to subset_itvScc")]
241217
Notation subset_itvS := subset_itvScc (only parsing).
242218

0 commit comments

Comments
 (0)