data.set.intervals.ord_connected
⟷
Mathlib.Data.Set.Intervals.OrdConnected
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
Fix naming errors and non-defeq diamonds recently introduced. Those were discovered during the port.
@@ -177,7 +177,7 @@ end preorder
section partial_order
variables {α : Type*} [partial_order α] {s : set α}
-protected lemma is_antichain.ord_connected (hs : is_antichain (≤) s) : s.ord_connected :=
+protected lemma _root_.is_antichain.ord_connected (hs : is_antichain (≤) s) : s.ord_connected :=
⟨λ x hx y hy z hz, by { obtain rfl := hs.eq hx hy (hz.1.trans hz.2),
rw [Icc_self, mem_singleton_iff] at hz, rwa hz }⟩
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
@@ -5,6 +5,7 @@ Authors: Yury G. Kudryashov
-/
import data.set.intervals.unordered_interval
import data.set.lattice
+import order.antichain
/-!
# Order-connected sets
@@ -173,6 +174,15 @@ dual_ord_connected_iff.2 ‹_›
end preorder
+section partial_order
+variables {α : Type*} [partial_order α] {s : set α}
+
+protected lemma is_antichain.ord_connected (hs : is_antichain (≤) s) : s.ord_connected :=
+⟨λ x hx y hy z hz, by { obtain rfl := hs.eq hx hy (hz.1.trans hz.2),
+ rw [Icc_self, mem_singleton_iff] at hz, rwa hz }⟩
+
+end partial_order
+
section linear_order
variables {α : Type*} [linear_order α] {s : set α} {x : α}
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
uIcc
/uIoc
(#18104)
Rename
set.interval
→ set.uIcc
set.interval_oc
→ set.uIoc
finset.interval
→ finset.uIcc
Closes #17982
Zulip: https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Set.20intervals.20names
@@ -176,35 +176,35 @@ end preorder
section linear_order
variables {α : Type*} [linear_order α] {s : set α} {x : α}
-@[instance] lemma ord_connected_interval {a b : α} : ord_connected [a, b] := ord_connected_Icc
-@[instance] lemma ord_connected_interval_oc {a b : α} : ord_connected (Ι a b) := ord_connected_Ioc
+@[instance] lemma ord_connected_uIcc {a b : α} : ord_connected [a, b] := ord_connected_Icc
+@[instance] lemma ord_connected_uIoc {a b : α} : ord_connected (Ι a b) := ord_connected_Ioc
-lemma ord_connected.interval_subset (hs : ord_connected s) ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) :
+lemma ord_connected.uIcc_subset (hs : ord_connected s) ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) :
[x, y] ⊆ s :=
hs.out (min_rec' (∈ s) hx hy) (max_rec' (∈ s) hx hy)
-lemma ord_connected.interval_oc_subset (hs : ord_connected s) ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) :
+lemma ord_connected.uIoc_subset (hs : ord_connected s) ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) :
Ι x y ⊆ s :=
-Ioc_subset_Icc_self.trans $ hs.interval_subset hx hy
+Ioc_subset_Icc_self.trans $ hs.uIcc_subset hx hy
-lemma ord_connected_iff_interval_subset :
+lemma ord_connected_iff_uIcc_subset :
ord_connected s ↔ ∀ ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s), [x, y] ⊆ s :=
-⟨λ h, h.interval_subset, λ H, ⟨λ x hx y hy, Icc_subset_interval.trans $ H hx hy⟩⟩
+⟨λ h, h.uIcc_subset, λ H, ⟨λ x hx y hy, Icc_subset_uIcc.trans $ H hx hy⟩⟩
-lemma ord_connected_of_interval_subset_left (h : ∀ y ∈ s, [x, y] ⊆ s) :
+lemma ord_connected_of_uIcc_subset_left (h : ∀ y ∈ s, [x, y] ⊆ s) :
ord_connected s :=
-ord_connected_iff_interval_subset.2 $ λ y hy z hz,
-calc [y, z] ⊆ [y, x] ∪ [x, z] : interval_subset_interval_union_interval
-... = [x, y] ∪ [x, z] : by rw [interval_swap]
+ord_connected_iff_uIcc_subset.2 $ λ y hy z hz,
+calc [y, z] ⊆ [y, x] ∪ [x, z] : uIcc_subset_uIcc_union_uIcc
+... = [x, y] ∪ [x, z] : by rw [uIcc_comm]
... ⊆ s : union_subset (h y hy) (h z hz)
-lemma ord_connected_iff_interval_subset_left (hx : x ∈ s) :
+lemma ord_connected_iff_uIcc_subset_left (hx : x ∈ s) :
ord_connected s ↔ ∀ ⦃y⦄, y ∈ s → [x, y] ⊆ s :=
-⟨λ hs, hs.interval_subset hx, ord_connected_of_interval_subset_left⟩
+⟨λ hs, hs.uIcc_subset hx, ord_connected_of_uIcc_subset_left⟩
-lemma ord_connected_iff_interval_subset_right (hx : x ∈ s) :
+lemma ord_connected_iff_uIcc_subset_right (hx : x ∈ s) :
ord_connected s ↔ ∀ ⦃y⦄, y ∈ s → [y, x] ⊆ s :=
-by simp_rw [ord_connected_iff_interval_subset_left hx, interval_swap]
+by simp_rw [ord_connected_iff_uIcc_subset_left hx, uIcc_comm]
end linear_order
end set
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-/
-import Data.Set.Intervals.UnorderedInterval
+import Order.Interval.Set.UnorderedInterval
import Data.Set.Lattice
import Order.Antichain
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -136,7 +136,7 @@ theorem ordConnected_sInter {S : Set (Set α)} (hS : ∀ s ∈ S, OrdConnected s
#print Set.ordConnected_iInter /-
theorem ordConnected_iInter {ι : Sort _} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
OrdConnected (⋂ i, s i) :=
- ordConnected_sInter <| forall_range_iff.2 hs
+ ordConnected_sInter <| forall_mem_range.2 hs
#align set.ord_connected_Inter Set.ordConnected_iInter
-/
@@ -301,7 +301,7 @@ variable {α : Type _} [PartialOrder α] {s : Set α}
protected theorem IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
⟨fun x hx y hy z hz => by
obtain rfl := hs.eq hx hy (hz.1.trans hz.2)
- rw [Icc_self, mem_singleton_iff] at hz ; rwa [hz]⟩
+ rw [Icc_self, mem_singleton_iff] at hz; rwa [hz]⟩
#align is_antichain.ord_connected IsAntichain.ordConnected
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-/
-import Mathbin.Data.Set.Intervals.UnorderedInterval
-import Mathbin.Data.Set.Lattice
-import Mathbin.Order.Antichain
+import Data.Set.Intervals.UnorderedInterval
+import Data.Set.Lattice
+import Order.Antichain
#align_import data.set.intervals.ord_connected from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-
-! This file was ported from Lean 3 source module data.set.intervals.ord_connected
-! leanprover-community/mathlib commit 76de8ae01554c3b37d66544866659ff174e66e1f
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Set.Intervals.UnorderedInterval
import Mathbin.Data.Set.Lattice
import Mathbin.Order.Antichain
+#align_import data.set.intervals.ord_connected from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f"
+
/-!
# Order-connected sets
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -81,15 +81,19 @@ theorem ordConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
#align set.ord_connected_of_Ioo Set.ordConnected_of_Ioo
-/
+#print Set.OrdConnected.preimage_mono /-
theorem OrdConnected.preimage_mono {f : β → α} (hs : OrdConnected s) (hf : Monotone f) :
OrdConnected (f ⁻¹' s) :=
⟨fun x hx y hy z hz => hs.out hx hy ⟨hf hz.1, hf hz.2⟩⟩
#align set.ord_connected.preimage_mono Set.OrdConnected.preimage_mono
+-/
+#print Set.OrdConnected.preimage_anti /-
theorem OrdConnected.preimage_anti {f : β → α} (hs : OrdConnected s) (hf : Antitone f) :
OrdConnected (f ⁻¹' s) :=
⟨fun x hx y hy z hz => hs.out hy hx ⟨hf hz.2, hf hz.1⟩⟩
#align set.ord_connected.preimage_anti Set.OrdConnected.preimage_anti
+-/
#print Set.Icc_subset /-
protected theorem Icc_subset (s : Set α) [hs : OrdConnected s] {x y} (hx : x ∈ s) (hy : y ∈ s) :
@@ -98,15 +102,19 @@ protected theorem Icc_subset (s : Set α) [hs : OrdConnected s] {x y} (hx : x
#align set.Icc_subset Set.Icc_subset
-/
+#print Set.OrdConnected.inter /-
theorem OrdConnected.inter {s t : Set α} (hs : OrdConnected s) (ht : OrdConnected t) :
OrdConnected (s ∩ t) :=
⟨fun x hx y hy => subset_inter (hs.out hx.1 hy.1) (ht.out hx.2 hy.2)⟩
#align set.ord_connected.inter Set.OrdConnected.inter
+-/
+#print Set.OrdConnected.inter' /-
instance OrdConnected.inter' {s t : Set α} [OrdConnected s] [OrdConnected t] :
OrdConnected (s ∩ t) :=
OrdConnected.inter ‹_› ‹_›
#align set.ord_connected.inter' Set.OrdConnected.inter'
+-/
#print Set.OrdConnected.dual /-
theorem OrdConnected.dual {s : Set α} (hs : OrdConnected s) :
@@ -150,10 +158,12 @@ theorem ordConnected_biInter {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (
#align set.ord_connected_bInter Set.ordConnected_biInter
-/
+#print Set.ordConnected_pi /-
theorem ordConnected_pi {ι : Type _} {α : ι → Type _} [∀ i, Preorder (α i)] {s : Set ι}
{t : ∀ i, Set (α i)} (h : ∀ i ∈ s, OrdConnected (t i)) : OrdConnected (s.pi t) :=
⟨fun x hx y hy z hz i hi => (h i hi).out (hx i hi) (hy i hi) ⟨hz.1 i, hz.2 i⟩⟩
#align set.ord_connected_pi Set.ordConnected_pi
+-/
#print Set.ordConnected_pi' /-
instance ordConnected_pi' {ι : Type _} {α : ι → Type _} [∀ i, Preorder (α i)] {s : Set ι}
@@ -245,22 +255,28 @@ instance [DenselyOrdered α] {s : Set α} [hs : OrdConnected s] : DenselyOrdered
let ⟨x, H⟩ := exists_between h
⟨⟨x, (hs.out a.2 b.2) (Ioo_subset_Icc_self H)⟩, H⟩⟩
+#print Set.ordConnected_preimage /-
@[instance]
theorem ordConnected_preimage {F : Type _} [OrderHomClass F α β] (f : F) {s : Set β}
[hs : OrdConnected s] : OrdConnected (f ⁻¹' s) :=
⟨fun x hx y hy z hz => hs.out hx hy ⟨OrderHomClass.mono _ hz.1, OrderHomClass.mono _ hz.2⟩⟩
#align set.ord_connected_preimage Set.ordConnected_preimage
+-/
+#print Set.ordConnected_image /-
@[instance]
theorem ordConnected_image {E : Type _} [OrderIsoClass E α β] (e : E) {s : Set α}
[hs : OrdConnected s] : OrdConnected (e '' s) := by erw [(e : α ≃o β).image_eq_preimage];
apply ord_connected_preimage
#align set.ord_connected_image Set.ordConnected_image
+-/
+#print Set.ordConnected_range /-
@[instance]
theorem ordConnected_range {E : Type _} [OrderIsoClass E α β] (e : E) : OrdConnected (range e) := by
simp_rw [← image_univ, ord_connected_image e]
#align set.ord_connected_range Set.ordConnected_range
+-/
#print Set.dual_ordConnected_iff /-
@[simp]
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -340,7 +340,6 @@ theorem ordConnected_of_uIcc_subset_left (h : ∀ y ∈ s, [x, y] ⊆ s) : OrdCo
[y, z] ⊆ [y, x] ∪ [x, z] := uIcc_subset_uIcc_union_uIcc
_ = [x, y] ∪ [x, z] := by rw [uIcc_comm]
_ ⊆ s := union_subset (h y hy) (h z hz)
-
#align set.ord_connected_of_uIcc_subset_left Set.ordConnected_of_uIcc_subset_left
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -288,7 +288,7 @@ variable {α : Type _} [PartialOrder α] {s : Set α}
protected theorem IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
⟨fun x hx y hy z hz => by
obtain rfl := hs.eq hx hy (hz.1.trans hz.2)
- rw [Icc_self, mem_singleton_iff] at hz; rwa [hz]⟩
+ rw [Icc_self, mem_singleton_iff] at hz ; rwa [hz]⟩
#align is_antichain.ord_connected IsAntichain.ordConnected
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -28,7 +28,7 @@ that all standard intervals are `ord_connected`.
-/
-open Interval
+open scoped Interval
open OrderDual (toDual ofDual)
@@ -61,12 +61,15 @@ theorem ordConnected_def : OrdConnected s ↔ ∀ ⦃x⦄ (hx : x ∈ s) ⦃y⦄
#align set.ord_connected_def Set.ordConnected_def
-/
+#print Set.ordConnected_iff /-
/-- It suffices to prove `[x, y] ⊆ s` for `x y ∈ s`, `x ≤ y`. -/
theorem ordConnected_iff : OrdConnected s ↔ ∀ x ∈ s, ∀ y ∈ s, x ≤ y → Icc x y ⊆ s :=
ordConnected_def.trans
⟨fun hs x hx y hy hxy => hs hx hy, fun H x hx y hy z hz => H x hx y hy (le_trans hz.1 hz.2) hz⟩
#align set.ord_connected_iff Set.ordConnected_iff
+-/
+#print Set.ordConnected_of_Ioo /-
theorem ordConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
(hs : ∀ x ∈ s, ∀ y ∈ s, x < y → Ioo x y ⊆ s) : OrdConnected s :=
by
@@ -76,6 +79,7 @@ theorem ordConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
rw [← Ioc_insert_left hxy, ← Ioo_insert_right hxy']
exact insert_subset.2 ⟨hx, insert_subset.2 ⟨hy, hs x hx y hy hxy'⟩⟩
#align set.ord_connected_of_Ioo Set.ordConnected_of_Ioo
+-/
theorem OrdConnected.preimage_mono {f : β → α} (hs : OrdConnected s) (hf : Monotone f) :
OrdConnected (f ⁻¹' s) :=
@@ -280,11 +284,13 @@ section PartialOrder
variable {α : Type _} [PartialOrder α] {s : Set α}
+#print IsAntichain.ordConnected /-
protected theorem IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
⟨fun x hx y hy z hz => by
obtain rfl := hs.eq hx hy (hz.1.trans hz.2)
rw [Icc_self, mem_singleton_iff] at hz; rwa [hz]⟩
#align is_antichain.ord_connected IsAntichain.ordConnected
+-/
end PartialOrder
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -61,24 +61,12 @@ theorem ordConnected_def : OrdConnected s ↔ ∀ ⦃x⦄ (hx : x ∈ s) ⦃y⦄
#align set.ord_connected_def Set.ordConnected_def
-/
-/- warning: set.ord_connected_iff -> Set.ordConnected_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {s : Set.{u1} α}, Iff (Set.OrdConnected.{u1} α _inst_1 s) (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) x y) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Set.Icc.{u1} α _inst_1 x y) s)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {s : Set.{u1} α}, Iff (Set.OrdConnected.{u1} α _inst_1 s) (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) x y) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (Set.Icc.{u1} α _inst_1 x y) s)))
-Case conversion may be inaccurate. Consider using '#align set.ord_connected_iff Set.ordConnected_iffₓ'. -/
/-- It suffices to prove `[x, y] ⊆ s` for `x y ∈ s`, `x ≤ y`. -/
theorem ordConnected_iff : OrdConnected s ↔ ∀ x ∈ s, ∀ y ∈ s, x ≤ y → Icc x y ⊆ s :=
ordConnected_def.trans
⟨fun hs x hx y hy hxy => hs hx hy, fun H x hx y hy z hz => H x hx y hy (le_trans hz.1 hz.2) hz⟩
#align set.ord_connected_iff Set.ordConnected_iff
-/- warning: set.ord_connected_of_Ioo -> Set.ordConnected_of_Ioo is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_3 : PartialOrder.{u1} α] {s : Set.{u1} α}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3)) x y) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Set.Ioo.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3) x y) s))) -> (Set.OrdConnected.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3) s)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_3 : PartialOrder.{u1} α] {s : Set.{u1} α}, (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3)) x y) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (Set.Ioo.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3) x y) s))) -> (Set.OrdConnected.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3) s)
-Case conversion may be inaccurate. Consider using '#align set.ord_connected_of_Ioo Set.ordConnected_of_Iooₓ'. -/
theorem ordConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
(hs : ∀ x ∈ s, ∀ y ∈ s, x < y → Ioo x y ⊆ s) : OrdConnected s :=
by
@@ -89,23 +77,11 @@ theorem ordConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
exact insert_subset.2 ⟨hx, insert_subset.2 ⟨hy, hs x hx y hy hxy'⟩⟩
#align set.ord_connected_of_Ioo Set.ordConnected_of_Ioo
-/- warning: set.ord_connected.preimage_mono -> Set.OrdConnected.preimage_mono is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {s : Set.{u1} α} {f : β -> α}, (Set.OrdConnected.{u1} α _inst_1 s) -> (Monotone.{u2, u1} β α _inst_2 _inst_1 f) -> (Set.OrdConnected.{u2} β _inst_2 (Set.preimage.{u2, u1} β α f s))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {s : Set.{u2} α} {f : β -> α}, (Set.OrdConnected.{u2} α _inst_1 s) -> (Monotone.{u1, u2} β α _inst_2 _inst_1 f) -> (Set.OrdConnected.{u1} β _inst_2 (Set.preimage.{u1, u2} β α f s))
-Case conversion may be inaccurate. Consider using '#align set.ord_connected.preimage_mono Set.OrdConnected.preimage_monoₓ'. -/
theorem OrdConnected.preimage_mono {f : β → α} (hs : OrdConnected s) (hf : Monotone f) :
OrdConnected (f ⁻¹' s) :=
⟨fun x hx y hy z hz => hs.out hx hy ⟨hf hz.1, hf hz.2⟩⟩
#align set.ord_connected.preimage_mono Set.OrdConnected.preimage_mono
-/- warning: set.ord_connected.preimage_anti -> Set.OrdConnected.preimage_anti is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {s : Set.{u1} α} {f : β -> α}, (Set.OrdConnected.{u1} α _inst_1 s) -> (Antitone.{u2, u1} β α _inst_2 _inst_1 f) -> (Set.OrdConnected.{u2} β _inst_2 (Set.preimage.{u2, u1} β α f s))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {s : Set.{u2} α} {f : β -> α}, (Set.OrdConnected.{u2} α _inst_1 s) -> (Antitone.{u1, u2} β α _inst_2 _inst_1 f) -> (Set.OrdConnected.{u1} β _inst_2 (Set.preimage.{u1, u2} β α f s))
-Case conversion may be inaccurate. Consider using '#align set.ord_connected.preimage_anti Set.OrdConnected.preimage_antiₓ'. -/
theorem OrdConnected.preimage_anti {f : β → α} (hs : OrdConnected s) (hf : Antitone f) :
OrdConnected (f ⁻¹' s) :=
⟨fun x hx y hy z hz => hs.out hy hx ⟨hf hz.2, hf hz.1⟩⟩
@@ -118,23 +94,11 @@ protected theorem Icc_subset (s : Set α) [hs : OrdConnected s] {x y} (hx : x
#align set.Icc_subset Set.Icc_subset
-/
-/- warning: set.ord_connected.inter -> Set.OrdConnected.inter is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (Set.OrdConnected.{u1} α _inst_1 s) -> (Set.OrdConnected.{u1} α _inst_1 t) -> (Set.OrdConnected.{u1} α _inst_1 (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (Set.OrdConnected.{u1} α _inst_1 s) -> (Set.OrdConnected.{u1} α _inst_1 t) -> (Set.OrdConnected.{u1} α _inst_1 (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t))
-Case conversion may be inaccurate. Consider using '#align set.ord_connected.inter Set.OrdConnected.interₓ'. -/
theorem OrdConnected.inter {s t : Set α} (hs : OrdConnected s) (ht : OrdConnected t) :
OrdConnected (s ∩ t) :=
⟨fun x hx y hy => subset_inter (hs.out hx.1 hy.1) (ht.out hx.2 hy.2)⟩
#align set.ord_connected.inter Set.OrdConnected.inter
-/- warning: set.ord_connected.inter' -> Set.OrdConnected.inter' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α} [_inst_3 : Set.OrdConnected.{u1} α _inst_1 s] [_inst_4 : Set.OrdConnected.{u1} α _inst_1 t], Set.OrdConnected.{u1} α _inst_1 (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α} [_inst_3 : Set.OrdConnected.{u1} α _inst_1 s] [_inst_4 : Set.OrdConnected.{u1} α _inst_1 t], Set.OrdConnected.{u1} α _inst_1 (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t)
-Case conversion may be inaccurate. Consider using '#align set.ord_connected.inter' Set.OrdConnected.inter'ₓ'. -/
instance OrdConnected.inter' {s t : Set α} [OrdConnected s] [OrdConnected t] :
OrdConnected (s ∩ t) :=
OrdConnected.inter ‹_› ‹_›
@@ -182,12 +146,6 @@ theorem ordConnected_biInter {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (
#align set.ord_connected_bInter Set.ordConnected_biInter
-/
-/- warning: set.ord_connected_pi -> Set.ordConnected_pi is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_3 : forall (i : ι), Preorder.{u2} (α i)] {s : Set.{u1} ι} {t : forall (i : ι), Set.{u2} (α i)}, (forall (i : ι), (Membership.Mem.{u1, u1} ι (Set.{u1} ι) (Set.hasMem.{u1} ι) i s) -> (Set.OrdConnected.{u2} (α i) (_inst_3 i) (t i))) -> (Set.OrdConnected.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_3 i)) (Set.pi.{u1, u2} ι (fun (i : ι) => α i) s t))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_3 : forall (i : ι), Preorder.{u1} (α i)] {s : Set.{u2} ι} {t : forall (i : ι), Set.{u1} (α i)}, (forall (i : ι), (Membership.mem.{u2, u2} ι (Set.{u2} ι) (Set.instMembershipSet.{u2} ι) i s) -> (Set.OrdConnected.{u1} (α i) (_inst_3 i) (t i))) -> (Set.OrdConnected.{max u2 u1} (forall (i : ι), α i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_3 i)) (Set.pi.{u2, u1} ι (fun (i : ι) => α i) s t))
-Case conversion may be inaccurate. Consider using '#align set.ord_connected_pi Set.ordConnected_piₓ'. -/
theorem ordConnected_pi {ι : Type _} {α : ι → Type _} [∀ i, Preorder (α i)] {s : Set ι}
{t : ∀ i, Set (α i)} (h : ∀ i ∈ s, OrdConnected (t i)) : OrdConnected (s.pi t) :=
⟨fun x hx y hy z hz i hi => (h i hi).out (hx i hi) (hy i hi) ⟨hz.1 i, hz.2 i⟩⟩
@@ -283,36 +241,18 @@ instance [DenselyOrdered α] {s : Set α} [hs : OrdConnected s] : DenselyOrdered
let ⟨x, H⟩ := exists_between h
⟨⟨x, (hs.out a.2 b.2) (Ioo_subset_Icc_self H)⟩, H⟩⟩
-/- warning: set.ord_connected_preimage -> Set.ordConnected_preimage is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {F : Type.{u3}} [_inst_3 : OrderHomClass.{u3, u1, u2} F α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)] (f : F) {s : Set.{u2} β} [hs : Set.OrdConnected.{u2} β _inst_2 s], Set.OrdConnected.{u1} α _inst_1 (Set.preimage.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} F α β (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2)) _inst_3)) f) s)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {F : Type.{u3}} [_inst_3 : OrderHomClass.{u3, u2, u1} F α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (f : F) {s : Set.{u1} β} [hs : Set.OrdConnected.{u1} β _inst_2 s], Set.OrdConnected.{u2} α _inst_1 (Set.preimage.{u2, u1} α β (FunLike.coe.{succ u3, succ u2, succ u1} F α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} F α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1902 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1904 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1902 x._@.Mathlib.Order.Hom.Basic._hyg.1904) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1926 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1926) _inst_3) f) s)
-Case conversion may be inaccurate. Consider using '#align set.ord_connected_preimage Set.ordConnected_preimageₓ'. -/
@[instance]
theorem ordConnected_preimage {F : Type _} [OrderHomClass F α β] (f : F) {s : Set β}
[hs : OrdConnected s] : OrdConnected (f ⁻¹' s) :=
⟨fun x hx y hy z hz => hs.out hx hy ⟨OrderHomClass.mono _ hz.1, OrderHomClass.mono _ hz.2⟩⟩
#align set.ord_connected_preimage Set.ordConnected_preimage
-/- warning: set.ord_connected_image -> Set.ordConnected_image is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)] (e : E) {s : Set.{u1} α} [hs : Set.OrdConnected.{u1} α _inst_1 s], Set.OrdConnected.{u2} β _inst_2 (Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} E α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} E α β (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2)) (OrderIsoClass.toOrderHomClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2) _inst_3))) e) s)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (e : E) {s : Set.{u2} α} [hs : Set.OrdConnected.{u2} α _inst_1 s], Set.OrdConnected.{u1} β _inst_2 (Set.image.{u2, u1} α β (FunLike.coe.{succ u3, succ u2, succ u1} E α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} E α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1902 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1904 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1902 x._@.Mathlib.Order.Hom.Basic._hyg.1904) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1926 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1926) (OrderIsoClass.toOrderHomClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2) _inst_3)) e) s)
-Case conversion may be inaccurate. Consider using '#align set.ord_connected_image Set.ordConnected_imageₓ'. -/
@[instance]
theorem ordConnected_image {E : Type _} [OrderIsoClass E α β] (e : E) {s : Set α}
[hs : OrdConnected s] : OrdConnected (e '' s) := by erw [(e : α ≃o β).image_eq_preimage];
apply ord_connected_preimage
#align set.ord_connected_image Set.ordConnected_image
-/- warning: set.ord_connected_range -> Set.ordConnected_range is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)] (e : E), Set.OrdConnected.{u2} β _inst_2 (Set.range.{u2, succ u1} β α (coeFn.{succ u3, max (succ u1) (succ u2)} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} E α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} E α β (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2)) (OrderIsoClass.toOrderHomClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2) _inst_3))) e))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (e : E), Set.OrdConnected.{u1} β _inst_2 (Set.range.{u1, succ u2} β α (FunLike.coe.{succ u3, succ u2, succ u1} E α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} E α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1902 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1904 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1902 x._@.Mathlib.Order.Hom.Basic._hyg.1904) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1926 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1926) (OrderIsoClass.toOrderHomClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2) _inst_3)) e))
-Case conversion may be inaccurate. Consider using '#align set.ord_connected_range Set.ordConnected_rangeₓ'. -/
@[instance]
theorem ordConnected_range {E : Type _} [OrderIsoClass E α β] (e : E) : OrdConnected (range e) := by
simp_rw [← image_univ, ord_connected_image e]
@@ -340,12 +280,6 @@ section PartialOrder
variable {α : Type _} [PartialOrder α] {s : Set α}
-/- warning: is_antichain.ord_connected -> IsAntichain.ordConnected is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {s : Set.{u1} α}, (IsAntichain.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1))) s) -> (Set.OrdConnected.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1) s)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {s : Set.{u1} α}, (IsAntichain.{u1} α (fun (x._@.Mathlib.Data.Set.Intervals.OrdConnected._hyg.1947 : α) (x._@.Mathlib.Data.Set.Intervals.OrdConnected._hyg.1949 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Data.Set.Intervals.OrdConnected._hyg.1947 x._@.Mathlib.Data.Set.Intervals.OrdConnected._hyg.1949) s) -> (Set.OrdConnected.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1) s)
-Case conversion may be inaccurate. Consider using '#align is_antichain.ord_connected IsAntichain.ordConnectedₓ'. -/
protected theorem IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
⟨fun x hx y hy z hz => by
obtain rfl := hs.eq hx hy (hz.1.trans hz.2)
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -259,9 +259,7 @@ theorem ordConnected_Ioo {a b : α} : OrdConnected (Ioo a b) :=
#print Set.ordConnected_singleton /-
@[instance]
theorem ordConnected_singleton {α : Type _} [PartialOrder α] {a : α} : OrdConnected ({a} : Set α) :=
- by
- rw [← Icc_self]
- exact ord_connected_Icc
+ by rw [← Icc_self]; exact ord_connected_Icc
#align set.ord_connected_singleton Set.ordConnected_singleton
-/
@@ -305,9 +303,7 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align set.ord_connected_image Set.ordConnected_imageₓ'. -/
@[instance]
theorem ordConnected_image {E : Type _} [OrderIsoClass E α β] (e : E) {s : Set α}
- [hs : OrdConnected s] : OrdConnected (e '' s) :=
- by
- erw [(e : α ≃o β).image_eq_preimage]
+ [hs : OrdConnected s] : OrdConnected (e '' s) := by erw [(e : α ≃o β).image_eq_preimage];
apply ord_connected_preimage
#align set.ord_connected_image Set.ordConnected_image
@@ -353,8 +349,7 @@ Case conversion may be inaccurate. Consider using '#align is_antichain.ord_conne
protected theorem IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
⟨fun x hx y hy z hz => by
obtain rfl := hs.eq hx hy (hz.1.trans hz.2)
- rw [Icc_self, mem_singleton_iff] at hz
- rwa [hz]⟩
+ rw [Icc_self, mem_singleton_iff] at hz; rwa [hz]⟩
#align is_antichain.ord_connected IsAntichain.ordConnected
end PartialOrder
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -289,7 +289,7 @@ instance [DenselyOrdered α] {s : Set α} [hs : OrdConnected s] : DenselyOrdered
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {F : Type.{u3}} [_inst_3 : OrderHomClass.{u3, u1, u2} F α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)] (f : F) {s : Set.{u2} β} [hs : Set.OrdConnected.{u2} β _inst_2 s], Set.OrdConnected.{u1} α _inst_1 (Set.preimage.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} F α β (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2)) _inst_3)) f) s)
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {F : Type.{u3}} [_inst_3 : OrderHomClass.{u3, u2, u1} F α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (f : F) {s : Set.{u1} β} [hs : Set.OrdConnected.{u1} β _inst_2 s], Set.OrdConnected.{u2} α _inst_1 (Set.preimage.{u2, u1} α β (FunLike.coe.{succ u3, succ u2, succ u1} F α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} F α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1896 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1898 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1896 x._@.Mathlib.Order.Hom.Basic._hyg.1898) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1920 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1920) _inst_3) f) s)
+ forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {F : Type.{u3}} [_inst_3 : OrderHomClass.{u3, u2, u1} F α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (f : F) {s : Set.{u1} β} [hs : Set.OrdConnected.{u1} β _inst_2 s], Set.OrdConnected.{u2} α _inst_1 (Set.preimage.{u2, u1} α β (FunLike.coe.{succ u3, succ u2, succ u1} F α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} F α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1902 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1904 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1902 x._@.Mathlib.Order.Hom.Basic._hyg.1904) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1926 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1926) _inst_3) f) s)
Case conversion may be inaccurate. Consider using '#align set.ord_connected_preimage Set.ordConnected_preimageₓ'. -/
@[instance]
theorem ordConnected_preimage {F : Type _} [OrderHomClass F α β] (f : F) {s : Set β}
@@ -301,7 +301,7 @@ theorem ordConnected_preimage {F : Type _} [OrderHomClass F α β] (f : F) {s :
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)] (e : E) {s : Set.{u1} α} [hs : Set.OrdConnected.{u1} α _inst_1 s], Set.OrdConnected.{u2} β _inst_2 (Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} E α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} E α β (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2)) (OrderIsoClass.toOrderHomClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2) _inst_3))) e) s)
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (e : E) {s : Set.{u2} α} [hs : Set.OrdConnected.{u2} α _inst_1 s], Set.OrdConnected.{u1} β _inst_2 (Set.image.{u2, u1} α β (FunLike.coe.{succ u3, succ u2, succ u1} E α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} E α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1896 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1898 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1896 x._@.Mathlib.Order.Hom.Basic._hyg.1898) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1920 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1920) (OrderIsoClass.toOrderHomClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2) _inst_3)) e) s)
+ forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (e : E) {s : Set.{u2} α} [hs : Set.OrdConnected.{u2} α _inst_1 s], Set.OrdConnected.{u1} β _inst_2 (Set.image.{u2, u1} α β (FunLike.coe.{succ u3, succ u2, succ u1} E α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} E α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1902 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1904 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1902 x._@.Mathlib.Order.Hom.Basic._hyg.1904) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1926 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1926) (OrderIsoClass.toOrderHomClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2) _inst_3)) e) s)
Case conversion may be inaccurate. Consider using '#align set.ord_connected_image Set.ordConnected_imageₓ'. -/
@[instance]
theorem ordConnected_image {E : Type _} [OrderIsoClass E α β] (e : E) {s : Set α}
@@ -315,7 +315,7 @@ theorem ordConnected_image {E : Type _} [OrderIsoClass E α β] (e : E) {s : Set
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)] (e : E), Set.OrdConnected.{u2} β _inst_2 (Set.range.{u2, succ u1} β α (coeFn.{succ u3, max (succ u1) (succ u2)} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} E α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} E α β (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2)) (OrderIsoClass.toOrderHomClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2) _inst_3))) e))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (e : E), Set.OrdConnected.{u1} β _inst_2 (Set.range.{u1, succ u2} β α (FunLike.coe.{succ u3, succ u2, succ u1} E α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} E α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1896 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1898 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1896 x._@.Mathlib.Order.Hom.Basic._hyg.1898) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1920 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1920) (OrderIsoClass.toOrderHomClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2) _inst_3)) e))
+ forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (e : E), Set.OrdConnected.{u1} β _inst_2 (Set.range.{u1, succ u2} β α (FunLike.coe.{succ u3, succ u2, succ u1} E α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} E α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1902 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1904 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1902 x._@.Mathlib.Order.Hom.Basic._hyg.1904) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1926 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1926) (OrderIsoClass.toOrderHomClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2) _inst_3)) e))
Case conversion may be inaccurate. Consider using '#align set.ord_connected_range Set.ordConnected_rangeₓ'. -/
@[instance]
theorem ordConnected_range {E : Type _} [OrderIsoClass E α β] (e : E) : OrdConnected (range e) := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -61,15 +61,24 @@ theorem ordConnected_def : OrdConnected s ↔ ∀ ⦃x⦄ (hx : x ∈ s) ⦃y⦄
#align set.ord_connected_def Set.ordConnected_def
-/
-#print Set.ordConnected_iff /-
+/- warning: set.ord_connected_iff -> Set.ordConnected_iff is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {s : Set.{u1} α}, Iff (Set.OrdConnected.{u1} α _inst_1 s) (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) x y) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Set.Icc.{u1} α _inst_1 x y) s)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {s : Set.{u1} α}, Iff (Set.OrdConnected.{u1} α _inst_1 s) (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) x y) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (Set.Icc.{u1} α _inst_1 x y) s)))
+Case conversion may be inaccurate. Consider using '#align set.ord_connected_iff Set.ordConnected_iffₓ'. -/
/-- It suffices to prove `[x, y] ⊆ s` for `x y ∈ s`, `x ≤ y`. -/
theorem ordConnected_iff : OrdConnected s ↔ ∀ x ∈ s, ∀ y ∈ s, x ≤ y → Icc x y ⊆ s :=
ordConnected_def.trans
⟨fun hs x hx y hy hxy => hs hx hy, fun H x hx y hy z hz => H x hx y hy (le_trans hz.1 hz.2) hz⟩
#align set.ord_connected_iff Set.ordConnected_iff
--/
-#print Set.ordConnected_of_Ioo /-
+/- warning: set.ord_connected_of_Ioo -> Set.ordConnected_of_Ioo is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_3 : PartialOrder.{u1} α] {s : Set.{u1} α}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3)) x y) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Set.Ioo.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3) x y) s))) -> (Set.OrdConnected.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3) s)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_3 : PartialOrder.{u1} α] {s : Set.{u1} α}, (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3)) x y) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (Set.Ioo.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3) x y) s))) -> (Set.OrdConnected.{u1} α (PartialOrder.toPreorder.{u1} α _inst_3) s)
+Case conversion may be inaccurate. Consider using '#align set.ord_connected_of_Ioo Set.ordConnected_of_Iooₓ'. -/
theorem ordConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
(hs : ∀ x ∈ s, ∀ y ∈ s, x < y → Ioo x y ⊆ s) : OrdConnected s :=
by
@@ -79,7 +88,6 @@ theorem ordConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
rw [← Ioc_insert_left hxy, ← Ioo_insert_right hxy']
exact insert_subset.2 ⟨hx, insert_subset.2 ⟨hy, hs x hx y hy hxy'⟩⟩
#align set.ord_connected_of_Ioo Set.ordConnected_of_Ioo
--/
/- warning: set.ord_connected.preimage_mono -> Set.OrdConnected.preimage_mono is a dubious translation:
lean 3 declaration is
@@ -279,7 +287,7 @@ instance [DenselyOrdered α] {s : Set α} [hs : OrdConnected s] : DenselyOrdered
/- warning: set.ord_connected_preimage -> Set.ordConnected_preimage is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {F : Type.{u3}} [_inst_3 : OrderHomClass.{u3, u1, u2} F α β (Preorder.toLE.{u1} α _inst_1) (Preorder.toLE.{u2} β _inst_2)] (f : F) {s : Set.{u2} β} [hs : Set.OrdConnected.{u2} β _inst_2 s], Set.OrdConnected.{u1} α _inst_1 (Set.preimage.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} F α β (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2)) _inst_3)) f) s)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {F : Type.{u3}} [_inst_3 : OrderHomClass.{u3, u1, u2} F α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)] (f : F) {s : Set.{u2} β} [hs : Set.OrdConnected.{u2} β _inst_2 s], Set.OrdConnected.{u1} α _inst_1 (Set.preimage.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} F α β (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2)) _inst_3)) f) s)
but is expected to have type
forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {F : Type.{u3}} [_inst_3 : OrderHomClass.{u3, u2, u1} F α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (f : F) {s : Set.{u1} β} [hs : Set.OrdConnected.{u1} β _inst_2 s], Set.OrdConnected.{u2} α _inst_1 (Set.preimage.{u2, u1} α β (FunLike.coe.{succ u3, succ u2, succ u1} F α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} F α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1896 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1898 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1896 x._@.Mathlib.Order.Hom.Basic._hyg.1898) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1920 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1920) _inst_3) f) s)
Case conversion may be inaccurate. Consider using '#align set.ord_connected_preimage Set.ordConnected_preimageₓ'. -/
@@ -291,7 +299,7 @@ theorem ordConnected_preimage {F : Type _} [OrderHomClass F α β] (f : F) {s :
/- warning: set.ord_connected_image -> Set.ordConnected_image is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u1, u2} E α β (Preorder.toLE.{u1} α _inst_1) (Preorder.toLE.{u2} β _inst_2)] (e : E) {s : Set.{u1} α} [hs : Set.OrdConnected.{u1} α _inst_1 s], Set.OrdConnected.{u2} β _inst_2 (Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} E α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} E α β (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2)) (OrderIsoClass.toOrderHomClass.{u3, u1, u2} E α β (Preorder.toLE.{u1} α _inst_1) (Preorder.toLE.{u2} β _inst_2) _inst_3))) e) s)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)] (e : E) {s : Set.{u1} α} [hs : Set.OrdConnected.{u1} α _inst_1 s], Set.OrdConnected.{u2} β _inst_2 (Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} E α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} E α β (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2)) (OrderIsoClass.toOrderHomClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2) _inst_3))) e) s)
but is expected to have type
forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (e : E) {s : Set.{u2} α} [hs : Set.OrdConnected.{u2} α _inst_1 s], Set.OrdConnected.{u1} β _inst_2 (Set.image.{u2, u1} α β (FunLike.coe.{succ u3, succ u2, succ u1} E α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} E α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1896 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1898 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1896 x._@.Mathlib.Order.Hom.Basic._hyg.1898) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1920 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1920) (OrderIsoClass.toOrderHomClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2) _inst_3)) e) s)
Case conversion may be inaccurate. Consider using '#align set.ord_connected_image Set.ordConnected_imageₓ'. -/
@@ -305,7 +313,7 @@ theorem ordConnected_image {E : Type _} [OrderIsoClass E α β] (e : E) {s : Set
/- warning: set.ord_connected_range -> Set.ordConnected_range is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u1, u2} E α β (Preorder.toLE.{u1} α _inst_1) (Preorder.toLE.{u2} β _inst_2)] (e : E), Set.OrdConnected.{u2} β _inst_2 (Set.range.{u2, succ u1} β α (coeFn.{succ u3, max (succ u1) (succ u2)} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} E α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} E α β (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2)) (OrderIsoClass.toOrderHomClass.{u3, u1, u2} E α β (Preorder.toLE.{u1} α _inst_1) (Preorder.toLE.{u2} β _inst_2) _inst_3))) e))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)] (e : E), Set.OrdConnected.{u2} β _inst_2 (Set.range.{u2, succ u1} β α (coeFn.{succ u3, max (succ u1) (succ u2)} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} E α (fun (_x : α) => β) (RelHomClass.toFunLike.{u3, u1, u2} E α β (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2)) (OrderIsoClass.toOrderHomClass.{u3, u1, u2} E α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2) _inst_3))) e))
but is expected to have type
forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {E : Type.{u3}} [_inst_3 : OrderIsoClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2)] (e : E), Set.OrdConnected.{u1} β _inst_2 (Set.range.{u1, succ u2} β α (FunLike.coe.{succ u3, succ u2, succ u1} E α (fun (_x : α) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : α) => β) _x) (RelHomClass.toFunLike.{u3, u2, u1} E α β (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1896 : α) (x._@.Mathlib.Order.Hom.Basic._hyg.1898 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) x._@.Mathlib.Order.Hom.Basic._hyg.1896 x._@.Mathlib.Order.Hom.Basic._hyg.1898) (fun (_x : β) (x._@.Mathlib.Order.Hom.Basic._hyg.1920 : β) => LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) _x x._@.Mathlib.Order.Hom.Basic._hyg.1920) (OrderIsoClass.toOrderHomClass.{u3, u2, u1} E α β (Preorder.toLE.{u2} α _inst_1) (Preorder.toLE.{u1} β _inst_2) _inst_3)) e))
Case conversion may be inaccurate. Consider using '#align set.ord_connected_range Set.ordConnected_rangeₓ'. -/
@@ -336,14 +344,18 @@ section PartialOrder
variable {α : Type _} [PartialOrder α] {s : Set α}
-#print IsAntichain.ordConnected /-
+/- warning: is_antichain.ord_connected -> IsAntichain.ordConnected is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {s : Set.{u1} α}, (IsAntichain.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1))) s) -> (Set.OrdConnected.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1) s)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {s : Set.{u1} α}, (IsAntichain.{u1} α (fun (x._@.Mathlib.Data.Set.Intervals.OrdConnected._hyg.1947 : α) (x._@.Mathlib.Data.Set.Intervals.OrdConnected._hyg.1949 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Data.Set.Intervals.OrdConnected._hyg.1947 x._@.Mathlib.Data.Set.Intervals.OrdConnected._hyg.1949) s) -> (Set.OrdConnected.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1) s)
+Case conversion may be inaccurate. Consider using '#align is_antichain.ord_connected IsAntichain.ordConnectedₓ'. -/
protected theorem IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
⟨fun x hx y hy z hz => by
obtain rfl := hs.eq hx hy (hz.1.trans hz.2)
rw [Icc_self, mem_singleton_iff] at hz
rwa [hz]⟩
#align is_antichain.ord_connected IsAntichain.ordConnected
--/
end PartialOrder
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -145,33 +145,33 @@ theorem ordConnected_dual {s : Set α} : OrdConnected (OrderDual.ofDual ⁻¹' s
#align set.ord_connected_dual Set.ordConnected_dual
-/
-#print Set.ordConnected_interₛ /-
-theorem ordConnected_interₛ {S : Set (Set α)} (hS : ∀ s ∈ S, OrdConnected s) :
+#print Set.ordConnected_sInter /-
+theorem ordConnected_sInter {S : Set (Set α)} (hS : ∀ s ∈ S, OrdConnected s) :
OrdConnected (⋂₀ S) :=
- ⟨fun x hx y hy => subset_interₛ fun s hs => (hS s hs).out (hx s hs) (hy s hs)⟩
-#align set.ord_connected_sInter Set.ordConnected_interₛ
+ ⟨fun x hx y hy => subset_sInter fun s hs => (hS s hs).out (hx s hs) (hy s hs)⟩
+#align set.ord_connected_sInter Set.ordConnected_sInter
-/
-#print Set.ordConnected_interᵢ /-
-theorem ordConnected_interᵢ {ι : Sort _} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
+#print Set.ordConnected_iInter /-
+theorem ordConnected_iInter {ι : Sort _} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
OrdConnected (⋂ i, s i) :=
- ordConnected_interₛ <| forall_range_iff.2 hs
-#align set.ord_connected_Inter Set.ordConnected_interᵢ
+ ordConnected_sInter <| forall_range_iff.2 hs
+#align set.ord_connected_Inter Set.ordConnected_iInter
-/
-#print Set.ordConnected_interᵢ' /-
-instance ordConnected_interᵢ' {ι : Sort _} {s : ι → Set α} [∀ i, OrdConnected (s i)] :
+#print Set.ordConnected_iInter' /-
+instance ordConnected_iInter' {ι : Sort _} {s : ι → Set α} [∀ i, OrdConnected (s i)] :
OrdConnected (⋂ i, s i) :=
- ordConnected_interᵢ ‹_›
-#align set.ord_connected_Inter' Set.ordConnected_interᵢ'
+ ordConnected_iInter ‹_›
+#align set.ord_connected_Inter' Set.ordConnected_iInter'
-/
/- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (i hi) -/
-#print Set.ordConnected_binterᵢ /-
-theorem ordConnected_binterᵢ {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (hi : p i), Set α}
+#print Set.ordConnected_biInter /-
+theorem ordConnected_biInter {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (hi : p i), Set α}
(hs : ∀ i hi, OrdConnected (s i hi)) : OrdConnected (⋂ (i) (hi), s i hi) :=
- ordConnected_interᵢ fun i => ordConnected_interᵢ <| hs i
-#align set.ord_connected_bInter Set.ordConnected_binterᵢ
+ ordConnected_iInter fun i => ordConnected_iInter <| hs i
+#align set.ord_connected_bInter Set.ordConnected_biInter
-/
/- warning: set.ord_connected_pi -> Set.ordConnected_pi is a dubious translation:
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce86f4e05e9a9b8da5e316b22c76ce76440c56a1
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
! This file was ported from Lean 3 source module data.set.intervals.ord_connected
-! leanprover-community/mathlib commit b19481deb571022990f1baa9cbf9172e6757a479
+! leanprover-community/mathlib commit 76de8ae01554c3b37d66544866659ff174e66e1f
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -336,12 +336,14 @@ section PartialOrder
variable {α : Type _} [PartialOrder α] {s : Set α}
+#print IsAntichain.ordConnected /-
protected theorem IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
⟨fun x hx y hy z hz => by
obtain rfl := hs.eq hx hy (hz.1.trans hz.2)
rw [Icc_self, mem_singleton_iff] at hz
rwa [hz]⟩
-#align set.is_antichain.ord_connected Set.IsAntichain.ordConnected
+#align is_antichain.ord_connected IsAntichain.ordConnected
+-/
end PartialOrder
mathlib commit https://github.com/leanprover-community/mathlib/commit/b19481deb571022990f1baa9cbf9172e6757a479
@@ -4,12 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
! This file was ported from Lean 3 source module data.set.intervals.ord_connected
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
+! leanprover-community/mathlib commit b19481deb571022990f1baa9cbf9172e6757a479
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Data.Set.Intervals.UnorderedInterval
import Mathbin.Data.Set.Lattice
+import Mathbin.Order.Antichain
/-!
# Order-connected sets
@@ -331,6 +332,19 @@ theorem dual_ordConnected {s : Set α} [OrdConnected s] : OrdConnected (ofDual
end Preorder
+section PartialOrder
+
+variable {α : Type _} [PartialOrder α] {s : Set α}
+
+protected theorem IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
+ ⟨fun x hx y hy z hz => by
+ obtain rfl := hs.eq hx hy (hz.1.trans hz.2)
+ rw [Icc_self, mem_singleton_iff] at hz
+ rwa [hz]⟩
+#align set.is_antichain.ord_connected Set.IsAntichain.ordConnected
+
+end PartialOrder
+
section LinearOrder
variable {α : Type _} [LinearOrder α] {s : Set α} {x : α}
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Move Set.Ixx
, Finset.Ixx
, Multiset.Ixx
together under two different folders:
Order.Interval
for their definition and basic propertiesAlgebra.Order.Interval
for their algebraic propertiesMove the definitions of Multiset.Ixx
to what is now Order.Interval.Multiset
. I believe we could just delete this file in a later PR as nothing uses it (and I already had doubts when defining Multiset.Ixx
three years ago).
Move the algebraic results out of what is now Order.Interval.Finset.Basic
to a new file Algebra.Order.Interval.Finset.Basic
.
@@ -3,7 +3,7 @@ Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-/
-import Mathlib.Data.Set.Intervals.OrderEmbedding
+import Mathlib.Order.Interval.Set.OrderEmbedding
import Mathlib.Order.Antichain
import Mathlib.Order.SetNotation
@@ -283,7 +283,7 @@ end Preorder
section PartialOrder
-variable {α : Type*} [PartialOrder α] {s : Set α}
+variable {α : Type*} [PartialOrder α] {s : Set α} {x y : α}
protected theorem _root_.IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
⟨fun x hx y hy z hz => by
@@ -292,6 +292,20 @@ protected theorem _root_.IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·)
rwa [hz]⟩
#align is_antichain.ord_connected IsAntichain.ordConnected
+lemma ordConnected_inter_Icc_of_subset (h : Ioo x y ⊆ s) : OrdConnected (s ∩ Icc x y) :=
+ ordConnected_of_Ioo fun _u ⟨_, hu, _⟩ _v ⟨_, _, hv⟩ _ ↦
+ Ioo_subset_Ioo hu hv |>.trans <| subset_inter h Ioo_subset_Icc_self
+
+lemma ordConnected_inter_Icc_iff (hx : x ∈ s) (hy : y ∈ s) :
+ OrdConnected (s ∩ Icc x y) ↔ Ioo x y ⊆ s := by
+ refine ⟨fun h ↦ Ioo_subset_Icc_self.trans fun z hz ↦ ?_, ordConnected_inter_Icc_of_subset⟩
+ have hxy : x ≤ y := hz.1.trans hz.2
+ exact h.out ⟨hx, left_mem_Icc.2 hxy⟩ ⟨hy, right_mem_Icc.2 hxy⟩ hz |>.1
+
+lemma not_ordConnected_inter_Icc_iff (hx : x ∈ s) (hy : y ∈ s) :
+ ¬ OrdConnected (s ∩ Icc x y) ↔ ∃ z ∉ s, z ∈ Ioo x y := by
+ simp_rw [ordConnected_inter_Icc_iff hx hy, subset_def, not_forall, exists_prop, and_comm]
+
end PartialOrder
section LinearOrder
ball
and bex
from lemma names (#10816)
ball
for "bounded forall" and bex
for "bounded exists" are from experience very confusing abbreviations. This PR renames them to forall_mem
and exists_mem
in the few Set
lemma names that mention them.
Also deprecate ball_image_of_ball
, mem_image_elim
, mem_image_elim_on
since those lemmas are duplicates of the renamed lemmas (apart from argument order and implicitness, which I am also fixing by making the binder in the RHS of forall_mem_image
semi-implicit), have obscure names and are completely unused.
@@ -159,7 +159,7 @@ theorem ordConnected_sInter {S : Set (Set α)} (hS : ∀ s ∈ S, OrdConnected s
theorem ordConnected_iInter {ι : Sort*} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
OrdConnected (⋂ i, s i) :=
- ordConnected_sInter <| forall_range_iff.2 hs
+ ordConnected_sInter <| forall_mem_range.2 hs
#align set.ord_connected_Inter Set.ordConnected_iInter
instance ordConnected_iInter' {ι : Sort*} {s : ι → Set α} [∀ i, OrdConnected (s i)] :
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -260,7 +260,7 @@ theorem ordConnected_image {E : Type*} [EquivLike E α β] [OrderIsoClass E α
apply ordConnected_preimage (e : α ≃o β).symm
#align set.ord_connected_image Set.ordConnected_image
--- porting note: split up `simp_rw [← image_univ, OrdConnected_image e]`, would not work otherwise
+-- Porting note: split up `simp_rw [← image_univ, OrdConnected_image e]`, would not work otherwise
@[instance]
theorem ordConnected_range {E : Type*} [EquivLike E α β] [OrderIsoClass E α β] (e : E) :
OrdConnected (range e) := by
@@ -4,8 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-/
import Mathlib.Data.Set.Intervals.OrderEmbedding
-import Mathlib.Data.Set.Lattice
import Mathlib.Order.Antichain
+import Mathlib.Order.SetNotation
#align_import data.set.intervals.ord_connected from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f"
@@ -154,7 +154,7 @@ theorem ordConnected_dual {s : Set α} : OrdConnected (OrderDual.ofDual ⁻¹' s
theorem ordConnected_sInter {S : Set (Set α)} (hS : ∀ s ∈ S, OrdConnected s) :
OrdConnected (⋂₀ S) :=
- ⟨fun _ hx _ hy => subset_sInter fun s hs => (hS s hs).out (hx s hs) (hy s hs)⟩
+ ⟨fun _x hx _y hy _z hz s hs => (hS s hs).out (hx s hs) (hy s hs) hz⟩
#align set.ord_connected_sInter Set.ordConnected_sInter
theorem ordConnected_iInter {ι : Sort*} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun
instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike
is EquivLike
, since that has a custom coe_injective'
field that is easier to implement. All other classes should take FunLike
or EquivLike
as a parameter.
Previously, morphism classes would be Type
-valued and extend FunLike
:
/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
extends FunLike F A B :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))
After this PR, they should be Prop
-valued and take FunLike
as a parameter:
/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
[FunLike F A B] : Prop :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))
(Note that A B
stay marked as outParam
even though they are not purely required to be so due to the FunLike
parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam
is slightly faster.)
Similarly, MyEquivClass
should take EquivLike
as a parameter.
As a result, every mention of [MyHomClass F A B]
should become [FunLike F A B] [MyHomClass F A B]
.
While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul
is more expensive. This is due to suboptimal processing of arguments. For example:
variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)
theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y
example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _
Before this PR, applying map_mul f
gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]
. Since M
and N
are out_param
s, [MulHomClass F ?M ?N]
is synthesized first, supplies values for ?M
and ?N
and then the Mul M
and Mul N
instances can be found.
After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]
. Now [FunLike F ?M ?N]
is synthesized first, supplies values for ?M
and ?N
and then the Mul M
and Mul N
instances can be found, before trying MulHomClass F M N
which fails. Since the Mul
hierarchy is very big, this can be slow to fail, especially when there is no such Mul
instance.
A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul
to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N]
because MulHomClass
fails or succeeds much faster than the others.
As a consequence, the simpNF
linter is much slower since by design it tries and fails to apply many map_
lemmas. The same issue occurs a few times in existing calls to simp [map_mul]
, where map_mul
is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.
simp
not firing sometimesThis affects map_smulₛₗ
and related definitions. For simp
lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw
can find every argument to map_smulₛₗ
successfully but simp
can't: leanprover/lean4#3701.
Especially in the category theory library, we might sometimes have a type A
which is also accessible as a synonym (Bundled A hA).1
. Instance synthesis doesn't always work if we have f : A →* B
but x * y : (Bundled A hA).1
or vice versa. This seems to be mostly fixed by keeping A B
as outParam
s in MulHomClass F A B
. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1
instead of using the syntax in the discrimination tree.)
The timeouts can be worked around for now by specifying which map_mul
we mean, either as map_mul f
for some explicit f
, or as e.g. MonoidHomClass.map_mul
.
map_smulₛₗ
not firing as simp
lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulₛₗ
a simp
lemma instead of the generic map_smulₛₗ
. Writing simp [map_smulₛₗ _]
also works.
Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@@ -248,13 +248,13 @@ instance instDenselyOrdered [DenselyOrdered α] {s : Set α} [hs : OrdConnected
⟨⟨x, (hs.out a.2 b.2) (Ioo_subset_Icc_self H)⟩, H⟩⟩
@[instance]
-theorem ordConnected_preimage {F : Type*} [OrderHomClass F α β] (f : F) {s : Set β}
- [hs : OrdConnected s] : OrdConnected (f ⁻¹' s) :=
+theorem ordConnected_preimage {F : Type*} [FunLike F α β] [OrderHomClass F α β] (f : F)
+ {s : Set β} [hs : OrdConnected s] : OrdConnected (f ⁻¹' s) :=
⟨fun _ hx _ hy _ hz => hs.out hx hy ⟨OrderHomClass.mono _ hz.1, OrderHomClass.mono _ hz.2⟩⟩
#align set.ord_connected_preimage Set.ordConnected_preimage
@[instance]
-theorem ordConnected_image {E : Type*} [OrderIsoClass E α β] (e : E) {s : Set α}
+theorem ordConnected_image {E : Type*} [EquivLike E α β] [OrderIsoClass E α β] (e : E) {s : Set α}
[hs : OrdConnected s] : OrdConnected (e '' s) := by
erw [(e : α ≃o β).image_eq_preimage]
apply ordConnected_preimage (e : α ≃o β).symm
@@ -262,7 +262,8 @@ theorem ordConnected_image {E : Type*} [OrderIsoClass E α β] (e : E) {s : Set
-- porting note: split up `simp_rw [← image_univ, OrdConnected_image e]`, would not work otherwise
@[instance]
-theorem ordConnected_range {E : Type*} [OrderIsoClass E α β] (e : E) : OrdConnected (range e) := by
+theorem ordConnected_range {E : Type*} [EquivLike E α β] [OrderIsoClass E α β] (e : E) :
+ OrdConnected (range e) := by
simp_rw [← image_univ]
exact ordConnected_image (e : α ≃o β)
#align set.ord_connected_range Set.ordConnected_range
@@ -3,7 +3,7 @@ Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-/
-import Mathlib.Data.Set.Intervals.UnorderedInterval
+import Mathlib.Data.Set.Intervals.OrderEmbedding
import Mathlib.Data.Set.Lattice
import Mathlib.Order.Antichain
@@ -21,8 +21,8 @@ In this file we prove that intersection of a family of `OrdConnected` sets is `O
that all standard intervals are `OrdConnected`.
-/
-open Interval
-
+open scoped Interval
+open Set
open OrderDual (toDual ofDual)
namespace Set
@@ -78,28 +78,60 @@ protected theorem Icc_subset (s : Set α) [hs : OrdConnected s] {x y} (hx : x
hs.out hx hy
#align set.Icc_subset Set.Icc_subset
+end Preorder
+
+end Set
+
+namespace OrderEmbedding
+
+variable {α β : Type*} [Preorder α] [Preorder β]
+
+theorem image_Icc (e : α ↪o β) (he : OrdConnected (range e)) (x y : α) :
+ e '' Icc x y = Icc (e x) (e y) := by
+ rw [← e.preimage_Icc, image_preimage_eq_inter_range, inter_eq_left.2 (he.out ⟨_, rfl⟩ ⟨_, rfl⟩)]
+
+theorem image_Ico (e : α ↪o β) (he : OrdConnected (range e)) (x y : α) :
+ e '' Ico x y = Ico (e x) (e y) := by
+ rw [← e.preimage_Ico, image_preimage_eq_inter_range,
+ inter_eq_left.2 <| Ico_subset_Icc_self.trans <| he.out ⟨_, rfl⟩ ⟨_, rfl⟩]
+
+theorem image_Ioc (e : α ↪o β) (he : OrdConnected (range e)) (x y : α) :
+ e '' Ioc x y = Ioc (e x) (e y) := by
+ rw [← e.preimage_Ioc, image_preimage_eq_inter_range,
+ inter_eq_left.2 <| Ioc_subset_Icc_self.trans <| he.out ⟨_, rfl⟩ ⟨_, rfl⟩]
+
+theorem image_Ioo (e : α ↪o β) (he : OrdConnected (range e)) (x y : α) :
+ e '' Ioo x y = Ioo (e x) (e y) := by
+ rw [← e.preimage_Ioo, image_preimage_eq_inter_range,
+ inter_eq_left.2 <| Ioo_subset_Icc_self.trans <| he.out ⟨_, rfl⟩ ⟨_, rfl⟩]
+
+end OrderEmbedding
+
+namespace Set
+
+section Preorder
+
+variable {α β : Type*} [Preorder α] [Preorder β] {s t : Set α}
+
@[simp]
lemma image_subtype_val_Icc {s : Set α} [OrdConnected s] (x y : s) :
Subtype.val '' Icc x y = Icc x.1 y :=
- (Subtype.image_preimage_val s (Icc x.1 y)).trans <| inter_eq_left.2 <| s.Icc_subset x.2 y.2
+ (OrderEmbedding.subtype (· ∈ s)).image_Icc (by simpa) x y
@[simp]
lemma image_subtype_val_Ico {s : Set α} [OrdConnected s] (x y : s) :
Subtype.val '' Ico x y = Ico x.1 y :=
- (Subtype.image_preimage_val s (Ico x.1 y)).trans <| inter_eq_left.2 <|
- Ico_subset_Icc_self.trans <| s.Icc_subset x.2 y.2
+ (OrderEmbedding.subtype (· ∈ s)).image_Ico (by simpa) x y
@[simp]
lemma image_subtype_val_Ioc {s : Set α} [OrdConnected s] (x y : s) :
Subtype.val '' Ioc x y = Ioc x.1 y :=
- (Subtype.image_preimage_val s (Ioc x.1 y)).trans <| inter_eq_left.2 <|
- Ioc_subset_Icc_self.trans <| s.Icc_subset x.2 y.2
+ (OrderEmbedding.subtype (· ∈ s)).image_Ioc (by simpa) x y
@[simp]
lemma image_subtype_val_Ioo {s : Set α} [OrdConnected s] (x y : s) :
Subtype.val '' Ioo x y = Ioo x.1 y :=
- (Subtype.image_preimage_val s (Ioo x.1 y)).trans <| inter_eq_left.2 <|
- Ioo_subset_Icc_self.trans <| s.Icc_subset x.2 y.2
+ (OrderEmbedding.subtype (· ∈ s)).image_Ioo (by simpa) x y
theorem OrdConnected.inter {s t : Set α} (hs : OrdConnected s) (ht : OrdConnected t) :
OrdConnected (s ∩ t) :=
∃ x ∈ s, _
instead of ∃ (x) (_ : x ∈ s), _
(#9184)
Search for [∀∃].*(_
and manually replace some occurrences with more readable versions.
In case of ∀
, the new expressions are defeq to the old ones.
In case of ∃
, they differ by exists_prop
.
In some rare cases, golf proofs that needed fixing.
@@ -136,7 +136,7 @@ instance ordConnected_iInter' {ι : Sort*} {s : ι → Set α} [∀ i, OrdConnec
#align set.ord_connected_Inter' Set.ordConnected_iInter'
/- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (i hi) -/
-theorem ordConnected_biInter {ι : Sort*} {p : ι → Prop} {s : ∀ (i : ι) (_ : p i), Set α}
+theorem ordConnected_biInter {ι : Sort*} {p : ι → Prop} {s : ∀ i, p i → Set α}
(hs : ∀ i hi, OrdConnected (s i hi)) : OrdConnected (⋂ (i) (hi), s i hi) :=
ordConnected_iInter fun i => ordConnected_iInter <| hs i
#align set.ord_connected_bInter Set.ordConnected_biInter
Subtype.val
(#7653)
Add simp
lemmas for images of intervals in other intervals
under Subtype.val
.
@@ -78,6 +78,29 @@ protected theorem Icc_subset (s : Set α) [hs : OrdConnected s] {x y} (hx : x
hs.out hx hy
#align set.Icc_subset Set.Icc_subset
+@[simp]
+lemma image_subtype_val_Icc {s : Set α} [OrdConnected s] (x y : s) :
+ Subtype.val '' Icc x y = Icc x.1 y :=
+ (Subtype.image_preimage_val s (Icc x.1 y)).trans <| inter_eq_left.2 <| s.Icc_subset x.2 y.2
+
+@[simp]
+lemma image_subtype_val_Ico {s : Set α} [OrdConnected s] (x y : s) :
+ Subtype.val '' Ico x y = Ico x.1 y :=
+ (Subtype.image_preimage_val s (Ico x.1 y)).trans <| inter_eq_left.2 <|
+ Ico_subset_Icc_self.trans <| s.Icc_subset x.2 y.2
+
+@[simp]
+lemma image_subtype_val_Ioc {s : Set α} [OrdConnected s] (x y : s) :
+ Subtype.val '' Ioc x y = Ioc x.1 y :=
+ (Subtype.image_preimage_val s (Ioc x.1 y)).trans <| inter_eq_left.2 <|
+ Ioc_subset_Icc_self.trans <| s.Icc_subset x.2 y.2
+
+@[simp]
+lemma image_subtype_val_Ioo {s : Set α} [OrdConnected s] (x y : s) :
+ Subtype.val '' Ioo x y = Ioo x.1 y :=
+ (Subtype.image_preimage_val s (Ioo x.1 y)).trans <| inter_eq_left.2 <|
+ Ioo_subset_Icc_self.trans <| s.Icc_subset x.2 y.2
+
theorem OrdConnected.inter {s t : Set α} (hs : OrdConnected s) (ht : OrdConnected t) :
OrdConnected (s ∩ t) :=
⟨fun _ hx _ hy => subset_inter (hs.out hx.1 hy.1) (ht.out hx.2 hy.2)⟩
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -29,7 +29,7 @@ namespace Set
section Preorder
-variable {α β : Type _} [Preorder α] [Preorder β] {s t : Set α}
+variable {α β : Type*} [Preorder α] [Preorder β] {s t : Set α}
/-- We say that a set `s : Set α` is `OrdConnected` if for all `x y ∈ s` it includes the
interval `[[x, y]]`. If `α` is a `DenselyOrdered` `ConditionallyCompleteLinearOrder` with
@@ -54,7 +54,7 @@ theorem ordConnected_iff : OrdConnected s ↔ ∀ x ∈ s, ∀ y ∈ s, x ≤ y
⟨fun hs _ hx _ hy _ => hs hx hy, fun H x hx y hy _ hz => H x hx y hy (le_trans hz.1 hz.2) hz⟩
#align set.ord_connected_iff Set.ordConnected_iff
-theorem ordConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
+theorem ordConnected_of_Ioo {α : Type*} [PartialOrder α] {s : Set α}
(hs : ∀ x ∈ s, ∀ y ∈ s, x < y → Ioo x y ⊆ s) : OrdConnected s := by
rw [ordConnected_iff]
intro x hx y hy hxy
@@ -102,28 +102,28 @@ theorem ordConnected_sInter {S : Set (Set α)} (hS : ∀ s ∈ S, OrdConnected s
⟨fun _ hx _ hy => subset_sInter fun s hs => (hS s hs).out (hx s hs) (hy s hs)⟩
#align set.ord_connected_sInter Set.ordConnected_sInter
-theorem ordConnected_iInter {ι : Sort _} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
+theorem ordConnected_iInter {ι : Sort*} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
OrdConnected (⋂ i, s i) :=
ordConnected_sInter <| forall_range_iff.2 hs
#align set.ord_connected_Inter Set.ordConnected_iInter
-instance ordConnected_iInter' {ι : Sort _} {s : ι → Set α} [∀ i, OrdConnected (s i)] :
+instance ordConnected_iInter' {ι : Sort*} {s : ι → Set α} [∀ i, OrdConnected (s i)] :
OrdConnected (⋂ i, s i) :=
ordConnected_iInter ‹_›
#align set.ord_connected_Inter' Set.ordConnected_iInter'
/- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (i hi) -/
-theorem ordConnected_biInter {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (_ : p i), Set α}
+theorem ordConnected_biInter {ι : Sort*} {p : ι → Prop} {s : ∀ (i : ι) (_ : p i), Set α}
(hs : ∀ i hi, OrdConnected (s i hi)) : OrdConnected (⋂ (i) (hi), s i hi) :=
ordConnected_iInter fun i => ordConnected_iInter <| hs i
#align set.ord_connected_bInter Set.ordConnected_biInter
-theorem ordConnected_pi {ι : Type _} {α : ι → Type _} [∀ i, Preorder (α i)] {s : Set ι}
+theorem ordConnected_pi {ι : Type*} {α : ι → Type*} [∀ i, Preorder (α i)] {s : Set ι}
{t : ∀ i, Set (α i)} (h : ∀ i ∈ s, OrdConnected (t i)) : OrdConnected (s.pi t) :=
⟨fun _ hx _ hy _ hz i hi => (h i hi).out (hx i hi) (hy i hi) ⟨hz.1 i, hz.2 i⟩⟩
#align set.ord_connected_pi Set.ordConnected_pi
-instance ordConnected_pi' {ι : Type _} {α : ι → Type _} [∀ i, Preorder (α i)] {s : Set ι}
+instance ordConnected_pi' {ι : Type*} {α : ι → Type*} [∀ i, Preorder (α i)] {s : Set ι}
{t : ∀ i, Set (α i)} [h : ∀ i, OrdConnected (t i)] : OrdConnected (s.pi t) :=
ordConnected_pi fun i _ => h i
#align set.ord_connected_pi' Set.ordConnected_pi'
@@ -169,7 +169,7 @@ theorem ordConnected_Ioo {a b : α} : OrdConnected (Ioo a b) :=
#align set.ord_connected_Ioo Set.ordConnected_Ioo
@[instance]
-theorem ordConnected_singleton {α : Type _} [PartialOrder α] {a : α} :
+theorem ordConnected_singleton {α : Type*} [PartialOrder α] {a : α} :
OrdConnected ({a} : Set α) := by
rw [← Icc_self]
exact ordConnected_Icc
@@ -193,13 +193,13 @@ instance instDenselyOrdered [DenselyOrdered α] {s : Set α} [hs : OrdConnected
⟨⟨x, (hs.out a.2 b.2) (Ioo_subset_Icc_self H)⟩, H⟩⟩
@[instance]
-theorem ordConnected_preimage {F : Type _} [OrderHomClass F α β] (f : F) {s : Set β}
+theorem ordConnected_preimage {F : Type*} [OrderHomClass F α β] (f : F) {s : Set β}
[hs : OrdConnected s] : OrdConnected (f ⁻¹' s) :=
⟨fun _ hx _ hy _ hz => hs.out hx hy ⟨OrderHomClass.mono _ hz.1, OrderHomClass.mono _ hz.2⟩⟩
#align set.ord_connected_preimage Set.ordConnected_preimage
@[instance]
-theorem ordConnected_image {E : Type _} [OrderIsoClass E α β] (e : E) {s : Set α}
+theorem ordConnected_image {E : Type*} [OrderIsoClass E α β] (e : E) {s : Set α}
[hs : OrdConnected s] : OrdConnected (e '' s) := by
erw [(e : α ≃o β).image_eq_preimage]
apply ordConnected_preimage (e : α ≃o β).symm
@@ -207,7 +207,7 @@ theorem ordConnected_image {E : Type _} [OrderIsoClass E α β] (e : E) {s : Set
-- porting note: split up `simp_rw [← image_univ, OrdConnected_image e]`, would not work otherwise
@[instance]
-theorem ordConnected_range {E : Type _} [OrderIsoClass E α β] (e : E) : OrdConnected (range e) := by
+theorem ordConnected_range {E : Type*} [OrderIsoClass E α β] (e : E) : OrdConnected (range e) := by
simp_rw [← image_univ]
exact ordConnected_image (e : α ≃o β)
#align set.ord_connected_range Set.ordConnected_range
@@ -227,7 +227,7 @@ end Preorder
section PartialOrder
-variable {α : Type _} [PartialOrder α] {s : Set α}
+variable {α : Type*} [PartialOrder α] {s : Set α}
protected theorem _root_.IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
⟨fun x hx y hy z hz => by
@@ -240,7 +240,7 @@ end PartialOrder
section LinearOrder
-variable {α : Type _} [LinearOrder α] {s : Set α} {x : α}
+variable {α : Type*} [LinearOrder α] {s : Set α} {x : α}
@[instance]
theorem ordConnected_uIcc {a b : α} : OrdConnected [[a, b]] :=
Per https://github.com/leanprover/lean4/issues/2343, we are going to need to change the automatic generation of instance names, as they become too long.
This PR ensures that everywhere in Mathlib that refers to an instance by name, that name is given explicitly, rather than being automatically generated.
There are four exceptions, which are now commented, with links to https://github.com/leanprover/lean4/issues/2343.
This was implemented by running Mathlib against a modified Lean that appended _ᾰ
to all automatically generated names, and fixing everything.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -186,7 +186,8 @@ theorem ordConnected_univ : OrdConnected (univ : Set α) :=
#align set.ord_connected_univ Set.ordConnected_univ
/-- In a dense order `α`, the subtype from an `OrdConnected` set is also densely ordered. -/
-instance [DenselyOrdered α] {s : Set α} [hs : OrdConnected s] : DenselyOrdered s :=
+instance instDenselyOrdered [DenselyOrdered α] {s : Set α} [hs : OrdConnected s] :
+ DenselyOrdered s :=
⟨fun a b (h : (a : α) < b) =>
let ⟨x, H⟩ := exists_between h
⟨⟨x, (hs.out a.2 b.2) (Ioo_subset_Icc_self H)⟩, H⟩⟩
@@ -2,16 +2,13 @@
Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-
-! This file was ported from Lean 3 source module data.set.intervals.ord_connected
-! leanprover-community/mathlib commit 76de8ae01554c3b37d66544866659ff174e66e1f
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Set.Intervals.UnorderedInterval
import Mathlib.Data.Set.Lattice
import Mathlib.Order.Antichain
+#align_import data.set.intervals.ord_connected from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f"
+
/-!
# Order-connected sets
@@ -116,7 +116,7 @@ instance ordConnected_iInter' {ι : Sort _} {s : ι → Set α} [∀ i, OrdConne
#align set.ord_connected_Inter' Set.ordConnected_iInter'
/- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (i hi) -/
-theorem ordConnected_biInter {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (_ : p i), Set α}
+theorem ordConnected_biInter {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (_ : p i), Set α}
(hs : ∀ i hi, OrdConnected (s i hi)) : OrdConnected (⋂ (i) (hi), s i hi) :=
ordConnected_iInter fun i => ordConnected_iInter <| hs i
#align set.ord_connected_bInter Set.ordConnected_biInter
Currently, (for both Set
and Finset
) insert_subset
is an iff
lemma stating that insert a s ⊆ t
if and only if a ∈ t
and s ⊆ t
. For both types, this PR renames this lemma to insert_subset_iff
, and adds an insert_subset
lemma that gives the implication just in the reverse direction : namely theorem insert_subset (ha : a ∈ t) (hs : s ⊆ t) : insert a s ⊆ t
.
This both aligns the naming with union_subset
and union_subset_iff
, and removes the need for the awkward insert_subset.mpr ⟨_,_⟩
idiom. It touches a lot of files (too many to list), but in a trivial way.
@@ -63,7 +63,7 @@ theorem ordConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
intro x hx y hy hxy
rcases eq_or_lt_of_le hxy with (rfl | hxy'); · simpa
rw [← Ioc_insert_left hxy, ← Ioo_insert_right hxy']
- exact insert_subset.2 ⟨hx, insert_subset.2 ⟨hy, hs x hx y hy hxy'⟩⟩
+ exact insert_subset_iff.2 ⟨hx, insert_subset_iff.2 ⟨hy, hs x hx y hy hxy'⟩⟩
#align set.ord_connected_of_Ioo Set.ordConnected_of_Ioo
theorem OrdConnected.preimage_mono {f : β → α} (hs : OrdConnected s) (hf : Monotone f) :
sSup
/iSup
(#3938)
As discussed on Zulip
supₛ
→ sSup
infₛ
→ sInf
supᵢ
→ iSup
infᵢ
→ iInf
bsupₛ
→ bsSup
binfₛ
→ bsInf
bsupᵢ
→ biSup
binfᵢ
→ biInf
csupₛ
→ csSup
cinfₛ
→ csInf
csupᵢ
→ ciSup
cinfᵢ
→ ciInf
unionₛ
→ sUnion
interₛ
→ sInter
unionᵢ
→ iUnion
interᵢ
→ iInter
bunionₛ
→ bsUnion
binterₛ
→ bsInter
bunionᵢ
→ biUnion
binterᵢ
→ biInter
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -100,26 +100,26 @@ theorem ordConnected_dual {s : Set α} : OrdConnected (OrderDual.ofDual ⁻¹' s
⟨fun h => by simpa only [ordConnected_def] using h.dual, fun h => h.dual⟩
#align set.ord_connected_dual Set.ordConnected_dual
-theorem ordConnected_interₛ {S : Set (Set α)} (hS : ∀ s ∈ S, OrdConnected s) :
+theorem ordConnected_sInter {S : Set (Set α)} (hS : ∀ s ∈ S, OrdConnected s) :
OrdConnected (⋂₀ S) :=
- ⟨fun _ hx _ hy => subset_interₛ fun s hs => (hS s hs).out (hx s hs) (hy s hs)⟩
-#align set.ord_connected_sInter Set.ordConnected_interₛ
+ ⟨fun _ hx _ hy => subset_sInter fun s hs => (hS s hs).out (hx s hs) (hy s hs)⟩
+#align set.ord_connected_sInter Set.ordConnected_sInter
-theorem ordConnected_interᵢ {ι : Sort _} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
+theorem ordConnected_iInter {ι : Sort _} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
OrdConnected (⋂ i, s i) :=
- ordConnected_interₛ <| forall_range_iff.2 hs
-#align set.ord_connected_Inter Set.ordConnected_interᵢ
+ ordConnected_sInter <| forall_range_iff.2 hs
+#align set.ord_connected_Inter Set.ordConnected_iInter
-instance ordConnected_interᵢ' {ι : Sort _} {s : ι → Set α} [∀ i, OrdConnected (s i)] :
+instance ordConnected_iInter' {ι : Sort _} {s : ι → Set α} [∀ i, OrdConnected (s i)] :
OrdConnected (⋂ i, s i) :=
- ordConnected_interᵢ ‹_›
-#align set.ord_connected_Inter' Set.ordConnected_interᵢ'
+ ordConnected_iInter ‹_›
+#align set.ord_connected_Inter' Set.ordConnected_iInter'
/- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (i hi) -/
-theorem ordConnected_binterᵢ {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (_ : p i), Set α}
+theorem ordConnected_biInter {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (_ : p i), Set α}
(hs : ∀ i hi, OrdConnected (s i hi)) : OrdConnected (⋂ (i) (hi), s i hi) :=
- ordConnected_interᵢ fun i => ordConnected_interᵢ <| hs i
-#align set.ord_connected_bInter Set.ordConnected_binterᵢ
+ ordConnected_iInter fun i => ordConnected_iInter <| hs i
+#align set.ord_connected_bInter Set.ordConnected_biInter
theorem ordConnected_pi {ι : Type _} {α : ι → Type _} [∀ i, Preorder (α i)] {s : Set ι}
{t : ∀ i, Set (α i)} (h : ∀ i ∈ s, OrdConnected (t i)) : OrdConnected (s.pi t) :=
The change to Mathlib/Data/Set/Intervals/OrdConnected.lean
was already forward-ported in #3077.
Also fixes a remaining simple_graph
in the comments of one of the files.
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
! This file was ported from Lean 3 source module data.set.intervals.ord_connected
-! leanprover-community/mathlib commit b19481deb571022990f1baa9cbf9172e6757a479
+! leanprover-community/mathlib commit 76de8ae01554c3b37d66544866659ff174e66e1f
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -4,12 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
! This file was ported from Lean 3 source module data.set.intervals.ord_connected
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
+! leanprover-community/mathlib commit b19481deb571022990f1baa9cbf9172e6757a479
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Data.Set.Intervals.UnorderedInterval
import Mathlib.Data.Set.Lattice
+import Mathlib.Order.Antichain
/-!
# Order-connected sets
@@ -226,6 +227,19 @@ theorem dual_ordConnected {s : Set α} [OrdConnected s] : OrdConnected (ofDual
end Preorder
+section PartialOrder
+
+variable {α : Type _} [PartialOrder α] {s : Set α}
+
+protected theorem _root_.IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected :=
+ ⟨fun x hx y hy z hz => by
+ obtain rfl := hs.eq hx hy (hz.1.trans hz.2)
+ rw [Icc_self, mem_singleton_iff] at hz
+ rwa [hz]⟩
+#align is_antichain.ord_connected IsAntichain.ordConnected
+
+end PartialOrder
+
section LinearOrder
variable {α : Type _} [LinearOrder α] {s : Set α} {x : α}
Implements a linter for lean 3 declarations containing capital letters (as suggested on Zulip).
Co-authored-by: Mario Carneiro <di.gama@gmail.com>
@@ -148,7 +148,7 @@ theorem ordConnected_Ioi {a : α} : OrdConnected (Ioi a) :=
@[instance]
theorem ordConnected_Iio {a : α} : OrdConnected (Iio a) :=
⟨fun _ _ _ hy _ hz => lt_of_le_of_lt hz.2 hy⟩
-#align set.OrdConnected_Iio Set.ordConnected_Iio
+#align set.ord_connected_Iio Set.ordConnected_Iio
@[instance]
theorem ordConnected_Icc {a b : α} : OrdConnected (Icc a b) :=
@@ -23,8 +23,7 @@ In this file we prove that intersection of a family of `OrdConnected` sets is `O
that all standard intervals are `OrdConnected`.
-/
--- porting note: namespace `Interval` is not found, commented out following line
--- open Interval
+open Interval
open OrderDual (toDual ofDual)
uIcc
/uIoc
(#1496)
Match https://github.com/leanprover-community/mathlib/pull/18104
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
! This file was ported from Lean 3 source module data.set.intervals.ord_connected
-! leanprover-community/mathlib commit ba2245edf0c8bb155f1569fd9b9492a9b384cde6
+! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -232,44 +232,44 @@ section LinearOrder
variable {α : Type _} [LinearOrder α] {s : Set α} {x : α}
@[instance]
-theorem ordConnected_interval {a b : α} : OrdConnected [[a, b]] :=
+theorem ordConnected_uIcc {a b : α} : OrdConnected [[a, b]] :=
ordConnected_Icc
-#align set.ord_connected_interval Set.ordConnected_interval
+#align set.ord_connected_uIcc Set.ordConnected_uIcc
@[instance]
-theorem ordConnected_interval_oc {a b : α} : OrdConnected (Ι a b) :=
+theorem ordConnected_uIoc {a b : α} : OrdConnected (Ι a b) :=
ordConnected_Ioc
-#align set.ord_connected_interval_oc Set.ordConnected_interval_oc
+#align set.ord_connected_uIoc Set.ordConnected_uIoc
-theorem OrdConnected.interval_subset (hs : OrdConnected s) ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) :
+theorem OrdConnected.uIcc_subset (hs : OrdConnected s) ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) :
[[x, y]] ⊆ s :=
hs.out (min_rec' (· ∈ s) hx hy) (max_rec' (· ∈ s) hx hy)
-#align set.ord_connected.interval_subset Set.OrdConnected.interval_subset
+#align set.ord_connected.uIcc_subset Set.OrdConnected.uIcc_subset
-theorem OrdConnected.interval_oc_subset (hs : OrdConnected s) ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) :
+theorem OrdConnected.uIoc_subset (hs : OrdConnected s) ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) :
Ι x y ⊆ s :=
- Ioc_subset_Icc_self.trans <| hs.interval_subset hx hy
-#align set.ord_connected.interval_oc_subset Set.OrdConnected.interval_oc_subset
+ Ioc_subset_Icc_self.trans <| hs.uIcc_subset hx hy
+#align set.ord_connected.uIoc_subset Set.OrdConnected.uIoc_subset
-theorem ordConnected_iff_interval_subset :
+theorem ordConnected_iff_uIcc_subset :
OrdConnected s ↔ ∀ ⦃x⦄ (_ : x ∈ s) ⦃y⦄ (_ : y ∈ s), [[x, y]] ⊆ s :=
- ⟨fun h => h.interval_subset, fun H => ⟨fun _ hx _ hy => Icc_subset_interval.trans <| H hx hy⟩⟩
-#align set.ord_connected_iff_interval_subset Set.ordConnected_iff_interval_subset
+ ⟨fun h => h.uIcc_subset, fun H => ⟨fun _ hx _ hy => Icc_subset_uIcc.trans <| H hx hy⟩⟩
+#align set.ord_connected_iff_uIcc_subset Set.ordConnected_iff_uIcc_subset
-theorem ordConnected_of_interval_subset_left (h : ∀ y ∈ s, [[x, y]] ⊆ s) : OrdConnected s :=
- ordConnected_iff_interval_subset.2 fun y hy z hz =>
+theorem ordConnected_of_uIcc_subset_left (h : ∀ y ∈ s, [[x, y]] ⊆ s) : OrdConnected s :=
+ ordConnected_iff_uIcc_subset.2 fun y hy z hz =>
calc
- [[y, z]] ⊆ [[y, x]] ∪ [[x, z]] := interval_subset_interval_union_interval
- _ = [[x, y]] ∪ [[x, z]] := by rw [interval_swap]
+ [[y, z]] ⊆ [[y, x]] ∪ [[x, z]] := uIcc_subset_uIcc_union_uIcc
+ _ = [[x, y]] ∪ [[x, z]] := by rw [uIcc_comm]
_ ⊆ s := union_subset (h y hy) (h z hz)
-#align set.ord_connected_of_interval_subset_left Set.ordConnected_of_interval_subset_left
+#align set.ord_connected_of_uIcc_subset_left Set.ordConnected_of_uIcc_subset_left
-theorem ordConnected_iff_interval_subset_left (hx : x ∈ s) :
+theorem ordConnected_iff_uIcc_subset_left (hx : x ∈ s) :
OrdConnected s ↔ ∀ ⦃y⦄, y ∈ s → [[x, y]] ⊆ s :=
- ⟨fun hs => hs.interval_subset hx, ordConnected_of_interval_subset_left⟩
-#align set.ord_connected_iff_interval_subset_left Set.ordConnected_iff_interval_subset_left
+ ⟨fun hs => hs.uIcc_subset hx, ordConnected_of_uIcc_subset_left⟩
+#align set.ord_connected_iff_uIcc_subset_left Set.ordConnected_iff_uIcc_subset_left
-theorem ordConnected_iff_interval_subset_right (hx : x ∈ s) :
+theorem ordConnected_iff_uIcc_subset_right (hx : x ∈ s) :
OrdConnected s ↔ ∀ ⦃y⦄, y ∈ s → [[y, x]] ⊆ s := by
- simp_rw [ordConnected_iff_interval_subset_left hx, interval_swap]
-#align set.ord_connected_iff_interval_subset_right Set.ordConnected_iff_interval_subset_right
+ simp_rw [ordConnected_iff_uIcc_subset_left hx, uIcc_comm]
+#align set.ord_connected_iff_uIcc_subset_right Set.ordConnected_iff_uIcc_subset_right
@@ -47,24 +47,24 @@ theorem OrdConnected.out (h : OrdConnected s) : ∀ ⦃x⦄ (_ : x ∈ s) ⦃y
h.1
#align set.ord_connected.out Set.OrdConnected.out
-theorem OrdConnected_def : OrdConnected s ↔ ∀ ⦃x⦄ (_ : x ∈ s) ⦃y⦄ (_ : y ∈ s), Icc x y ⊆ s :=
+theorem ordConnected_def : OrdConnected s ↔ ∀ ⦃x⦄ (_ : x ∈ s) ⦃y⦄ (_ : y ∈ s), Icc x y ⊆ s :=
⟨fun h => h.1, fun h => ⟨h⟩⟩
-#align set.ord_connected_def Set.OrdConnected_def
+#align set.ord_connected_def Set.ordConnected_def
/-- It suffices to prove `[[x, y]] ⊆ s` for `x y ∈ s`, `x ≤ y`. -/
-theorem OrdConnected_iff : OrdConnected s ↔ ∀ x ∈ s, ∀ y ∈ s, x ≤ y → Icc x y ⊆ s :=
- OrdConnected_def.trans
+theorem ordConnected_iff : OrdConnected s ↔ ∀ x ∈ s, ∀ y ∈ s, x ≤ y → Icc x y ⊆ s :=
+ ordConnected_def.trans
⟨fun hs _ hx _ hy _ => hs hx hy, fun H x hx y hy _ hz => H x hx y hy (le_trans hz.1 hz.2) hz⟩
-#align set.ord_connected_iff Set.OrdConnected_iff
+#align set.ord_connected_iff Set.ordConnected_iff
-theorem OrdConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
+theorem ordConnected_of_Ioo {α : Type _} [PartialOrder α] {s : Set α}
(hs : ∀ x ∈ s, ∀ y ∈ s, x < y → Ioo x y ⊆ s) : OrdConnected s := by
- rw [OrdConnected_iff]
+ rw [ordConnected_iff]
intro x hx y hy hxy
rcases eq_or_lt_of_le hxy with (rfl | hxy'); · simpa
rw [← Ioc_insert_left hxy, ← Ioo_insert_right hxy']
exact insert_subset.2 ⟨hx, insert_subset.2 ⟨hy, hs x hx y hy hxy'⟩⟩
-#align set.ord_connected_of_Ioo Set.OrdConnected_of_Ioo
+#align set.ord_connected_of_Ioo Set.ordConnected_of_Ioo
theorem OrdConnected.preimage_mono {f : β → α} (hs : OrdConnected s) (hf : Monotone f) :
OrdConnected (f ⁻¹' s) :=
@@ -96,97 +96,97 @@ theorem OrdConnected.dual {s : Set α} (hs : OrdConnected s) :
⟨fun _ hx _ hy _ hz => hs.out hy hx ⟨hz.2, hz.1⟩⟩
#align set.ord_connected.dual Set.OrdConnected.dual
-theorem OrdConnected_dual {s : Set α} : OrdConnected (OrderDual.ofDual ⁻¹' s) ↔ OrdConnected s :=
- ⟨fun h => by simpa only [OrdConnected_def] using h.dual, fun h => h.dual⟩
-#align set.ord_connected_dual Set.OrdConnected_dual
+theorem ordConnected_dual {s : Set α} : OrdConnected (OrderDual.ofDual ⁻¹' s) ↔ OrdConnected s :=
+ ⟨fun h => by simpa only [ordConnected_def] using h.dual, fun h => h.dual⟩
+#align set.ord_connected_dual Set.ordConnected_dual
-theorem OrdConnected_interₛ {S : Set (Set α)} (hS : ∀ s ∈ S, OrdConnected s) :
+theorem ordConnected_interₛ {S : Set (Set α)} (hS : ∀ s ∈ S, OrdConnected s) :
OrdConnected (⋂₀ S) :=
⟨fun _ hx _ hy => subset_interₛ fun s hs => (hS s hs).out (hx s hs) (hy s hs)⟩
-#align set.ord_connected_sInter Set.OrdConnected_interₛ
+#align set.ord_connected_sInter Set.ordConnected_interₛ
-theorem OrdConnected_interᵢ {ι : Sort _} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
+theorem ordConnected_interᵢ {ι : Sort _} {s : ι → Set α} (hs : ∀ i, OrdConnected (s i)) :
OrdConnected (⋂ i, s i) :=
- OrdConnected_interₛ <| forall_range_iff.2 hs
-#align set.ord_connected_Inter Set.OrdConnected_interᵢ
+ ordConnected_interₛ <| forall_range_iff.2 hs
+#align set.ord_connected_Inter Set.ordConnected_interᵢ
-instance OrdConnected_interᵢ' {ι : Sort _} {s : ι → Set α} [∀ i, OrdConnected (s i)] :
+instance ordConnected_interᵢ' {ι : Sort _} {s : ι → Set α} [∀ i, OrdConnected (s i)] :
OrdConnected (⋂ i, s i) :=
- OrdConnected_interᵢ ‹_›
-#align set.ord_connected_Inter' Set.OrdConnected_interᵢ'
+ ordConnected_interᵢ ‹_›
+#align set.ord_connected_Inter' Set.ordConnected_interᵢ'
/- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (i hi) -/
-theorem OrdConnected_binterᵢ {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (_ : p i), Set α}
+theorem ordConnected_binterᵢ {ι : Sort _} {p : ι → Prop} {s : ∀ (i : ι) (_ : p i), Set α}
(hs : ∀ i hi, OrdConnected (s i hi)) : OrdConnected (⋂ (i) (hi), s i hi) :=
- OrdConnected_interᵢ fun i => OrdConnected_interᵢ <| hs i
-#align set.ord_connected_bInter Set.OrdConnected_binterᵢ
+ ordConnected_interᵢ fun i => ordConnected_interᵢ <| hs i
+#align set.ord_connected_bInter Set.ordConnected_binterᵢ
-theorem OrdConnected_pi {ι : Type _} {α : ι → Type _} [∀ i, Preorder (α i)] {s : Set ι}
+theorem ordConnected_pi {ι : Type _} {α : ι → Type _} [∀ i, Preorder (α i)] {s : Set ι}
{t : ∀ i, Set (α i)} (h : ∀ i ∈ s, OrdConnected (t i)) : OrdConnected (s.pi t) :=
⟨fun _ hx _ hy _ hz i hi => (h i hi).out (hx i hi) (hy i hi) ⟨hz.1 i, hz.2 i⟩⟩
-#align set.ord_connected_pi Set.OrdConnected_pi
+#align set.ord_connected_pi Set.ordConnected_pi
-instance OrdConnected_pi' {ι : Type _} {α : ι → Type _} [∀ i, Preorder (α i)] {s : Set ι}
+instance ordConnected_pi' {ι : Type _} {α : ι → Type _} [∀ i, Preorder (α i)] {s : Set ι}
{t : ∀ i, Set (α i)} [h : ∀ i, OrdConnected (t i)] : OrdConnected (s.pi t) :=
- OrdConnected_pi fun i _ => h i
-#align set.ord_connected_pi' Set.OrdConnected_pi'
+ ordConnected_pi fun i _ => h i
+#align set.ord_connected_pi' Set.ordConnected_pi'
@[instance]
-theorem OrdConnected_Ici {a : α} : OrdConnected (Ici a) :=
+theorem ordConnected_Ici {a : α} : OrdConnected (Ici a) :=
⟨fun _ hx _ _ _ hz => le_trans hx hz.1⟩
-#align set.ord_connected_Ici Set.OrdConnected_Ici
+#align set.ord_connected_Ici Set.ordConnected_Ici
@[instance]
-theorem OrdConnected_Iic {a : α} : OrdConnected (Iic a) :=
+theorem ordConnected_Iic {a : α} : OrdConnected (Iic a) :=
⟨fun _ _ _ hy _ hz => le_trans hz.2 hy⟩
-#align set.ord_connected_Iic Set.OrdConnected_Iic
+#align set.ord_connected_Iic Set.ordConnected_Iic
@[instance]
-theorem OrdConnected_Ioi {a : α} : OrdConnected (Ioi a) :=
+theorem ordConnected_Ioi {a : α} : OrdConnected (Ioi a) :=
⟨fun _ hx _ _ _ hz => lt_of_lt_of_le hx hz.1⟩
-#align set.ord_connected_Ioi Set.OrdConnected_Ioi
+#align set.ord_connected_Ioi Set.ordConnected_Ioi
@[instance]
-theorem OrdConnected_Iio {a : α} : OrdConnected (Iio a) :=
+theorem ordConnected_Iio {a : α} : OrdConnected (Iio a) :=
⟨fun _ _ _ hy _ hz => lt_of_le_of_lt hz.2 hy⟩
-#align set.OrdConnected_Iio Set.OrdConnected_Iio
+#align set.OrdConnected_Iio Set.ordConnected_Iio
@[instance]
-theorem OrdConnected_Icc {a b : α} : OrdConnected (Icc a b) :=
- OrdConnected_Ici.inter OrdConnected_Iic
-#align set.ord_connected_Icc Set.OrdConnected_Icc
+theorem ordConnected_Icc {a b : α} : OrdConnected (Icc a b) :=
+ ordConnected_Ici.inter ordConnected_Iic
+#align set.ord_connected_Icc Set.ordConnected_Icc
@[instance]
-theorem OrdConnected_Ico {a b : α} : OrdConnected (Ico a b) :=
- OrdConnected_Ici.inter OrdConnected_Iio
-#align set.ord_connected_Ico Set.OrdConnected_Ico
+theorem ordConnected_Ico {a b : α} : OrdConnected (Ico a b) :=
+ ordConnected_Ici.inter ordConnected_Iio
+#align set.ord_connected_Ico Set.ordConnected_Ico
@[instance]
-theorem OrdConnected_Ioc {a b : α} : OrdConnected (Ioc a b) :=
- OrdConnected_Ioi.inter OrdConnected_Iic
-#align set.ord_connected_Ioc Set.OrdConnected_Ioc
+theorem ordConnected_Ioc {a b : α} : OrdConnected (Ioc a b) :=
+ ordConnected_Ioi.inter ordConnected_Iic
+#align set.ord_connected_Ioc Set.ordConnected_Ioc
@[instance]
-theorem OrdConnected_Ioo {a b : α} : OrdConnected (Ioo a b) :=
- OrdConnected_Ioi.inter OrdConnected_Iio
-#align set.ord_connected_Ioo Set.OrdConnected_Ioo
+theorem ordConnected_Ioo {a b : α} : OrdConnected (Ioo a b) :=
+ ordConnected_Ioi.inter ordConnected_Iio
+#align set.ord_connected_Ioo Set.ordConnected_Ioo
@[instance]
-theorem OrdConnected_singleton {α : Type _} [PartialOrder α] {a : α} :
+theorem ordConnected_singleton {α : Type _} [PartialOrder α] {a : α} :
OrdConnected ({a} : Set α) := by
rw [← Icc_self]
- exact OrdConnected_Icc
-#align set.ord_connected_singleton Set.OrdConnected_singleton
+ exact ordConnected_Icc
+#align set.ord_connected_singleton Set.ordConnected_singleton
@[instance]
-theorem OrdConnected_empty : OrdConnected (∅ : Set α) :=
+theorem ordConnected_empty : OrdConnected (∅ : Set α) :=
⟨fun _ => False.elim⟩
-#align set.ord_connected_empty Set.OrdConnected_empty
+#align set.ord_connected_empty Set.ordConnected_empty
@[instance]
-theorem OrdConnected_univ : OrdConnected (univ : Set α) :=
+theorem ordConnected_univ : OrdConnected (univ : Set α) :=
⟨fun _ _ _ _ => subset_univ _⟩
-#align set.ord_connected_univ Set.OrdConnected_univ
+#align set.ord_connected_univ Set.ordConnected_univ
/-- In a dense order `α`, the subtype from an `OrdConnected` set is also densely ordered. -/
instance [DenselyOrdered α] {s : Set α} [hs : OrdConnected s] : DenselyOrdered s :=
@@ -195,35 +195,35 @@ instance [DenselyOrdered α] {s : Set α} [hs : OrdConnected s] : DenselyOrdered
⟨⟨x, (hs.out a.2 b.2) (Ioo_subset_Icc_self H)⟩, H⟩⟩
@[instance]
-theorem OrdConnected_preimage {F : Type _} [OrderHomClass F α β] (f : F) {s : Set β}
+theorem ordConnected_preimage {F : Type _} [OrderHomClass F α β] (f : F) {s : Set β}
[hs : OrdConnected s] : OrdConnected (f ⁻¹' s) :=
⟨fun _ hx _ hy _ hz => hs.out hx hy ⟨OrderHomClass.mono _ hz.1, OrderHomClass.mono _ hz.2⟩⟩
-#align set.ord_connected_preimage Set.OrdConnected_preimage
+#align set.ord_connected_preimage Set.ordConnected_preimage
@[instance]
-theorem OrdConnected_image {E : Type _} [OrderIsoClass E α β] (e : E) {s : Set α}
+theorem ordConnected_image {E : Type _} [OrderIsoClass E α β] (e : E) {s : Set α}
[hs : OrdConnected s] : OrdConnected (e '' s) := by
erw [(e : α ≃o β).image_eq_preimage]
- apply OrdConnected_preimage (e : α ≃o β).symm
-#align set.ord_connected_image Set.OrdConnected_image
+ apply ordConnected_preimage (e : α ≃o β).symm
+#align set.ord_connected_image Set.ordConnected_image
-- porting note: split up `simp_rw [← image_univ, OrdConnected_image e]`, would not work otherwise
@[instance]
-theorem OrdConnected_range {E : Type _} [OrderIsoClass E α β] (e : E) : OrdConnected (range e) := by
+theorem ordConnected_range {E : Type _} [OrderIsoClass E α β] (e : E) : OrdConnected (range e) := by
simp_rw [← image_univ]
- exact OrdConnected_image (e : α ≃o β)
-#align set.ord_connected_range Set.OrdConnected_range
+ exact ordConnected_image (e : α ≃o β)
+#align set.ord_connected_range Set.ordConnected_range
@[simp]
-theorem dual_OrdConnected_iff {s : Set α} : OrdConnected (ofDual ⁻¹' s) ↔ OrdConnected s := by
- simp_rw [OrdConnected_def, toDual.surjective.forall, dual_Icc, Subtype.forall']
+theorem dual_ordConnected_iff {s : Set α} : OrdConnected (ofDual ⁻¹' s) ↔ OrdConnected s := by
+ simp_rw [ordConnected_def, toDual.surjective.forall, dual_Icc, Subtype.forall']
exact forall_swap
-#align set.dual_ord_connected_iff Set.dual_OrdConnected_iff
+#align set.dual_ord_connected_iff Set.dual_ordConnected_iff
@[instance]
-theorem dual_OrdConnected {s : Set α} [OrdConnected s] : OrdConnected (ofDual ⁻¹' s) :=
- dual_OrdConnected_iff.2 ‹_›
-#align set.dual_ord_connected Set.dual_OrdConnected
+theorem dual_ordConnected {s : Set α} [OrdConnected s] : OrdConnected (ofDual ⁻¹' s) :=
+ dual_ordConnected_iff.2 ‹_›
+#align set.dual_ord_connected Set.dual_ordConnected
end Preorder
@@ -232,14 +232,14 @@ section LinearOrder
variable {α : Type _} [LinearOrder α] {s : Set α} {x : α}
@[instance]
-theorem OrdConnected_interval {a b : α} : OrdConnected [[a, b]] :=
- OrdConnected_Icc
-#align set.ord_connected_interval Set.OrdConnected_interval
+theorem ordConnected_interval {a b : α} : OrdConnected [[a, b]] :=
+ ordConnected_Icc
+#align set.ord_connected_interval Set.ordConnected_interval
@[instance]
-theorem OrdConnected_interval_oc {a b : α} : OrdConnected (Ι a b) :=
- OrdConnected_Ioc
-#align set.ord_connected_interval_oc Set.OrdConnected_interval_oc
+theorem ordConnected_interval_oc {a b : α} : OrdConnected (Ι a b) :=
+ ordConnected_Ioc
+#align set.ord_connected_interval_oc Set.ordConnected_interval_oc
theorem OrdConnected.interval_subset (hs : OrdConnected s) ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) :
[[x, y]] ⊆ s :=
@@ -251,25 +251,25 @@ theorem OrdConnected.interval_oc_subset (hs : OrdConnected s) ⦃x⦄ (hx : x
Ioc_subset_Icc_self.trans <| hs.interval_subset hx hy
#align set.ord_connected.interval_oc_subset Set.OrdConnected.interval_oc_subset
-theorem OrdConnected_iff_interval_subset :
+theorem ordConnected_iff_interval_subset :
OrdConnected s ↔ ∀ ⦃x⦄ (_ : x ∈ s) ⦃y⦄ (_ : y ∈ s), [[x, y]] ⊆ s :=
⟨fun h => h.interval_subset, fun H => ⟨fun _ hx _ hy => Icc_subset_interval.trans <| H hx hy⟩⟩
-#align set.ord_connected_iff_interval_subset Set.OrdConnected_iff_interval_subset
+#align set.ord_connected_iff_interval_subset Set.ordConnected_iff_interval_subset
-theorem OrdConnected_of_interval_subset_left (h : ∀ y ∈ s, [[x, y]] ⊆ s) : OrdConnected s :=
- OrdConnected_iff_interval_subset.2 fun y hy z hz =>
+theorem ordConnected_of_interval_subset_left (h : ∀ y ∈ s, [[x, y]] ⊆ s) : OrdConnected s :=
+ ordConnected_iff_interval_subset.2 fun y hy z hz =>
calc
[[y, z]] ⊆ [[y, x]] ∪ [[x, z]] := interval_subset_interval_union_interval
_ = [[x, y]] ∪ [[x, z]] := by rw [interval_swap]
_ ⊆ s := union_subset (h y hy) (h z hz)
-#align set.ord_connected_of_interval_subset_left Set.OrdConnected_of_interval_subset_left
+#align set.ord_connected_of_interval_subset_left Set.ordConnected_of_interval_subset_left
-theorem OrdConnected_iff_interval_subset_left (hx : x ∈ s) :
+theorem ordConnected_iff_interval_subset_left (hx : x ∈ s) :
OrdConnected s ↔ ∀ ⦃y⦄, y ∈ s → [[x, y]] ⊆ s :=
- ⟨fun hs => hs.interval_subset hx, OrdConnected_of_interval_subset_left⟩
-#align set.ord_connected_iff_interval_subset_left Set.OrdConnected_iff_interval_subset_left
+ ⟨fun hs => hs.interval_subset hx, ordConnected_of_interval_subset_left⟩
+#align set.ord_connected_iff_interval_subset_left Set.ordConnected_iff_interval_subset_left
-theorem OrdConnected_iff_interval_subset_right (hx : x ∈ s) :
+theorem ordConnected_iff_interval_subset_right (hx : x ∈ s) :
OrdConnected s ↔ ∀ ⦃y⦄, y ∈ s → [[y, x]] ⊆ s := by
- simp_rw [OrdConnected_iff_interval_subset_left hx, interval_swap]
-#align set.ord_connected_iff_interval_subset_right Set.OrdConnected_iff_interval_subset_right
+ simp_rw [ordConnected_iff_interval_subset_left hx, interval_swap]
+#align set.ord_connected_iff_interval_subset_right Set.ordConnected_iff_interval_subset_right
All dependencies are ported!