fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
wcovBy_iff [Nonempty ι] : a ⩿ b ↔ ∃ i, a i ⩿ b i ∧ ∀ j ≠ i, a j = b j := by simp [wcovBy_iff_antisymmRel]
lemma
Order
[ "Mathlib.Order.Antisymmetrization", "Mathlib.Order.Hom.WithTopBot", "Mathlib.Order.Interval.Set.OrdConnected", "Mathlib.Order.Interval.Set.WithBotTop" ]
Mathlib/Order/Cover.lean
wcovBy_iff
null
covBy_iff : a ⋖ b ↔ ∃ i, a i ⋖ b i ∧ ∀ j ≠ i, a j = b j := by simp [covBy_iff_antisymmRel]
lemma
Order
[ "Mathlib.Order.Antisymmetrization", "Mathlib.Order.Hom.WithTopBot", "Mathlib.Order.Interval.Set.OrdConnected", "Mathlib.Order.Interval.Set.WithBotTop" ]
Mathlib/Order/Cover.lean
covBy_iff
null
wcovBy_iff_exists_right_eq [Nonempty ι] [DecidableEq ι] : a ⩿ b ↔ ∃ i x, a i ⩿ x ∧ b = Function.update a i x := by rw [wcovBy_iff] constructor · rintro ⟨i, hi, h⟩ exact ⟨i, b i, hi, by simpa [Function.eq_update_iff, eq_comm] using h⟩ · rintro ⟨i, x, h, rfl⟩ exact ⟨i, by simpa +contextual⟩
lemma
Order
[ "Mathlib.Order.Antisymmetrization", "Mathlib.Order.Hom.WithTopBot", "Mathlib.Order.Interval.Set.OrdConnected", "Mathlib.Order.Interval.Set.WithBotTop" ]
Mathlib/Order/Cover.lean
wcovBy_iff_exists_right_eq
null
covBy_iff_exists_right_eq [DecidableEq ι] : a ⋖ b ↔ ∃ i x, a i ⋖ x ∧ b = Function.update a i x := by rw [covBy_iff] constructor · rintro ⟨i, hi, h⟩ exact ⟨i, b i, hi, by simpa [Function.eq_update_iff, eq_comm] using h⟩ · rintro ⟨i, x, h, rfl⟩ exact ⟨i, by simpa +contextual⟩
lemma
Order
[ "Mathlib.Order.Antisymmetrization", "Mathlib.Order.Hom.WithTopBot", "Mathlib.Order.Interval.Set.OrdConnected", "Mathlib.Order.Interval.Set.WithBotTop" ]
Mathlib/Order/Cover.lean
covBy_iff_exists_right_eq
null
wcovBy_iff_exists_left_eq [Nonempty ι] [DecidableEq ι] : a ⩿ b ↔ ∃ i x, x ⩿ b i ∧ a = Function.update b i x := by rw [wcovBy_iff] constructor · rintro ⟨i, hi, h⟩ exact ⟨i, a i, hi, by simpa [Function.eq_update_iff, eq_comm] using h⟩ · rintro ⟨i, x, h, rfl⟩ exact ⟨i, by simpa +contextual⟩
lemma
Order
[ "Mathlib.Order.Antisymmetrization", "Mathlib.Order.Hom.WithTopBot", "Mathlib.Order.Interval.Set.OrdConnected", "Mathlib.Order.Interval.Set.WithBotTop" ]
Mathlib/Order/Cover.lean
wcovBy_iff_exists_left_eq
null
covBy_iff_exists_left_eq [DecidableEq ι] : a ⋖ b ↔ ∃ i x, x ⋖ b i ∧ a = Function.update b i x := by rw [covBy_iff] constructor · rintro ⟨i, hi, h⟩ exact ⟨i, a i, hi, by simpa [Function.eq_update_iff, eq_comm] using h⟩ · rintro ⟨i, x, h, rfl⟩ exact ⟨i, by simpa +contextual⟩
lemma
Order
[ "Mathlib.Order.Antisymmetrization", "Mathlib.Order.Hom.WithTopBot", "Mathlib.Order.Interval.Set.OrdConnected", "Mathlib.Order.Interval.Set.WithBotTop" ]
Mathlib/Order/Cover.lean
covBy_iff_exists_left_eq
null
@[simp, norm_cast] coe_wcovBy_coe : (a : WithTop α) ⩿ b ↔ a ⩿ b := Set.OrdConnected.apply_wcovBy_apply_iff WithTop.coeOrderHom <| by simp [WithTop.range_coe, ordConnected_Iio] @[simp, norm_cast] lemma coe_covBy_coe : (a : WithTop α) ⋖ b ↔ a ⋖ b := Set.OrdConnected.apply_covBy_apply_iff WithTop.coeOrderHom <| by...
lemma
Order
[ "Mathlib.Order.Antisymmetrization", "Mathlib.Order.Hom.WithTopBot", "Mathlib.Order.Interval.Set.OrdConnected", "Mathlib.Order.Interval.Set.WithBotTop" ]
Mathlib/Order/Cover.lean
coe_wcovBy_coe
null
@[simp, norm_cast] coe_wcovBy_coe : (a : WithBot α) ⩿ b ↔ a ⩿ b := Set.OrdConnected.apply_wcovBy_apply_iff WithBot.coeOrderHom <| by simp [WithBot.range_coe, ordConnected_Ioi] @[simp, norm_cast] lemma coe_covBy_coe : (a : WithBot α) ⋖ b ↔ a ⋖ b := Set.OrdConnected.apply_covBy_apply_iff WithBot.coeOrderHom <| by...
lemma
Order
[ "Mathlib.Order.Antisymmetrization", "Mathlib.Order.Hom.WithTopBot", "Mathlib.Order.Interval.Set.OrdConnected", "Mathlib.Order.Interval.Set.WithBotTop" ]
Mathlib/Order/Cover.lean
coe_wcovBy_coe
null
exists_covBy_of_wellFoundedLT [wf : WellFoundedLT α] ⦃a : α⦄ (h : ¬ IsMax a) : ∃ a', a ⋖ a' := by rw [not_isMax_iff] at h exact ⟨_, wellFounded_lt.min_mem _ h, fun a' ↦ wf.wf.not_lt_min _ h⟩
lemma
Order
[ "Mathlib.Order.Antisymmetrization", "Mathlib.Order.Hom.WithTopBot", "Mathlib.Order.Interval.Set.OrdConnected", "Mathlib.Order.Interval.Set.WithBotTop" ]
Mathlib/Order/Cover.lean
exists_covBy_of_wellFoundedLT
null
exists_covBy_of_wellFoundedGT [wf : WellFoundedGT α] ⦃a : α⦄ (h : ¬ IsMin a) : ∃ a', a' ⋖ a := by rw [not_isMin_iff] at h exact ⟨_, wf.wf.min_mem _ h, fun a' h₁ h₂ ↦ wf.wf.not_lt_min _ h h₂ h₁⟩
lemma
Order
[ "Mathlib.Order.Antisymmetrization", "Mathlib.Order.Hom.WithTopBot", "Mathlib.Order.Interval.Set.OrdConnected", "Mathlib.Order.Interval.Set.WithBotTop" ]
Mathlib/Order/Cover.lean
exists_covBy_of_wellFoundedGT
null
Directed (f : ι → α) := ∀ x y, ∃ z, f x ≼ f z ∧ f y ≼ f z
def
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
Directed
Local notation for a relation -/ local infixl:50 " ≼ " => r /-- A family of elements of α is directed (with respect to a relation `≼` on α) if there is a member of the family `≼`-above any pair in the family.
DirectedOn (s : Set α) := ∀ x ∈ s, ∀ y ∈ s, ∃ z ∈ s, x ≼ z ∧ y ≼ z variable {r r'}
def
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
DirectedOn
A subset of α is directed if there is an element of the set `≼`-above any pair of elements in the set.
directedOn_iff_directed {s} : @DirectedOn α r s ↔ Directed r (Subtype.val : s → α) := by simp only [DirectedOn, Directed, Subtype.exists, exists_and_left, exists_prop, Subtype.forall] exact forall₂_congr fun x _ => by simp [And.comm, and_assoc] alias ⟨DirectedOn.directed_val, _⟩ := directedOn_iff_directed
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directedOn_iff_directed
null
directedOn_range {f : ι → α} : Directed r f ↔ DirectedOn r (Set.range f) := by simp_rw [Directed, DirectedOn, Set.forall_mem_range, Set.exists_range_iff] protected alias ⟨Directed.directedOn_range, _⟩ := directedOn_range
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directedOn_range
null
directedOn_image {s : Set β} {f : β → α} : DirectedOn r (f '' s) ↔ DirectedOn (f ⁻¹'o r) s := by simp only [DirectedOn, Set.mem_image, exists_exists_and_eq_and, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂, Order.Preimage]
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directedOn_image
null
DirectedOn.mono' {s : Set α} (hs : DirectedOn r s) (h : ∀ ⦃a⦄, a ∈ s → ∀ ⦃b⦄, b ∈ s → r a b → r' a b) : DirectedOn r' s := fun _ hx _ hy => let ⟨z, hz, hxz, hyz⟩ := hs _ hx _ hy ⟨z, hz, h hx hz hxz, h hy hz hyz⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
DirectedOn.mono'
null
DirectedOn.mono {s : Set α} (h : DirectedOn r s) (H : ∀ ⦃a b⦄, r a b → r' a b) : DirectedOn r' s := h.mono' fun _ _ _ _ h ↦ H h
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
DirectedOn.mono
null
directed_comp {ι} {f : ι → β} {g : β → α} : Directed r (g ∘ f) ↔ Directed (g ⁻¹'o r) f := Iff.rfl
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directed_comp
null
Directed.mono {s : α → α → Prop} {ι} {f : ι → α} (H : ∀ a b, r a b → s a b) (h : Directed r f) : Directed s f := fun a b => let ⟨c, h₁, h₂⟩ := h a b ⟨c, H _ _ h₁, H _ _ h₂⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
Directed.mono
null
Directed.mono_comp (r : α → α → Prop) {ι} {rb : β → β → Prop} {g : α → β} {f : ι → α} (hg : ∀ ⦃x y⦄, r x y → rb (g x) (g y)) (hf : Directed r f) : Directed rb (g ∘ f) := directed_comp.2 <| hf.mono hg
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
Directed.mono_comp
null
DirectedOn.mono_comp {r : α → α → Prop} {rb : β → β → Prop} {g : α → β} {s : Set α} (hg : ∀ ⦃x y⦄, r x y → rb (g x) (g y)) (hf : DirectedOn r s) : DirectedOn rb (g '' s) := directedOn_image.mpr (hf.mono hg)
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
DirectedOn.mono_comp
null
directedOn_of_sup_mem [SemilatticeSup α] {S : Set α} (H : ∀ ⦃i j⦄, i ∈ S → j ∈ S → i ⊔ j ∈ S) : DirectedOn (· ≤ ·) S := fun a ha b hb => ⟨a ⊔ b, H ha hb, le_sup_left, le_sup_right⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directedOn_of_sup_mem
A set stable by supremum is `≤`-directed.
Directed.extend_bot [Preorder α] [OrderBot α] {e : ι → β} {f : ι → α} (hf : Directed (· ≤ ·) f) (he : Function.Injective e) : Directed (· ≤ ·) (Function.extend e f ⊥) := by intro a b rcases (em (∃ i, e i = a)).symm with (ha | ⟨i, rfl⟩) · use b simp [Function.extend_apply' _ _ _ ha] rcases (em (∃ i, ...
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
Directed.extend_bot
null
directedOn_of_inf_mem [SemilatticeInf α] {S : Set α} (H : ∀ ⦃i j⦄, i ∈ S → j ∈ S → i ⊓ j ∈ S) : DirectedOn (· ≥ ·) S := directedOn_of_sup_mem (α := αᵒᵈ) H
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directedOn_of_inf_mem
A set stable by infimum is `≥`-directed.
IsTotal.directed [IsTotal α r] (f : ι → α) : Directed r f := fun i j => Or.casesOn (total_of r (f i) (f j)) (fun h => ⟨j, h, refl _⟩) fun h => ⟨i, refl _, h⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
IsTotal.directed
null
IsDirected (α : Type*) (r : α → α → Prop) : Prop where /-- For every pair of elements `a` and `b` there is a `c` such that `r a c` and `r b c` -/ directed (a b : α) : ∃ c, r a c ∧ r b c
class
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
IsDirected
`IsDirected α r` states that for any elements `a`, `b` there exists an element `c` such that `r a c` and `r b c`.
directed_of (r : α → α → Prop) [IsDirected α r] (a b : α) : ∃ c, r a c ∧ r b c := IsDirected.directed _ _
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directed_of
null
directed_of₃ (r : α → α → Prop) [IsDirected α r] [IsTrans α r] (a b c : α) : ∃ d, r a d ∧ r b d ∧ r c d := have ⟨e, hae, hbe⟩ := directed_of r a b have ⟨f, hef, hcf⟩ := directed_of r e c ⟨f, Trans.trans hae hef, Trans.trans hbe hef, hcf⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directed_of₃
null
directed_id [IsDirected α r] : Directed r id := directed_of r
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directed_id
null
directed_id_iff : Directed r id ↔ IsDirected α r := ⟨fun h => ⟨h⟩, @directed_id _ _⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directed_id_iff
null
directedOn_univ [IsDirected α r] : DirectedOn r Set.univ := fun a _ b _ => let ⟨c, hc⟩ := directed_of r a b ⟨c, trivial, hc⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directedOn_univ
null
directedOn_univ_iff : DirectedOn r Set.univ ↔ IsDirected α r := ⟨fun h => ⟨fun a b => let ⟨c, _, hc⟩ := h a trivial b trivial ⟨c, hc⟩⟩, @directedOn_univ _ _⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directedOn_univ_iff
null
isDirected_mono [IsDirected α r] (h : ∀ ⦃a b⦄, r a b → s a b) : IsDirected α s := ⟨fun a b => let ⟨c, ha, hb⟩ := IsDirected.directed a b ⟨c, h ha, h hb⟩⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
isDirected_mono
null
exists_ge_ge [LE α] [IsDirected α (· ≤ ·)] (a b : α) : ∃ c, a ≤ c ∧ b ≤ c := directed_of (· ≤ ·) a b
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
exists_ge_ge
null
exists_le_le [LE α] [IsDirected α (· ≥ ·)] (a b : α) : ∃ c, c ≤ a ∧ c ≤ b := directed_of (· ≥ ·) a b
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
exists_le_le
null
OrderDual.isDirected_ge [LE α] [IsDirected α (· ≤ ·)] : IsDirected αᵒᵈ (· ≥ ·) := by assumption
instance
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
OrderDual.isDirected_ge
null
OrderDual.isDirected_le [LE α] [IsDirected α (· ≥ ·)] : IsDirected αᵒᵈ (· ≤ ·) := by assumption
instance
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
OrderDual.isDirected_le
null
directed_of_isDirected_le [LE α] [IsDirected α (· ≤ ·)] {f : α → β} {r : β → β → Prop} (H : ∀ ⦃i j⦄, i ≤ j → r (f i) (f j)) : Directed r f := directed_id.mono_comp _ H
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directed_of_isDirected_le
A monotone function on an upwards-directed type is directed.
Monotone.directed_le [Preorder α] [IsDirected α (· ≤ ·)] [Preorder β] {f : α → β} : Monotone f → Directed (· ≤ ·) f := directed_of_isDirected_le
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
Monotone.directed_le
null
Antitone.directed_ge [Preorder α] [IsDirected α (· ≤ ·)] [Preorder β] {f : α → β} (hf : Antitone f) : Directed (· ≥ ·) f := directed_of_isDirected_le hf
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
Antitone.directed_ge
null
directed_of_isDirected_ge [LE α] [IsDirected α (· ≥ ·)] {r : β → β → Prop} {f : α → β} (hf : ∀ a₁ a₂, a₁ ≤ a₂ → r (f a₂) (f a₁)) : Directed r f := directed_of_isDirected_le (α := αᵒᵈ) fun _ _ ↦ hf _ _
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directed_of_isDirected_ge
An antitone function on a downwards-directed type is directed.
Monotone.directed_ge [Preorder α] [IsDirected α (· ≥ ·)] [Preorder β] {f : α → β} (hf : Monotone f) : Directed (· ≥ ·) f := directed_of_isDirected_ge hf
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
Monotone.directed_ge
null
Antitone.directed_le [Preorder α] [IsDirected α (· ≥ ·)] [Preorder β] {f : α → β} (hf : Antitone f) : Directed (· ≤ ·) f := directed_of_isDirected_ge hf
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
Antitone.directed_le
null
protected DirectedOn.insert (h : Reflexive r) (a : α) {s : Set α} (hd : DirectedOn r s) (ha : ∀ b ∈ s, ∃ c ∈ s, a ≼ c ∧ b ≼ c) : DirectedOn r (insert a s) := by rintro x (rfl | hx) y (rfl | hy) · exact ⟨y, Set.mem_insert _ _, h _, h _⟩ · obtain ⟨w, hws, hwr⟩ := ha y hy exact ⟨w, Set.mem_insert_of_mem _ hw...
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
DirectedOn.insert
null
directedOn_singleton (h : Reflexive r) (a : α) : DirectedOn r ({a} : Set α) := fun x hx _ hy => ⟨x, hx, h _, hx.symm ▸ hy.symm ▸ h _⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directedOn_singleton
null
directedOn_pair (h : Reflexive r) {a b : α} (hab : a ≼ b) : DirectedOn r ({a, b} : Set α) := (directedOn_singleton h _).insert h _ fun c hc => ⟨c, hc, hc.symm ▸ hab, h _⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directedOn_pair
null
directedOn_pair' (h : Reflexive r) {a b : α} (hab : a ≼ b) : DirectedOn r ({b, a} : Set α) := by rw [Set.pair_comm] apply directedOn_pair h hab
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
directedOn_pair'
null
protected IsMin.isBot [IsDirected α (· ≥ ·)] (h : IsMin a) : IsBot a := fun b => let ⟨_, hca, hcb⟩ := exists_le_le a b (h hca).trans hcb
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
IsMin.isBot
null
protected IsMax.isTop [IsDirected α (· ≤ ·)] (h : IsMax a) : IsTop a := h.toDual.isBot
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
IsMax.isTop
null
DirectedOn.is_bot_of_is_min {s : Set α} (hd : DirectedOn (· ≥ ·) s) {m} (hm : m ∈ s) (hmin : ∀ a ∈ s, a ≤ m → m ≤ a) : ∀ a ∈ s, m ≤ a := fun a as => let ⟨x, xs, xm, xa⟩ := hd m hm a as (hmin x xs xm).trans xa
lemma
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
DirectedOn.is_bot_of_is_min
null
DirectedOn.is_top_of_is_max {s : Set α} (hd : DirectedOn (· ≤ ·) s) {m} (hm : m ∈ s) (hmax : ∀ a ∈ s, m ≤ a → a ≤ m) : ∀ a ∈ s, a ≤ m := @DirectedOn.is_bot_of_is_min αᵒᵈ _ s hd m hm hmax
lemma
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
DirectedOn.is_top_of_is_max
null
isTop_or_exists_gt [IsDirected α (· ≤ ·)] (a : α) : IsTop a ∨ ∃ b, a < b := (em (IsMax a)).imp IsMax.isTop not_isMax_iff.mp
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
isTop_or_exists_gt
null
isBot_or_exists_lt [IsDirected α (· ≥ ·)] (a : α) : IsBot a ∨ ∃ b, b < a := @isTop_or_exists_gt αᵒᵈ _ _ a
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
isBot_or_exists_lt
null
isBot_iff_isMin [IsDirected α (· ≥ ·)] : IsBot a ↔ IsMin a := ⟨IsBot.isMin, IsMin.isBot⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
isBot_iff_isMin
null
isTop_iff_isMax [IsDirected α (· ≤ ·)] : IsTop a ↔ IsMax a := ⟨IsTop.isMax, IsMax.isTop⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
isTop_iff_isMax
null
exists_lt_of_directed_ge [IsDirected β (· ≥ ·)] : ∃ a b : β, a < b := by rcases exists_pair_ne β with ⟨a, b, hne⟩ rcases isBot_or_exists_lt a with (ha | ⟨c, hc⟩) exacts [⟨a, b, (ha b).lt_of_ne hne⟩, ⟨_, _, hc⟩] variable (β) in
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
exists_lt_of_directed_ge
null
exists_lt_of_directed_le [IsDirected β (· ≤ ·)] : ∃ a b : β, a < b := let ⟨a, b, h⟩ := exists_lt_of_directed_ge βᵒᵈ ⟨b, a, h⟩
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
exists_lt_of_directed_le
null
protected IsMin.not_isMax [IsDirected β (· ≥ ·)] {b : β} (hb : IsMin b) : ¬ IsMax b := by intro hb' obtain ⟨a, c, hac⟩ := exists_lt_of_directed_ge β have := hb.isBot a obtain rfl := (hb' <| this).antisymm this exact hb'.not_lt hac
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
IsMin.not_isMax
null
protected IsMin.not_isMax' [IsDirected β (· ≤ ·)] {b : β} (hb : IsMin b) : ¬ IsMax b := fun hb' ↦ hb'.toDual.not_isMax hb.toDual
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
IsMin.not_isMax'
null
protected IsMax.not_isMin [IsDirected β (· ≤ ·)] {b : β} (hb : IsMax b) : ¬ IsMin b := fun hb' ↦ hb.toDual.not_isMax hb'.toDual
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
IsMax.not_isMin
null
protected IsMax.not_isMin' [IsDirected β (· ≥ ·)] {b : β} (hb : IsMax b) : ¬ IsMin b := fun hb' ↦ hb'.toDual.not_isMin hb.toDual
theorem
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
IsMax.not_isMin'
null
constant_of_monotone_antitone [IsDirected α (· ≤ ·)] (hf : Monotone f) (hf' : Antitone f) (a b : α) : f a = f b := by obtain ⟨c, hac, hbc⟩ := exists_ge_ge a b exact le_antisymm ((hf hac).trans <| hf' hbc) ((hf hbc).trans <| hf' hac)
lemma
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
constant_of_monotone_antitone
If `f` is monotone and antitone on a directed order, then `f` is constant.
constant_of_monotoneOn_antitoneOn (hf : MonotoneOn f s) (hf' : AntitoneOn f s) (hs : DirectedOn (· ≤ ·) s) : ∀ ⦃a⦄, a ∈ s → ∀ ⦃b⦄, b ∈ s → f a = f b := by rintro a ha b hb obtain ⟨c, hc, hac, hbc⟩ := hs _ ha _ hb exact le_antisymm ((hf ha hc hac).trans <| hf' hb hc hbc) ((hf hb hc hbc).trans <| hf' ha hc hac)
lemma
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
constant_of_monotoneOn_antitoneOn
If `f` is monotone and antitone on a directed set `s`, then `f` is constant on `s`.
proj {d : Set (Π i, α i)} (hd : DirectedOn (fun x y => ∀ i, r i (x i) (y i)) d) (i : ι) : DirectedOn (r i) ((fun a => a i) '' d) := DirectedOn.mono_comp (fun _ _ h => h) (mono hd fun ⦃_ _⦄ h ↦ h i)
lemma
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
proj
null
pi {d : (i : ι) → Set (α i)} (hd : ∀ (i : ι), DirectedOn (r i) (d i)) : DirectedOn (fun x y => ∀ i, r i (x i) (y i)) (Set.pi Set.univ d) := by intro a ha b hb choose f hfd haf hbf using fun i => hd i (a i) (ha i trivial) (b i) (hb i trivial) exact ⟨f, fun i _ => hfd i, haf, hbf⟩
lemma
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
pi
null
fst {d : Set (α × β)} (hd : DirectedOn (fun p q ↦ p.1 ≼₁ q.1 ∧ p.2 ≼₂ q.2) d) : DirectedOn (· ≼₁ ·) (Prod.fst '' d) := DirectedOn.mono_comp (fun ⦃_ _⦄ h ↦ h) (mono hd fun ⦃_ _⦄ h ↦ h.1)
lemma
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
fst
null
snd {d : Set (α × β)} (hd : DirectedOn (fun p q ↦ p.1 ≼₁ q.1 ∧ p.2 ≼₂ q.2) d) : DirectedOn (· ≼₂ ·) (Prod.snd '' d) := DirectedOn.mono_comp (fun ⦃_ _⦄ h ↦ h) (mono hd fun ⦃_ _⦄ h ↦ h.2)
lemma
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
snd
null
prod {d₁ : Set α} {d₂ : Set β} (h₁ : DirectedOn (· ≼₁ ·) d₁) (h₂ : DirectedOn (· ≼₂ ·) d₂) : DirectedOn (fun p q ↦ p.1 ≼₁ q.1 ∧ p.2 ≼₂ q.2) (d₁ ×ˢ d₂) := fun _ hpd _ hqd => by obtain ⟨r₁, hdr₁, hpr₁, hqr₁⟩ := h₁ _ hpd.1 _ hqd.1 obtain ⟨r₂, hdr₂, hpr₂, hqr₂⟩ := h₂ _ hpd.2 _ hqd.2 exact ⟨⟨r₁, r₂⟩, ⟨hdr₁, hdr₂⟩,...
lemma
Order
[ "Mathlib.Data.Set.Image" ]
Mathlib/Order/Directed.lean
prod
null
DirectedSystem (f : ∀ ⦃i j⦄, i ≤ j → F i → F j) : Prop where map_self ⦃i⦄ (x : F i) : f le_rfl x = x map_map ⦃k j i⦄ (hij : i ≤ j) (hjk : j ≤ k) (x : F i) : f hjk (f hij x) = f (hij.trans hjk) x
class
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
DirectedSystem
A directed system is a functor from a category (directed poset) to another category.
DirectedSystem.map_self' ⦃i⦄ (x) : f i i le_rfl x = x := DirectedSystem.map_self (f := (f · · ·)) x
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
DirectedSystem.map_self'
A copy of `DirectedSystem.map_self` specialized to FunLike, as otherwise the `fun i j h ↦ f i j h` can confuse the simplifier.
DirectedSystem.map_map' ⦃i j k⦄ (hij hjk x) : f j k hjk (f i j hij x) = f i k (hij.trans hjk) x := DirectedSystem.map_map (f := (f · · ·)) hij hjk x
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
DirectedSystem.map_map'
A copy of `DirectedSystem.map_map` specialized to FunLike, as otherwise the `fun i j h ↦ f i j h` can confuse the simplifier.
setoid : Setoid (Σ i, F i) where r x y := ∃ᵉ (i) (hx : x.1 ≤ i) (hy : y.1 ≤ i), f _ _ hx x.2 = f _ _ hy y.2 iseqv := ⟨fun x ↦ ⟨x.1, le_rfl, le_rfl, rfl⟩, fun ⟨i, hx, hy, eq⟩ ↦ ⟨i, hy, hx, eq.symm⟩, fun ⟨j, hx, _, jeq⟩ ⟨k, _, hz, keq⟩ ↦ have ⟨i, hji, hki⟩ := exists_ge_ge j k ⟨i, hx.trans hji, hz.tran...
def
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
setoid
The setoid on the sigma type defining the direct limit.
r_of_le (x : Σ i, F i) (i : ι) (h : x.1 ≤ i) : (setoid f).r x ⟨i, f _ _ h x.2⟩ := ⟨i, h, le_rfl, (map_map' _ _ _ _).symm⟩ variable (F) in
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
r_of_le
null
_root_.DirectLimit : Type _ := Quotient (setoid f) variable {f} in
abbrev
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
_root_.DirectLimit
The direct limit of a directed system.
eq_of_le (x : Σ i, F i) (i : ι) (h : x.1 ≤ i) : (⟦x⟧ : DirectLimit F f) = ⟦⟨i, f _ _ h x.2⟩⟧ := Quotient.sound (r_of_le _ x i h) @[elab_as_elim] protected theorem induction {C : DirectLimit F f → Prop} (ih : ∀ i x, C ⟦⟨i, x⟩⟧) (x : DirectLimit F f) : C x := Quotient.ind (fun _ ↦ ih _ _) x
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
eq_of_le
null
exists_eq_mk (z : DirectLimit F f) : ∃ i x, z = ⟦⟨i, x⟩⟧ := by rcases z; exact ⟨_, _, rfl⟩
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
exists_eq_mk
null
exists_eq_mk₂ (z w : DirectLimit F f) : ∃ i x y, z = ⟦⟨i, x⟩⟧ ∧ w = ⟦⟨i, y⟩⟧ := z.inductionOn₂ w fun x y ↦ have ⟨i, hxi, hyi⟩ := exists_ge_ge x.1 y.1 ⟨i, _, _, eq_of_le x i hxi, eq_of_le y i hyi⟩
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
exists_eq_mk₂
null
exists_eq_mk₃ (w u v : DirectLimit F f) : ∃ i x y z, w = ⟦⟨i, x⟩⟧ ∧ u = ⟦⟨i, y⟩⟧ ∧ v = ⟦⟨i, z⟩⟧ := w.inductionOn₃ u v fun x y z ↦ have ⟨i, hxi, hyi, hzi⟩ := directed_of₃ (· ≤ ·) x.1 y.1 z.1 ⟨i, _, _, _, eq_of_le x i hxi, eq_of_le y i hyi, eq_of_le z i hzi⟩ @[elab_as_elim] protected theorem induction₂ {C :...
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
exists_eq_mk₃
null
mk_injective (h : ∀ i j hij, Function.Injective (f i j hij)) (i) : Function.Injective fun x ↦ (⟦⟨i, x⟩⟧ : DirectLimit F f) := fun _ _ eq ↦ have ⟨_, _, _, eq⟩ := Quotient.eq.mp eq; h _ _ _ eq
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
mk_injective
null
noncomputable map₀ : DirectLimit F f := ⟦⟨Classical.arbitrary ι, ih _⟩⟧
def
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
map₀
"Nullary map" to construct an element in the direct limit.
map₀_def (compat : ∀ i j h, f i j h (ih i) = ih j) (i) : map₀ f ih = ⟦⟨i, ih i⟩⟧ := have ⟨j, hcj, hij⟩ := exists_ge_ge (Classical.arbitrary ι) i Quotient.sound ⟨j, hcj, hij, (compat ..).trans (compat ..).symm⟩
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
map₀_def
null
protected lift (z : DirectLimit F f) : C := z.recOn (fun x ↦ ih x.1 x.2) fun x y ⟨k, hxk, hyk, eq⟩ ↦ by simp_rw [eq_rec_constant, compat _ _ hxk, compat _ _ hyk, eq]
def
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
lift
To define a function from the direct limit, it suffices to provide one function from each component subject to a compatibility condition.
lift_def (x) : DirectLimit.lift f ih compat ⟦x⟧ = ih x.1 x.2 := rfl
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
lift_def
null
lift_injective (h : ∀ i, Function.Injective (ih i)) : Function.Injective (DirectLimit.lift f ih compat) := DirectLimit.induction₂ _ fun i x y eq ↦ by simp_rw [lift_def] at eq; rw [h i eq]
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
lift_injective
null
map (z : DirectLimit F₁ f₁) : DirectLimit F₂ f₂ := z.lift _ (fun i x ↦ ⟦⟨i, ih i x⟩⟧) fun j k h x ↦ Quotient.sound <| have ⟨i, hji, hki⟩ := exists_ge_ge j k ⟨i, hji, hki, by simp_rw [compat, map_map']⟩
def
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
map
To define a function from the direct limit, it suffices to provide one function from each component subject to a compatibility condition.
map_def (x) : map f₁ f₂ ih compat ⟦x⟧ = ⟦⟨x.1, ih x.1 x.2⟩⟧ := rfl
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
map_def
null
private noncomputable lift₂Aux (z : Σ i, F₁ i) (w : Σ i, F₂ i) : {x : C // ∀ i (hzi : z.1 ≤ i) (hwi : w.1 ≤ i), x = ih i (f₁ _ _ hzi z.2) (f₂ _ _ hwi w.2)} := by choose j hzj hwj using exists_ge_ge z.1 w.1 refine ⟨ih j (f₁ _ _ hzj z.2) (f₂ _ _ hwj w.2), fun k hzk hwk ↦ ?_⟩ have ⟨i, hji, hki⟩ := exists_ge_ge j...
def
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
lift₂Aux
null
protected noncomputable lift₂ (z : DirectLimit F₁ f₁) (w : DirectLimit F₂ f₂) : C := z.hrecOn₂ w (φ := fun _ _ ↦ C) (lift₂Aux f₁ f₂ ih compat · ·) fun _ _ _ _ ⟨j, hx, hyj, jeq⟩ ⟨k, hyk, hz, keq⟩ ↦ heq_of_eq <| by have ⟨i, hji, hki⟩ := exists_ge_ge j k simp_rw [(lift₂Aux ..).2 _ (hx.trans hji) (hyk.tra...
def
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
lift₂
To define a binary function from the direct limit, it suffices to provide one binary function from each component subject to a compatibility condition.
lift₂_def₂ (x : Σ i, F₁ i) (y : Σ i, F₂ i) (i) (hxi : x.1 ≤ i) (hyi : y.1 ≤ i) : DirectLimit.lift₂ f₁ f₂ ih compat ⟦x⟧ ⟦y⟧ = ih i (f₁ _ _ hxi x.2) (f₂ _ _ hyi y.2) := (lift₂Aux _ _ _ compat _ _).2 ..
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
lift₂_def₂
null
lift₂_def (i x y) : DirectLimit.lift₂ f₁ f₂ ih compat ⟦⟨i, x⟩⟧ ⟦⟨i, y⟩⟧ = ih i x y := by rw [lift₂_def₂ _ _ _ _ _ _ i le_rfl le_rfl, map_self', map_self']
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
lift₂_def
null
noncomputable map₂ : DirectLimit F₁ f₁ → DirectLimit F₂ f₂ → DirectLimit F f := DirectLimit.lift₂ f₁ f₂ (fun i x y ↦ ⟦⟨i, ih i x y⟩⟧) fun j k h x y ↦ Quotient.sound <| have ⟨i, hji, hki⟩ := exists_ge_ge j k ⟨i, hji, hki, by simp_rw [compat, map_map']⟩
def
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
map₂
To define a function from the direct limit, it suffices to provide one function from each component subject to a compatibility condition.
map₂_def₂ (x y) (i) (hxi : x.1 ≤ i) (hyi : y.1 ≤ i) : map₂ f₁ f₂ f ih compat ⟦x⟧ ⟦y⟧ = ⟦⟨i, ih i (f₁ _ _ hxi x.2) (f₂ _ _ hyi y.2)⟩⟧ := lift₂_def₂ ..
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
map₂_def₂
null
map₂_def (i x y) : map₂ f₁ f₂ f ih compat ⟦⟨i, x⟩⟧ ⟦⟨i, y⟩⟧ = ⟦⟨i, ih i x y⟩⟧ := lift₂_def ..
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
map₂_def
null
InverseSystem : Prop where map_self ⦃i : ι⦄ (x : F i) : f le_rfl x = x map_map ⦃k j i : ι⦄ (hkj : k ≤ j) (hji : j ≤ i) (x : F i) : f hkj (f hji x) = f (hkj.trans hji) x
class
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
InverseSystem
A inverse system indexed by a preorder is a contravariant functor from the preorder to another category. It is dual to `DirectedSystem`.
limit (i : ι) : Set (∀ l : Iio i, F l) := {F | ∀ ⦃j k⦄ (h : j.1 ≤ k.1), f h (F k) = F j}
def
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
limit
The inverse limit of an inverse system of types.
piLT (X : ι → Type*) (i : ι) := ∀ l : Iio i, X l
abbrev
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
piLT
For a family of types `X` indexed by an preorder `ι` and an element `i : ι`, `piLT X i` is the product of all the types indexed by elements below `i`.
piLTProj (f : piLT X j) : piLT X i := fun l ↦ f ⟨l, l.2.trans_le h⟩
abbrev
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
piLTProj
The projection from a Pi type to the Pi type over an initial segment of its indexing type.
piLTProj_intro {l : Iio j} {f : piLT X j} (hl : l < i) : f l = piLTProj h f ⟨l, hl⟩ := rfl
theorem
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
piLTProj_intro
null
IsNatEquiv {s : Set ι} (equiv : ∀ j : s, F j ≃ piLT X j) : Prop := ∀ ⦃j k⦄ (hj : j ∈ s) (hk : k ∈ s) (h : k ≤ j) (x : F j), equiv ⟨k, hk⟩ (f h x) = piLTProj h (equiv ⟨j, hj⟩ x) variable {ι : Type*} [LinearOrder ι] {X : ι → Type*} {i : ι} (hi : IsSuccPrelimit i)
def
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
IsNatEquiv
The predicate that says a family of equivalences between `F j` and `piLT X j` is a natural transformation.
@[simps apply] noncomputable piLTLim : piLT X i ≃ limit (piLTProj (X := X)) i where toFun f := ⟨fun j ↦ piLTProj j.2.le f, fun _ _ _ ↦ rfl⟩ invFun f l := let k := hi.mid l.2; f.1 ⟨k, k.2.2⟩ ⟨l, k.2.1⟩ right_inv f := by ext j l set k := hi.mid (l.2.trans j.2) obtain le | le := le_total j ⟨k, k.2.2⟩ ...
def
Order
[ "Mathlib.Order.SuccPred.Limit", "Mathlib.Order.UpperLower.Basic" ]
Mathlib/Order/DirectedInverseSystem.lean
piLTLim
If `i` is a limit in a well-ordered type indexing a family of types, then `piLT X i` is the limit of all `piLT X j` for `j < i`.