The areas / V04. Order and lattices
Mathlib.Order.Zorn
21 declarations. Mathlib docs · Source
Zorn's lemmas
This file proves several formulations of Zorn's Lemma.
Variants
The primary statement of Zorn's lemma is exists_maximal_of_chains_bounded. Then it is specialized
to particular relations:
(≤)withzorn_le(⊆)withzorn_subset(⊇)withzorn_superset
Lemma names carry modifiers:
₀: Quantifies over a set, as opposed to over a type._nonempty: Doesn't ask to prove that the empty chain is bounded and lets you give an element that will be smaller than the maximal element found (the maximal element is no smaller than any other element, but it can also be incomparable to some).
How-to
This file comes across as confusing to those who haven't yet used it, so here is a detailed walkthrough:
- Know what relation on which type/set you're looking for. See Variants above. You can discharge
some conditions to Zorn's lemma directly using a
_nonemptyvariant. - Write down the definition of your type/set, put a
suffices ∃ m, ∀ a, m ≺ a → a ≺ m by ...(or whatever you actually need) followed by anapply some_version_of_zorn. - Fill in the details. This is where you start talking about chains.
A typical proof using Zorn could look like this
lemma zorny_lemma : zorny_statement := by
let s : Set α := {x | whatever x}
suffices ∃ x ∈ s, ∀ y ∈ s, y ⊆ x → y = x by -- or with another operator xxx
proof_post_zorn
apply zorn_subset -- or another variant
rintro c hcs hc
obtain rfl | hcnemp := c.eq_empty_or_nonempty -- you might need to disjunct on c empty or not
· exact ⟨edge_case_construction,
proof_that_edge_case_construction_respects_whatever,
proof_that_edge_case_construction_contains_all_stuff_in_c⟩
· exact ⟨construction,
proof_that_construction_respects_whatever,
proof_that_construction_contains_all_stuff_in_c⟩
Notes
Originally ported from Isabelle/HOL. The original file was written by Jacques D. Fleuriot, Tobias Nipkow, Christian Sternagel.
Flags
theorem exists_maximal_of_chains_bounded E2 #
∀ {α : Type u_1} {r : α → α → Prop},
(∀ (c : Set α), IsChain r c → ∃ ub, ∀ a ∈ c, r a ub) →
(∀ {a b c : α}, r a b → r b c → r a c) → ∃ m, ∀ (a : α), r m a → r a m
Zorn's lemma
If every chain has an upper bound, then there exists a maximal element.
theorem exists_maximal_of_nonempty_chains_bounded E2 #
∀ {α : Type u_1} {r : α → α → Prop} [Nonempty α],
(∀ (c : Set α), IsChain r c → c.Nonempty → ∃ ub, ∀ a ∈ c, r a ub) →
(∀ {a b c : α}, r a b → r b c → r a c) → ∃ m, ∀ (a : α), r m a → r a m
A variant of Zorn's lemma. If every nonempty chain of a nonempty type has an upper bound, then there is a maximal element.
theorem zorn_le E1 #
∀ {α : Type u_1} [inst : Preorder α], (∀ (c : Set α), IsChain (fun x1 x2 ↦ x1 ≤ x2) c → BddAbove c) → ∃ m, IsMax m
theorem zorn_ge E1 #
∀ {α : Type u_1} [inst : Preorder α], (∀ (c : Set α), IsChain (fun x1 x2 ↦ x2 ≤ x1) c → BddBelow c) → ∃ m, IsMin m
theorem zorn_ge_nonempty E1 #
∀ {α : Type u_1} [inst : Preorder α] [Nonempty α],
(∀ (c : Set α), IsChain (fun x1 x2 ↦ x2 ≤ x1) c → c.Nonempty → BddBelow c) → ∃ m, IsMin m
theorem zorn_le_nonempty E1 #
∀ {α : Type u_1} [inst : Preorder α] [Nonempty α],
(∀ (c : Set α), IsChain (fun x1 x2 ↦ x1 ≤ x2) c → c.Nonempty → BddAbove c) → ∃ m, IsMax m
theorem zorn_le₀ E1 #
∀ {α : Type u_1} [inst : Preorder α] (s : Set α),
(∀ c ⊆ s, IsChain (fun x1 x2 ↦ x1 ≤ x2) c → ∃ ub ∈ s, ∀ z ∈ c, z ≤ ub) → ∃ m, Maximal (fun x ↦ x ∈ s) m
theorem zorn_ge₀ E1 #
∀ {α : Type u_1} [inst : Preorder α] (s : Set α),
(∀ c ⊆ s, IsChain (fun x1 x2 ↦ x2 ≤ x1) c → ∃ ub ∈ s, ∀ z ∈ c, ub ≤ z) → ∃ m, Minimal (fun x ↦ x ∈ s) m
theorem zorn_ge_nonempty₀ E1 #
∀ {α : Type u_1} [inst : Preorder α] (s : Set α),
(∀ c ⊆ s, IsChain (fun x1 x2 ↦ x2 ≤ x1) c → ∀ y ∈ c, ∃ ub ∈ s, ∀ z ∈ c, ub ≤ z) →
∀ x ∈ s, ∃ m ≤ x, Minimal (fun x ↦ x ∈ s) m
theorem zorn_le_nonempty₀ E1 #
∀ {α : Type u_1} [inst : Preorder α] (s : Set α),
(∀ c ⊆ s, IsChain (fun x1 x2 ↦ x1 ≤ x2) c → ∀ y ∈ c, ∃ ub ∈ s, ∀ z ∈ c, z ≤ ub) →
∀ x ∈ s, ∃ m, x ≤ m ∧ Maximal (fun x ↦ x ∈ s) m
theorem zorn_le_nonempty_Ici₀ E1 #
∀ {α : Type u_1} [inst : Preorder α] (a : α),
(∀ c ⊆ Set.Ici a, IsChain (fun x1 x2 ↦ x1 ≤ x2) c → ∀ y ∈ c, ∃ ub, ∀ z ∈ c, z ≤ ub) →
∀ (x : α), a ≤ x → ∃ m, x ≤ m ∧ IsMax m
theorem zorn_ge_nonempty_Iic₀ E1 #
∀ {α : Type u_1} [inst : Preorder α] (a : α),
(∀ c ⊆ Set.Iic a, IsChain (fun x1 x2 ↦ x2 ≤ x1) c → ∀ y ∈ c, ∃ ub, ∀ z ∈ c, ub ≤ z) → ∀ x ≤ a, ∃ m ≤ x, IsMin m
theorem zorn_subset E1 #
∀ {α : Type u_1} (S : Set (Set α)),
(∀ c ⊆ S, IsChain (fun x1 x2 ↦ x1 ⊆ x2) c → ∃ ub ∈ S, ∀ s ∈ c, s ⊆ ub) → ∃ m, Maximal (fun x ↦ x ∈ S) m
theorem zorn_subset_nonempty E1 #
∀ {α : Type u_1} (S : Set (Set α)),
(∀ c ⊆ S, IsChain (fun x1 x2 ↦ x1 ⊆ x2) c → c.Nonempty → ∃ ub ∈ S, ∀ s ∈ c, s ⊆ ub) →
∀ x ∈ S, ∃ m, x ⊆ m ∧ Maximal (fun x ↦ x ∈ S) m
theorem zorn_superset E1 #
∀ {α : Type u_1} (S : Set (Set α)),
(∀ c ⊆ S, IsChain (fun x1 x2 ↦ x1 ⊆ x2) c → ∃ lb ∈ S, ∀ s ∈ c, lb ⊆ s) → ∃ m, Minimal (fun x ↦ x ∈ S) m
theorem zorn_superset_nonempty E1 #
∀ {α : Type u_1} (S : Set (Set α)),
(∀ c ⊆ S, IsChain (fun x1 x2 ↦ x1 ⊆ x2) c → c.Nonempty → ∃ lb ∈ S, ∀ s ∈ c, lb ⊆ s) →
∀ x ∈ S, ∃ m ⊆ x, Minimal (fun x ↦ x ∈ S) m
theorem IsChain.exists_maxChain E1 #
∀ {α : Type u_1} {r : α → α → Prop} {c : Set α}, IsChain r c → ∃ M, IsMaxChain r M ∧ c ⊆ M
Every chain is contained in a maximal chain. This generalizes Hausdorff's maximality principle.
theorem IsChain.exists_subset_flag E1 #
∀ {α : Type u_1} [inst : Preorder α] {c : Set α}, IsChain (fun x1 x2 ↦ x1 ≤ x2) c → ∃ s, c ⊆ ↑s
theorem Flag.exists_mem E1 #
∀ {α : Type u_1} [inst : Preorder α] (a : α), ∃ s, a ∈ s
theorem Flag.exists_mem_mem E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a ≤ b → ∃ s, a ∈ s ∧ b ∈ s
instance Flag.instNonempty E0 #
∀ {α : Type u_1} [inst : Preorder α], Nonempty (Flag α)