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
symmDiff_symmDiff_right' : a ∆ (b ∆ c) = a ⊓ b ⊓ c ⊔ a ⊓ bᶜ ⊓ cᶜ ⊔ aᶜ ⊓ b ⊓ cᶜ ⊔ aᶜ ⊓ bᶜ ⊓ c := calc a ∆ (b ∆ c) = a ⊓ (b ⊓ c ⊔ bᶜ ⊓ cᶜ) ⊔ (b ⊓ cᶜ ⊔ c ⊓ bᶜ) ⊓ aᶜ := by { rw [symmDiff_eq, compl_symmDiff, bihimp_eq', symmDiff_eq] } _ = a ⊓ b ⊓ c ⊔ a ⊓ bᶜ ⊓ cᶜ ⊔ b ⊓ cᶜ ⊓ aᶜ ⊔ c ⊓ bᶜ ⊓ aᶜ := by ...
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
symmDiff_symmDiff_right'
null
Disjoint.le_symmDiff_sup_symmDiff_left (h : Disjoint a b) : c ≤ a ∆ c ⊔ b ∆ c := by trans c \ (a ⊓ b) · rw [h.eq_bot, sdiff_bot] · rw [sdiff_inf] exact sup_le_sup le_sup_right le_sup_right
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
Disjoint.le_symmDiff_sup_symmDiff_left
null
Disjoint.le_symmDiff_sup_symmDiff_right (h : Disjoint b c) : a ≤ a ∆ b ⊔ a ∆ c := by simp_rw [symmDiff_comm a] exact h.le_symmDiff_sup_symmDiff_left
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
Disjoint.le_symmDiff_sup_symmDiff_right
null
Codisjoint.bihimp_inf_bihimp_le_left (h : Codisjoint a b) : a ⇔ c ⊓ b ⇔ c ≤ c := h.dual.le_symmDiff_sup_symmDiff_left
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
Codisjoint.bihimp_inf_bihimp_le_left
null
Codisjoint.bihimp_inf_bihimp_le_right (h : Codisjoint b c) : a ⇔ b ⊓ a ⇔ c ≤ a := h.dual.le_symmDiff_sup_symmDiff_right
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
Codisjoint.bihimp_inf_bihimp_le_right
null
@[simp] symmDiff_fst [GeneralizedCoheytingAlgebra α] [GeneralizedCoheytingAlgebra β] (a b : α × β) : (a ∆ b).1 = a.1 ∆ b.1 := rfl @[simp]
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
symmDiff_fst
null
symmDiff_snd [GeneralizedCoheytingAlgebra α] [GeneralizedCoheytingAlgebra β] (a b : α × β) : (a ∆ b).2 = a.2 ∆ b.2 := rfl @[simp]
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
symmDiff_snd
null
bihimp_fst [GeneralizedHeytingAlgebra α] [GeneralizedHeytingAlgebra β] (a b : α × β) : (a ⇔ b).1 = a.1 ⇔ b.1 := rfl @[simp]
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
bihimp_fst
null
bihimp_snd [GeneralizedHeytingAlgebra α] [GeneralizedHeytingAlgebra β] (a b : α × β) : (a ⇔ b).2 = a.2 ⇔ b.2 := rfl
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
bihimp_snd
null
symmDiff_def [∀ i, GeneralizedCoheytingAlgebra (π i)] (a b : ∀ i, π i) : a ∆ b = fun i => a i ∆ b i := rfl
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
symmDiff_def
null
bihimp_def [∀ i, GeneralizedHeytingAlgebra (π i)] (a b : ∀ i, π i) : a ⇔ b = fun i => a i ⇔ b i := rfl @[simp]
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
bihimp_def
null
symmDiff_apply [∀ i, GeneralizedCoheytingAlgebra (π i)] (a b : ∀ i, π i) (i : ι) : (a ∆ b) i = a i ∆ b i := rfl @[simp]
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
symmDiff_apply
null
bihimp_apply [∀ i, GeneralizedHeytingAlgebra (π i)] (a b : ∀ i, π i) (i : ι) : (a ⇔ b) i = a i ⇔ b i := rfl
theorem
Order
[ "Mathlib.Order.BooleanAlgebra.Basic", "Mathlib.Logic.Equiv.Basic" ]
Mathlib/Order/SymmDiff.lean
bihimp_apply
null
toDual : α ≃ αᵒᵈ := Equiv.refl _
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toDual
`toDual` is the identity function to the `OrderDual` of a linear order.
ofDual : αᵒᵈ ≃ α := Equiv.refl _ @[simp]
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofDual
`ofDual` is the identity function from the `OrderDual` of a linear order.
toDual_symm_eq : (@toDual α).symm = ofDual := rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toDual_symm_eq
null
ofDual_symm_eq : (@ofDual α).symm = toDual := rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofDual_symm_eq
null
toDual_ofDual (a : αᵒᵈ) : toDual (ofDual a) = a := rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toDual_ofDual
null
ofDual_toDual (a : α) : ofDual (toDual a) = a := rfl
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofDual_toDual
null
toDual_inj {a b : α} : toDual a = toDual b ↔ a = b := by simp
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toDual_inj
null
ofDual_inj {a b : αᵒᵈ} : ofDual a = ofDual b ↔ a = b := by simp @[ext] lemma ext {a b : αᵒᵈ} (h : ofDual a = ofDual b) : a = b := h @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofDual_inj
null
toDual_le_toDual [LE α] {a b : α} : toDual a ≤ toDual b ↔ b ≤ a := Iff.rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toDual_le_toDual
null
toDual_lt_toDual [LT α] {a b : α} : toDual a < toDual b ↔ b < a := Iff.rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toDual_lt_toDual
null
ofDual_le_ofDual [LE α] {a b : αᵒᵈ} : ofDual a ≤ ofDual b ↔ b ≤ a := Iff.rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofDual_le_ofDual
null
ofDual_lt_ofDual [LT α] {a b : αᵒᵈ} : ofDual a < ofDual b ↔ b < a := Iff.rfl
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofDual_lt_ofDual
null
le_toDual [LE α] {a : αᵒᵈ} {b : α} : a ≤ toDual b ↔ b ≤ ofDual a := Iff.rfl
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
le_toDual
null
lt_toDual [LT α] {a : αᵒᵈ} {b : α} : a < toDual b ↔ b < ofDual a := Iff.rfl
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
lt_toDual
null
toDual_le [LE α] {a : α} {b : αᵒᵈ} : toDual a ≤ b ↔ ofDual b ≤ a := Iff.rfl
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toDual_le
null
toDual_lt [LT α] {a : α} {b : αᵒᵈ} : toDual a < b ↔ ofDual b < a := Iff.rfl
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toDual_lt
null
@[elab_as_elim] protected rec {motive : αᵒᵈ → Sort*} (toDual : ∀ a : α, motive (toDual a)) : ∀ a : αᵒᵈ, motive a := toDual @[simp]
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
rec
Recursor for `αᵒᵈ`.
Lex (α : Type*) := α
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
Lex
A type synonym to equip a type with its lexicographic order.
@[match_pattern] toLex : α ≃ Lex α := Equiv.refl _
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toLex
`toLex` is the identity function to the `Lex` of a type.
@[match_pattern] ofLex : Lex α ≃ α := Equiv.refl _ @[simp]
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofLex
`ofLex` is the identity function from the `Lex` of a type.
toLex_symm_eq : (@toLex α).symm = ofLex := rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toLex_symm_eq
null
ofLex_symm_eq : (@ofLex α).symm = toLex := rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofLex_symm_eq
null
toLex_ofLex (a : Lex α) : toLex (ofLex a) = a := rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toLex_ofLex
null
ofLex_toLex (a : α) : ofLex (toLex a) = a := rfl
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofLex_toLex
null
toLex_inj {a b : α} : toLex a = toLex b ↔ a = b := by simp
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toLex_inj
null
ofLex_inj {a b : Lex α} : ofLex a = ofLex b ↔ a = b := by simp
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofLex_inj
null
@[elab_as_elim, induction_eliminator, cases_eliminator] protected Lex.rec {β : Lex α → Sort*} (h : ∀ a, β (toLex a)) : ∀ a, β a := fun a => h (ofLex a) @[simp] lemma Lex.forall {p : Lex α → Prop} : (∀ a, p a) ↔ ∀ a, p (toLex a) := Iff.rfl @[simp] lemma Lex.exists {p : Lex α → Prop} : (∃ a, p a) ↔ ∃ a, p (toLex a) := If...
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
Lex.rec
A recursor for `Lex`. Use as `induction x`.
Colex (α : Type*) := α
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
Colex
A type synonym to equip a type with its lexicographic order.
@[match_pattern] toColex : α ≃ Colex α := Equiv.refl _
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toColex
`toColex` is the identity function to the `Colex` of a type.
@[match_pattern] ofColex : Colex α ≃ α := Equiv.refl _ @[simp]
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofColex
`ofColex` is the identity function from the `Colex` of a type.
toColex_symm_eq : (@toColex α).symm = ofColex := rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toColex_symm_eq
null
ofColex_symm_eq : (@ofColex α).symm = toColex := rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofColex_symm_eq
null
toColex_ofColex (a : Colex α) : toColex (ofColex a) = a := rfl @[simp]
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toColex_ofColex
null
ofColex_toColex (a : α) : ofColex (toColex a) = a := rfl
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofColex_toColex
null
toColex_inj {a b : α} : toColex a = toColex b ↔ a = b := by simp
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
toColex_inj
null
ofColex_inj {a b : Colex α} : ofColex a = ofColex b ↔ a = b := by simp
theorem
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
ofColex_inj
null
@[elab_as_elim, induction_eliminator, cases_eliminator] protected Colex.rec {β : Colex α → Sort*} (h : ∀ a, β (toColex a)) : ∀ a, β a := fun a => h (ofColex a) @[simp] lemma Colex.forall {p : Colex α → Prop} : (∀ a, p a) ↔ ∀ a, p (toColex a) := Iff.rfl @[simp] lemma Colex.exists {p : Colex α → Prop} : (∃ a, p a) ↔ ∃ ...
def
Order
[ "Mathlib.Logic.Equiv.Defs", "Mathlib.Logic.Nontrivial.Defs", "Mathlib.Order.Basic" ]
Mathlib/Order/Synonym.lean
Colex.rec
A recursor for `Colex`. Use as `induction x`.
IsOfFiniteCharacter := ∀ x, x ∈ F ↔ ∀ y ⊆ x, y.Finite → y ∈ F
def
Order
[ "Mathlib.Data.Set.Finite.Range", "Mathlib.Data.Set.Finite.Lattice", "Mathlib.Order.Zorn" ]
Mathlib/Order/TeichmullerTukey.lean
IsOfFiniteCharacter
A family of sets $F$ is of finite character iff for every set $X$, $X ∈ F$ iff every finite subset of $X$ is in $F$
IsOfFiniteCharacter.exists_maximal {F} (hF : IsOfFiniteCharacter F) {x : Set α} (xF : x ∈ F) : ∃ m, x ⊆ m ∧ Maximal (· ∈ F) m := by /- Apply Zorn's lemma. Take the union of the elements of a chain as its upper bound. -/ refine zorn_subset_nonempty F (fun c cF cch cne ↦ ⟨sUnion c, ?_, fun s sc ↦ subset_sUnio...
theorem
Order
[ "Mathlib.Data.Set.Finite.Range", "Mathlib.Data.Set.Finite.Lattice", "Mathlib.Order.Zorn" ]
Mathlib/Order/TeichmullerTukey.lean
IsOfFiniteCharacter.exists_maximal
**Teichmuller-Tukey lemma**. Every nonempty family of finite character has a maximal element.
noncomputable transfiniteIterate (j : J) : I → I := SuccOrder.limitRecOn j (fun _ _ ↦ id) (fun _ _ g ↦ φ ∘ g) (fun y _ h ↦ ⨆ (x : Set.Iio y), h x.1 x.2) @[simp]
def
Order
[ "Mathlib.Order.SuccPred.Limit" ]
Mathlib/Order/TransfiniteIteration.lean
transfiniteIterate
The `j`th-iteration of a function `φ : I → I` when `j : J` belongs to a well-ordered type.
transfiniteIterate_bot [OrderBot J] (i₀ : I) : transfiniteIterate φ (⊥ : J) i₀ = i₀ := by dsimp [transfiniteIterate] simp only [isMin_iff_eq_bot, SuccOrder.limitRecOn_isMin, id_eq]
lemma
Order
[ "Mathlib.Order.SuccPred.Limit" ]
Mathlib/Order/TransfiniteIteration.lean
transfiniteIterate_bot
null
transfiniteIterate_succ (i₀ : I) (j : J) (hj : ¬ IsMax j) : transfiniteIterate φ (Order.succ j) i₀ = φ (transfiniteIterate φ j i₀) := by dsimp [transfiniteIterate] rw [SuccOrder.limitRecOn_succ_of_not_isMax _ _ _ hj] rfl
lemma
Order
[ "Mathlib.Order.SuccPred.Limit" ]
Mathlib/Order/TransfiniteIteration.lean
transfiniteIterate_succ
null
transfiniteIterate_limit (i₀ : I) (j : J) (hj : Order.IsSuccLimit j) : transfiniteIterate φ j i₀ = ⨆ (x : Set.Iio j), transfiniteIterate φ x.1 i₀ := by dsimp [transfiniteIterate] rw [SuccOrder.limitRecOn_of_isSuccLimit _ _ _ hj] simp only [iSup_apply]
lemma
Order
[ "Mathlib.Order.SuccPred.Limit" ]
Mathlib/Order/TransfiniteIteration.lean
transfiniteIterate_limit
null
monotone_transfiniteIterate (hφ : ∀ (i : I), i ≤ φ i) : Monotone (fun (j : J) ↦ transfiniteIterate φ j i₀) := by intro k j hkj induction j using SuccOrder.limitRecOn with | isMin k hk => obtain rfl := hk.eq_bot obtain rfl : k = ⊥ := by simpa using hkj rfl | succ k' hk' hkk' => obtain hkj | r...
lemma
Order
[ "Mathlib.Order.SuccPred.Limit" ]
Mathlib/Order/TransfiniteIteration.lean
monotone_transfiniteIterate
null
top_mem_range_transfiniteIterate (hφ' : ∀ i ≠ (⊤ : I), i < φ i) (φtop : φ ⊤ = ⊤) (H : ¬ Function.Injective (fun (j : J) ↦ transfiniteIterate φ j i₀)) : ∃ (j : J), transfiniteIterate φ j i₀ = ⊤ := by have hφ (i : I) : i ≤ φ i := by by_cases hi : i = ⊤ · subst hi rw [φtop] · exact (hφ' i h...
lemma
Order
[ "Mathlib.Order.SuccPred.Limit" ]
Mathlib/Order/TransfiniteIteration.lean
top_mem_range_transfiniteIterate
null
WithBot (α : Type*) := Option α
def
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
WithBot
Attach `⊥` to a type.
@[coe, match_pattern] some : α → WithBot α := Option.some
def
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
some
The canonical map from `α` into `WithBot α`
coe : Coe α (WithBot α) := ⟨some⟩
instance
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
coe
null
bot : Bot (WithBot α) := ⟨none⟩
instance
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
bot
null
inhabited : Inhabited (WithBot α) := ⟨⊥⟩
instance
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
inhabited
null
@[elab_as_elim, induction_eliminator, cases_eliminator] recBotCoe {C : WithBot α → Sort*} (bot : C ⊥) (coe : ∀ a : α, C a) : ∀ n : WithBot α, C n | ⊥ => bot | (a : α) => coe a @[simp]
def
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
recBotCoe
Recursor for `WithBot` using the preferred forms `⊥` and `↑a`.
recBotCoe_bot {C : WithBot α → Sort*} (d : C ⊥) (f : ∀ a : α, C a) : @recBotCoe _ C d f ⊥ = d := rfl @[simp]
theorem
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
recBotCoe_bot
null
recBotCoe_coe {C : WithBot α → Sort*} (d : C ⊥) (f : ∀ a : α, C a) (x : α) : @recBotCoe _ C d f ↑x = f x := rfl
theorem
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
recBotCoe_coe
null
WithTop (α : Type*) := Option α
def
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
WithTop
Attach `⊤` to a type.
@[coe, match_pattern] some : α → WithTop α := Option.some
def
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
some
The canonical map from `α` into `WithTop α`
coeTC : CoeTC α (WithTop α) := ⟨some⟩
instance
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
coeTC
null
top : Top (WithTop α) := ⟨none⟩
instance
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
top
null
inhabited : Inhabited (WithTop α) := ⟨⊤⟩
instance
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
inhabited
null
@[elab_as_elim, induction_eliminator, cases_eliminator] recTopCoe {C : WithTop α → Sort*} (top : C ⊤) (coe : ∀ a : α, C a) : ∀ n : WithTop α, C n | none => top | Option.some a => coe a @[simp]
def
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
recTopCoe
Recursor for `WithTop` using the preferred forms `⊤` and `↑a`.
recTopCoe_top {C : WithTop α → Sort*} (d : C ⊤) (f : ∀ a : α, C a) : @recTopCoe _ C d f ⊤ = d := rfl @[simp]
theorem
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
recTopCoe_top
null
recTopCoe_coe {C : WithTop α → Sort*} (d : C ⊤) (f : ∀ a : α, C a) (x : α) : @recTopCoe _ C d f ↑x = f x := rfl
theorem
Order
[ "Mathlib.Order.Notation" ]
Mathlib/Order/TypeTags.lean
recTopCoe_coe
null
@[simp] up_le [LE α] {a b : α} : up a ≤ up b ↔ a ≤ b := Iff.rfl @[simp] theorem down_le [LE α] {a b : ULift α} : down a ≤ down b ↔ a ≤ b := Iff.rfl
theorem
Order
[ "Mathlib.Logic.Function.ULift", "Mathlib.Order.Basic" ]
Mathlib/Order/ULift.lean
up_le
null
@[simp] up_lt [LT α] {a b : α} : up a < up b ↔ a < b := Iff.rfl @[simp] theorem down_lt [LT α] {a b : ULift α} : down a < down b ↔ a < b := Iff.rfl
theorem
Order
[ "Mathlib.Logic.Function.ULift", "Mathlib.Order.Basic" ]
Mathlib/Order/ULift.lean
up_lt
null
@[simp] up_beq [BEq α] (a b : α) : (up a == up b) = (a == b) := rfl @[simp] theorem down_beq [BEq α] (a b : ULift α) : (down a == down b) = (a == b) := rfl
theorem
Order
[ "Mathlib.Logic.Function.ULift", "Mathlib.Order.Basic" ]
Mathlib/Order/ULift.lean
up_beq
null
@[simp] up_compare [Ord α] (a b : α) : compare (up a) (up b) = compare a b := rfl @[simp] theorem down_compare [Ord α] (a b : ULift α) : compare (down a) (down b) = compare a b := rfl
theorem
Order
[ "Mathlib.Logic.Function.ULift", "Mathlib.Order.Basic" ]
Mathlib/Order/ULift.lean
up_compare
null
@[simp] up_sup [Max α] (a b : α) : up (a ⊔ b) = up a ⊔ up b := rfl @[simp] theorem down_sup [Max α] (a b : ULift α) : down (a ⊔ b) = down a ⊔ down b := rfl
theorem
Order
[ "Mathlib.Logic.Function.ULift", "Mathlib.Order.Basic" ]
Mathlib/Order/ULift.lean
up_sup
null
@[simp] up_inf [Min α] (a b : α) : up (a ⊓ b) = up a ⊓ up b := rfl @[simp] theorem down_inf [Min α] (a b : ULift α) : down (a ⊓ b) = down a ⊓ down b := rfl
theorem
Order
[ "Mathlib.Logic.Function.ULift", "Mathlib.Order.Basic" ]
Mathlib/Order/ULift.lean
up_inf
null
@[simp] up_sdiff [SDiff α] (a b : α) : up (a \ b) = up a \ up b := rfl @[simp] theorem down_sdiff [SDiff α] (a b : ULift α) : down (a \ b) = down a \ down b := rfl
theorem
Order
[ "Mathlib.Logic.Function.ULift", "Mathlib.Order.Basic" ]
Mathlib/Order/ULift.lean
up_sdiff
null
@[simp] up_compl [HasCompl α] (a : α) : up (aᶜ) = (up a)ᶜ := rfl @[simp] theorem down_compl [HasCompl α] (a : ULift α) : down aᶜ = (down a)ᶜ := rfl
theorem
Order
[ "Mathlib.Logic.Function.ULift", "Mathlib.Order.Basic" ]
Mathlib/Order/ULift.lean
up_compl
null
acc_def {α} {r : α → α → Prop} {a : α} : Acc r a ↔ ∀ b, r b a → Acc r b where mp h := h.rec fun _ h _ ↦ h mpr := .intro a
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
acc_def
null
exists_not_acc_lt_of_not_acc {α} {a : α} {r} (h : ¬Acc r a) : ∃ b, ¬Acc r b ∧ r b a := by rw [acc_def] at h push_neg at h simpa only [and_comm]
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
exists_not_acc_lt_of_not_acc
null
not_acc_iff_exists_descending_chain {α} {r : α → α → Prop} {x : α} : ¬Acc r x ↔ ∃ f : ℕ → α, f 0 = x ∧ ∀ n, r (f (n + 1)) (f n) where mp hx := let f : ℕ → {a : α // ¬Acc r a} := Nat.rec ⟨x, hx⟩ fun _ a ↦ ⟨_, (exists_not_acc_lt_of_not_acc a.2).choose_spec.1⟩ ⟨(f · |>.1), rfl, fun n ↦ (exists_not_acc_lt_o...
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
not_acc_iff_exists_descending_chain
null
acc_iff_isEmpty_descending_chain {α} {r : α → α → Prop} {x : α} : Acc r x ↔ IsEmpty { f : ℕ → α // f 0 = x ∧ ∀ n, r (f (n + 1)) (f n) } := by rw [← not_iff_not, not_isEmpty_iff, nonempty_subtype] exact not_acc_iff_exists_descending_chain
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
acc_iff_isEmpty_descending_chain
null
wellFounded_iff_isEmpty_descending_chain {α} {r : α → α → Prop} : WellFounded r ↔ IsEmpty { f : ℕ → α // ∀ n, r (f (n + 1)) (f n) } where mp := fun ⟨h⟩ ↦ ⟨fun ⟨f, hf⟩ ↦ (acc_iff_isEmpty_descending_chain.mp (h (f 0))).false ⟨f, rfl, hf⟩⟩ mpr h := ⟨fun _ ↦ acc_iff_isEmpty_descending_chain.mpr ⟨fun ⟨f, hf⟩ ↦ h.fal...
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
wellFounded_iff_isEmpty_descending_chain
A relation is well-founded iff it doesn't have any infinite descending chain. See `RelEmbedding.wellFounded_iff_isEmpty` for a version in terms of relation embeddings.
protected isAsymm (h : WellFounded r) : IsAsymm α r := ⟨h.asymmetric⟩
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
isAsymm
null
protected isIrrefl (h : WellFounded r) : IsIrrefl α r := @IsAsymm.isIrrefl α r h.isAsymm
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
isIrrefl
null
mono (hr : WellFounded r) (h : ∀ a b, r' a b → r a b) : WellFounded r' := Subrelation.wf (h _ _) hr open scoped Function in -- required for scoped `on` notation
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
mono
null
onFun {α β : Sort*} {r : β → β → Prop} {f : α → β} : WellFounded r → WellFounded (r on f) := InvImage.wf _
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
onFun
null
has_min {α} {r : α → α → Prop} (H : WellFounded r) (s : Set α) : s.Nonempty → ∃ a ∈ s, ∀ x ∈ s, ¬r x a | ⟨a, ha⟩ => show ∃ b ∈ s, ∀ x ∈ s, ¬r x b from Acc.recOn (H.apply a) (fun x _ IH => not_imp_not.1 fun hne hx => hne <| ⟨x, hx, fun y hy hyx => hne <| IH y hyx hy⟩) ha
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
has_min
If `r` is a well-founded relation, then any nonempty set has a minimal element with respect to `r`.
noncomputable min {r : α → α → Prop} (H : WellFounded r) (s : Set α) (h : s.Nonempty) : α := Classical.choose (H.has_min s h)
def
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
min
A minimal element of a nonempty set in a well-founded order. If you're working with a nonempty linear order, consider defining a `ConditionallyCompleteLinearOrderBot` instance via `WellFoundedLT.conditionallyCompleteLinearOrderBot` and using `Inf` instead.
min_mem {r : α → α → Prop} (H : WellFounded r) (s : Set α) (h : s.Nonempty) : H.min s h ∈ s := let ⟨h, _⟩ := Classical.choose_spec (H.has_min s h) h
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
min_mem
null
not_lt_min {r : α → α → Prop} (H : WellFounded r) (s : Set α) (h : s.Nonempty) {x} (hx : x ∈ s) : ¬r x (H.min s h) := let ⟨_, h'⟩ := Classical.choose_spec (H.has_min s h) h' _ hx
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
not_lt_min
null
wellFounded_iff_has_min {r : α → α → Prop} : WellFounded r ↔ ∀ s : Set α, s.Nonempty → ∃ m ∈ s, ∀ x ∈ s, ¬r x m := by refine ⟨fun h => h.has_min, fun h => ⟨fun x => ?_⟩⟩ by_contra hx obtain ⟨m, hm, hm'⟩ := h {x | ¬Acc r x} ⟨x, hx⟩ refine hm ⟨_, fun y hy => ?_⟩ by_contra hy' exact hm' y hy' hy @[deprecat...
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
wellFounded_iff_has_min
null
not_rel_apply_succ [h : IsWellFounded α r] (f : ℕ → α) : ∃ n, ¬ r (f (n + 1)) (f n) := by by_contra! hf exact (wellFounded_iff_isEmpty_descending_chain.1 h.wf).elim ⟨f, hf⟩ open Set
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
not_rel_apply_succ
null
protected noncomputable sup {r : α → α → Prop} (wf : WellFounded r) (s : Set α) (h : Bounded r s) : α := wf.min { x | ∀ a ∈ s, r a x } h
def
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
sup
The supremum of a bounded, well-founded order
protected lt_sup {r : α → α → Prop} (wf : WellFounded r) {s : Set α} (h : Bounded r s) {x} (hx : x ∈ s) : r x (wf.sup s h) := min_mem wf { x | ∀ a ∈ s, r a x } h x hx
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
lt_sup
null
WellFounded.min_le (h : WellFounded ((· < ·) : β → β → Prop)) {x : β} {s : Set β} (hx : x ∈ s) (hne : s.Nonempty := ⟨x, hx⟩) : h.min s hne ≤ x := not_lt.1 <| h.not_lt_min _ _ hx
theorem
Order
[ "Mathlib.Data.Set.Function", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/WellFounded.lean
WellFounded.min_le
null