Documentation

Mathlib.Order.RelSeries

Series of a relation #

If r is a relation on α then a relation series of length n is a series a_0, a_1, ..., a_n such that r a_i a_{i+1} for all i < n

structure RelSeries {α : Type u_1} (r : Rel α α) :
Type u_1

Let r be a relation on α, a relation series of r of length n is a series a_0, a_1, ..., a_n such that r a_i a_{i+1} for all i < n

  • length :

    The number of inequalities in the series

  • toFun : Fin (self.length + 1)α

    The underlying function of a relation series

  • step : ∀ (i : Fin self.length), r (self.toFun (Fin.castSucc i)) (self.toFun (Fin.succ i))

    Adjacent elements are related

Instances For
    @[simp]
    theorem RelSeries.singleton_length {α : Type u_1} (r : Rel α α) (a : α) :
    (RelSeries.singleton r a).length = 0
    @[simp]
    theorem RelSeries.singleton_toFun {α : Type u_1} (r : Rel α α) (a : α) :
    ∀ (x : Fin (0 + 1)), (RelSeries.singleton r a).toFun x = a
    def RelSeries.singleton {α : Type u_1} (r : Rel α α) (a : α) :

    For any type α, each term of α gives a relation series with the right most index to be 0.

    Equations
    Instances For
      instance RelSeries.instIsEmptyRelSeries {α : Type u_1} (r : Rel α α) [IsEmpty α] :
      Equations
      instance RelSeries.instInhabitedRelSeries {α : Type u_1} (r : Rel α α) [Inhabited α] :
      Equations
      instance RelSeries.instNonemptyRelSeries {α : Type u_1} (r : Rel α α) [Nonempty α] :
      Equations
      theorem RelSeries.ext {α : Type u_1} {r : Rel α α} {x : RelSeries r} {y : RelSeries r} (length_eq : x.length = y.length) (toFun_eq : x.toFun = y.toFun Fin.cast (_ : x.length + 1 = y.length + 1)) :
      x = y
      theorem RelSeries.rel_of_lt {α : Type u_1} {r : Rel α α} [IsTrans α r] (x : RelSeries r) {i : Fin (x.length + 1)} {j : Fin (x.length + 1)} (h : i < j) :
      r (x.toFun i) (x.toFun j)
      theorem RelSeries.rel_or_eq_of_le {α : Type u_1} {r : Rel α α} [IsTrans α r] (x : RelSeries r) {i : Fin (x.length + 1)} {j : Fin (x.length + 1)} (h : i j) :
      r (x.toFun i) (x.toFun j) x.toFun i = x.toFun j
      @[simp]
      theorem RelSeries.ofLE_length {α : Type u_1} {r : Rel α α} (x : RelSeries r) {s : Rel α α} (h : r s) :
      (RelSeries.ofLE x h).length = x.length
      @[simp]
      theorem RelSeries.ofLE_toFun {α : Type u_1} {r : Rel α α} (x : RelSeries r) {s : Rel α α} (h : r s) :
      ∀ (a : Fin (x.length + 1)), (RelSeries.ofLE x h).toFun a = x.toFun a
      def RelSeries.ofLE {α : Type u_1} {r : Rel α α} (x : RelSeries r) {s : Rel α α} (h : r s) :

      Given two relations r, s on α such that r ≤ s, any relation series of r induces a relation series of s

      Equations
      Instances For
        theorem RelSeries.coe_ofLE {α : Type u_1} {r : Rel α α} (x : RelSeries r) {s : Rel α α} (h : r s) :
        (RelSeries.ofLE x h).toFun = x.toFun
        @[inline, reducible]
        abbrev RelSeries.toList {α : Type u_1} {r : Rel α α} (x : RelSeries r) :
        List α

        Every relation series gives a list

        Equations
        Instances For
          theorem RelSeries.toList_chain' {α : Type u_1} {r : Rel α α} (x : RelSeries r) :
          theorem RelSeries.toList_ne_empty {α : Type u_1} {r : Rel α α} (x : RelSeries r) :
          @[simp]
          theorem RelSeries.fromListChain'_toFun {α : Type u_1} {r : Rel α α} (x : List α) (x_ne_empty : x []) (hx : List.Chain' r x) :
          ∀ (a : Fin (Nat.pred (List.length x) + 1)), (RelSeries.fromListChain' x x_ne_empty hx).toFun a = (List.get x Fin.cast (_ : Nat.succ (Nat.pred (List.length x)) = List.length x)) a
          @[simp]
          theorem RelSeries.fromListChain'_length {α : Type u_1} {r : Rel α α} (x : List α) (x_ne_empty : x []) (hx : List.Chain' r x) :
          (RelSeries.fromListChain' x x_ne_empty hx).length = Nat.pred (List.length x)
          def RelSeries.fromListChain' {α : Type u_1} {r : Rel α α} (x : List α) (x_ne_empty : x []) (hx : List.Chain' r x) :

          Every nonempty list satisfying the chain condition gives a relation series

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def RelSeries.Equiv {α : Type u_1} {r : Rel α α} :
            RelSeries r {x : List α | x [] List.Chain' r x}

            Relation series of r and nonempty list of α satisfying r-chain condition bijectively corresponds to each other.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              class Rel.FiniteDimensional {α : Type u_1} (r : Rel α α) :

              A relation r is said to be finite dimensional iff there is a relation series of r with the maximum length.

              • exists_longest_relSeries : ∃ (x : RelSeries r), ∀ (y : RelSeries r), y.length x.length

                A relation r is said to be finite dimensional iff there is a relation series of r with the maximum length.

              Instances
                class Rel.InfiniteDimensional {α : Type u_1} (r : Rel α α) :

                A relation r is said to be infinite dimensional iff there exists relation series of arbitrary length.

                • exists_relSeries_with_length : ∀ (n : ), ∃ (x : RelSeries r), x.length = n

                  A relation r is said to be infinite dimensional iff there exists relation series of arbitrary length.

                Instances
                  noncomputable def RelSeries.longestOf {α : Type u_1} (r : Rel α α) [Rel.FiniteDimensional r] :

                  The longest relational series when a relation is finite dimensional

                  Equations
                  Instances For
                    theorem RelSeries.length_le_length_longestOf {α : Type u_1} (r : Rel α α) [Rel.FiniteDimensional r] (x : RelSeries r) :
                    x.length (RelSeries.longestOf r).length
                    noncomputable def RelSeries.withLength {α : Type u_1} (r : Rel α α) [Rel.InfiniteDimensional r] (n : ) :

                    A relation series with length n if the relation is infinite dimensional

                    Equations
                    Instances For
                      @[simp]
                      theorem RelSeries.length_withLength {α : Type u_1} (r : Rel α α) [Rel.InfiniteDimensional r] (n : ) :
                      (RelSeries.withLength r n).length = n

                      If a relation on α is infinite dimensional, then α is nonempty.

                      instance RelSeries.membership {α : Type u_1} (r : Rel α α) :
                      Equations
                      theorem RelSeries.mem_def {α : Type u_1} (r : Rel α α) {x : α} {s : RelSeries r} :
                      x s x Set.range s.toFun
                      def RelSeries.head {α : Type u_1} (r : Rel α α) (x : RelSeries r) :
                      α

                      Start of a series, i.e. for a₀ -r→ a₁ -r→ ... -r→ aₙ, its head is a₀.

                      Since a relation series is assumed to be non-empty, this is well defined.

                      Equations
                      Instances For
                        def RelSeries.last {α : Type u_1} (r : Rel α α) (x : RelSeries r) :
                        α

                        End of a series, i.e. for a₀ -r→ a₁ -r→ ... -r→ aₙ, its last element is aₙ.

                        Since a relation series is assumed to be non-empty, this is well defined.

                        Equations
                        Instances For
                          theorem RelSeries.head_mem {α : Type u_1} (r : Rel α α) (x : RelSeries r) :
                          theorem RelSeries.last_mem {α : Type u_1} (r : Rel α α) (x : RelSeries r) :
                          @[simp]
                          theorem RelSeries.append_length {α : Type u_1} (r : Rel α α) (p : RelSeries r) (q : RelSeries r) (connect : r (RelSeries.last r p) (RelSeries.head r q)) :
                          (RelSeries.append r p q connect).length = p.length + q.length + 1
                          @[simp]
                          theorem RelSeries.append_toFun {α : Type u_1} (r : Rel α α) (p : RelSeries r) (q : RelSeries r) (connect : r (RelSeries.last r p) (RelSeries.head r q)) :
                          ∀ (a : Fin (p.length + q.length + 1 + 1)), (RelSeries.append r p q connect).toFun a = (Fin.append p.toFun q.toFun Fin.cast (_ : p.length + q.length + 1 + 1 = p.length + 1 + (q.length + 1))) a
                          def RelSeries.append {α : Type u_1} (r : Rel α α) (p : RelSeries r) (q : RelSeries r) (connect : r (RelSeries.last r p) (RelSeries.head r q)) :

                          If a₀ -r→ a₁ -r→ ... -r→ aₙ and b₀ -r→ b₁ -r→ ... -r→ bₘ are two strict series such that r aₙ b₀, then there is a chain of length n + m + 1 given by a₀ -r→ a₁ -r→ ... -r→ aₙ -r→ b₀ -r→ b₁ -r→ ... -r→ bₘ.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[simp]
                            theorem RelSeries.map_toFun {α : Type u_1} (r : Rel α α) {β : Type u_2} (s : Rel β β) (p : RelSeries r) (f : αβ) (hf : ∀ ⦃x y : α⦄, r x ys (f x) (f y)) :
                            ∀ (a : Fin (p.length + 1)), (RelSeries.map r s p f hf).toFun a = (f p.toFun) a
                            @[simp]
                            theorem RelSeries.map_length {α : Type u_1} (r : Rel α α) {β : Type u_2} (s : Rel β β) (p : RelSeries r) (f : αβ) (hf : ∀ ⦃x y : α⦄, r x ys (f x) (f y)) :
                            (RelSeries.map r s p f hf).length = p.length
                            def RelSeries.map {α : Type u_1} (r : Rel α α) {β : Type u_2} (s : Rel β β) (p : RelSeries r) (f : αβ) (hf : ∀ ⦃x y : α⦄, r x ys (f x) (f y)) :

                            For two types α, β and relation on them r, s, if f : α → β preserves relation r, then an r-series can be pushed out to an s-series by a₀ -r→ a₁ -r→ ... -r→ aₙ ↦ f a₀ -s→ f a₁ -s→ ... -s→ f aₙ

                            Equations
                            Instances For
                              @[simp]
                              theorem RelSeries.insertNth_length {α : Type u_1} (r : Rel α α) (p : RelSeries r) (i : Fin p.length) (a : α) (prev_connect : r (p.toFun (Fin.castSucc i)) a) (connect_next : r a (p.toFun (Fin.succ i))) :
                              (RelSeries.insertNth r p i a prev_connect connect_next).length = p.length + 1
                              @[simp]
                              theorem RelSeries.insertNth_toFun {α : Type u_1} (r : Rel α α) (p : RelSeries r) (i : Fin p.length) (a : α) (prev_connect : r (p.toFun (Fin.castSucc i)) a) (connect_next : r a (p.toFun (Fin.succ i))) (j : Fin (p.length + 1 + 1)) :
                              (RelSeries.insertNth r p i a prev_connect connect_next).toFun j = Fin.insertNth (Fin.castSucc (Fin.succ i)) a p.toFun j
                              def RelSeries.insertNth {α : Type u_1} (r : Rel α α) (p : RelSeries r) (i : Fin p.length) (a : α) (prev_connect : r (p.toFun (Fin.castSucc i)) a) (connect_next : r a (p.toFun (Fin.succ i))) :

                              If a₀ -r→ a₁ -r→ ... -r→ aₙ is an r-series and a is such that aᵢ -r→ a -r→ a_ᵢ₊₁, then a₀ -r→ a₁ -r→ ... -r→ aᵢ -r→ a -r→ aᵢ₊₁ -r→ ... -r→ aₙ is another r-series

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                @[inline, reducible]
                                abbrev FiniteDimensionalOrder (γ : Type u_3) [Preorder γ] :

                                A type is finite dimensional if its LTSeries has bounded length.

                                Equations
                                Instances For
                                  @[inline, reducible]
                                  abbrev InfiniteDimensionalOrder (γ : Type u_3) [Preorder γ] :

                                  A type is infinite dimensional if it has LTSeries of at least arbitrary length

                                  Equations
                                  Instances For
                                    @[inline, reducible]
                                    abbrev LTSeries (α : Type u_1) [Preorder α] :
                                    Type u_1

                                    If α is a preorder, a LTSeries is a relation series of the less than relation.

                                    Equations
                                    Instances For
                                      noncomputable def LTSeries.longestOf (α : Type u_1) [Preorder α] [FiniteDimensionalOrder α] :

                                      The longest <-series when a type is finite dimensional

                                      Equations
                                      Instances For
                                        noncomputable def LTSeries.withLength (α : Type u_1) [Preorder α] [InfiniteDimensionalOrder α] (n : ) :

                                        A <-series with length n if the relation is infinite dimensional

                                        Equations
                                        Instances For
                                          @[simp]
                                          theorem LTSeries.length_withLength (α : Type u_1) [Preorder α] [InfiniteDimensionalOrder α] (n : ) :
                                          (LTSeries.withLength α n).length = n

                                          if α is infinite dimensional, then α is nonempty.

                                          theorem LTSeries.longestOf_is_longest {α : Type u_1} [Preorder α] [FiniteDimensionalOrder α] (x : LTSeries α) :
                                          x.length (LTSeries.longestOf α).length
                                          theorem LTSeries.longestOf_len_unique {α : Type u_1} [Preorder α] [FiniteDimensionalOrder α] (p : LTSeries α) (is_longest : ∀ (q : LTSeries α), q.length p.length) :
                                          p.length = (LTSeries.longestOf α).length
                                          theorem LTSeries.strictMono {α : Type u_1} [Preorder α] (x : LTSeries α) :
                                          StrictMono x.toFun
                                          theorem LTSeries.monotone {α : Type u_1} [Preorder α] (x : LTSeries α) :
                                          Monotone x.toFun
                                          @[simp]
                                          theorem LTSeries.mk_length {α : Type u_1} [Preorder α] (length : ) (toFun : Fin (length + 1)α) (strictMono : StrictMono toFun) :
                                          (LTSeries.mk length toFun strictMono).length = length
                                          @[simp]
                                          theorem LTSeries.mk_toFun {α : Type u_1} [Preorder α] (length : ) (toFun : Fin (length + 1)α) (strictMono : StrictMono toFun) :
                                          ∀ (a : Fin (length + 1)), (LTSeries.mk length toFun strictMono).toFun a = toFun a
                                          def LTSeries.mk {α : Type u_1} [Preorder α] (length : ) (toFun : Fin (length + 1)α) (strictMono : StrictMono toFun) :

                                          An alternative constructor of LTSeries from a strictly monotone function.

                                          Equations
                                          Instances For
                                            @[simp]
                                            theorem LTSeries.map_length {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] (p : LTSeries α) (f : αβ) (hf : StrictMono f) :
                                            (LTSeries.map p f hf).length = p.length
                                            @[simp]
                                            theorem LTSeries.map_toFun {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] (p : LTSeries α) (f : αβ) (hf : StrictMono f) :
                                            ∀ (a : Fin (p.length + 1)), (LTSeries.map p f hf).toFun a = f (p.toFun a)
                                            def LTSeries.map {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] (p : LTSeries α) (f : αβ) (hf : StrictMono f) :

                                            For two preorders α, β, if f : α → β is strictly monotonic, then a strict chain of α can be pushed out to a strict chain of β by a₀ < a₁ < ... < aₙ ↦ f a₀ < f a₁ < ... < f aₙ

                                            Equations
                                            Instances For
                                              @[simp]
                                              theorem LTSeries.comap_toFun {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] (p : LTSeries β) (f : αβ) (comap : ∀ ⦃x y : α⦄, f x < f yx < y) (surjective : Function.Surjective f) (i : Fin (p.length + 1)) :
                                              (LTSeries.comap p f comap surjective).toFun i = Exists.choose (_ : ∃ (a : α), f a = p.toFun i)
                                              @[simp]
                                              theorem LTSeries.comap_length {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] (p : LTSeries β) (f : αβ) (comap : ∀ ⦃x y : α⦄, f x < f yx < y) (surjective : Function.Surjective f) :
                                              (LTSeries.comap p f comap surjective).length = p.length
                                              noncomputable def LTSeries.comap {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] (p : LTSeries β) (f : αβ) (comap : ∀ ⦃x y : α⦄, f x < f yx < y) (surjective : Function.Surjective f) :

                                              For two preorders α, β, if f : α → β is surjective and strictly comonotonic, then a strict series of β can be pulled back to a strict chain of α by b₀ < b₁ < ... < bₙ ↦ f⁻¹ b₀ < f⁻¹ b₁ < ... < f⁻¹ bₙ where f⁻¹ bᵢ is an arbitrary element in the preimage of f⁻¹ {bᵢ}.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For