The areas / V04. Order and lattices
Mathlib.Order.WellFoundedSet
131 declarations. Mathlib docs · Source
Well-founded sets
This file introduces versions of WellFounded and WellQuasiOrdered for sets.
Main Definitions
Set.WellFoundedOn s rindicates that the relationris well-founded when restricted to the sets.Set.IsWF sindicates that<is well-founded when restricted tos.Set.PartiallyWellOrderedOn s rindicates that the relationris partially well-ordered (also known as well quasi-ordered) when restricted to the sets.Set.IsPWO sindicates that any infinite sequence of elements inscontains an infinite monotone subsequence. Note that this is equivalent to containing only two comparable elements.
Main Results
- Higman's Lemma,
Set.PartiallyWellOrderedOn.partiallyWellOrderedOn_sublistForall₂, shows that ifris partially well-ordered ons, thenList.SublistForall₂is partially well-ordered on the set of lists of elements ofs. The result was originally published by Higman, but this proof more closely follows Nash-Williams. Set.wellFoundedOn_iffrelateswell_founded_onto the well-foundedness of a relation on the original type, to avoid dealing with subtypes.Set.IsWF.monoshows that a subset of a well-founded subset is well-founded.Set.IsWF.unionshows that the union of two well-founded subsets is well-founded.Finset.isWFshows that allFinsets are well-founded.
TODO
- Prove that
sis partially well-ordered iff it has no infinite descending chain or antichain. - Rename
Set.PartiallyWellOrderedOntoSet.WellQuasiOrderedOnandSet.IsPWOtoSet.IsWQO.
References
- [Higman, Ordering by Divisibility in Abstract Algebras][Higman52]
- [Nash-Williams, On Well-Quasi-Ordering Finite Trees][Nash-Williams63]
Relations well-founded on sets
Sets well-founded w.r.t. the strict inequality
Partially well-ordered sets
def Set.WellFoundedOn E1 #
{α : Type u_2} → Set α → (α → α → Prop) → Prop
s.WellFoundedOn r indicates that the relation r is WellFounded when restricted to s.
theorem Set.wellFoundedOn_empty E0 #
∀ {α : Type u_2} (r : α → α → Prop), ∅.WellFoundedOn r
theorem Set.wellFoundedOn_iff E3 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α}, s.WellFoundedOn r ↔ WellFounded fun a b ↦ r a b ∧ a ∈ s ∧ b ∈ s
theorem Set.wellFoundedOn_univ E0 #
∀ {α : Type u_2} {r : α → α → Prop}, Set.univ.WellFoundedOn r ↔ WellFounded r
theorem WellFounded.wellFoundedOn E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α}, WellFounded r → s.WellFoundedOn r
theorem Set.wellFoundedOn_range E0 #
∀ {α : Type u_2} {β : Type u_3} {r : α → α → Prop} {f : β → α},
(Set.range f).WellFoundedOn r ↔ WellFounded (Function.onFun r f)
theorem Set.wellFoundedOn_image E0 #
∀ {α : Type u_2} {β : Type u_3} {r : α → α → Prop} {f : β → α} {s : Set β},
(f '' s).WellFoundedOn r ↔ s.WellFoundedOn (Function.onFun r f)
theorem Set.WellFoundedOn.induction E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α} {x : α},
s.WellFoundedOn r → x ∈ s → ∀ {P : α → Prop}, (∀ y ∈ s, (∀ z ∈ s, r z y → P z) → P y) → P x
theorem Set.WellFoundedOn.mono E1 #
∀ {α : Type u_2} {r r' : α → α → Prop} {s t : Set α}, t.WellFoundedOn r' → r ≤ r' → s ⊆ t → s.WellFoundedOn r
theorem Set.WellFoundedOn.mono' E1 #
∀ {α : Type u_2} {r r' : α → α → Prop} {s : Set α},
(∀ a ∈ s, ∀ b ∈ s, r' a b → r a b) → s.WellFoundedOn r → s.WellFoundedOn r'
theorem Set.WellFoundedOn.subset E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s t : Set α}, t.WellFoundedOn r → s ⊆ t → s.WellFoundedOn r
theorem Set.WellFoundedOn.acc_iff_wellFoundedOn E1 #
∀ {α : Type u_6} {r : α → α → Prop} {a : α},
[Acc r a, {b | Relation.ReflTransGen r b a}.WellFoundedOn r, {b | Relation.TransGen r b a}.WellFoundedOn r].TFAE
a is accessible under the relation r iff r is well-founded on the downward transitive
closure of a under r (including a or not).
instance Set.IsStrictOrder.subset E0 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {s : Set α}, IsStrictOrder α fun a b ↦ r a b ∧ a ∈ s ∧ b ∈ s
theorem Set.wellFoundedOn_iff_no_descending_seq E1 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {s : Set α},
s.WellFoundedOn r ↔ ∀ (f : (fun x1 x2 ↦ x1 > x2) ↪r r), ¬∀ (n : ℕ), f n ∈ s
theorem Set.WellFoundedOn.union E1 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {s t : Set α},
s.WellFoundedOn r → t.WellFoundedOn r → (s ∪ t).WellFoundedOn r
theorem Set.wellFoundedOn_union E0 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {s t : Set α},
(s ∪ t).WellFoundedOn r ↔ s.WellFoundedOn r ∧ t.WellFoundedOn r
def Set.IsWF E1 #
{α : Type u_2} → [LT α] → Set α → Prop
s.IsWF indicates that < is well-founded when restricted to s.
theorem Set.isWF_empty E0 #
∀ {α : Type u_2} [inst : LT α], ∅.IsWF
theorem Set.IsWF.mono E3 #
∀ {α : Type u_2} [inst : LT α] {s t : Set α}, t.IsWF → s ⊆ t → s.IsWF
theorem Set.isWF_univ_iff E0 #
∀ {α : Type u_2} [inst : LT α], Set.univ.IsWF ↔ WellFoundedLT α
theorem Set.IsWF.of_wellFoundedLT E1 #
∀ {α : Type u_2} [inst : LT α] [h : WellFoundedLT α] (s : Set α), s.IsWF
theorem Set.IsWF.union E3 #
∀ {α : Type u_2} [inst : Preorder α] {s t : Set α}, s.IsWF → t.IsWF → (s ∪ t).IsWF
theorem Set.isWF_union E0 #
∀ {α : Type u_2} [inst : Preorder α] {s t : Set α}, (s ∪ t).IsWF ↔ s.IsWF ∧ t.IsWF
theorem Set.isWF_iff_no_descending_seq E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.IsWF ↔ ∀ (f : ℕ → α), StrictAnti f → ¬∀ (n : ℕ), f n ∈ s
def Set.PartiallyWellOrderedOn E1 #
{α : Type u_2} → Set α → (α → α → Prop) → Prop
s.PartiallyWellOrderedOn r indicates that the relation r is WellQuasiOrdered when
restricted to s.
A set is partially well-ordered by a relation r when any infinite sequence contains two elements
where the first is related to the second by r. Equivalently, any antichain (see IsAntichain) is
finite, see Set.partiallyWellOrderedOn_iff_finite_antichains.
TODO: rename this to WellQuasiOrderedOn to match WellQuasiOrdered.
theorem Set.PartiallyWellOrderedOn.exists_lt E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α},
s.PartiallyWellOrderedOn r → ∀ {f : ℕ → α}, (∀ (n : ℕ), f n ∈ s) → ∃ m n, m < n ∧ r (f m) (f n)
theorem Set.partiallyWellOrderedOn_iff_exists_lt E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α},
s.PartiallyWellOrderedOn r ↔ ∀ (f : ℕ → α), (∀ (n : ℕ), f n ∈ s) → ∃ m n, m < n ∧ r (f m) (f n)
theorem Set.partiallyWellOrderedOn_univ_iff E0 #
∀ {α : Type u_2} {r : α → α → Prop}, Set.univ.PartiallyWellOrderedOn r ↔ WellQuasiOrdered r
theorem Set.PartiallyWellOrderedOn.mono E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s t : Set α}, t.PartiallyWellOrderedOn r → s ⊆ t → s.PartiallyWellOrderedOn r
theorem Set.partiallyWellOrderedOn_of_wellQuasiOrdered E1 #
∀ {α : Type u_2} {r : α → α → Prop}, WellQuasiOrdered r → ∀ (s : Set α), s.PartiallyWellOrderedOn r
theorem Set.partiallyWellOrderedOn_empty E0 #
∀ {α : Type u_2} (r : α → α → Prop), ∅.PartiallyWellOrderedOn r
theorem Set.PartiallyWellOrderedOn.union E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s t : Set α},
s.PartiallyWellOrderedOn r → t.PartiallyWellOrderedOn r → (s ∪ t).PartiallyWellOrderedOn r
theorem Set.partiallyWellOrderedOn_union E0 #
∀ {α : Type u_2} {r : α → α → Prop} {s t : Set α},
(s ∪ t).PartiallyWellOrderedOn r ↔ s.PartiallyWellOrderedOn r ∧ t.PartiallyWellOrderedOn r
theorem Set.PartiallyWellOrderedOn.image_of_monotone_on E1 #
∀ {α : Type u_2} {β : Type u_3} {r : α → α → Prop} {r' : β → β → Prop} {f : α → β} {s : Set α},
s.PartiallyWellOrderedOn r → (∀ a₁ ∈ s, ∀ a₂ ∈ s, r a₁ a₂ → r' (f a₁) (f a₂)) → (f '' s).PartiallyWellOrderedOn r'
theorem IsAntichain.finite_of_partiallyWellOrderedOn E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α}, IsAntichain r s → s.PartiallyWellOrderedOn r → s.Finite
theorem Set.Finite.partiallyWellOrderedOn E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α} [Std.Refl r], s.Finite → s.PartiallyWellOrderedOn r
theorem IsAntichain.partiallyWellOrderedOn_iff E0 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α} [Std.Refl r], IsAntichain r s → (s.PartiallyWellOrderedOn r ↔ s.Finite)
theorem Set.partiallyWellOrderedOn_singleton E0 #
∀ {α : Type u_2} {r : α → α → Prop} [Std.Refl r] (a : α), {a}.PartiallyWellOrderedOn r
theorem Set.Subsingleton.partiallyWellOrderedOn E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α} [Std.Refl r], s.Subsingleton → s.PartiallyWellOrderedOn r
theorem Set.partiallyWellOrderedOn_insert E0 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α} {a : α} [Std.Refl r],
(insert a s).PartiallyWellOrderedOn r ↔ s.PartiallyWellOrderedOn r
theorem Set.PartiallyWellOrderedOn.insert E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α} [Std.Refl r],
s.PartiallyWellOrderedOn r → ∀ (a : α), (insert a s).PartiallyWellOrderedOn r
theorem Set.partiallyWellOrderedOn_iff_finite_antichains E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α} [Std.Refl r] [Std.Symm r],
s.PartiallyWellOrderedOn r ↔ ∀ t ⊆ s, IsAntichain r t → t.Finite
theorem Set.PartiallyWellOrderedOn.exists_monotone_subseq E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α} [IsPreorder α r],
s.PartiallyWellOrderedOn r → ∀ {f : ℕ → α}, (∀ (n : ℕ), f n ∈ s) → ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (g m)) (f (g n))
theorem Set.partiallyWellOrderedOn_iff_exists_monotone_subseq E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α} [IsPreorder α r],
s.PartiallyWellOrderedOn r ↔ ∀ (f : ℕ → α), (∀ (n : ℕ), f n ∈ s) → ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (g m)) (f (g n))
theorem Set.PartiallyWellOrderedOn.prod E1 #
∀ {α : Type u_2} {β : Type u_3} {r : α → α → Prop} {r' : β → β → Prop} {s : Set α} [IsPreorder α r] {t : Set β},
s.PartiallyWellOrderedOn r →
t.PartiallyWellOrderedOn r' → (s ×ˢ t).PartiallyWellOrderedOn fun x y ↦ r x.1 y.1 ∧ r' x.2 y.2
theorem Set.PartiallyWellOrderedOn.pi E2 #
∀ {ι : Type u_1} {α : ι → Type u_6} [Finite ι] {r : (i : ι) → α i → α i → Prop} [∀ (i : ι), IsPreorder (α i) (r i)]
{s : (i : ι) → Set (α i)},
(∀ (i : ι), (s i).PartiallyWellOrderedOn (r i)) →
(Set.univ.pi s).PartiallyWellOrderedOn fun a b ↦ ∀ (i : ι), r i (a i) (b i)
A version of Dickson's lemma on finite product of well-quasi-ordered sets. See
WellQuasiOrdered.pi when the type α i is well-quasi-ordered.
theorem Set.PartiallyWellOrderedOn.wellFoundedOn E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α} [IsPreorder α r],
s.PartiallyWellOrderedOn r → s.WellFoundedOn fun a b ↦ r a b ∧ ¬r b a
def Set.IsPWO E1 #
{α : Type u_2} → [Preorder α] → Set α → Prop
A subset of a preorder is partially well-ordered when any infinite sequence contains a monotone subsequence of length 2 (or equivalently, an infinite monotone subsequence).
theorem Set.IsPWO.mono E1 #
∀ {α : Type u_2} [inst : Preorder α] {s t : Set α}, t.IsPWO → s ⊆ t → s.IsPWO
theorem Set.IsPWO.exists_monotone_subseq E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.IsPWO → ∀ {f : ℕ → α}, (∀ (n : ℕ), f n ∈ s) → ∃ g, Monotone (f ∘ ⇑g)
theorem Set.isPWO_univ_iff E0 #
∀ {α : Type u_2} [inst : Preorder α], Set.univ.IsPWO ↔ WellQuasiOrderedLE α
theorem Set.isPWO_of_wellQuasiOrderedLE E1 #
∀ {α : Type u_2} [inst : Preorder α] [h : WellQuasiOrderedLE α] (s : Set α), s.IsPWO
theorem Set.isPWO_iff_exists_monotone_subseq E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.IsPWO ↔ ∀ (f : ℕ → α), (∀ (n : ℕ), f n ∈ s) → ∃ g, Monotone (f ∘ ⇑g)
theorem Set.IsPWO.isWF E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.IsPWO → s.IsWF
theorem Set.IsPWO.prod E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {s : Set α} {t : Set β},
s.IsPWO → t.IsPWO → (s ×ˢ t).IsPWO
theorem Set.IsPWO.pi E2 #
∀ {ι : Type u_1} {α : ι → Type u_6} [Finite ι] [inst : (i : ι) → Preorder (α i)] {s : (i : ι) → Set (α i)},
(∀ (i : ι), (s i).IsPWO) → (Set.univ.pi s).IsPWO
A version of Dickson's lemma on finite product of well-quasi-ordered sets.
See Pi.wellQuasiOrderedLE when the type α i is WellQuasiOrderedLE.
theorem Set.IsPWO.image_of_monotoneOn E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {s : Set α},
s.IsPWO → ∀ {f : α → β}, MonotoneOn f s → (f '' s).IsPWO
theorem Set.IsPWO.image_of_monotone E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {s : Set α},
s.IsPWO → ∀ {f : α → β}, Monotone f → (f '' s).IsPWO
theorem Set.IsPWO.union E1 #
∀ {α : Type u_2} [inst : Preorder α] {s t : Set α}, s.IsPWO → t.IsPWO → (s ∪ t).IsPWO
theorem Set.isPWO_union E0 #
∀ {α : Type u_2} [inst : Preorder α] {s t : Set α}, (s ∪ t).IsPWO ↔ s.IsPWO ∧ t.IsPWO
theorem Set.Finite.isPWO E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.Finite → s.IsPWO
theorem Set.isPWO_of_finite E0 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α} [Finite α], s.IsPWO
theorem Set.isPWO_singleton E0 #
∀ {α : Type u_2} [inst : Preorder α] (a : α), {a}.IsPWO
theorem Set.isPWO_empty E0 #
∀ {α : Type u_2} [inst : Preorder α], ∅.IsPWO
theorem Set.Subsingleton.isPWO E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.Subsingleton → s.IsPWO
theorem Set.isPWO_insert E0 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α} {a : α}, (insert a s).IsPWO ↔ s.IsPWO
theorem Set.IsPWO.insert E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.IsPWO → ∀ (a : α), (insert a s).IsPWO
theorem Set.Finite.isWF E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.Finite → s.IsWF
theorem Set.isWF_singleton E0 #
∀ {α : Type u_2} [inst : Preorder α] {a : α}, {a}.IsWF
theorem Set.Subsingleton.isWF E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.Subsingleton → s.IsWF
theorem Set.isWF_insert E0 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α} {a : α}, (insert a s).IsWF ↔ s.IsWF
theorem Set.IsWF.insert E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.IsWF → ∀ (a : α), (insert a s).IsWF
theorem Set.IsPWO.exists_le_minimal E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α} {a : α}, s.IsPWO → a ∈ s → ∃ b ≤ a, Minimal (fun x ↦ x ∈ s) b
theorem Set.IsPWO.exists_minimal E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α}, s.IsPWO → s.Nonempty → ∃ a, Minimal (fun x ↦ x ∈ s) a
theorem Set.IsPWO.exists_minimalFor E1 #
∀ {ι : Type u_1} {α : Type u_2} [inst : Preorder α] (f : ι → α) (s : Set ι),
(f '' s).IsPWO → s.Nonempty → ∃ i, MinimalFor (fun x ↦ x ∈ s) f i
theorem Set.Finite.wellFoundedOn E1 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {s : Set α}, s.Finite → s.WellFoundedOn r
theorem Set.wellFoundedOn_singleton E0 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {a : α}, {a}.WellFoundedOn r
theorem Set.Subsingleton.wellFoundedOn E1 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {s : Set α}, s.Subsingleton → s.WellFoundedOn r
theorem Set.wellFoundedOn_insert E0 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {s : Set α} {a : α},
(insert a s).WellFoundedOn r ↔ s.WellFoundedOn r
theorem Set.wellFoundedOn_sdiff_singleton E0 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {s : Set α} {a : α},
(s \ {a}).WellFoundedOn r ↔ s.WellFoundedOn r
theorem Set.WellFoundedOn.insert E1 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {s : Set α},
s.WellFoundedOn r → ∀ (a : α), (insert a s).WellFoundedOn r
theorem Set.WellFoundedOn.sdiff_singleton E1 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] {s : Set α},
s.WellFoundedOn r → ∀ (a : α), (s \ {a}).WellFoundedOn r
theorem Set.WellFoundedOn.mapsTo E1 #
∀ {α : Type u_6} {β : Type u_7} {r : α → α → Prop} (f : β → α) {s : Set α} {t : Set β},
Set.MapsTo f t s → s.WellFoundedOn r → t.WellFoundedOn (Function.onFun r f)
theorem Set.WellFoundedOn.exists_maximal E1 #
∀ {α : Type u_6} [inst : Preorder α] {s : Set α},
(s.WellFoundedOn fun x1 x2 ↦ x2 < x1) → s.Nonempty → ∃ a, Maximal (fun x ↦ x ∈ s) a
theorem Set.WellFoundedOn.exists_minimal E1 #
∀ {α : Type u_6} [inst : Preorder α] {s : Set α},
(s.WellFoundedOn fun x1 x2 ↦ x1 < x2) → s.Nonempty → ∃ a, Minimal (fun x ↦ x ∈ s) a
theorem Set.isPWO_iff_isWF E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {s : Set α}, s.IsPWO ↔ s.IsWF
In a linear order, the predicates Set.IsPWO and Set.IsWF are equivalent.
theorem Set.IsWF.isPWO E2 #
∀ {α : Type u_2} [inst : LinearOrder α] {s : Set α}, s.IsWF → s.IsPWO
Alias of the reverse direction of Set.isPWO_iff_isWF.
In a linear order, the predicates Set.IsPWO and Set.IsWF are equivalent.
theorem Set.IsPWO.of_linearOrder E1 #
∀ {α : Type u_2} [inst : LinearOrder α] [WellFoundedLT α] (s : Set α), s.IsPWO
If α is a linear order with well-founded <, then any set in it is a partially well-ordered set.
Note this does not hold without the linearity assumption.
theorem Finset.partiallyWellOrderedOn E0 #
∀ {α : Type u_2} {r : α → α → Prop} [Std.Refl r] (s : Finset α), (↑s).PartiallyWellOrderedOn r
theorem Finset.isPWO E0 #
∀ {α : Type u_2} [inst : Preorder α] (s : Finset α), (↑s).IsPWO
theorem Finset.isWF E3 #
∀ {α : Type u_2} [inst : Preorder α] (s : Finset α), (↑s).IsWF
theorem Finset.wellFoundedOn E0 #
∀ {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] (s : Finset α), (↑s).WellFoundedOn r
theorem Finset.wellFoundedOn_sup E1 #
∀ {ι : Type u_1} {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] (s : Finset ι) {f : ι → Set α},
(s.sup f).WellFoundedOn r ↔ ∀ i ∈ s, (f i).WellFoundedOn r
theorem Finset.partiallyWellOrderedOn_sup E1 #
∀ {ι : Type u_1} {α : Type u_2} {r : α → α → Prop} (s : Finset ι) {f : ι → Set α},
(s.sup f).PartiallyWellOrderedOn r ↔ ∀ i ∈ s, (f i).PartiallyWellOrderedOn r
theorem Finset.isWF_sup E1 #
∀ {ι : Type u_1} {α : Type u_2} [inst : Preorder α] (s : Finset ι) {f : ι → Set α}, (s.sup f).IsWF ↔ ∀ i ∈ s, (f i).IsWF
theorem Finset.isPWO_sup E1 #
∀ {ι : Type u_1} {α : Type u_2} [inst : Preorder α] (s : Finset ι) {f : ι → Set α},
(s.sup f).IsPWO ↔ ∀ i ∈ s, (f i).IsPWO
theorem Finset.wellFoundedOn_bUnion E0 #
∀ {ι : Type u_1} {α : Type u_2} {r : α → α → Prop} [IsStrictOrder α r] (s : Finset ι) {f : ι → Set α},
(⋃ i ∈ s, f i).WellFoundedOn r ↔ ∀ i ∈ s, (f i).WellFoundedOn r
theorem Finset.partiallyWellOrderedOn_bUnion E0 #
∀ {ι : Type u_1} {α : Type u_2} {r : α → α → Prop} (s : Finset ι) {f : ι → Set α},
(⋃ i ∈ s, f i).PartiallyWellOrderedOn r ↔ ∀ i ∈ s, (f i).PartiallyWellOrderedOn r
theorem Finset.isWF_bUnion E0 #
∀ {ι : Type u_1} {α : Type u_2} [inst : Preorder α] (s : Finset ι) {f : ι → Set α},
(⋃ i ∈ s, f i).IsWF ↔ ∀ i ∈ s, (f i).IsWF
theorem Finset.isPWO_bUnion E0 #
∀ {ι : Type u_1} {α : Type u_2} [inst : Preorder α] (s : Finset ι) {f : ι → Set α},
(⋃ i ∈ s, f i).IsPWO ↔ ∀ i ∈ s, (f i).IsPWO
def Set.IsWF.min E1 #
{α : Type u_2} → [inst : Preorder α] → {s : Set α} → s.IsWF → s.Nonempty → α
Set.IsWF.min returns a minimal element of a nonempty well-founded set.
theorem Set.IsWF.min_mem E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α} (hs : s.IsWF) (hn : s.Nonempty), hs.min hn ∈ s
theorem Set.IsWF.not_lt_min E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α} {a : α} (hs : s.IsWF) (hn : s.Nonempty), a ∈ s → ¬a < hs.min hn
theorem Set.IsWF.min_of_subset_not_lt_min E1 #
∀ {α : Type u_2} [inst : Preorder α] {s t : Set α} {hs : s.IsWF} {hsn : s.Nonempty} {ht : t.IsWF} {htn : t.Nonempty},
s ⊆ t → ¬hs.min hsn < ht.min htn
theorem Set.isWF_min_singleton E0 #
∀ {α : Type u_2} [inst : Preorder α] (a : α) {hs : {a}.IsWF} {hn : {a}.Nonempty}, hs.min hn = a
theorem Set.IsWF.min_eq_of_lt E1 #
∀ {α : Type u_2} [inst : Preorder α] {s : Set α} {a : α} (hs : s.IsWF) (ha : a ∈ s),
(∀ b ∈ s, b ≠ a → a < b) → hs.min ⋯ = a
theorem Set.IsWF.min_eq_of_le E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {s : Set α} {a : α} (hs : s.IsWF) (ha : a ∈ s), (∀ b ∈ s, a ≤ b) → hs.min ⋯ = a
theorem Set.IsWF.min_le E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {s : Set α} {a : α} (hs : s.IsWF) (hn : s.Nonempty), a ∈ s → hs.min hn ≤ a
theorem Set.IsWF.le_min_iff E0 #
∀ {α : Type u_2} [inst : LinearOrder α] {s : Set α} {a : α} (hs : s.IsWF) (hn : s.Nonempty),
a ≤ hs.min hn ↔ ∀ b ∈ s, a ≤ b
theorem Set.IsWF.min_le_min_of_subset E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {s t : Set α} {hs : s.IsWF} {hsn : s.Nonempty} {ht : t.IsWF} {htn : t.Nonempty},
s ⊆ t → ht.min htn ≤ hs.min hsn
theorem Set.IsWF.min_union E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {s t : Set α} (hs : s.IsWF) (hsn : s.Nonempty) (ht : t.IsWF) (htn : t.Nonempty),
⋯.min ⋯ = min (hs.min hsn) (ht.min htn)
theorem BddBelow.wellFoundedOn_lt E1 #
∀ {α : Type u_2} {s : Set α} [inst : Preorder α] [LocallyFiniteOrder α],
BddBelow s → s.WellFoundedOn fun x1 x2 ↦ x1 < x2
theorem BddAbove.wellFoundedOn_gt E1 #
∀ {α : Type u_2} {s : Set α} [inst : Preorder α] [LocallyFiniteOrder α],
BddAbove s → s.WellFoundedOn fun x1 x2 ↦ x1 > x2
theorem BddBelow.isWF E1 #
∀ {α : Type u_2} {s : Set α} [inst : Preorder α] [LocallyFiniteOrder α], BddBelow s → s.IsWF
theorem Set.PartiallyWellOrderedOn.bddAbove_preimage E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α},
s.PartiallyWellOrderedOn r → ∀ {f : ℕ → α}, (∀ (m n : ℕ), m < n → ¬r (f m) (f n)) → BddAbove (f ⁻¹' s)
theorem Set.PartiallyWellOrderedOn.exists_notMem_of_gt E1 #
∀ {α : Type u_2} {r : α → α → Prop} {s : Set α},
s.PartiallyWellOrderedOn r → ∀ {f : ℕ → α}, (∀ (m n : ℕ), m < n → ¬r (f m) (f n)) → ∃ k, ∀ (m : ℕ), k < m → f m ∉ s
def Set.PartiallyWellOrderedOn.IsBadSeq E1 #
{α : Type u_2} → (α → α → Prop) → Set α → (ℕ → α) → Prop
In the context of partial well-orderings, a bad sequence is a nonincreasing sequence
whose range is contained in a particular set s. One exists if and only if s is not
partially well-ordered.
theorem Set.PartiallyWellOrderedOn.iff_forall_not_isBadSeq E1 #
∀ {α : Type u_2} (r : α → α → Prop) (s : Set α),
s.PartiallyWellOrderedOn r ↔ ∀ (f : ℕ → α), ¬Set.PartiallyWellOrderedOn.IsBadSeq r s f
def Set.PartiallyWellOrderedOn.IsMinBadSeq E1 #
{α : Type u_2} → (α → α → Prop) → (α → ℕ) → Set α → ℕ → (ℕ → α) → Prop
This indicates that every bad sequence g that agrees with f on the first n
terms has rk (f n) ≤ rk (g n).
def Set.PartiallyWellOrderedOn.minBadSeqOfBadSeq E1 #
{α : Type u_2} →
(r : α → α → Prop) →
(rk : α → ℕ) →
(s : Set α) →
(n : ℕ) →
(f : ℕ → α) →
Set.PartiallyWellOrderedOn.IsBadSeq r s f →
{ g //
(∀ m < n, f m = g m) ∧
Set.PartiallyWellOrderedOn.IsBadSeq r s g ∧ Set.PartiallyWellOrderedOn.IsMinBadSeq r rk s n g }
Given a bad sequence f, this constructs a bad sequence that agrees with f on the first n
terms and is minimal at n.
theorem Set.PartiallyWellOrderedOn.exists_min_bad_of_exists_bad E1 #
∀ {α : Type u_2} (r : α → α → Prop) (rk : α → ℕ) (s : Set α),
(∃ f, Set.PartiallyWellOrderedOn.IsBadSeq r s f) →
∃ f, Set.PartiallyWellOrderedOn.IsBadSeq r s f ∧ ∀ (n : ℕ), Set.PartiallyWellOrderedOn.IsMinBadSeq r rk s n f
theorem Set.PartiallyWellOrderedOn.iff_not_exists_isMinBadSeq E1 #
∀ {α : Type u_2} {r : α → α → Prop} (rk : α → ℕ) {s : Set α},
s.PartiallyWellOrderedOn r ↔
¬∃ f, Set.PartiallyWellOrderedOn.IsBadSeq r s f ∧ ∀ (n : ℕ), Set.PartiallyWellOrderedOn.IsMinBadSeq r rk s n f
theorem Set.PartiallyWellOrderedOn.partiallyWellOrderedOn_sublistForall₂ E3 #
∀ {α : Type u_2} (r : α → α → Prop) [IsPreorder α r] {s : Set α},
s.PartiallyWellOrderedOn r → {l | ∀ x ∈ l, x ∈ s}.PartiallyWellOrderedOn (List.SublistForall₂ r)
Higman's Lemma, which states that for any reflexive, transitive relation r which is
partially well-ordered on a set s, the relation List.SublistForall₂ r is partially
well-ordered on the set of lists of elements of s. That relation is defined so that
List.SublistForall₂ r l₁ l₂ whenever l₁ related pointwise by r to a sublist of l₂.
theorem Set.PartiallyWellOrderedOn.subsetProdLex E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : PartialOrder α] [inst_1 : Preorder β] {s : Set (Lex (α × β))},
((fun x ↦ (ofLex x).1) '' s).IsPWO → (∀ (a : α), {y | toLex (a, y) ∈ s}.IsPWO) → s.IsPWO
theorem Set.PartiallyWellOrderedOn.imageProdLex E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {s : Set (Lex (α × β))},
s.IsPWO → ((fun x ↦ (ofLex x).1) '' s).IsPWO
theorem Set.PartiallyWellOrderedOn.fiberProdLex E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {s : Set (Lex (α × β))},
s.IsPWO → ∀ (a : α), {y | toLex (a, y) ∈ s}.IsPWO
theorem Set.PartiallyWellOrderedOn.ProdLex_iff E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : PartialOrder α] [inst_1 : Preorder β] {s : Set (Lex (α × β))},
s.IsPWO ↔ ((fun x ↦ (ofLex x).1) '' s).IsPWO ∧ ∀ (a : α), {y | toLex (a, y) ∈ s}.IsPWO
theorem WellFounded.prod_lex_of_wellFoundedOn_fiber E1 #
∀ {α : Type u_2} {β : Type u_3} {γ : Type u_4} {rα : α → α → Prop} {rβ : β → β → Prop} {f : γ → α} {g : γ → β},
WellFounded (Function.onFun rα f) →
(∀ (a : α), (f ⁻¹' {a}).WellFoundedOn (Function.onFun rβ g)) →
WellFounded (Function.onFun (Prod.Lex rα rβ) fun c ↦ (f c, g c))
Stronger version of WellFounded.prod_lex. Instead of requiring rβ on g to be well-founded,
we only require it to be well-founded on fibers of f.
theorem Set.WellFoundedOn.prod_lex_of_wellFoundedOn_fiber E1 #
∀ {α : Type u_2} {β : Type u_3} {γ : Type u_4} {rα : α → α → Prop} {rβ : β → β → Prop} {f : γ → α} {g : γ → β}
{s : Set γ},
s.WellFoundedOn (Function.onFun rα f) →
(∀ (a : α), (s ∩ f ⁻¹' {a}).WellFoundedOn (Function.onFun rβ g)) →
s.WellFoundedOn (Function.onFun (Prod.Lex rα rβ) fun c ↦ (f c, g c))
theorem WellFounded.sigma_lex_of_wellFoundedOn_fiber E1 #
∀ {ι : Type u_1} {γ : Type u_4} {π : ι → Type u_5} {rι : ι → ι → Prop} {rπ : (i : ι) → π i → π i → Prop} {f : γ → ι}
{g : (i : ι) → γ → π i},
WellFounded (Function.onFun rι f) →
(∀ (i : ι), (f ⁻¹' {i}).WellFoundedOn (Function.onFun (rπ i) (g i))) →
WellFounded (Function.onFun (Sigma.Lex rι rπ) fun c ↦ ⟨f c, g (f c) c⟩)
Stronger version of PSigma.lex_wf. Instead of requiring rπ on g to be well-founded, we only
require it to be well-founded on fibers of f.
theorem Set.WellFoundedOn.sigma_lex_of_wellFoundedOn_fiber E1 #
∀ {ι : Type u_1} {γ : Type u_4} {π : ι → Type u_5} {rι : ι → ι → Prop} {rπ : (i : ι) → π i → π i → Prop} {f : γ → ι}
{g : (i : ι) → γ → π i} {s : Set γ},
s.WellFoundedOn (Function.onFun rι f) →
(∀ (i : ι), (s ∩ f ⁻¹' {i}).WellFoundedOn (Function.onFun (rπ i) (g i))) →
s.WellFoundedOn (Function.onFun (Sigma.Lex rι rπ) fun c ↦ ⟨f c, g (f c) c⟩)