data.set.intervals.ord_connected_component
⟷
Mathlib.Data.Set.Intervals.OrdConnectedComponent
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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
wlog
(#16495)
Benefits:
Downside:
Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/wlog/near/296996966
Co-authored-by: Yury G. Kudryashov <urkud@urkud.name> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -165,8 +165,8 @@ begin
rcases mem_Union₂.1 hx₁ with ⟨a, has, ha⟩, clear hx₁,
rcases mem_Union₂.1 hx₂ with ⟨b, hbt, hb⟩, clear hx₂,
rw [mem_ord_connected_component, subset_inter_iff] at ha hb,
- wlog hab : a ≤ b := le_total a b using [a b s t, b a t s] tactic.skip,
- rotate, from λ h₁ h₂ h₃ h₄, this h₂ h₁ h₄ h₃,
+ wlog hab : a ≤ b,
+ { exact this b hbt a has ha hb (le_of_not_le hab) },
cases ha with ha ha', cases hb with hb hb',
have hsub : [a, b] ⊆ (ord_separating_set s t).ord_connected_sectionᶜ,
{ rw [ord_separating_set_comm, uIcc_comm] at hb',
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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
@@ -13,7 +13,7 @@ import tactic.wlog
> Any changes to this file require a corresponding PR to mathlib4.
In this file we define `set.ord_connected_component s x` to be the set of `y` such that
-`set.interval x y ⊆ s` and prove some basic facts about this definition. At the moment of writing,
+`set.uIcc x y ⊆ s` and prove some basic facts about this definition. At the moment of writing,
this construction is used only to prove that any linear order with order topology is a T₅ space,
so we only add API needed for this lemma.
-/
@@ -26,7 +26,7 @@ namespace set
variables {α : Type*} [linear_order α] {s t : set α} {x y z : α}
/-- Order-connected component of a point `x` in a set `s`. It is defined as the set of `y` such that
-`set.interval x y ⊆ s`. Note that it is empty if and only if `x ∉ s`. -/
+`set.uIcc x y ⊆ s`. Note that it is empty if and only if `x ∉ s`. -/
def ord_connected_component (s : set α) (x : α) : set α := {y | [x, y] ⊆ s}
lemma mem_ord_connected_component : y ∈ ord_connected_component s x ↔ [x, y] ⊆ s := iff.rfl
@@ -34,20 +34,19 @@ lemma mem_ord_connected_component : y ∈ ord_connected_component s x ↔ [x, y]
lemma dual_ord_connected_component :
ord_connected_component (of_dual ⁻¹' s) (to_dual x) = of_dual ⁻¹' (ord_connected_component s x) :=
ext $ to_dual.surjective.forall.2 $ λ x,
- by { rw [mem_ord_connected_component, dual_interval], refl }
+ by { rw [mem_ord_connected_component, dual_uIcc], refl }
-lemma ord_connected_component_subset : ord_connected_component s x ⊆ s :=
-λ y hy, hy right_mem_interval
+lemma ord_connected_component_subset : ord_connected_component s x ⊆ s := λ y hy, hy right_mem_uIcc
lemma subset_ord_connected_component {t} [h : ord_connected s] (hs : x ∈ s) (ht : s ⊆ t) :
s ⊆ ord_connected_component t x :=
-λ y hy, (h.interval_subset hs hy).trans ht
+λ y hy, (h.uIcc_subset hs hy).trans ht
@[simp] lemma self_mem_ord_connected_component : x ∈ ord_connected_component s x ↔ x ∈ s :=
-by rw [mem_ord_connected_component, interval_self, singleton_subset_iff]
+by rw [mem_ord_connected_component, uIcc_self, singleton_subset_iff]
@[simp] lemma nonempty_ord_connected_component : (ord_connected_component s x).nonempty ↔ x ∈ s :=
-⟨λ ⟨y, hy⟩, hy $ left_mem_interval, λ h, ⟨x, self_mem_ord_connected_component.2 h⟩⟩
+⟨λ ⟨y, hy⟩, hy $ left_mem_uIcc, λ h, ⟨x, self_mem_ord_connected_component.2 h⟩⟩
@[simp] lemma ord_connected_component_eq_empty : ord_connected_component s x = ∅ ↔ x ∉ s :=
by rw [← not_nonempty_iff_eq_empty, nonempty_ord_connected_component]
@@ -64,11 +63,11 @@ by simp [ord_connected_component, set_of_and]
lemma mem_ord_connected_component_comm :
y ∈ ord_connected_component s x ↔ x ∈ ord_connected_component s y :=
-by rw [mem_ord_connected_component, mem_ord_connected_component, interval_swap]
+by rw [mem_ord_connected_component, mem_ord_connected_component, uIcc_comm]
lemma mem_ord_connected_component_trans (hxy : y ∈ ord_connected_component s x)
(hyz : z ∈ ord_connected_component s y) : z ∈ ord_connected_component s x :=
-calc [x, z] ⊆ [x, y] ∪ [y, z] : interval_subset_interval_union_interval
+calc [x, z] ⊆ [x, y] ∪ [y, z] : uIcc_subset_uIcc_union_uIcc
... ⊆ s : union_subset hxy hyz
lemma ord_connected_component_eq (h : [x, y] ⊆ s) :
@@ -77,7 +76,7 @@ ext $ λ z, ⟨mem_ord_connected_component_trans (mem_ord_connected_component_co
mem_ord_connected_component_trans h⟩
instance : ord_connected (ord_connected_component s x) :=
-ord_connected_of_interval_subset_left $ λ y hy z hz, (interval_subset_interval_left hz).trans hy
+ord_connected_of_uIcc_subset_left $ λ y hy z hz, (uIcc_subset_uIcc_left hz).trans hy
/-- Projection from `s : set α` to `α` sending each order connected component of `s` to a single
point of this component. -/
@@ -123,7 +122,7 @@ end
lemma ord_connected_section_subset : ord_connected_section s ⊆ s :=
range_subset_iff.2 $ λ x, ord_connected_component_subset $ nonempty.some_mem _
-lemma eq_of_mem_ord_connected_section_of_interval_subset (hx : x ∈ ord_connected_section s)
+lemma eq_of_mem_ord_connected_section_of_uIcc_subset (hx : x ∈ ord_connected_section s)
(hy : y ∈ ord_connected_section s) (h : [x, y] ⊆ s) : x = y :=
begin
rcases hx with ⟨x, rfl⟩, rcases hy with ⟨y, rfl⟩,
@@ -170,25 +169,25 @@ begin
rotate, from λ h₁ h₂ h₃ h₄, this h₂ h₁ h₄ h₃,
cases ha with ha ha', cases hb with hb hb',
have hsub : [a, b] ⊆ (ord_separating_set s t).ord_connected_sectionᶜ,
- { rw [ord_separating_set_comm, interval_swap] at hb',
- calc [a, b] ⊆ [a, x] ∪ [x, b] : interval_subset_interval_union_interval
+ { rw [ord_separating_set_comm, uIcc_comm] at hb',
+ calc [a, b] ⊆ [a, x] ∪ [x, b] : uIcc_subset_uIcc_union_uIcc
... ⊆ (ord_separating_set s t).ord_connected_sectionᶜ : union_subset ha' hb' },
clear ha' hb',
cases le_total x a with hxa hax,
- { exact hb (Icc_subset_interval' ⟨hxa, hab⟩) has },
+ { exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has },
cases le_total b x with hbx hxb,
- { exact ha (Icc_subset_interval ⟨hab, hbx⟩) hbt },
+ { exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt },
have : x ∈ ord_separating_set s t,
{ exact ⟨mem_Union₂.2 ⟨a, has, ha⟩, mem_Union₂.2 ⟨b, hbt, hb⟩⟩ },
lift x to ord_separating_set s t using this,
suffices : ord_connected_component (ord_separating_set s t) x ⊆ [a, b],
from hsub (this $ ord_connected_proj_mem_ord_connected_component _ _) (mem_range_self _),
rintros y (hy : [↑x, y] ⊆ ord_separating_set s t),
- rw [interval_of_le hab, mem_Icc, ← not_lt, ← not_lt],
+ rw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt],
exact ⟨λ hya, disjoint_left.1 disjoint_left_ord_separating_set has
- (hy $ Icc_subset_interval' ⟨hya.le, hax⟩),
+ (hy $ Icc_subset_uIcc' ⟨hya.le, hax⟩),
λ hyb, disjoint_left.1 disjoint_right_ord_separating_set hbt
- (hy $ Icc_subset_interval ⟨hxb, hyb.le⟩)⟩
+ (hy $ Icc_subset_uIcc ⟨hxb, hyb.le⟩)⟩
end
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)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2022 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
-import Data.Set.Intervals.OrdConnected
+import Order.Interval.Set.OrdConnected
import Tactic.Wlog
#align_import data.set.intervals.ord_connected_component from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -266,13 +266,13 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) :=
rintro x ⟨hx₁, hx₂⟩
rcases mem_Union₂.1 hx₁ with ⟨a, has, ha⟩; clear hx₁
rcases mem_Union₂.1 hx₂ with ⟨b, hbt, hb⟩; clear hx₂
- rw [mem_ord_connected_component, subset_inter_iff] at ha hb
+ rw [mem_ord_connected_component, subset_inter_iff] at ha hb
wlog hab : a ≤ b
· exact this b hbt a has ha hb (le_of_not_le hab)
cases' ha with ha ha'; cases' hb with hb hb'
have hsub : [a, b] ⊆ (ord_separating_set s t).ordConnectedSectionᶜ :=
by
- rw [ord_separating_set_comm, uIcc_comm] at hb'
+ rw [ord_separating_set_comm, uIcc_comm] at hb'
calc
[a, b] ⊆ [a, x] ∪ [x, b] := uIcc_subset_uIcc_union_uIcc
_ ⊆ (ord_separating_set s t).ordConnectedSectionᶜ := union_subset ha' hb'
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2022 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
-import Mathbin.Data.Set.Intervals.OrdConnected
-import Mathbin.Tactic.Wlog
+import Data.Set.Intervals.OrdConnected
+import Tactic.Wlog
#align_import data.set.intervals.ord_connected_component from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2022 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module data.set.intervals.ord_connected_component
-! leanprover-community/mathlib commit 92ca63f0fb391a9ca5f22d2409a6080e786d99f7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Set.Intervals.OrdConnected
import Mathbin.Tactic.Wlog
+#align_import data.set.intervals.ord_connected_component from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
+
/-!
# Order connected components of a set
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -100,10 +100,12 @@ theorem ordConnectedComponent_univ : ordConnectedComponent univ x = univ := by
#align set.ord_connected_component_univ Set.ordConnectedComponent_univ
-/
+#print Set.ordConnectedComponent_inter /-
theorem ordConnectedComponent_inter (s t : Set α) (x : α) :
ordConnectedComponent (s ∩ t) x = ordConnectedComponent s x ∩ ordConnectedComponent t x := by
simp [ord_connected_component, set_of_and]
#align set.ord_connected_component_inter Set.ordConnectedComponent_inter
+-/
#print Set.mem_ordConnectedComponent_comm /-
theorem mem_ordConnectedComponent_comm :
@@ -231,15 +233,19 @@ theorem ordSeparatingSet_comm (s t : Set α) : ordSeparatingSet s t = ordSeparat
#align set.ord_separating_set_comm Set.ordSeparatingSet_comm
-/
+#print Set.disjoint_left_ordSeparatingSet /-
theorem disjoint_left_ordSeparatingSet : Disjoint s (ordSeparatingSet s t) :=
Disjoint.inter_right' _ <|
disjoint_iUnion₂_right.2 fun x hx =>
disjoint_compl_right.mono_right <| ordConnectedComponent_subset
#align set.disjoint_left_ord_separating_set Set.disjoint_left_ordSeparatingSet
+-/
+#print Set.disjoint_right_ordSeparatingSet /-
theorem disjoint_right_ordSeparatingSet : Disjoint t (ordSeparatingSet s t) :=
ordSeparatingSet_comm t s ▸ disjoint_left_ordSeparatingSet
#align set.disjoint_right_ord_separating_set Set.disjoint_right_ordSeparatingSet
+-/
#print Set.dual_ordSeparatingSet /-
theorem dual_ordSeparatingSet :
@@ -256,6 +262,7 @@ def ordT5Nhd (s t : Set α) : Set α :=
#align set.ord_t5_nhd Set.ordT5Nhd
-/
+#print Set.disjoint_ordT5Nhd /-
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) :=
by
rw [disjoint_iff_inf_le]
@@ -289,6 +296,7 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) :=
fun hyb =>
disjoint_left.1 disjoint_right_ord_separating_set hbt (hy <| Icc_subset_uIcc ⟨hxb, hyb.le⟩)⟩
#align set.disjoint_ord_t5_nhd Set.disjoint_ordT5Nhd
+-/
end Set
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -118,7 +118,6 @@ theorem mem_ordConnectedComponent_trans (hxy : y ∈ ordConnectedComponent s x)
calc
[x, z] ⊆ [x, y] ∪ [y, z] := uIcc_subset_uIcc_union_uIcc
_ ⊆ s := union_subset hxy hyz
-
#align set.mem_ord_connected_component_trans Set.mem_ordConnectedComponent_trans
-/
@@ -273,7 +272,6 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) :=
calc
[a, b] ⊆ [a, x] ∪ [x, b] := uIcc_subset_uIcc_union_uIcc
_ ⊆ (ord_separating_set s t).ordConnectedSectionᶜ := union_subset ha' hb'
-
clear ha' hb'
cases' le_total x a with hxa hax
· exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -36,7 +36,7 @@ variable {α : Type _} [LinearOrder α] {s t : Set α} {x y z : α}
/-- Order-connected component of a point `x` in a set `s`. It is defined as the set of `y` such that
`set.uIcc x y ⊆ s`. Note that it is empty if and only if `x ∉ s`. -/
def ordConnectedComponent (s : Set α) (x : α) : Set α :=
- { y | [x, y] ⊆ s }
+ {y | [x, y] ⊆ s}
#align set.ord_connected_component Set.ordConnectedComponent
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -263,13 +263,13 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) :=
rintro x ⟨hx₁, hx₂⟩
rcases mem_Union₂.1 hx₁ with ⟨a, has, ha⟩; clear hx₁
rcases mem_Union₂.1 hx₂ with ⟨b, hbt, hb⟩; clear hx₂
- rw [mem_ord_connected_component, subset_inter_iff] at ha hb
+ rw [mem_ord_connected_component, subset_inter_iff] at ha hb
wlog hab : a ≤ b
· exact this b hbt a has ha hb (le_of_not_le hab)
cases' ha with ha ha'; cases' hb with hb hb'
have hsub : [a, b] ⊆ (ord_separating_set s t).ordConnectedSectionᶜ :=
by
- rw [ord_separating_set_comm, uIcc_comm] at hb'
+ rw [ord_separating_set_comm, uIcc_comm] at hb'
calc
[a, b] ⊆ [a, x] ∪ [x, b] := uIcc_subset_uIcc_union_uIcc
_ ⊆ (ord_separating_set s t).ordConnectedSectionᶜ := union_subset ha' hb'
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -26,7 +26,7 @@ so we only add API needed for this lemma.
open Function OrderDual
-open Interval
+open scoped Interval
namespace Set
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -100,12 +100,6 @@ theorem ordConnectedComponent_univ : ordConnectedComponent univ x = univ := by
#align set.ord_connected_component_univ Set.ordConnectedComponent_univ
-/
-/- warning: set.ord_connected_component_inter -> Set.ordConnectedComponent_inter is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (s : Set.{u1} α) (t : Set.{u1} α) (x : α), Eq.{succ u1} (Set.{u1} α) (Set.ordConnectedComponent.{u1} α _inst_1 (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t) x) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (Set.ordConnectedComponent.{u1} α _inst_1 s x) (Set.ordConnectedComponent.{u1} α _inst_1 t x))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (s : Set.{u1} α) (t : Set.{u1} α) (x : α), Eq.{succ u1} (Set.{u1} α) (Set.ordConnectedComponent.{u1} α _inst_1 (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t) x) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (Set.ordConnectedComponent.{u1} α _inst_1 s x) (Set.ordConnectedComponent.{u1} α _inst_1 t x))
-Case conversion may be inaccurate. Consider using '#align set.ord_connected_component_inter Set.ordConnectedComponent_interₓ'. -/
theorem ordConnectedComponent_inter (s t : Set α) (x : α) :
ordConnectedComponent (s ∩ t) x = ordConnectedComponent s x ∩ ordConnectedComponent t x := by
simp [ord_connected_component, set_of_and]
@@ -238,24 +232,12 @@ theorem ordSeparatingSet_comm (s t : Set α) : ordSeparatingSet s t = ordSeparat
#align set.ord_separating_set_comm Set.ordSeparatingSet_comm
-/
-/- warning: set.disjoint_left_ord_separating_set -> Set.disjoint_left_ordSeparatingSet is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, Disjoint.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) s (Set.ordSeparatingSet.{u1} α _inst_1 s t)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, Disjoint.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) s (Set.ordSeparatingSet.{u1} α _inst_1 s t)
-Case conversion may be inaccurate. Consider using '#align set.disjoint_left_ord_separating_set Set.disjoint_left_ordSeparatingSetₓ'. -/
theorem disjoint_left_ordSeparatingSet : Disjoint s (ordSeparatingSet s t) :=
Disjoint.inter_right' _ <|
disjoint_iUnion₂_right.2 fun x hx =>
disjoint_compl_right.mono_right <| ordConnectedComponent_subset
#align set.disjoint_left_ord_separating_set Set.disjoint_left_ordSeparatingSet
-/- warning: set.disjoint_right_ord_separating_set -> Set.disjoint_right_ordSeparatingSet is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, Disjoint.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) t (Set.ordSeparatingSet.{u1} α _inst_1 s t)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, Disjoint.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) t (Set.ordSeparatingSet.{u1} α _inst_1 s t)
-Case conversion may be inaccurate. Consider using '#align set.disjoint_right_ord_separating_set Set.disjoint_right_ordSeparatingSetₓ'. -/
theorem disjoint_right_ordSeparatingSet : Disjoint t (ordSeparatingSet s t) :=
ordSeparatingSet_comm t s ▸ disjoint_left_ordSeparatingSet
#align set.disjoint_right_ord_separating_set Set.disjoint_right_ordSeparatingSet
@@ -275,12 +257,6 @@ def ordT5Nhd (s t : Set α) : Set α :=
#align set.ord_t5_nhd Set.ordT5Nhd
-/
-/- warning: set.disjoint_ord_t5_nhd -> Set.disjoint_ordT5Nhd is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, Disjoint.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) (Set.ordT5Nhd.{u1} α _inst_1 s t) (Set.ordT5Nhd.{u1} α _inst_1 t s)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, Disjoint.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α)))))) (Set.ordT5Nhd.{u1} α _inst_1 s t) (Set.ordT5Nhd.{u1} α _inst_1 t s)
-Case conversion may be inaccurate. Consider using '#align set.disjoint_ord_t5_nhd Set.disjoint_ordT5Nhdₓ'. -/
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) :=
by
rw [disjoint_iff_inf_le]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -49,11 +49,7 @@ theorem mem_ordConnectedComponent : y ∈ ordConnectedComponent s x ↔ [x, y]
#print Set.dual_ordConnectedComponent /-
theorem dual_ordConnectedComponent :
ordConnectedComponent (ofDual ⁻¹' s) (toDual x) = ofDual ⁻¹' ordConnectedComponent s x :=
- ext <|
- toDual.Surjective.forall.2 fun x =>
- by
- rw [mem_ord_connected_component, dual_uIcc]
- rfl
+ ext <| toDual.Surjective.forall.2 fun x => by rw [mem_ord_connected_component, dual_uIcc]; rfl
#align set.dual_ord_connected_component Set.dual_ordConnectedComponent
-/
@@ -289,15 +285,12 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) :=
by
rw [disjoint_iff_inf_le]
rintro x ⟨hx₁, hx₂⟩
- rcases mem_Union₂.1 hx₁ with ⟨a, has, ha⟩
- clear hx₁
- rcases mem_Union₂.1 hx₂ with ⟨b, hbt, hb⟩
- clear hx₂
+ rcases mem_Union₂.1 hx₁ with ⟨a, has, ha⟩; clear hx₁
+ rcases mem_Union₂.1 hx₂ with ⟨b, hbt, hb⟩; clear hx₂
rw [mem_ord_connected_component, subset_inter_iff] at ha hb
wlog hab : a ≤ b
· exact this b hbt a has ha hb (le_of_not_le hab)
- cases' ha with ha ha'
- cases' hb with hb hb'
+ cases' ha with ha ha'; cases' hb with hb hb'
have hsub : [a, b] ⊆ (ord_separating_set s t).ordConnectedSectionᶜ :=
by
rw [ord_separating_set_comm, uIcc_comm] at hb'
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -250,7 +250,7 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align set.disjoint_left_ord_separating_set Set.disjoint_left_ordSeparatingSetₓ'. -/
theorem disjoint_left_ordSeparatingSet : Disjoint s (ordSeparatingSet s t) :=
Disjoint.inter_right' _ <|
- disjoint_unionᵢ₂_right.2 fun x hx =>
+ disjoint_iUnion₂_right.2 fun x hx =>
disjoint_compl_right.mono_right <| ordConnectedComponent_subset
#align set.disjoint_left_ord_separating_set Set.disjoint_left_ordSeparatingSet
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) 2022 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
-import Mathlib.Data.Set.Intervals.OrdConnected
+import Mathlib.Order.Interval.Set.OrdConnected
import Mathlib.Data.Set.Lattice
#align_import data.set.intervals.ord_connected_component from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
…implemented
By now, it has been implemented; use it.
@@ -219,11 +219,10 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
rcases le_total b x with hbx | hxb
· exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt
have h' : x ∈ ordSeparatingSet s t := ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩
- -- Porting note: lift not implemented yet
- -- lift x to ordSeparatingSet s t using this
+ lift x to ordSeparatingSet s t using h'
suffices ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]] from
- hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)
- rintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)
+ hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ x) (mem_range_self _)
+ rintro y hy
rw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]
have sol1 := fun (hya : y < a) =>
(disjoint_left (t := ordSeparatingSet s t)).1 disjoint_left_ordSeparatingSet has
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -219,7 +219,7 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
rcases le_total b x with hbx | hxb
· exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt
have h' : x ∈ ordSeparatingSet s t := ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩
- -- porting note: lift not implemented yet
+ -- Porting note: lift not implemented yet
-- lift x to ordSeparatingSet s t using this
suffices ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]] from
hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.OrdConnected
+import Mathlib.Data.Set.Lattice
#align_import data.set.intervals.ord_connected_component from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
@@ -203,35 +203,32 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
clear hx₂
rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
- rcases le_total a b with hab | hab
- on_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
- all_goals
--- porting note: wlog not implemented yet, the following replaces the three previous lines
--- wlog (discharger := tactic.skip) hab : a ≤ b := le_total a b using a b s t, b a t s
- cases' ha with ha ha'
- cases' hb with hb hb'
- have hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := by
- rw [ordSeparatingSet_comm, uIcc_comm] at hb'
- calc
- [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc
- _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'
- clear ha' hb'
- rcases le_total x a with hxa | hax
- · exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has
- rcases le_total b x with hbx | hxb
- · exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt
- have h' : x ∈ ordSeparatingSet s t := ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩
- -- porting note: lift not implemented yet
- -- lift x to ordSeparatingSet s t using this
- suffices ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]] from
- hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)
- rintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)
- rw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]
- have sol1 := fun (hya : y < a) =>
- (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_left_ordSeparatingSet has
- (hy <| Icc_subset_uIcc' ⟨hya.le, hax⟩)
- have sol2 := fun (hby : b < y) =>
- (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_right_ordSeparatingSet hbt
- (hy <| Icc_subset_uIcc ⟨hxb, hby.le⟩)
- exact ⟨sol1, sol2⟩
+ wlog hab : a ≤ b with H
+ · exact H (x := x) (y := y) (z := z) b hbt hb a has ha (le_of_not_le hab)
+ cases' ha with ha ha'
+ cases' hb with hb hb'
+ have hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := by
+ rw [ordSeparatingSet_comm, uIcc_comm] at hb'
+ calc
+ [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc
+ _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'
+ clear ha' hb'
+ rcases le_total x a with hxa | hax
+ · exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has
+ rcases le_total b x with hbx | hxb
+ · exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt
+ have h' : x ∈ ordSeparatingSet s t := ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩
+ -- porting note: lift not implemented yet
+ -- lift x to ordSeparatingSet s t using this
+ suffices ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]] from
+ hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)
+ rintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)
+ rw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]
+ have sol1 := fun (hya : y < a) =>
+ (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_left_ordSeparatingSet has
+ (hy <| Icc_subset_uIcc' ⟨hya.le, hax⟩)
+ have sol2 := fun (hby : b < y) =>
+ (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_right_ordSeparatingSet hbt
+ (hy <| Icc_subset_uIcc ⟨hxb, hby.le⟩)
+ exact ⟨sol1, sol2⟩
#align set.disjoint_ord_t5_nhd Set.disjoint_ordT5Nhd
cases'
(#9171)
I literally went through and regex'd some uses of cases'
, replacing them with rcases
; this is meant to be a low effort PR as I hope that tools can do this in the future.
rcases
is an easier replacement than cases
, though with better tools we could in future do a second pass converting simple rcases
added here (and existing ones) to cases
.
@@ -203,7 +203,7 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
clear hx₂
rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
- cases' le_total a b with hab hab
+ rcases le_total a b with hab | hab
on_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt
all_goals
-- porting note: wlog not implemented yet, the following replaces the three previous lines
@@ -216,9 +216,9 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
[[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc
_ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'
clear ha' hb'
- cases' le_total x a with hxa hax
+ rcases le_total x a with hxa | hax
· exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has
- cases' le_total b x with hbx hxb
+ rcases le_total b x with hbx | hxb
· exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt
have h' : x ∈ ordSeparatingSet s t := ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩
-- porting note: lift not implemented yet
This is the supremum of
along with some minor fixes from failures on nightly-testing as Mathlib master
is merged into it.
Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.
I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0
branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.
In particular this includes adjustments for the Lean PRs
We can get rid of all the
local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)
macros across Mathlib (and in any projects that want to write natural number powers of reals).
Changes the default behaviour of simp
to (config := {decide := false})
. This makes simp
(and consequentially norm_num
) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp
or norm_num
to decide
or rfl
, or adding (config := {decide := true})
.
This changed the behaviour of simp
so that simp [f]
will only unfold "fully applied" occurrences of f
. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true })
. We may in future add a syntax for this, e.g. simp [!f]
; please provide feedback! In the meantime, we have made the following changes:
(config := { unfoldPartialApp := true })
in some places, to recover the old behaviour@[eqns]
to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp
and Function.flip
.This change in Lean may require further changes down the line (e.g. adding the !f
syntax, and/or upstreaming the special treatment for Function.comp
and Function.flip
, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>
@@ -140,7 +140,8 @@ def ordConnectedSection (s : Set α) : Set α :=
theorem dual_ordConnectedSection (s : Set α) :
ordConnectedSection (ofDual ⁻¹' s) = ofDual ⁻¹' ordConnectedSection s := by
- simp_rw [ordConnectedSection, ordConnectedProj]
+ simp only [ordConnectedSection]
+ simp (config := { unfoldPartialApp := true }) only [ordConnectedProj]
ext x
simp only [mem_range, Subtype.exists, mem_preimage, OrderDual.exists, dual_ordConnectedComponent,
ofDual_toDual]
Removes nonterminal simps on lines looking like simp [...]
@@ -142,7 +142,8 @@ theorem dual_ordConnectedSection (s : Set α) :
ordConnectedSection (ofDual ⁻¹' s) = ofDual ⁻¹' ordConnectedSection s := by
simp_rw [ordConnectedSection, ordConnectedProj]
ext x
- simp [dual_ordConnectedComponent]
+ simp only [mem_range, Subtype.exists, mem_preimage, OrderDual.exists, dual_ordConnectedComponent,
+ ofDual_toDual]
tauto
#align set.dual_ord_connected_section Set.dual_ordConnectedSection
Many proofs use the "stream of consciousness" style from Lean 3, rather than have ... :=
or suffices ... from/by
.
This PR updates a fraction of these to the preferred Lean 4 style.
I think a good goal would be to delete the "deferred" versions of have
, suffices
, and let
at the bottom of Mathlib.Tactic.Have
(Anyone who would like to contribute more cleanup is welcome to push directly to this branch.)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -221,8 +221,8 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
have h' : x ∈ ordSeparatingSet s t := ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩
-- porting note: lift not implemented yet
-- lift x to ordSeparatingSet s t using this
- suffices : ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]
- exact hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)
+ suffices ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]] from
+ hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)
rintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)
rw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]
have sol1 := fun (hya : y < a) =>
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -21,7 +21,7 @@ open Interval Function OrderDual
namespace Set
-variable {α : Type _} [LinearOrder α] {s t : Set α} {x y z : α}
+variable {α : Type*} [LinearOrder α] {s t : Set α} {x y z : α}
/-- Order-connected component of a point `x` in a set `s`. It is defined as the set of `y` such that
`Set.uIcc x y ⊆ s`. Note that it is empty if and only if `x ∉ s`. -/
@@ -2,14 +2,11 @@
Copyright (c) 2022 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module data.set.intervals.ord_connected_component
-! leanprover-community/mathlib commit 92ca63f0fb391a9ca5f22d2409a6080e786d99f7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Set.Intervals.OrdConnected
+#align_import data.set.intervals.ord_connected_component from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
+
/-!
# Order connected components of a set
@@ -32,7 +32,7 @@ def ordConnectedComponent (s : Set α) (x : α) : Set α :=
{ y | [[x, y]] ⊆ s }
#align set.ord_connected_component Set.ordConnectedComponent
-theorem mem_ordConnectedComponent : y ∈ ordConnectedComponent s x ↔ [[x, y]] ⊆ s :=
+theorem mem_ordConnectedComponent : y ∈ ordConnectedComponent s x ↔ [[x, y]] ⊆ s :=
Iff.rfl
#align set.mem_ord_connected_component Set.mem_ordConnectedComponent
@@ -168,7 +168,7 @@ belong both to some `Set.ordConnectedComponent tᶜ x`, `x ∈ s`, and to some
`Set.ordConnectedComponent sᶜ x`, `x ∈ t`. In the case of two disjoint closed sets, this is the
union of all open intervals $(a, b)$ such that their endpoints belong to different sets. -/
def ordSeparatingSet (s t : Set α) : Set α :=
- (⋃ x ∈ s, ordConnectedComponent (tᶜ) x) ∩ ⋃ x ∈ t, ordConnectedComponent (sᶜ) x
+ (⋃ x ∈ s, ordConnectedComponent tᶜ x) ∩ ⋃ x ∈ t, ordConnectedComponent sᶜ x
#align set.ord_separating_set Set.ordSeparatingSet
theorem ordSeparatingSet_comm (s t : Set α) : ordSeparatingSet s t = ordSeparatingSet t s :=
This makes a mathlib4 version of mathlib3's tactic.basic
, now called Mathlib.Tactic.Common
, which imports all tactics which do not have significant theory requirements, and then is imported all across the base of the hierarchy.
This ensures that all common tactics are available nearly everywhere in the library, rather than having to be imported one-by-one as you need them.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -9,7 +9,7 @@ Authors: Yury Kudryashov
! if you have ported upstream changes.
-/
import Mathlib.Data.Set.Intervals.OrdConnected
-import Mathlib.Tactic.SwapVar
+
/-!
# Order connected components of a set
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>
@@ -177,7 +177,7 @@ theorem ordSeparatingSet_comm (s t : Set α) : ordSeparatingSet s t = ordSeparat
theorem disjoint_left_ordSeparatingSet : Disjoint s (ordSeparatingSet s t) :=
Disjoint.inter_right' _ <|
- disjoint_unionᵢ₂_right.2 fun _ _ =>
+ disjoint_iUnion₂_right.2 fun _ _ =>
disjoint_compl_right.mono_right <| ordConnectedComponent_subset
#align set.disjoint_left_ord_separating_set Set.disjoint_left_ordSeparatingSet
@@ -187,8 +187,8 @@ theorem disjoint_right_ordSeparatingSet : Disjoint t (ordSeparatingSet s t) :=
theorem dual_ordSeparatingSet :
ordSeparatingSet (ofDual ⁻¹' s) (ofDual ⁻¹' t) = ofDual ⁻¹' ordSeparatingSet s t := by
- simp only [ordSeparatingSet, mem_preimage, ← toDual.surjective.unionᵢ_comp, ofDual_toDual,
- dual_ordConnectedComponent, ← preimage_compl, preimage_inter, preimage_unionᵢ]
+ simp only [ordSeparatingSet, mem_preimage, ← toDual.surjective.iUnion_comp, ofDual_toDual,
+ dual_ordConnectedComponent, ← preimage_compl, preimage_inter, preimage_iUnion]
#align set.dual_ord_separating_set Set.dual_ordSeparatingSet
/-- An auxiliary neighborhood that will be used in the proof of `OrderTopology.t5Space`. -/
@@ -199,9 +199,9 @@ def ordT5Nhd (s t : Set α) : Set α :=
theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
rw [disjoint_iff_inf_le]
rintro x ⟨hx₁, hx₂⟩
- rcases mem_unionᵢ₂.1 hx₁ with ⟨a, has, ha⟩
+ rcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩
clear hx₁
- rcases mem_unionᵢ₂.1 hx₂ with ⟨b, hbt, hb⟩
+ rcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩
clear hx₂
rw [mem_ordConnectedComponent, subset_inter_iff] at ha hb
cases' le_total a b with hab hab
@@ -221,7 +221,7 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
· exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has
cases' le_total b x with hbx hxb
· exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt
- have h' : x ∈ ordSeparatingSet s t := ⟨mem_unionᵢ₂.2 ⟨a, has, ha⟩, mem_unionᵢ₂.2 ⟨b, hbt, hb⟩⟩
+ have h' : x ∈ ordSeparatingSet s t := ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩
-- porting note: lift not implemented yet
-- lift x to ordSeparatingSet s t using this
suffices : ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -38,11 +38,9 @@ theorem mem_ordConnectedComponent : y ∈ ordConnectedComponent s x ↔ [[x, y]
theorem dual_ordConnectedComponent :
ordConnectedComponent (ofDual ⁻¹' s) (toDual x) = ofDual ⁻¹' ordConnectedComponent s x :=
- ext <|
- (Surjective.forall toDual.surjective).2 fun x =>
- by
- rw [mem_ordConnectedComponent, dual_uIcc]
- rfl
+ ext <| (Surjective.forall toDual.surjective).2 fun x => by
+ rw [mem_ordConnectedComponent, dual_uIcc]
+ rfl
#align set.dual_ord_connected_component Set.dual_ordConnectedComponent
theorem ordConnectedComponent_subset : ordConnectedComponent s x ⊆ s := fun _ hy =>
@@ -213,8 +211,7 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
-- wlog (discharger := tactic.skip) hab : a ≤ b := le_total a b using a b s t, b a t s
cases' ha with ha ha'
cases' hb with hb hb'
- have hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ :=
- by
+ have hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := by
rw [ordSeparatingSet_comm, uIcc_comm] at hb'
calc
[[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc
This PR fixes two things:
align
statements for definitions and theorems and instances that are separated by two newlines from the relevant declaration (s/\n\n#align/\n#align
). This is often seen in the mathport output after ending calc
blocks.#align
statements. (This was needed for a script I wrote for #3630.)@@ -93,7 +93,6 @@ theorem mem_ordConnectedComponent_trans (hxy : y ∈ ordConnectedComponent s x)
calc
[[x, z]] ⊆ [[x, y]] ∪ [[y, z]] := uIcc_subset_uIcc_union_uIcc
_ ⊆ s := union_subset hxy hyz
-
#align set.mem_ord_connected_component_trans Set.mem_ordConnectedComponent_trans
theorem ordConnectedComponent_eq (h : [[x, y]] ⊆ s) :
@@ -150,7 +149,6 @@ theorem dual_ordConnectedSection (s : Set α) :
ext x
simp [dual_ordConnectedComponent]
tauto
-
#align set.dual_ord_connected_section Set.dual_ordConnectedSection
theorem ordConnectedSection_subset : ordConnectedSection s ⊆ s :=
@@ -165,8 +163,7 @@ theorem eq_of_mem_ordConnectedSection_of_uIcc_subset (hx : x ∈ ordConnectedSec
(mem_ordConnectedComponent_trans
(mem_ordConnectedComponent_trans (ordConnectedProj_mem_ordConnectedComponent _ _) h)
(mem_ordConnectedComponent_ordConnectedProj _ _))
-#align set.eq_of_mem_ord_connected_section_of_uIcc_subset
- Set.eq_of_mem_ordConnectedSection_of_uIcc_subset
+#align set.eq_of_mem_ord_connected_section_of_uIcc_subset Set.eq_of_mem_ordConnectedSection_of_uIcc_subset
/-- Given two sets `s t : Set α`, the set `Set.orderSeparatingSet s t` is the set of points that
belong both to some `Set.ordConnectedComponent tᶜ x`, `x ∈ s`, and to some
This PR resyncs the first 28 entries of https://leanprover-community.github.io/mathlib-port-status/out-of-sync.html after sorting by diff size.
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
! This file was ported from Lean 3 source module data.set.intervals.ord_connected_component
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
+! leanprover-community/mathlib commit 92ca63f0fb391a9ca5f22d2409a6080e786d99f7
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -90,7 +90,6 @@ theorem mem_ordConnectedComponent_comm :
theorem mem_ordConnectedComponent_trans (hxy : y ∈ ordConnectedComponent s x)
(hyz : z ∈ ordConnectedComponent s y) : z ∈ ordConnectedComponent s x :=
- show _ ⊆ _ from -- lean4#2073
calc
[[x, z]] ⊆ [[x, y]] ∪ [[y, z]] := uIcc_subset_uIcc_union_uIcc
_ ⊆ s := union_subset hxy hyz
@@ -90,6 +90,7 @@ theorem mem_ordConnectedComponent_comm :
theorem mem_ordConnectedComponent_trans (hxy : y ∈ ordConnectedComponent s x)
(hyz : z ∈ ordConnectedComponent s y) : z ∈ ordConnectedComponent s x :=
+ show _ ⊆ _ from -- lean4#2073
calc
[[x, z]] ⊆ [[x, y]] ∪ [[y, z]] := uIcc_subset_uIcc_union_uIcc
_ ⊆ s := union_subset hxy hyz
@@ -20,7 +20,7 @@ so we only add API needed for this lemma.
-/
-open Function OrderDual
+open Interval Function OrderDual
namespace Set
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 Kudryashov
! This file was ported from Lean 3 source module data.set.intervals.ord_connected_component
-! leanprover-community/mathlib commit 1e05171a5e8cf18d98d9cf7b207540acb044acae
+! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,7 +14,7 @@ import Mathlib.Tactic.SwapVar
# Order connected components of a set
In this file we define `Set.ordConnectedComponent s x` to be the set of `y` such that
-`Set.interval x y ⊆ s` and prove some basic facts about this definition. At the moment of writing,
+`Set.uIcc x y ⊆ s` and prove some basic facts about this definition. At the moment of writing,
this construction is used only to prove that any linear order with order topology is a T₅ space,
so we only add API needed for this lemma.
-/
@@ -27,7 +27,7 @@ namespace Set
variable {α : Type _} [LinearOrder α] {s t : Set α} {x y z : α}
/-- Order-connected component of a point `x` in a set `s`. It is defined as the set of `y` such that
-`Set.interval x y ⊆ s`. Note that it is empty if and only if `x ∉ s`. -/
+`Set.uIcc x y ⊆ s`. Note that it is empty if and only if `x ∉ s`. -/
def ordConnectedComponent (s : Set α) (x : α) : Set α :=
{ y | [[x, y]] ⊆ s }
#align set.ord_connected_component Set.ordConnectedComponent
@@ -41,26 +41,26 @@ theorem dual_ordConnectedComponent :
ext <|
(Surjective.forall toDual.surjective).2 fun x =>
by
- rw [mem_ordConnectedComponent, dual_interval]
+ rw [mem_ordConnectedComponent, dual_uIcc]
rfl
#align set.dual_ord_connected_component Set.dual_ordConnectedComponent
theorem ordConnectedComponent_subset : ordConnectedComponent s x ⊆ s := fun _ hy =>
- hy right_mem_interval
+ hy right_mem_uIcc
#align set.ord_connected_component_subset Set.ordConnectedComponent_subset
theorem subset_ordConnectedComponent {t} [h : OrdConnected s] (hs : x ∈ s) (ht : s ⊆ t) :
- s ⊆ ordConnectedComponent t x := fun _ hy => (h.interval_subset hs hy).trans ht
+ s ⊆ ordConnectedComponent t x := fun _ hy => (h.uIcc_subset hs hy).trans ht
#align set.subset_ord_connected_component Set.subset_ordConnectedComponent
@[simp]
theorem self_mem_ordConnectedComponent : x ∈ ordConnectedComponent s x ↔ x ∈ s := by
- rw [mem_ordConnectedComponent, interval_self, singleton_subset_iff]
+ rw [mem_ordConnectedComponent, uIcc_self, singleton_subset_iff]
#align set.self_mem_ord_connected_component Set.self_mem_ordConnectedComponent
@[simp]
theorem nonempty_ordConnectedComponent : (ordConnectedComponent s x).Nonempty ↔ x ∈ s :=
- ⟨fun ⟨_, hy⟩ => hy <| left_mem_interval, fun h => ⟨x, self_mem_ordConnectedComponent.2 h⟩⟩
+ ⟨fun ⟨_, hy⟩ => hy <| left_mem_uIcc, fun h => ⟨x, self_mem_ordConnectedComponent.2 h⟩⟩
#align set.nonempty_ord_connected_component Set.nonempty_ordConnectedComponent
@[simp]
@@ -85,13 +85,13 @@ theorem ordConnectedComponent_inter (s t : Set α) (x : α) :
theorem mem_ordConnectedComponent_comm :
y ∈ ordConnectedComponent s x ↔ x ∈ ordConnectedComponent s y := by
- rw [mem_ordConnectedComponent, mem_ordConnectedComponent, interval_swap]
+ rw [mem_ordConnectedComponent, mem_ordConnectedComponent, uIcc_comm]
#align set.mem_ord_connected_component_comm Set.mem_ordConnectedComponent_comm
theorem mem_ordConnectedComponent_trans (hxy : y ∈ ordConnectedComponent s x)
(hyz : z ∈ ordConnectedComponent s y) : z ∈ ordConnectedComponent s x :=
calc
- [[x, z]] ⊆ [[x, y]] ∪ [[y, z]] := interval_subset_interval_union_interval
+ [[x, z]] ⊆ [[x, y]] ∪ [[y, z]] := uIcc_subset_uIcc_union_uIcc
_ ⊆ s := union_subset hxy hyz
#align set.mem_ord_connected_component_trans Set.mem_ordConnectedComponent_trans
@@ -104,7 +104,7 @@ theorem ordConnectedComponent_eq (h : [[x, y]] ⊆ s) :
#align set.ord_connected_component_eq Set.ordConnectedComponent_eq
instance : OrdConnected (ordConnectedComponent s x) :=
- ordConnected_of_interval_subset_left fun _ hy _ hz => (interval_subset_interval_left hz).trans hy
+ ordConnected_of_uIcc_subset_left fun _ hy _ hz => (uIcc_subset_uIcc_left hz).trans hy
/-- Projection from `s : Set α` to `α` sending each order connected component of `s` to a single
point of this component. -/
@@ -157,7 +157,7 @@ theorem ordConnectedSection_subset : ordConnectedSection s ⊆ s :=
range_subset_iff.2 fun _ => ordConnectedComponent_subset <| Nonempty.some_mem _
#align set.ord_connected_section_subset Set.ordConnectedSection_subset
-theorem eq_of_mem_ordConnectedSection_of_interval_subset (hx : x ∈ ordConnectedSection s)
+theorem eq_of_mem_ordConnectedSection_of_uIcc_subset (hx : x ∈ ordConnectedSection s)
(hy : y ∈ ordConnectedSection s) (h : [[x, y]] ⊆ s) : x = y := by
rcases hx with ⟨x, rfl⟩; rcases hy with ⟨y, rfl⟩
exact
@@ -165,7 +165,8 @@ theorem eq_of_mem_ordConnectedSection_of_interval_subset (hx : x ∈ ordConnecte
(mem_ordConnectedComponent_trans
(mem_ordConnectedComponent_trans (ordConnectedProj_mem_ordConnectedComponent _ _) h)
(mem_ordConnectedComponent_ordConnectedProj _ _))
-#align set.eq_of_mem_ord_connected_section_of_interval_subset Set.eq_of_mem_ordConnectedSection_of_interval_subset
+#align set.eq_of_mem_ord_connected_section_of_uIcc_subset
+ Set.eq_of_mem_ordConnectedSection_of_uIcc_subset
/-- Given two sets `s t : Set α`, the set `Set.orderSeparatingSet s t` is the set of points that
belong both to some `Set.ordConnectedComponent tᶜ x`, `x ∈ s`, and to some
@@ -217,27 +218,27 @@ theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
cases' hb with hb hb'
have hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ :=
by
- rw [ordSeparatingSet_comm, interval_swap] at hb'
+ rw [ordSeparatingSet_comm, uIcc_comm] at hb'
calc
- [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := interval_subset_interval_union_interval
+ [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc
_ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'
clear ha' hb'
cases' le_total x a with hxa hax
- · exact hb (Icc_subset_interval' ⟨hxa, hab⟩) has
+ · exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has
cases' le_total b x with hbx hxb
- · exact ha (Icc_subset_interval ⟨hab, hbx⟩) hbt
+ · exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt
have h' : x ∈ ordSeparatingSet s t := ⟨mem_unionᵢ₂.2 ⟨a, has, ha⟩, mem_unionᵢ₂.2 ⟨b, hbt, hb⟩⟩
-- porting note: lift not implemented yet
-- lift x to ordSeparatingSet s t using this
suffices : ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]
exact hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)
rintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)
- rw [interval_of_le hab, mem_Icc, ← not_lt, ← not_lt]
+ rw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]
have sol1 := fun (hya : y < a) =>
(disjoint_left (t := ordSeparatingSet s t)).1 disjoint_left_ordSeparatingSet has
- (hy <| Icc_subset_interval' ⟨hya.le, hax⟩)
+ (hy <| Icc_subset_uIcc' ⟨hya.le, hax⟩)
have sol2 := fun (hby : b < y) =>
(disjoint_left (t := ordSeparatingSet s t)).1 disjoint_right_ordSeparatingSet hbt
- (hy <| Icc_subset_interval ⟨hxb, hby.le⟩)
+ (hy <| Icc_subset_uIcc ⟨hxb, hby.le⟩)
exact ⟨sol1, sol2⟩
#align set.disjoint_ord_t5_nhd Set.disjoint_ordT5Nhd
by
line breaks (#1523)
During porting, I usually fix the desired format we seem to want for the line breaks around by
with
awk '{do {{if (match($0, "^ by$") && length(p) < 98) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}' Mathlib/File/Im/Working/On.lean
I noticed there are some more files that slipped through.
This pull request is the result of running this command:
grep -lr "^ by\$" Mathlib | xargs -n 1 awk -i inplace '{do {{if (match($0, "^ by$") && length(p) < 98 && not (match(p, "^[ \t]*--"))) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}'
Co-authored-by: Moritz Firsching <firsching@google.com>
@@ -130,8 +130,7 @@ theorem ordConnectedComponent_ordConnectedProj (s : Set α) (x : s) :
@[simp]
theorem ordConnectedProj_eq {x y : s} :
- ordConnectedProj s x = ordConnectedProj s y ↔ [[(x : α), y]] ⊆ s :=
- by
+ ordConnectedProj s x = ordConnectedProj s y ↔ [[(x : α), y]] ⊆ s := by
constructor <;> intro h
· rw [← mem_ordConnectedComponent, ← ordConnectedComponent_ordConnectedProj, h,
ordConnectedComponent_ordConnectedProj, self_mem_ordConnectedComponent]
@@ -159,8 +158,7 @@ theorem ordConnectedSection_subset : ordConnectedSection s ⊆ s :=
#align set.ord_connected_section_subset Set.ordConnectedSection_subset
theorem eq_of_mem_ordConnectedSection_of_interval_subset (hx : x ∈ ordConnectedSection s)
- (hy : y ∈ ordConnectedSection s) (h : [[x, y]] ⊆ s) : x = y :=
- by
+ (hy : y ∈ ordConnectedSection s) (h : [[x, y]] ⊆ s) : x = y := by
rcases hx with ⟨x, rfl⟩; rcases hy with ⟨y, rfl⟩
exact
ordConnectedProj_eq.2
@@ -202,8 +200,7 @@ def ordT5Nhd (s t : Set α) : Set α :=
⋃ x ∈ s, ordConnectedComponent (tᶜ ∩ (ordConnectedSection <| ordSeparatingSet s t)ᶜ) x
#align set.ord_t5_nhd Set.ordT5Nhd
-theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) :=
- by
+theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s) := by
rw [disjoint_iff_inf_le]
rintro x ⟨hx₁, hx₂⟩
rcases mem_unionᵢ₂.1 hx₁ with ⟨a, has, ha⟩
@@ -115,16 +115,12 @@ noncomputable def ordConnectedProj (s : Set α) : s → α := fun x : s =>
theorem ordConnectedProj_mem_ordConnectedComponent (s : Set α) (x : s) :
ordConnectedProj s x ∈ ordConnectedComponent s x :=
Nonempty.some_mem _
-#align
- set.ord_connected_proj_mem_ord_connected_component
- Set.ordConnectedProj_mem_ordConnectedComponent
+#align set.ord_connected_proj_mem_ord_connected_component Set.ordConnectedProj_mem_ordConnectedComponent
theorem mem_ordConnectedComponent_ordConnectedProj (s : Set α) (x : s) :
↑x ∈ ordConnectedComponent s (ordConnectedProj s x) :=
mem_ordConnectedComponent_comm.2 <| ordConnectedProj_mem_ordConnectedComponent s x
-#align
- set.mem_ord_connected_component_ord_connected_proj
- Set.mem_ordConnectedComponent_ordConnectedProj
+#align set.mem_ord_connected_component_ord_connected_proj Set.mem_ordConnectedComponent_ordConnectedProj
@[simp]
theorem ordConnectedComponent_ordConnectedProj (s : Set α) (x : s) :
@@ -171,9 +167,7 @@ theorem eq_of_mem_ordConnectedSection_of_interval_subset (hx : x ∈ ordConnecte
(mem_ordConnectedComponent_trans
(mem_ordConnectedComponent_trans (ordConnectedProj_mem_ordConnectedComponent _ _) h)
(mem_ordConnectedComponent_ordConnectedProj _ _))
-#align
- set.eq_of_mem_ord_connected_section_of_interval_subset
- Set.eq_of_mem_ordConnectedSection_of_interval_subset
+#align set.eq_of_mem_ord_connected_section_of_interval_subset Set.eq_of_mem_ordConnectedSection_of_interval_subset
/-- Given two sets `s t : Set α`, the set `Set.orderSeparatingSet s t` is the set of points that
belong both to some `Set.ordConnectedComponent tᶜ x`, `x ∈ s`, and to some
@@ -119,30 +119,28 @@ theorem ordConnectedProj_mem_ordConnectedComponent (s : Set α) (x : s) :
set.ord_connected_proj_mem_ord_connected_component
Set.ordConnectedProj_mem_ordConnectedComponent
-theorem mem_ordConnectedComponent_ord_connected_proj (s : Set α) (x : s) :
+theorem mem_ordConnectedComponent_ordConnectedProj (s : Set α) (x : s) :
↑x ∈ ordConnectedComponent s (ordConnectedProj s x) :=
mem_ordConnectedComponent_comm.2 <| ordConnectedProj_mem_ordConnectedComponent s x
#align
set.mem_ord_connected_component_ord_connected_proj
- Set.mem_ordConnectedComponent_ord_connected_proj
+ Set.mem_ordConnectedComponent_ordConnectedProj
@[simp]
-theorem ordConnectedComponent_ord_connected_proj (s : Set α) (x : s) :
+theorem ordConnectedComponent_ordConnectedProj (s : Set α) (x : s) :
ordConnectedComponent s (ordConnectedProj s x) = ordConnectedComponent s x :=
- ordConnectedComponent_eq <| mem_ordConnectedComponent_ord_connected_proj _ _
-#align set.ord_connected_component_ord_connected_proj Set.ordConnectedComponent_ord_connected_proj
+ ordConnectedComponent_eq <| mem_ordConnectedComponent_ordConnectedProj _ _
+#align set.ord_connected_component_ord_connected_proj Set.ordConnectedComponent_ordConnectedProj
@[simp]
theorem ordConnectedProj_eq {x y : s} :
ordConnectedProj s x = ordConnectedProj s y ↔ [[(x : α), y]] ⊆ s :=
by
constructor <;> intro h
- · rw [← mem_ordConnectedComponent, ← ordConnectedComponent_ord_connected_proj, h,
- ordConnectedComponent_ord_connected_proj, self_mem_ordConnectedComponent]
+ · rw [← mem_ordConnectedComponent, ← ordConnectedComponent_ordConnectedProj, h,
+ ordConnectedComponent_ordConnectedProj, self_mem_ordConnectedComponent]
exact y.2
- · simp only [ordConnectedProj]
- congr 1
- exact ordConnectedComponent_eq h
+ · simp only [ordConnectedProj, ordConnectedComponent_eq h]
#align set.ord_connected_proj_eq Set.ordConnectedProj_eq
/-- A set that intersects each order connected component of a set by a single point. Defined as the
@@ -172,7 +170,7 @@ theorem eq_of_mem_ordConnectedSection_of_interval_subset (hx : x ∈ ordConnecte
ordConnectedProj_eq.2
(mem_ordConnectedComponent_trans
(mem_ordConnectedComponent_trans (ordConnectedProj_mem_ordConnectedComponent _ _) h)
- (mem_ordConnectedComponent_ord_connected_proj _ _))
+ (mem_ordConnectedComponent_ordConnectedProj _ _))
#align
set.eq_of_mem_ord_connected_section_of_interval_subset
Set.eq_of_mem_ordConnectedSection_of_interval_subset
All dependencies are ported!