@@ -47,10 +47,18 @@ begin
47
47
simp [*, insert_subset]
48
48
end
49
49
50
+ protected lemma Icc_subset (s : set α) [hs : ord_connected s] {x y} (hx : x ∈ s) (hy : y ∈ s) :
51
+ Icc x y ⊆ s :=
52
+ hs hx hy
53
+
50
54
lemma ord_connected.inter {s t : set α} (hs : ord_connected s) (ht : ord_connected t) :
51
55
ord_connected (s ∩ t) :=
52
56
λ x hx y hy, subset_inter (hs hx.1 hy.1 ) (ht hx.2 hy.2 )
53
57
58
+ instance ord_connected.inter' {s t : set α} [ord_connected s] [ord_connected t] :
59
+ ord_connected (s ∩ t) :=
60
+ ord_connected.inter ‹_› ‹_›
61
+
54
62
lemma ord_connected.dual {s : set α} (hs : ord_connected s) : @ord_connected (order_dual α) _ s :=
55
63
λ x hx y hy z hz, hs hy hx ⟨hz.2 , hz.1 ⟩
56
64
@@ -65,38 +73,54 @@ lemma ord_connected_Inter {ι : Sort*} {s : ι → set α} (hs : ∀ i, ord_conn
65
73
ord_connected (⋂ i, s i) :=
66
74
ord_connected_sInter $ forall_range_iff.2 hs
67
75
76
+ instance ord_connected_Inter' {ι : Sort *} {s : ι → set α} [∀ i, ord_connected (s i)] :
77
+ ord_connected (⋂ i, s i) :=
78
+ ord_connected_Inter ‹_›
79
+
68
80
lemma ord_connected_bInter {ι : Sort *} {p : ι → Prop } {s : Π (i : ι) (hi : p i), set α}
69
81
(hs : ∀ i hi, ord_connected (s i hi)) :
70
82
ord_connected (⋂ i hi, s i hi) :=
71
83
ord_connected_Inter $ λ i, ord_connected_Inter $ hs i
72
84
73
- lemma ord_connected_Ici {a : α} : ord_connected (Ici a) := λ x hx y hy z hz, le_trans hx hz.1
74
- lemma ord_connected_Iic {a : α} : ord_connected (Iic a) := λ x hx y hy z hz, le_trans hz.2 hy
75
- lemma ord_connected_Ioi {a : α} : ord_connected (Ioi a) := λ x hx y hy z hz, lt_of_lt_of_le hx hz.1
76
- lemma ord_connected_Iio {a : α} : ord_connected (Iio a) := λ x hx y hy z hz, lt_of_le_of_lt hz.2 hy
85
+ lemma ord_connected_pi {ι : Type *} {α : ι → Type *} [Π i, preorder (α i)] {s : set ι}
86
+ {t : Π i, set (α i)} (h : ∀ i ∈ s, ord_connected (t i)) : ord_connected (s.pi t) :=
87
+ λ x hx y hy z hz i hi, h i hi (hx i hi) (hy i hi) ⟨hz.1 i, hz.2 i⟩
88
+
89
+ instance ord_connected_pi' {ι : Type *} {α : ι → Type *} [Π i, preorder (α i)] {s : set ι}
90
+ {t : Π i, set (α i)} [h : ∀ i, ord_connected (t i)] : ord_connected (s.pi t) :=
91
+ ord_connected_pi $ λ i hi, h i
77
92
78
- lemma ord_connected_Icc {a b : α} : ord_connected (Icc a b) :=
93
+ @[instance] lemma ord_connected_Ici {a : α} : ord_connected (Ici a) :=
94
+ λ x hx y hy z hz, le_trans hx hz.1
95
+
96
+ @[instance] lemma ord_connected_Iic {a : α} : ord_connected (Iic a) :=
97
+ λ x hx y hy z hz, le_trans hz.2 hy
98
+
99
+ @[instance] lemma ord_connected_Ioi {a : α} : ord_connected (Ioi a) :=
100
+ λ x hx y hy z hz, lt_of_lt_of_le hx hz.1
101
+
102
+ @[instance] lemma ord_connected_Iio {a : α} : ord_connected (Iio a) :=
103
+ λ x hx y hy z hz, lt_of_le_of_lt hz.2 hy
104
+
105
+ @[instance] lemma ord_connected_Icc {a b : α} : ord_connected (Icc a b) :=
79
106
ord_connected_Ici.inter ord_connected_Iic
80
107
81
- lemma ord_connected_Ico {a b : α} : ord_connected (Ico a b) :=
108
+ @[instance] lemma ord_connected_Ico {a b : α} : ord_connected (Ico a b) :=
82
109
ord_connected_Ici.inter ord_connected_Iio
83
110
84
- lemma ord_connected_Ioc {a b : α} : ord_connected (Ioc a b) :=
111
+ @[instance] lemma ord_connected_Ioc {a b : α} : ord_connected (Ioc a b) :=
85
112
ord_connected_Ioi.inter ord_connected_Iic
86
113
87
- lemma ord_connected_Ioo {a b : α} : ord_connected (Ioo a b) :=
114
+ @[instance] lemma ord_connected_Ioo {a b : α} : ord_connected (Ioo a b) :=
88
115
ord_connected_Ioi.inter ord_connected_Iio
89
116
90
- attribute [instance] ord_connected_Ici ord_connected_Iic ord_connected_Ioi ord_connected_Iio
91
- ord_connected_Icc ord_connected_Ico ord_connected_Ioc ord_connected_Ioo
92
-
93
- lemma ord_connected_singleton {α : Type *} [partial_order α] {a : α} :
117
+ @[instance] lemma ord_connected_singleton {α : Type *} [partial_order α] {a : α} :
94
118
ord_connected ({a} : set α) :=
95
119
by { rw ← Icc_self, exact ord_connected_Icc }
96
120
97
- lemma ord_connected_empty : ord_connected (∅ : set α) := λ x, false.elim
121
+ @[instance] lemma ord_connected_empty : ord_connected (∅ : set α) := λ x, false.elim
98
122
99
- lemma ord_connected_univ : ord_connected (univ : set α) := λ _ _ _ _, subset_univ _
123
+ @[instance] lemma ord_connected_univ : ord_connected (univ : set α) := λ _ _ _ _, subset_univ _
100
124
101
125
/-- In a dense order `α`, the subtype from an `ord_connected` set is also densely ordered. -/
102
126
instance [densely_ordered α] {s : set α} [hs : ord_connected s] :
@@ -111,7 +135,7 @@ instance [densely_ordered α] {s : set α} [hs : ord_connected s] :
111
135
112
136
variables {β : Type *} [linear_order β]
113
137
114
- lemma ord_connected_interval {a b : β} : ord_connected (interval a b) :=
138
+ @[instance] lemma ord_connected_interval {a b : β} : ord_connected (interval a b) :=
115
139
ord_connected_Icc
116
140
117
141
lemma ord_connected.interval_subset {s : set β} (hs : ord_connected s)
0 commit comments