Documentation

Mathlib.Order.WellFoundedSet

Well-founded sets #

A well-founded subset of an ordered type is one on which the relation < is well-founded.

Main Definitions #

Main Results #

TODO #

Prove that s is partial well ordered iff it has no infinite descending chain or antichain.

References #

Relations well-founded on sets #

def Set.WellFoundedOn {α : Type u_2} (s : Set α) (r : ααProp) :

s.WellFoundedOn r indicates that the relation r is well-founded when restricted to s.

Equations
Instances For
    @[simp]
    theorem Set.wellFoundedOn_empty {α : Type u_2} (r : ααProp) :
    theorem Set.wellFoundedOn_iff {α : Type u_2} {r : ααProp} {s : Set α} :
    Set.WellFoundedOn s r WellFounded fun (a b : α) => r a b a s b s
    @[simp]
    theorem Set.wellFoundedOn_univ {α : Type u_2} {r : ααProp} :
    theorem WellFounded.wellFoundedOn {α : Type u_2} {r : ααProp} {s : Set α} :
    @[simp]
    theorem Set.wellFoundedOn_range {α : Type u_2} {β : Type u_3} {r : ααProp} {f : βα} :
    @[simp]
    theorem Set.wellFoundedOn_image {α : Type u_2} {β : Type u_3} {r : ααProp} {f : βα} {s : Set β} :
    theorem Set.WellFoundedOn.induction {α : Type u_2} {r : ααProp} {s : Set α} {x : α} (hs : Set.WellFoundedOn s r) (hx : x s) {P : αProp} (hP : ys, (zs, r z yP z)P y) :
    P x
    theorem Set.WellFoundedOn.mono {α : Type u_2} {r : ααProp} {r' : ααProp} {s : Set α} {t : Set α} (h : Set.WellFoundedOn t r') (hle : r r') (hst : s t) :
    theorem Set.WellFoundedOn.mono' {α : Type u_2} {r : ααProp} {r' : ααProp} {s : Set α} (h : as, bs, r' a br a b) :
    theorem Set.WellFoundedOn.subset {α : Type u_2} {r : ααProp} {s : Set α} {t : Set α} (h : Set.WellFoundedOn t r) (hst : s t) :
    theorem Set.WellFoundedOn.acc_iff_wellFoundedOn {α : Type u_6} {r : ααProp} {a : α} :

    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 {α : Type u_2} {r : ααProp} [IsStrictOrder α r] {s : Set α} :
    IsStrictOrder α fun (a b : α) => r a b a s b s
    Equations
    • =
    theorem Set.wellFoundedOn_iff_no_descending_seq {α : Type u_2} {r : ααProp} [IsStrictOrder α r] {s : Set α} :
    Set.WellFoundedOn s r ∀ (f : (fun (x x_1 : ) => x > x_1) ↪r r), ¬∀ (n : ), f n s
    theorem Set.WellFoundedOn.union {α : Type u_2} {r : ααProp} [IsStrictOrder α r] {s : Set α} {t : Set α} (hs : Set.WellFoundedOn s r) (ht : Set.WellFoundedOn t r) :
    @[simp]
    theorem Set.wellFoundedOn_union {α : Type u_2} {r : ααProp} [IsStrictOrder α r] {s : Set α} {t : Set α} :

    Sets well-founded w.r.t. the strict inequality #

    def Set.IsWF {α : Type u_2} [LT α] (s : Set α) :

    s.IsWF indicates that < is well-founded when restricted to s.

    Equations
    Instances For
      @[simp]
      theorem Set.isWF_empty {α : Type u_2} [LT α] :
      theorem Set.isWF_univ_iff {α : Type u_2} [LT α] :
      Set.IsWF Set.univ WellFounded fun (x x_1 : α) => x < x_1
      theorem Set.IsWF.mono {α : Type u_2} [LT α] {s : Set α} {t : Set α} (h : Set.IsWF t) (st : s t) :
      theorem Set.IsWF.union {α : Type u_2} [Preorder α] {s : Set α} {t : Set α} (hs : Set.IsWF s) (ht : Set.IsWF t) :
      @[simp]
      theorem Set.isWF_union {α : Type u_2} [Preorder α] {s : Set α} {t : Set α} :
      theorem Set.isWF_iff_no_descending_seq {α : Type u_2} [Preorder α] {s : Set α} :
      Set.IsWF s ∀ (f : α), StrictAnti f¬∀ (n : ), f (OrderDual.toDual n) s

      Partially well-ordered sets #

      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.

      def Set.PartiallyWellOrderedOn {α : Type u_2} (s : Set α) (r : ααProp) :

      A subset 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.

      Equations
      Instances For
        theorem Set.PartiallyWellOrderedOn.mono {α : Type u_2} {r : ααProp} {s : Set α} {t : Set α} (ht : Set.PartiallyWellOrderedOn t r) (h : s t) :
        @[simp]
        theorem Set.partiallyWellOrderedOn_empty {α : Type u_2} (r : ααProp) :
        theorem Set.PartiallyWellOrderedOn.union {α : Type u_2} {r : ααProp} {s : Set α} {t : Set α} (hs : Set.PartiallyWellOrderedOn s r) (ht : Set.PartiallyWellOrderedOn t r) :
        theorem Set.PartiallyWellOrderedOn.image_of_monotone_on {α : Type u_2} {β : Type u_3} {r : ααProp} {r' : ββProp} {f : αβ} {s : Set α} (hs : Set.PartiallyWellOrderedOn s r) (hf : a₁s, a₂s, r a₁ a₂r' (f a₁) (f a₂)) :
        theorem IsAntichain.finite_of_partiallyWellOrderedOn {α : Type u_2} {r : ααProp} {s : Set α} (ha : IsAntichain r s) (hp : Set.PartiallyWellOrderedOn s r) :
        theorem Set.Finite.partiallyWellOrderedOn {α : Type u_2} {r : ααProp} {s : Set α} [IsRefl α r] (hs : Set.Finite s) :
        theorem IsAntichain.partiallyWellOrderedOn_iff {α : Type u_2} {r : ααProp} {s : Set α} [IsRefl α r] (hs : IsAntichain r s) :
        @[simp]
        theorem Set.partiallyWellOrderedOn_singleton {α : Type u_2} {r : ααProp} [IsRefl α r] (a : α) :
        theorem Set.Subsingleton.partiallyWellOrderedOn {α : Type u_2} {r : ααProp} {s : Set α} [IsRefl α r] (hs : Set.Subsingleton s) :
        @[simp]
        theorem Set.partiallyWellOrderedOn_insert {α : Type u_2} {r : ααProp} {s : Set α} {a : α} [IsRefl α r] :
        theorem Set.PartiallyWellOrderedOn.insert {α : Type u_2} {r : ααProp} {s : Set α} [IsRefl α r] (h : Set.PartiallyWellOrderedOn s r) (a : α) :
        theorem Set.partiallyWellOrderedOn_iff_finite_antichains {α : Type u_2} {r : ααProp} {s : Set α} [IsRefl α r] [IsSymm α r] :
        theorem Set.PartiallyWellOrderedOn.exists_monotone_subseq {α : Type u_2} {r : ααProp} {s : Set α} [IsRefl α r] [IsTrans α r] (h : Set.PartiallyWellOrderedOn s r) (f : α) (hf : ∀ (n : ), f n s) :
        ∃ (g : ↪o ), ∀ (m n : ), m nr (f (g m)) (f (g n))
        theorem Set.partiallyWellOrderedOn_iff_exists_monotone_subseq {α : Type u_2} {r : ααProp} {s : Set α} [IsRefl α r] [IsTrans α r] :
        Set.PartiallyWellOrderedOn s r ∀ (f : α), (∀ (n : ), f n s)∃ (g : ↪o ), ∀ (m n : ), m nr (f (g m)) (f (g n))
        theorem Set.PartiallyWellOrderedOn.prod {α : Type u_2} {β : Type u_3} {r : ααProp} {r' : ββProp} {s : Set α} [IsRefl α r] [IsTrans α r] {t : Set β} (hs : Set.PartiallyWellOrderedOn s r) (ht : Set.PartiallyWellOrderedOn t r') :
        Set.PartiallyWellOrderedOn (s ×ˢ t) fun (x y : α × β) => r x.1 y.1 r' x.2 y.2
        theorem Set.PartiallyWellOrderedOn.wellFoundedOn {α : Type u_2} {r : ααProp} {s : Set α} [IsPreorder α r] (h : Set.PartiallyWellOrderedOn s r) :
        Set.WellFoundedOn s fun (a b : α) => r a b ¬r b a
        def Set.IsPWO {α : Type u_2} [Preorder α] (s : Set α) :

        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).

        Equations
        Instances For
          theorem Set.IsPWO.mono {α : Type u_2} [Preorder α] {s : Set α} {t : Set α} (ht : Set.IsPWO t) :
          s tSet.IsPWO s
          theorem Set.IsPWO.exists_monotone_subseq {α : Type u_2} [Preorder α] {s : Set α} (h : Set.IsPWO s) (f : α) (hf : ∀ (n : ), f n s) :
          ∃ (g : ↪o ), Monotone (f g)
          theorem Set.isPWO_iff_exists_monotone_subseq {α : Type u_2} [Preorder α] {s : Set α} :
          Set.IsPWO s ∀ (f : α), (∀ (n : ), f n s)∃ (g : ↪o ), Monotone (f g)
          theorem Set.IsPWO.isWF {α : Type u_2} [Preorder α] {s : Set α} (h : Set.IsPWO s) :
          theorem Set.IsPWO.prod {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] {s : Set α} {t : Set β} (hs : Set.IsPWO s) (ht : Set.IsPWO t) :
          theorem Set.IsPWO.image_of_monotoneOn {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] {s : Set α} (hs : Set.IsPWO s) {f : αβ} (hf : MonotoneOn f s) :
          theorem Set.IsPWO.image_of_monotone {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] {s : Set α} (hs : Set.IsPWO s) {f : αβ} (hf : Monotone f) :
          theorem Set.IsPWO.union {α : Type u_2} [Preorder α] {s : Set α} {t : Set α} (hs : Set.IsPWO s) (ht : Set.IsPWO t) :
          @[simp]
          theorem Set.isPWO_union {α : Type u_2} [Preorder α] {s : Set α} {t : Set α} :
          theorem Set.Finite.isPWO {α : Type u_2} [Preorder α] {s : Set α} (hs : Set.Finite s) :
          @[simp]
          theorem Set.isPWO_of_finite {α : Type u_2} [Preorder α] {s : Set α} [Finite α] :
          @[simp]
          theorem Set.isPWO_singleton {α : Type u_2} [Preorder α] (a : α) :
          @[simp]
          theorem Set.isPWO_empty {α : Type u_2} [Preorder α] :
          theorem Set.Subsingleton.isPWO {α : Type u_2} [Preorder α] {s : Set α} (hs : Set.Subsingleton s) :
          @[simp]
          theorem Set.isPWO_insert {α : Type u_2} [Preorder α] {s : Set α} {a : α} :
          theorem Set.IsPWO.insert {α : Type u_2} [Preorder α] {s : Set α} (h : Set.IsPWO s) (a : α) :
          theorem Set.Finite.isWF {α : Type u_2} [Preorder α] {s : Set α} (hs : Set.Finite s) :
          @[simp]
          theorem Set.isWF_singleton {α : Type u_2} [Preorder α] {a : α} :
          theorem Set.Subsingleton.isWF {α : Type u_2} [Preorder α] {s : Set α} (hs : Set.Subsingleton s) :
          @[simp]
          theorem Set.isWF_insert {α : Type u_2} [Preorder α] {s : Set α} {a : α} :
          theorem Set.IsWF.insert {α : Type u_2} [Preorder α] {s : Set α} (h : Set.IsWF s) (a : α) :
          theorem Set.Finite.wellFoundedOn {α : Type u_2} {r : ααProp} [IsStrictOrder α r] {s : Set α} (hs : Set.Finite s) :
          @[simp]
          theorem Set.wellFoundedOn_singleton {α : Type u_2} {r : ααProp} [IsStrictOrder α r] {a : α} :
          theorem Set.Subsingleton.wellFoundedOn {α : Type u_2} {r : ααProp} [IsStrictOrder α r] {s : Set α} (hs : Set.Subsingleton s) :
          @[simp]
          theorem Set.wellFoundedOn_insert {α : Type u_2} {r : ααProp} [IsStrictOrder α r] {s : Set α} {a : α} :
          theorem Set.WellFoundedOn.insert {α : Type u_2} {r : ααProp} [IsStrictOrder α r] {s : Set α} (h : Set.WellFoundedOn s r) (a : α) :
          theorem Set.IsWF.isPWO {α : Type u_2} [LinearOrder α] {s : Set α} (hs : Set.IsWF s) :
          theorem Set.isWF_iff_isPWO {α : Type u_2} [LinearOrder α] {s : Set α} :

          In a linear order, the predicates Set.IsWF and Set.IsPWO are equivalent.

          @[simp]
          theorem Finset.partiallyWellOrderedOn {α : Type u_2} {r : ααProp} [IsRefl α r] (s : Finset α) :
          @[simp]
          theorem Finset.isPWO {α : Type u_2} [Preorder α] (s : Finset α) :
          @[simp]
          theorem Finset.isWF {α : Type u_2} [Preorder α] (s : Finset α) :
          @[simp]
          theorem Finset.wellFoundedOn {α : Type u_2} {r : ααProp} [IsStrictOrder α r] (s : Finset α) :
          theorem Finset.wellFoundedOn_sup {ι : Type u_1} {α : Type u_2} {r : ααProp} [IsStrictOrder α r] (s : Finset ι) {f : ιSet α} :
          Set.WellFoundedOn (Finset.sup s f) r is, Set.WellFoundedOn (f i) r
          theorem Finset.partiallyWellOrderedOn_sup {ι : Type u_1} {α : Type u_2} {r : ααProp} (s : Finset ι) {f : ιSet α} :
          theorem Finset.isWF_sup {ι : Type u_1} {α : Type u_2} [Preorder α] (s : Finset ι) {f : ιSet α} :
          Set.IsWF (Finset.sup s f) is, Set.IsWF (f i)
          theorem Finset.isPWO_sup {ι : Type u_1} {α : Type u_2} [Preorder α] (s : Finset ι) {f : ιSet α} :
          Set.IsPWO (Finset.sup s f) is, Set.IsPWO (f i)
          @[simp]
          theorem Finset.wellFoundedOn_bUnion {ι : Type u_1} {α : Type u_2} {r : ααProp} [IsStrictOrder α r] (s : Finset ι) {f : ιSet α} :
          Set.WellFoundedOn (⋃ i ∈ s, f i) r is, Set.WellFoundedOn (f i) r
          @[simp]
          theorem Finset.partiallyWellOrderedOn_bUnion {ι : Type u_1} {α : Type u_2} {r : ααProp} (s : Finset ι) {f : ιSet α} :
          Set.PartiallyWellOrderedOn (⋃ i ∈ s, f i) r is, Set.PartiallyWellOrderedOn (f i) r
          @[simp]
          theorem Finset.isWF_bUnion {ι : Type u_1} {α : Type u_2} [Preorder α] (s : Finset ι) {f : ιSet α} :
          Set.IsWF (⋃ i ∈ s, f i) is, Set.IsWF (f i)
          @[simp]
          theorem Finset.isPWO_bUnion {ι : Type u_1} {α : Type u_2} [Preorder α] (s : Finset ι) {f : ιSet α} :
          Set.IsPWO (⋃ i ∈ s, f i) is, Set.IsPWO (f i)
          noncomputable def Set.IsWF.min {α : Type u_2} [Preorder α] {s : Set α} (hs : Set.IsWF s) (hn : Set.Nonempty s) :
          α

          Set.IsWF.min returns a minimal element of a nonempty well-founded set.

          Equations
          Instances For
            theorem Set.IsWF.min_mem {α : Type u_2} [Preorder α] {s : Set α} (hs : Set.IsWF s) (hn : Set.Nonempty s) :
            theorem Set.IsWF.not_lt_min {α : Type u_2} [Preorder α] {s : Set α} {a : α} (hs : Set.IsWF s) (hn : Set.Nonempty s) (ha : a s) :
            theorem Set.IsWF.min_of_subset_not_lt_min {α : Type u_2} [Preorder α] {s : Set α} {t : Set α} {hs : Set.IsWF s} {hsn : Set.Nonempty s} {ht : Set.IsWF t} {htn : Set.Nonempty t} (hst : s t) :
            @[simp]
            theorem Set.isWF_min_singleton {α : Type u_2} [Preorder α] (a : α) {hs : Set.IsWF {a}} {hn : Set.Nonempty {a}} :
            Set.IsWF.min hs hn = a
            theorem Set.IsWF.min_le {α : Type u_2} [LinearOrder α] {s : Set α} {a : α} (hs : Set.IsWF s) (hn : Set.Nonempty s) (ha : a s) :
            theorem Set.IsWF.le_min_iff {α : Type u_2} [LinearOrder α] {s : Set α} {a : α} (hs : Set.IsWF s) (hn : Set.Nonempty s) :
            a Set.IsWF.min hs hn bs, a b
            theorem Set.IsWF.min_le_min_of_subset {α : Type u_2} [LinearOrder α] {s : Set α} {t : Set α} {hs : Set.IsWF s} {hsn : Set.Nonempty s} {ht : Set.IsWF t} {htn : Set.Nonempty t} (hst : s t) :
            theorem Set.IsWF.min_union {α : Type u_2} [LinearOrder α] {s : Set α} {t : Set α} (hs : Set.IsWF s) (hsn : Set.Nonempty s) (ht : Set.IsWF t) (htn : Set.Nonempty t) :
            Set.IsWF.min = min (Set.IsWF.min hs hsn) (Set.IsWF.min ht htn)
            theorem BddBelow.wellFoundedOn_lt {α : Type u_2} {s : Set α} [Preorder α] [LocallyFiniteOrder α] :
            BddBelow sSet.WellFoundedOn s fun (x x_1 : α) => x < x_1
            theorem BddAbove.wellFoundedOn_gt {α : Type u_2} {s : Set α} [Preorder α] [LocallyFiniteOrder α] :
            BddAbove sSet.WellFoundedOn s fun (x x_1 : α) => x > x_1
            def Set.PartiallyWellOrderedOn.IsBadSeq {α : Type u_2} (r : ααProp) (s : Set α) (f : α) :

            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.

            Equations
            Instances For
              def Set.PartiallyWellOrderedOn.IsMinBadSeq {α : Type u_2} (r : ααProp) (rk : α) (s : Set α) (n : ) (f : α) :

              This indicates that every bad sequence g that agrees with f on the first n terms has rk (f n) ≤ rk (g n).

              Equations
              Instances For
                noncomputable def Set.PartiallyWellOrderedOn.minBadSeqOfBadSeq {α : Type u_2} (r : ααProp) (rk : α) (s : Set α) (n : ) (f : α) (hf : 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.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem Set.PartiallyWellOrderedOn.exists_min_bad_of_exists_bad {α : 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 {α : Type u_2} {r : ααProp} (rk : α) {s : Set α} :
                  theorem Set.PartiallyWellOrderedOn.partiallyWellOrderedOn_sublistForall₂ {α : Type u_2} (r : ααProp) [IsRefl α r] [IsTrans α r] {s : Set α} (h : Set.PartiallyWellOrderedOn s 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 WellFounded.isWF {α : Type u_2} [LT α] (h : WellFounded fun (x x_1 : α) => x < x_1) (s : Set α) :
                  theorem Pi.isPWO {ι : Type u_1} {α : ιType u_6} [(i : ι) → LinearOrder (α i)] [∀ (i : ι), IsWellOrder (α i) fun (x x_1 : α i) => x < x_1] [Finite ι] (s : Set ((i : ι) → α i)) :

                  A version of Dickson's lemma any subset of functions Π s : σ, α s is partially well ordered, when σ is a Fintype and each α s is a linear well order. This includes the classical case of Dickson's lemma that ℕ ^ n is a well partial order. Some generalizations would be possible based on this proof, to include cases where the target is partially well ordered, and also to consider the case of Set.PartiallyWellOrderedOn instead of Set.IsPWO.

                  theorem WellFounded.prod_lex_of_wellFoundedOn_fiber {α : Type u_2} {β : Type u_3} {γ : Type u_4} {rα : ααProp} {rβ : ββProp} {f : γα} {g : γβ} (hα : WellFounded ( on f)) (hβ : ∀ (a : α), Set.WellFoundedOn (f ⁻¹' {a}) ( on g)) :
                  WellFounded (Prod.Lex on 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 {α : Type u_2} {β : Type u_3} {γ : Type u_4} {rα : ααProp} {rβ : ββProp} {f : γα} {g : γβ} {s : Set γ} (hα : Set.WellFoundedOn s ( on f)) (hβ : ∀ (a : α), Set.WellFoundedOn (s f ⁻¹' {a}) ( on g)) :
                  Set.WellFoundedOn s (Prod.Lex on fun (c : γ) => (f c, g c))
                  theorem WellFounded.sigma_lex_of_wellFoundedOn_fiber {ι : Type u_1} {γ : Type u_4} {π : ιType u_5} {rι : ιιProp} {rπ : (i : ι) → π iπ iProp} {f : γι} {g : (i : ι) → γπ i} (hι : WellFounded ( on f)) (hπ : ∀ (i : ι), Set.WellFoundedOn (f ⁻¹' {i}) ( i on g i)) :
                  WellFounded (Sigma.Lex on fun (c : γ) => { fst := f c, snd := 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 {ι : Type u_1} {γ : Type u_4} {π : ιType u_5} {rι : ιιProp} {rπ : (i : ι) → π iπ iProp} {f : γι} {g : (i : ι) → γπ i} {s : Set γ} (hι : Set.WellFoundedOn s ( on f)) (hπ : ∀ (i : ι), Set.WellFoundedOn (s f ⁻¹' {i}) ( i on g i)) :
                  Set.WellFoundedOn s (Sigma.Lex on fun (c : γ) => { fst := f c, snd := g (f c) c })