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
le_of_max_le_right {a b c : α} (h : max a b ≤ c) : b ≤ c := le_trans (le_max_right _ _) h
theorem
Order
[ "Mathlib.Logic.OpClass", "Mathlib.Order.Lattice" ]
Mathlib/Order/MinMax.lean
le_of_max_le_right
null
instCommutativeMax : Std.Commutative (α := α) max where comm := max_comm
instance
Order
[ "Mathlib.Logic.OpClass", "Mathlib.Order.Lattice" ]
Mathlib/Order/MinMax.lean
instCommutativeMax
null
instAssociativeMax : Std.Associative (α := α) max where assoc := max_assoc
instance
Order
[ "Mathlib.Logic.OpClass", "Mathlib.Order.Lattice" ]
Mathlib/Order/MinMax.lean
instAssociativeMax
null
instCommutativeMin : Std.Commutative (α := α) min where comm := min_comm
instance
Order
[ "Mathlib.Logic.OpClass", "Mathlib.Order.Lattice" ]
Mathlib/Order/MinMax.lean
instCommutativeMin
null
instAssociativeMin : Std.Associative (α := α) min where assoc := min_assoc
instance
Order
[ "Mathlib.Logic.OpClass", "Mathlib.Order.Lattice" ]
Mathlib/Order/MinMax.lean
instAssociativeMin
null
max_left_commutative : LeftCommutative (max : α → α → α) := ⟨max_left_comm⟩
theorem
Order
[ "Mathlib.Logic.OpClass", "Mathlib.Order.Lattice" ]
Mathlib/Order/MinMax.lean
max_left_commutative
null
min_left_commutative : LeftCommutative (min : α → α → α) := ⟨min_left_comm⟩
theorem
Order
[ "Mathlib.Logic.OpClass", "Mathlib.Order.Lattice" ]
Mathlib/Order/MinMax.lean
min_left_commutative
null
IsWeakUpperModularLattice (α : Type*) [Lattice α] : Prop where
class
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
IsWeakUpperModularLattice
A weakly upper modular lattice is a lattice where `a ⊔ b` covers `a` and `b` if `a` and `b` both cover `a ⊓ b`.
IsWeakLowerModularLattice (α : Type*) [Lattice α] : Prop where
class
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
IsWeakLowerModularLattice
`a ⊔ b` covers `a` and `b` if `a` and `b` both cover `a ⊓ b`. -/ covBy_sup_of_inf_covBy_covBy {a b : α} : a ⊓ b ⋖ a → a ⊓ b ⋖ b → a ⋖ a ⊔ b /-- A weakly lower modular lattice is a lattice where `a` and `b` cover `a ⊓ b` if `a ⊔ b` covers both `a` and `b`.
IsUpperModularLattice (α : Type*) [Lattice α] : Prop where
class
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
IsUpperModularLattice
`a` and `b` cover `a ⊓ b` if `a ⊔ b` covers both `a` and `b` -/ inf_covBy_of_covBy_covBy_sup {a b : α} : a ⋖ a ⊔ b → b ⋖ a ⊔ b → a ⊓ b ⋖ a /-- An upper modular lattice, aka semimodular lattice, is a lattice where `a ⊔ b` covers `a` and `b` if either `a` or `b` covers `a ⊓ b`.
IsLowerModularLattice (α : Type*) [Lattice α] : Prop where
class
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
IsLowerModularLattice
`a ⊔ b` covers `a` and `b` if either `a` or `b` covers `a ⊓ b` -/ covBy_sup_of_inf_covBy {a b : α} : a ⊓ b ⋖ a → b ⋖ a ⊔ b /-- A lower modular lattice is a lattice where `a` and `b` both cover `a ⊓ b` if `a ⊔ b` covers either `a` or `b`.
IsModularLattice (α : Type*) [Lattice α] : Prop where
class
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
IsModularLattice
`a` and `b` both cover `a ⊓ b` if `a ⊔ b` covers either `a` or `b` -/ inf_covBy_of_covBy_sup {a b : α} : a ⋖ a ⊔ b → a ⊓ b ⋖ b /-- A modular lattice is one with a limited associativity between `⊓` and `⊔`.
wellFounded_lt_exact_sequence {β γ : Type*} [Preorder β] [Preorder γ] [h₁ : WellFoundedLT β] [h₂ : WellFoundedLT γ] (K : α) (f₁ : β → α) (f₂ : α → β) (g₁ : γ → α) (g₂ : α → γ) (gci : GaloisCoinsertion f₁ f₂) (gi : GaloisInsertion g₂ g₁) (hf : ∀ a, f₁ (f₂ a) = a ⊓ K) (hg : ∀ a, g₁ (g₂ a) = a ⊔ K) : WellF...
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
wellFounded_lt_exact_sequence
Whenever `x ≤ z`, then for any `y`, `(x ⊔ y) ⊓ z ≤ x ⊔ (y ⊓ z)` -/ sup_inf_le_assoc_of_le : ∀ {x : α} (y : α) {z : α}, x ≤ z → (x ⊔ y) ⊓ z ≤ x ⊔ y ⊓ z section WeakUpperModular variable [Lattice α] [IsWeakUpperModularLattice α] {a b : α} theorem covBy_sup_of_inf_covBy_of_inf_covBy_left : a ⊓ b ⋖ a → a ⊓ b ⋖ b → a ⋖...
wellFounded_gt_exact_sequence {β γ : Type*} [Preorder β] [Preorder γ] [WellFoundedGT β] [WellFoundedGT γ] (K : α) (f₁ : β → α) (f₂ : α → β) (g₁ : γ → α) (g₂ : α → γ) (gci : GaloisCoinsertion f₁ f₂) (gi : GaloisInsertion g₂ g₁) (hf : ∀ a, f₁ (f₂ a) = a ⊓ K) (hg : ∀ a, g₁ (g₂ a) = a ⊔ K) : WellFoundedGT α...
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
wellFounded_gt_exact_sequence
A generalization of the theorem that if `N` is a submodule of `M` and `N` and `M / N` are both Noetherian, then `M` is Noetherian.
@[simps] infIccOrderIsoIccSup (a b : α) : Set.Icc (a ⊓ b) a ≃o Set.Icc b (a ⊔ b) where toFun x := ⟨x ⊔ b, ⟨le_sup_right, sup_le_sup_right x.prop.2 b⟩⟩ invFun x := ⟨a ⊓ x, ⟨inf_le_inf_left a x.prop.1, inf_le_left⟩⟩ left_inv x := Subtype.ext (by change a ⊓ (↑x ⊔ b) = ↑x rw [sup_comm, ← inf...
def
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
infIccOrderIsoIccSup
The diamond isomorphism between the intervals `[a ⊓ b, a]` and `[b, a ⊔ b]`
inf_strictMonoOn_Icc_sup {a b : α} : StrictMonoOn (fun c => a ⊓ c) (Icc b (a ⊔ b)) := StrictMono.of_restrict (infIccOrderIsoIccSup a b).symm.strictMono
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
inf_strictMonoOn_Icc_sup
null
sup_strictMonoOn_Icc_inf {a b : α} : StrictMonoOn (fun c => c ⊔ b) (Icc (a ⊓ b) a) := StrictMono.of_restrict (infIccOrderIsoIccSup a b).strictMono
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
sup_strictMonoOn_Icc_inf
null
@[simps] infIooOrderIsoIooSup (a b : α) : Ioo (a ⊓ b) a ≃o Ioo b (a ⊔ b) where toFun c := ⟨c ⊔ b, le_sup_right.trans_lt <| sup_strictMonoOn_Icc_inf (left_mem_Icc.2 inf_le_left) (Ioo_subset_Icc_self c.2) c.2.1, sup_strictMonoOn_Icc_inf (Ioo_subset_Icc_self c.2) (right_mem_Icc.2 inf_le_left) c.2...
def
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
infIooOrderIsoIooSup
The diamond isomorphism between the intervals `]a ⊓ b, a[` and `}b, a ⊔ b[`.
IicOrderIsoIci {a b : α} (h : IsCompl a b) : Set.Iic a ≃o Set.Ici b := (OrderIso.setCongr (Set.Iic a) (Set.Icc (a ⊓ b) a) (h.inf_eq_bot.symm ▸ Set.Icc_bot.symm)).trans <| (infIccOrderIsoIccSup a b).trans (OrderIso.setCongr (Set.Icc b (a ⊔ b)) (Set.Ici b) (h.sup_eq_top.symm ▸ Set.Icc_top))
def
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
IicOrderIsoIci
The diamond isomorphism between the intervals `Set.Iic a` and `Set.Ici b`.
isModularLattice_iff_inf_sup_inf_assoc [Lattice α] : IsModularLattice α ↔ ∀ x y z : α, x ⊓ z ⊔ y ⊓ z = (x ⊓ z ⊔ y) ⊓ z := ⟨fun h => @IsModularLattice.inf_sup_inf_assoc _ _ h, fun h => ⟨fun y z xz => by rw [← inf_eq_left.2 xz, h]⟩⟩
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
isModularLattice_iff_inf_sup_inf_assoc
null
disjoint_sup_right_of_disjoint_sup_left [Lattice α] [OrderBot α] [IsModularLattice α] (h : Disjoint a b) (hsup : Disjoint (a ⊔ b) c) : Disjoint a (b ⊔ c) := by rw [disjoint_iff_inf_le, ← h.eq_bot, sup_comm] apply le_inf inf_le_left apply (inf_le_inf_right (c ⊔ b) le_sup_right).trans rw [sup_comm, IsModu...
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
disjoint_sup_right_of_disjoint_sup_left
null
disjoint_sup_left_of_disjoint_sup_right [Lattice α] [OrderBot α] [IsModularLattice α] (h : Disjoint b c) (hsup : Disjoint a (b ⊔ c)) : Disjoint (a ⊔ b) c := by rw [disjoint_comm, sup_comm] apply Disjoint.disjoint_sup_right_of_disjoint_sup_left h.symm rwa [sup_comm, disjoint_comm] at hsup
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
disjoint_sup_left_of_disjoint_sup_right
null
isCompl_sup_right_of_isCompl_sup_left [Lattice α] [BoundedOrder α] [IsModularLattice α] (h : Disjoint a b) (hcomp : IsCompl (a ⊔ b) c) : IsCompl a (b ⊔ c) := ⟨h.disjoint_sup_right_of_disjoint_sup_left hcomp.disjoint, codisjoint_assoc.mp hcomp.codisjoint⟩
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
isCompl_sup_right_of_isCompl_sup_left
null
isCompl_sup_left_of_isCompl_sup_right [Lattice α] [BoundedOrder α] [IsModularLattice α] (h : Disjoint b c) (hcomp : IsCompl a (b ⊔ c)) : IsCompl (a ⊔ b) c := ⟨h.disjoint_sup_left_of_disjoint_sup_right hcomp.disjoint, codisjoint_assoc.mpr hcomp.codisjoint⟩
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
isCompl_sup_left_of_isCompl_sup_right
null
Set.Iic.isCompl_inf_inf_of_isCompl_of_le [Lattice α] [BoundedOrder α] [IsModularLattice α] {a b c : α} (h₁ : IsCompl b c) (h₂ : b ≤ a) : IsCompl (⟨a ⊓ b, inf_le_left⟩ : Iic a) (⟨a ⊓ c, inf_le_left⟩ : Iic a) := by constructor · simp [disjoint_iff, Subtype.ext_iff, inf_comm a c, inf_assoc a, ← inf_assoc b, h₁...
lemma
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
Set.Iic.isCompl_inf_inf_of_isCompl_of_le
null
isModularLattice_Iic : IsModularLattice (Set.Iic a) := ⟨@fun x y z xz => (sup_inf_le_assoc_of_le (y : α) xz : (↑x ⊔ ↑y) ⊓ ↑z ≤ ↑x ⊔ ↑y ⊓ ↑z)⟩
instance
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
isModularLattice_Iic
null
isModularLattice_Ici : IsModularLattice (Set.Ici a) := ⟨@fun x y z xz => (sup_inf_le_assoc_of_le (y : α) xz : (↑x ⊔ ↑y) ⊓ ↑z ≤ ↑x ⊔ ↑y ⊓ ↑z)⟩
instance
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
isModularLattice_Ici
null
exists_inf_eq_and_sup_eq (hb : a ≤ b) (hc : b ≤ c) : ∃ b', b ⊓ b' = a ∧ b ⊔ b' = c := by obtain ⟨d, hdisjoint, hcodisjoint⟩ := exists_isCompl b refine ⟨(d ⊔ a) ⊓ c, ?_, ?_⟩ · simpa [← inf_assoc, ← inf_sup_assoc_of_le _ hb, hdisjoint.eq_bot] using hb.trans hc · simp [← sup_inf_assoc_of_le _ hc, ← sup_assoc, hcod...
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
exists_inf_eq_and_sup_eq
null
exists_disjoint_and_sup_eq (h : a ≤ b) : ∃ a', Disjoint a a' ∧ a ⊔ a' = b := by simp_rw [disjoint_iff] apply exists_inf_eq_and_sup_eq (by simp) h
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
exists_disjoint_and_sup_eq
null
exists_inf_eq_and_codisjoint (h : a ≤ b) : ∃ b', b ⊓ b' = a ∧ Codisjoint b b' := by simp_rw [codisjoint_iff] apply exists_inf_eq_and_sup_eq h (by simp)
theorem
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
exists_inf_eq_and_codisjoint
null
complementedLattice_Icc [Fact (a ≤ b)] : ComplementedLattice (Set.Icc a b) where exists_isCompl := fun ⟨x, ha, hb⟩ => by simp_rw [Set.Icc.isCompl_iff] obtain ⟨y, rfl, rfl⟩ := exists_inf_eq_and_sup_eq ha hb exact ⟨⟨y, inf_le_right, le_sup_right⟩, rfl, rfl⟩
instance
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
complementedLattice_Icc
null
complementedLattice_Iic : ComplementedLattice (Set.Iic a) where exists_isCompl := fun ⟨x, hx⟩ => by simp_rw [Set.Iic.isCompl_iff] obtain ⟨y, hdisjoint, rfl⟩ := exists_disjoint_and_sup_eq hx exact ⟨⟨y, le_sup_right⟩, hdisjoint, rfl⟩
instance
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
complementedLattice_Iic
null
complementedLattice_Ici : ComplementedLattice (Set.Ici a) where exists_isCompl := fun ⟨x, hx⟩ => by simp_rw [Set.Ici.isCompl_iff] obtain ⟨y, rfl, hcodisjoint⟩ := exists_inf_eq_and_codisjoint hx exact ⟨⟨y, inf_le_right⟩, rfl, hcodisjoint⟩
instance
Order
[ "Mathlib.Data.Set.Monotone", "Mathlib.Order.Cover", "Mathlib.Order.LatticeIntervals", "Mathlib.Order.GaloisConnection.Defs" ]
Mathlib/Order/ModularLattice.lean
complementedLattice_Ici
null
instOrderBot : OrderBot ℕ where bot := 0 bot_le := zero_le
instance
Order
[ "Mathlib.Data.Nat.Find", "Mathlib.Order.BoundedOrder.Basic", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/Nat.lean
instOrderBot
null
instNoMaxOrder : NoMaxOrder ℕ where exists_gt n := ⟨n + 1, n.lt_succ_self⟩ /-! ### Miscellaneous lemmas -/ @[simp high] protected lemma bot_eq_zero : ⊥ = 0 := rfl
instance
Order
[ "Mathlib.Data.Nat.Find", "Mathlib.Order.BoundedOrder.Basic", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/Nat.lean
instNoMaxOrder
null
isLeast_find {p : ℕ → Prop} [DecidablePred p] (hp : ∃ n, p n) : IsLeast {n | p n} (Nat.find hp) := ⟨Nat.find_spec hp, fun _ ↦ Nat.find_min' hp⟩
lemma
Order
[ "Mathlib.Data.Nat.Find", "Mathlib.Order.BoundedOrder.Basic", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/Nat.lean
isLeast_find
`Nat.find` is the minimum natural number satisfying a predicate `p`.
Set.Nonempty.isLeast_natFind {s : Set ℕ} [DecidablePred (· ∈ s)] (hs : s.Nonempty) : IsLeast s (Nat.find hs) := Nat.isLeast_find hs
lemma
Order
[ "Mathlib.Data.Nat.Find", "Mathlib.Order.BoundedOrder.Basic", "Mathlib.Order.Bounds.Defs" ]
Mathlib/Order/Nat.lean
Set.Nonempty.isLeast_natFind
`Nat.find` is the minimum element of a nonempty set of natural numbers.
@[notation_class] HasCompl (α : Type*) where /-- Set / lattice complement -/ compl : α → α export HasCompl (compl) @[inherit_doc] postfix:1024 "ᶜ" => compl /-! ### `Sup` and `Inf` -/ attribute [ext] Min Max
class
Order
[ "Qq", "Mathlib.Lean.PrettyPrinter.Delaborator", "Mathlib.Tactic.TypeStar", "Mathlib.Tactic.Simps.NotationClass" ]
Mathlib/Order/Notation.lean
HasCompl
Set / lattice complement
private hasLinearOrder (u : Level) (α : Q(Type u)) (cls : Q(Type u → Type u)) (toCls : Q((α : Type u) → $(linearOrderExpr u) α → $cls α)) (inst : Q($cls $α)) : MetaM Bool := do try withNewMCtxDepth do withLocalInstances (← getLCtx).decls.toList.reduceOption do let mvar ← mkFreshExprMVarQ q($(lin...
def
Order
[ "Qq", "Mathlib.Lean.PrettyPrinter.Delaborator", "Mathlib.Tactic.TypeStar", "Mathlib.Tactic.Simps.NotationClass" ]
Mathlib/Order/Notation.lean
hasLinearOrder
The supremum/join operation: `x ⊔ y`. It is notation for `max x y` and should be used when the type is not a linear order. -/ syntax:68 term:68 " ⊔ " term:69 : term /-- The infimum/meet operation: `x ⊓ y`. It is notation for `min x y` and should be used when the type is not a linear order. -/ syntax:69 term:69 " ⊓ " t...
@[delab app.Max.max] delabSup : Delab := whenNotPPOption getPPExplicit <| whenPPOption getPPNotation do let_expr f@Max.max α inst _ _ := ← getExpr | failure have u := f.constLevels![0]! if ← hasLinearOrder u α q(Max) q($(linearOrderToMax u)) inst then failure -- use the default delaborator let x ← withNaryA...
def
Order
[ "Qq", "Mathlib.Lean.PrettyPrinter.Delaborator", "Mathlib.Tactic.TypeStar", "Mathlib.Tactic.Simps.NotationClass" ]
Mathlib/Order/Notation.lean
delabSup
Delaborate `max x y` into `x ⊔ y` if the type is not a linear order.
@[delab app.Min.min] delabInf : Delab := whenNotPPOption getPPExplicit <| whenPPOption getPPNotation do let_expr f@Min.min α inst _ _ := ← getExpr | failure have u := f.constLevels![0]! if ← hasLinearOrder u α q(Min) q($(linearOrderToMin u)) inst then failure -- use the default delaborator let x ← withNaryA...
def
Order
[ "Qq", "Mathlib.Lean.PrettyPrinter.Delaborator", "Mathlib.Tactic.TypeStar", "Mathlib.Tactic.Simps.NotationClass" ]
Mathlib/Order/Notation.lean
delabInf
Delaborate `min x y` into `x ⊓ y` if the type is not a linear order.
@[notation_class] HImp (α : Type*) where /-- Heyting implication `⇨` -/ himp : α → α → α
class
Order
[ "Qq", "Mathlib.Lean.PrettyPrinter.Delaborator", "Mathlib.Tactic.TypeStar", "Mathlib.Tactic.Simps.NotationClass" ]
Mathlib/Order/Notation.lean
HImp
Syntax typeclass for Heyting implication `⇨`.
@[notation_class] HNot (α : Type*) where /-- Heyting negation `¬` -/ hnot : α → α export HImp (himp) export SDiff (sdiff) export HNot (hnot)
class
Order
[ "Qq", "Mathlib.Lean.PrettyPrinter.Delaborator", "Mathlib.Tactic.TypeStar", "Mathlib.Tactic.Simps.NotationClass" ]
Mathlib/Order/Notation.lean
HNot
Syntax typeclass for Heyting negation `¬`. The difference between `HasCompl` and `HNot` is that the former belongs to Heyting algebras, while the latter belongs to co-Heyting algebras. They are both pseudo-complements, but `compl` underestimates while `HNot` overestimates. In Boolean algebras, they are equal. See `hno...
@[notation_class, ext] Top (α : Type*) where /-- The top (`⊤`, `\top`) element -/ top : α
class
Order
[ "Qq", "Mathlib.Lean.PrettyPrinter.Delaborator", "Mathlib.Tactic.TypeStar", "Mathlib.Tactic.Simps.NotationClass" ]
Mathlib/Order/Notation.lean
Top
Heyting implication -/ infixr:60 " ⇨ " => himp /-- Heyting negation -/ prefix:72 "¬" => hnot /-- Typeclass for the `⊤` (`\top`) notation
@[notation_class, ext] Bot (α : Type*) where /-- The bot (`⊥`, `\bot`) element -/ bot : α
class
Order
[ "Qq", "Mathlib.Lean.PrettyPrinter.Delaborator", "Mathlib.Tactic.TypeStar", "Mathlib.Tactic.Simps.NotationClass" ]
Mathlib/Order/Notation.lean
Bot
Typeclass for the `⊥` (`\bot`) notation
Nucleus (X : Type*) [SemilatticeInf X] extends InfHom X X where /-- A nucleus is idempotent. Do not use this directly. Instead use `NucleusClass.idempotent`. -/ idempotent' (x : X) : toFun (toFun x) ≤ toFun x /-- A nucleus is increasing. Do not use this directly. Instead use `NucleusClass.le_apply`. -/ le_a...
structure
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
Nucleus
A nucleus is an inflationary idempotent `inf`-preserving endomorphism of a semilattice. In a frame, nuclei correspond to sublocales. See `nucleusIsoSublocale`.
NucleusClass (F X : Type*) [SemilatticeInf X] [FunLike F X X] : Prop extends InfHomClass F X X where /-- A nucleus is idempotent. -/ idempotent (x : X) (f : F) : f (f x) ≤ f x /-- A nucleus is inflationary. -/ le_apply (x : X) (f : F) : x ≤ f x
class
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
NucleusClass
`NucleusClass F X` states that F is a type of nuclei.
Simps.apply (n : Nucleus X) : X → X := n @[simp] lemma toFun_eq_coe (n : Nucleus X) : n.toFun = n := rfl @[simp] lemma coe_toInfHom (n : Nucleus X) : ⇑n.toInfHom = n := rfl @[simp] lemma coe_mk (f : InfHom X X) (h1 h2) : ⇑(mk f h1 h2) = f := rfl initialize_simps_projections Nucleus (toFun → apply)
def
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
Simps.apply
See Note [custom simps projection]
toClosureOperator (n : Nucleus X) : ClosureOperator X := ClosureOperator.mk' n (OrderHomClass.mono n) n.le_apply' n.idempotent' @[simp] lemma idempotent (x : X) : n (n x) = n x := n.toClosureOperator.idempotent x
def
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
toClosureOperator
Every nucleus is a `ClosureOperator`.
le_apply : x ≤ n x := n.toClosureOperator.le_closure x
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
le_apply
null
monotone : Monotone n := n.toClosureOperator.monotone
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
monotone
null
map_inf : n (x ⊓ y) = n x ⊓ n y := InfHomClass.map_inf n x y @[ext] lemma ext {m n : Nucleus X} (h : ∀ a, m a = n a) : m = n := DFunLike.ext m n h
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
map_inf
null
@[simp, norm_cast] coe_le_coe : ⇑m ≤ n ↔ m ≤ n := .rfl @[simp, norm_cast] lemma coe_lt_coe : ⇑m < n ↔ m < n := .rfl @[simp] lemma mk_le_mk (toInfHom₁ toInfHom₂ : InfHom X X) (le_apply₁ le_apply₂ idempotent₁ idempotent₂) : mk toInfHom₁ le_apply₁ idempotent₁ ≤ mk toInfHom₂ le_apply₂ idempotent₂ ↔ toInfHom₁ ...
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
coe_le_coe
null
@[simp, norm_cast] coe_inf (m n : Nucleus X) : ⇑(m ⊓ n) = ⇑m ⊓ ⇑n := rfl @[simp] lemma inf_apply (m n : Nucleus X) (x : X) : (m ⊓ n) x = m x ⊓ n x := rfl
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
coe_inf
null
instBot : OrderBot (Nucleus X) where bot.toFun x := x bot.idempotent' := by simp bot.le_apply' := by simp bot.map_inf' := by simp bot_le n _ := n.le_apply @[simp, norm_cast] lemma coe_bot : ⇑(⊥ : Nucleus X) = id := rfl @[simp] lemma bot_apply (x : X) : (⊥ : Nucleus X) x = x := rfl variable [OrderTop X]
instance
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
instBot
The smallest nucleus is the identity.
instTop : Top (Nucleus X) where top.toFun := ⊤ top.idempotent' := by simp top.le_apply' := by simp top.map_inf' := by simp @[simp, norm_cast] lemma coe_top : ⇑(⊤ : Nucleus X) = ⊤ := rfl @[simp] lemma top_apply (x : X) : (⊤ : Nucleus X) x = ⊤ := rfl
instance
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
instTop
A nucleus preserves `⊤`. -/ instance : TopHomClass (Nucleus X) X X where map_top _ := eq_top_iff.mpr le_apply /-- The largest nucleus sends everything to `⊤`.
@[simp] sInf_apply (s : Set (Nucleus X)) (x : X) : sInf s x = ⨅ j ∈ s, j x := rfl @[simp] lemma iInf_apply {ι : Type*} (f : ι → (Nucleus X)) (x : X) : iInf f x = ⨅ j, f j x := by rw [iInf, sInf_apply, iInf_range]
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
sInf_apply
null
map_himp_le : n (x ⇨ y) ≤ x ⇨ n y := by rw [le_himp_iff] calc n (x ⇨ y) ⊓ x _ ≤ n (x ⇨ y) ⊓ n x := by gcongr; exact n.le_apply _ = n (y ⊓ x) := by rw [← map_inf, himp_inf_self] _ ≤ n y := by gcongr; exact inf_le_left
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
map_himp_le
null
map_himp_apply (n : Nucleus X) (x y : X) : n (x ⇨ n y) = x ⇨ n y := le_antisymm (map_himp_le.trans_eq <| by rw [n.idempotent]) n.le_apply
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
map_himp_apply
null
@[simp] himp_apply (m n : Nucleus X) (x : X) : (m ⇨ n) x = ⨅ y ≥ x, m y ⇨ n y := rfl
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
himp_apply
null
mem_range : x ∈ range n ↔ n x = x where mp := by rintro ⟨x, rfl⟩; exact idempotent _ mpr h := ⟨x, h⟩
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
mem_range
null
private giAux (n : Nucleus X) : GaloisInsertion (rangeFactorization n) Subtype.val where choice x hx := ⟨x, mem_range.2 <| hx.antisymm n.le_apply⟩ gc x y := ClosureOperator.IsClosed.closure_le_iff (c := n.toClosureOperator) <| mem_range.1 y.2 le_l_u x := le_apply choice_eq x hx := by ext; exact le_apply.antisym...
def
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
giAux
See `Nucleus.giRestrict` for the public-facing version.
range.instFrameMinimalAxioms : Frame.MinimalAxioms (range n) where inf_sSup_le_iSup_inf a s := by simp_rw [← Subtype.coe_le_coe, iSup_subtype', iSup, sSup, n.giAux.gc.u_inf] rw [rangeFactorization_coe, ← mem_range.1 a.prop, ← map_inf] apply n.monotone simp_rw [inf_sSup_eq, sSup_image, iSup_range, iSup...
instance
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
range.instFrameMinimalAxioms
null
@[simps] restrict (n : Nucleus X) : FrameHom X (range n) where toFun := rangeFactorization n map_inf' a b := by ext; exact map_inf map_top' := by ext; exact map_top n map_sSup' s := by rw [n.giAux.gc.l_sSup, sSup_image]
def
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
restrict
Restrict a nucleus to its range.
giRestrict (n : Nucleus X) : GaloisInsertion n.restrict Subtype.val := n.giAux
def
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
giRestrict
The restriction of a nucleus to its range forms a Galois insertion with the forgetful map from the range to the original frame.
comp_eq_right_iff_le : n ∘ m = m ↔ n ≤ m where mpr h := funext_iff.mpr <| fun _ ↦ le_antisymm (le_trans (h (m _)) (m.idempotent' _)) le_apply mp h := by rw [← coe_le_coe, ← h] exact fun _ ↦ monotone le_apply @[simp] lemma range_subset_range : range m ⊆ range n ↔ n ≤ m where mp h x := by rw [← mem_rang...
lemma
Order
[ "Mathlib.Order.Closure", "Mathlib.Order.Hom.CompleteLattice" ]
Mathlib/Order/Nucleus.lean
comp_eq_right_iff_le
null
Chain (α : Type u) [Preorder α] := ℕ →o α
def
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
Chain
A chain is a monotone sequence. See the definition on page 114 of [gunter1992].
@[ext] ext ⦃f g : Chain α⦄ (h : ⇑f = ⇑g) : f = g := DFunLike.ext' h
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ext
See note [partially-applied ext lemmas].
isChain_range : IsChain (· ≤ ·) (Set.range c) := Monotone.isChain_range (OrderHomClass.mono c)
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
isChain_range
null
directed : Directed (· ≤ ·) c := directedOn_range.2 c.isChain_range.directedOn
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
directed
null
pair (a b : α) (hab : a ≤ b) : Chain α where toFun | 0 => a | _ => b monotone' _ _ _ := by aesop @[simp] lemma pair_zero (a b : α) (hab) : pair a b hab 0 = a := rfl @[simp] lemma pair_succ (a b : α) (hab) (n : ℕ) : pair a b hab (n + 1) = b := rfl @[simp] lemma range_pair (a b : α) (hab) : Set.range (pair a ...
def
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
pair
`map` function for `Chain` -/ -- Not `@[simps]`: we need `@[simps!]` to see through the type synonym `Chain β = ℕ →o β`, -- but then we'd get the `FunLike` instance for `OrderHom` instead. def map : Chain β := f.comp c @[simp] theorem map_coe : ⇑(map c f) = f ∘ c := rfl variable {f} theorem mem_map (x : α) : x ∈ c...
OmegaCompletePartialOrder (α : Type*) extends PartialOrder α where /-- The supremum of an increasing sequence -/ ωSup : Chain α → α /-- `ωSup` is an upper bound of the increasing sequence -/ le_ωSup : ∀ c : Chain α, ∀ i, c i ≤ ωSup c /-- `ωSup` is a lower bound of the set of upper bounds of the increasing seq...
class
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
OmegaCompletePartialOrder
An omega-complete partial order is a partial order with a supremum operation on increasing sequences indexed by natural numbers (which we call `ωSup`). In this sense, it is strictly weaker than join complete semi-lattices as only ω-sized totally ordered sets have a supremum. See the definition on page 114 of [gunter19...
protected lift [PartialOrder β] (f : β →o α) (ωSup₀ : Chain β → β) (h : ∀ x y, f x ≤ f y → x ≤ y) (h' : ∀ c, f (ωSup₀ c) = ωSup (c.map f)) : OmegaCompletePartialOrder β where ωSup := ωSup₀ ωSup_le c x hx := h _ _ (by rw [h']; apply ωSup_le; intro i; apply f.monotone (hx i)) le_ωSup c i := h _ _ (by rw [h'...
abbrev
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
lift
Transfer an `OmegaCompletePartialOrder` on `β` to an `OmegaCompletePartialOrder` on `α` using a strictly monotone function `f : β →o α`, a definition of ωSup and a proof that `f` is continuous with regard to the provided `ωSup` and the ωCPO on `α`.
le_ωSup_of_le {c : Chain α} {x : α} (i : ℕ) (h : x ≤ c i) : x ≤ ωSup c := le_trans h (le_ωSup c _)
theorem
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
le_ωSup_of_le
null
ωSup_total {c : Chain α} {x : α} (h : ∀ i, c i ≤ x ∨ x ≤ c i) : ωSup c ≤ x ∨ x ≤ ωSup c := by_cases (fun (this : ∀ i, c i ≤ x) => Or.inl (ωSup_le _ _ this)) (fun (this : ¬∀ i, c i ≤ x) => have : ∃ i, ¬c i ≤ x := by simp only [not_forall] at this ⊢; assumption let ⟨i, hx⟩ := this have : x ≤ c...
theorem
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωSup_total
null
ωSup_le_ωSup_of_le {c₀ c₁ : Chain α} (h : c₀ ≤ c₁) : ωSup c₀ ≤ ωSup c₁ := (ωSup_le _ _) fun i => by obtain ⟨_, h⟩ := h i exact le_trans h (le_ωSup _ _) @[simp] theorem ωSup_le_iff {c : Chain α} {x : α} : ωSup c ≤ x ↔ ∀ i, c i ≤ x := by constructor <;> intros · trans ωSup c · exact le_ωSup _ _ · as...
theorem
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωSup_le_ωSup_of_le
null
isLUB_range_ωSup (c : Chain α) : IsLUB (Set.range c) (ωSup c) := by constructor · simp only [upperBounds, Set.mem_range, forall_exists_index, forall_apply_eq_imp_iff, Set.mem_setOf_eq] exact fun a ↦ le_ωSup c a · simp only [lowerBounds, upperBounds, Set.mem_range, forall_exists_index, forall_apply...
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
isLUB_range_ωSup
null
ωSup_eq_of_isLUB {c : Chain α} {a : α} (h : IsLUB (Set.range c) a) : a = ωSup c := by rw [le_antisymm_iff] simp only [IsLUB, IsLeast, upperBounds, lowerBounds, Set.mem_range, forall_exists_index, forall_apply_eq_imp_iff, Set.mem_setOf_eq] at h constructor · apply h.2 exact fun a ↦ le_ωSup c a · rw [ωS...
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωSup_eq_of_isLUB
null
subtype {α : Type*} [OmegaCompletePartialOrder α] (p : α → Prop) (hp : ∀ c : Chain α, (∀ i ∈ c, p i) → p (ωSup c)) : OmegaCompletePartialOrder (Subtype p) := OmegaCompletePartialOrder.lift (OrderHom.Subtype.val p) (fun c => ⟨ωSup _, hp (c.map (OrderHom.Subtype.val p)) fun _ ⟨n, q⟩ => q.symm ▸ (c n).2⟩) (f...
def
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
subtype
A subset `p : α → Prop` of the type closed under `ωSup` induces an `OmegaCompletePartialOrder` on the subtype `{a : α // p a}`.
ωScottContinuous (f : α → β) : Prop := ScottContinuousOn (Set.range fun c : Chain α => Set.range c) f
def
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous
A function `f` between `ω`-complete partial orders is `ωScottContinuous` if it is Scott continuous over chains.
_root_.ScottContinuous.ωScottContinuous (hf : ScottContinuous f) : ωScottContinuous f := hf.scottContinuousOn
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
_root_.ScottContinuous.ωScottContinuous
null
ωScottContinuous.monotone (h : ωScottContinuous f) : Monotone f := ScottContinuousOn.monotone _ (fun a b hab => by use pair a b hab; exact range_pair a b hab) h
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous.monotone
null
ωScottContinuous.isLUB {c : Chain α} (hf : ωScottContinuous f) : IsLUB (Set.range (c.map ⟨f, hf.monotone⟩)) (f (ωSup c)) := by simpa [map_coe, OrderHom.coe_mk, Set.range_comp] using hf (by simp) (Set.range_nonempty _) (isChain_range c).directedOn (isLUB_range_ωSup c)
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous.isLUB
null
ωScottContinuous.id : ωScottContinuous (id : α → α) := ScottContinuousOn.id
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous.id
null
ωScottContinuous.map_ωSup (hf : ωScottContinuous f) (c : Chain α) : f (ωSup c) = ωSup (c.map ⟨f, hf.monotone⟩) := ωSup_eq_of_isLUB hf.isLUB
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous.map_ωSup
null
ωScottContinuous_iff_monotone_map_ωSup : ωScottContinuous f ↔ ∃ hf : Monotone f, ∀ c : Chain α, f (ωSup c) = ωSup (c.map ⟨f, hf⟩) := by refine ⟨fun hf ↦ ⟨hf.monotone, hf.map_ωSup⟩, ?_⟩ intro hf _ ⟨c, hc⟩ _ _ _ hda convert isLUB_range_ωSup (c.map { toFun := f, monotone' := hf.1 }) · rw [map_coe, OrderHom.coe...
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous_iff_monotone_map_ωSup
`ωScottContinuous f` asserts that `f` is both monotone and distributes over ωSup.
ωScottContinuous_iff_map_ωSup_of_orderHom {f : α →o β} : ωScottContinuous f ↔ ∀ c : Chain α, f (ωSup c) = ωSup (c.map f) := by rw [ωScottContinuous_iff_monotone_map_ωSup] exact exists_prop_of_true f.monotone' alias ⟨ωScottContinuous.map_ωSup_of_orderHom, ωScottContinuous.of_map_ωSup_of_orderHom⟩ := ωScottCont...
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous_iff_map_ωSup_of_orderHom
null
ωScottContinuous.comp (hg : ωScottContinuous g) (hf : ωScottContinuous f) : ωScottContinuous (g.comp f) := ωScottContinuous.of_monotone_map_ωSup ⟨hg.monotone.comp hf.monotone, by simp [hf.map_ωSup, hg.map_ωSup, map_comp]⟩
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous.comp
null
ωScottContinuous.const {x : β} : ωScottContinuous (Function.const α x) := by simp [ωScottContinuous, ScottContinuousOn, Set.range_nonempty]
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous.const
null
eq_of_chain {c : Chain (Part α)} {a b : α} (ha : some a ∈ c) (hb : some b ∈ c) : a = b := by obtain ⟨i, ha⟩ := ha; replace ha := ha.symm obtain ⟨j, hb⟩ := hb; replace hb := hb.symm rw [eq_some_iff] at ha hb rcases le_total i j with hij | hji · have := c.monotone hij _ ha; apply mem_unique this hb · have := ...
theorem
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
eq_of_chain
null
protected noncomputable ωSup (c : Chain (Part α)) : Part α := if h : ∃ a, some a ∈ c then some (Classical.choose h) else none
def
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωSup
The (noncomputable) `ωSup` definition for the `ω`-CPO structure on `Part α`.
ωSup_eq_some {c : Chain (Part α)} {a : α} (h : some a ∈ c) : Part.ωSup c = some a := have : ∃ a, some a ∈ c := ⟨a, h⟩ have a' : some (Classical.choose this) ∈ c := Classical.choose_spec this calc Part.ωSup c = some (Classical.choose this) := dif_pos this _ = some a := congr_arg _ (eq_of_chain a' h)
theorem
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωSup_eq_some
null
ωSup_eq_none {c : Chain (Part α)} (h : ¬∃ a, some a ∈ c) : Part.ωSup c = none := dif_neg h
theorem
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωSup_eq_none
null
mem_chain_of_mem_ωSup {c : Chain (Part α)} {a : α} (h : a ∈ Part.ωSup c) : some a ∈ c := by simp only [Part.ωSup] at h; split_ifs at h with h_1 · have h' := Classical.choose_spec h_1 rw [← eq_some_iff] at h rw [← h] exact h' · rcases h with ⟨⟨⟩⟩
theorem
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
mem_chain_of_mem_ωSup
null
noncomputable omegaCompletePartialOrder : OmegaCompletePartialOrder (Part α) where ωSup := Part.ωSup le_ωSup c i := by intro x hx rw [← eq_some_iff] at hx ⊢ rw [ωSup_eq_some] rw [← hx] exact ⟨i, rfl⟩ ωSup_le := by rintro c x hx a ha replace ha := mem_chain_of_mem_ωSup ha obtain...
instance
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
omegaCompletePartialOrder
null
mem_ωSup (x : α) (c : Chain (Part α)) : x ∈ ωSup c ↔ some x ∈ c := by simp only [ωSup, Part.ωSup] constructor · split_ifs with h swap · rintro ⟨⟨⟩⟩ intro h' have hh := Classical.choose_spec h simp only [mem_some_iff] at h' subst x exact hh · intro h have h' : ∃ a : α, some a ∈ c ...
theorem
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
mem_ωSup
null
ωScottContinuous.apply₂ (hf : ωScottContinuous f) (a : α) : ωScottContinuous (f · a) := ωScottContinuous.of_monotone_map_ωSup ⟨fun _ _ h ↦ hf.monotone h a, fun c ↦ congr_fun (hf.map_ωSup c) a⟩
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous.apply₂
null
ωScottContinuous.of_apply₂ (hf : ∀ a, ωScottContinuous (f · a)) : ωScottContinuous f := ωScottContinuous.of_monotone_map_ωSup ⟨fun _ _ h a ↦ (hf a).monotone h, fun c ↦ by ext a; apply (hf a).map_ωSup c⟩
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous.of_apply₂
null
ωScottContinuous_iff_apply₂ : ωScottContinuous f ↔ ∀ a, ωScottContinuous (f · a) := ⟨ωScottContinuous.apply₂, ωScottContinuous.of_apply₂⟩
lemma
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωScottContinuous_iff_apply₂
null
@[simps] protected ωSupImpl (c : Chain (α × β)) : α × β := (ωSup (c.map OrderHom.fst), ωSup (c.map OrderHom.snd)) @[simps! ωSup_fst ωSup_snd]
def
Order
[ "Mathlib.Control.Monad.Basic", "Mathlib.Dynamics.FixedPoints.Basic", "Mathlib.Order.CompleteLattice.Basic", "Mathlib.Order.Iterate", "Mathlib.Order.Part", "Mathlib.Order.Preorder.Chain", "Mathlib.Order.ScottContinuity" ]
Mathlib/Order/OmegaCompletePartialOrder.lean
ωSupImpl
The supremum of a chain in the product `ω`-CPO.