The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V04. Order and lattices

Mathlib.Order.RelSeries

209 declarations. Mathlib docs · Source

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

theorem RelSeries.cons.congr_simp E1 #

∀ {α : Type u_1} {r : SetRel α α} (p p_1 : RelSeries r) (e_p : p = p_1) (newHead newHead_1 : α)
  (e_newHead : newHead = newHead_1) (rel : (newHead, p.head) ∈ r), p.cons newHead rel = p_1.cons newHead_1 ⋯

theorem RelSeries.tail.congr_simp E1 #

∀ {α : Type u_1} {r : SetRel α α} (p p_1 : RelSeries r) (e_p : p = p_1) (len_pos : p.length ≠ 0),
  p.tail len_pos = p_1.tail ⋯

theorem RelSeries.append.congr_simp E1 #

∀ {α : Type u_1} {r : SetRel α α} (p p_1 : RelSeries r) (e_p : p = p_1) (q q_1 : RelSeries r) (e_q : q = q_1)
  (connect : (p.last, q.head) ∈ r), p.append q connect = p_1.append q_1 ⋯

theorem RelSeries.mk.inj E1 #

∀ {α : Type u_1} {r : SetRel α α} {length : ℕ} {toFun : Fin (length + 1) → α}
  {step : ∀ (i : Fin length), (toFun i.castSucc, toFun i.succ) ∈ r} {length_1 : ℕ} {toFun_1 : Fin (length_1 + 1) → α}
  {step_1 : ∀ (i : Fin length_1), (toFun_1 i.castSucc, toFun_1 i.succ) ∈ r},
  { length := length, toFun := toFun, step := step } = { length := length_1, toFun := toFun_1, step := step_1 } →
    length = length_1 ∧ toFun ≍ toFun_1

theorem RelSeries.smash.congr_simp E1 #

∀ {α : Type u_1} {r : SetRel α α} (p p_1 : RelSeries r) (e_p : p = p_1) (q q_1 : RelSeries r) (e_q : q = q_1)
  (connect : p.last = q.head), p.smash q connect = p_1.smash q_1 ⋯

theorem RelSeries.snoc.congr_simp E1 #

∀ {α : Type u_1} {r : SetRel α α} (p p_1 : RelSeries r) (e_p : p = p_1) (newLast newLast_1 : α)
  (e_newLast : newLast = newLast_1) (rel : (p.last, newLast) ∈ r), p.snoc newLast rel = p_1.snoc newLast_1 ⋯

theorem RelSeries.drop.match_1.congr_eq_1 E1 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin (p.length + 1))
  (motive : Fin (p.length - ↑i + 1) → Sort u_2) (x : Fin (p.length - ↑i + 1))
  (h_1 : (j : ℕ) → (h : j < p.length - ↑i + 1) → motive ⟨j, h⟩) (j : ℕ) (h : j < p.length - ↑i + 1),
  x = ⟨j, h⟩ →
    (match x with
      | ⟨j, h⟩ => h_1 j h) ≍
      h_1 j h

theorem RelSeries.mk.injEq E0 #

∀ {α : Type u_1} {r : SetRel α α} (length : ℕ) (toFun : Fin (length + 1) → α)
  (step : ∀ (i : Fin length), (toFun i.castSucc, toFun i.succ) ∈ r) (length_1 : ℕ) (toFun_1 : Fin (length_1 + 1) → α)
  (step_1 : ∀ (i : Fin length_1), (toFun_1 i.castSucc, toFun_1 i.succ) ∈ r),
  ({ length := length, toFun := toFun, step := step } = { length := length_1, toFun := toFun_1, step := step_1 }) =
    (length = length_1 ∧ toFun ≍ toFun_1)

theorem RelSeries.take.match_1.congr_eq_1 E1 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin (p.length + 1)) (motive : Fin (↑i + 1) → Sort u_2)
  (x : Fin (↑i + 1)) (h_1 : (j : ℕ) → (h : j < ↑i + 1) → motive ⟨j, h⟩) (j : ℕ) (h : j < ↑i + 1),
  x = ⟨j, h⟩ →
    (match x with
      | ⟨j, h⟩ => h_1 j h) ≍
      h_1 j h

theorem RelSeries.fromListIsChain.congr_simp E1 #

∀ {α : Type u_1} {r : SetRel α α} (x x_1 : List α) (e_x : x = x_1) (x_ne_nil : x ≠ [])
  (hx : List.IsChain (fun x1 x2 ↦ (x1, x2) ∈ r) x),
  RelSeries.fromListIsChain x x_ne_nil hx = RelSeries.fromListIsChain x_1 ⋯ ⋯

theorem RelSeries.mk.congr_simp E1 #

∀ {α : Type u_1} {r : SetRel α α} (length : ℕ) (toFun toFun_1 : Fin (length + 1) → α) (e_toFun : toFun = toFun_1)
  (step : ∀ (i : Fin length), (toFun i.castSucc, toFun i.succ) ∈ r),
  { length := length, toFun := toFun, step := step } = { length := length, toFun := toFun_1, step := ⋯ }

def RelSeries.ctorIdx E1 #

{α : Type u_1} → {r : SetRel α α} → RelSeries r → ℕ

structure RelSeries E1 #

{α : Type u_1} → SetRel α α → 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

ctor RelSeries.mk E0 #

{α : Type u_1} →
  {r : SetRel α α} →
    (length : ℕ) →
      (toFun : Fin (length + 1) → α) → (∀ (i : Fin length), (toFun i.castSucc, toFun i.succ) ∈ r) → RelSeries r

abbrev RelSeries.length E1 #

{α : Type u_1} → {r : SetRel α α} → RelSeries r → ℕ

The number of inequalities in the series

abbrev RelSeries.toFun E1 #

{α : Type u_1} → {r : SetRel α α} → (self : RelSeries r) → Fin (self.length + 1) → α

The underlying function of a relation series

theorem RelSeries.step E1 #

∀ {α : Type u_1} {r : SetRel α α} (self : RelSeries r) (i : Fin self.length),
  (self.toFun i.castSucc, self.toFun i.succ) ∈ r

Adjacent elements are related

instance RelSeries.instCoeFunForallFinHAddNatLengthOfNat E0 #

{α : Type u_1} → (r : SetRel α α) → CoeFun (RelSeries r) fun x ↦ Fin (x.length + 1) → α

def RelSeries.singleton E1 #

{α : Type u_1} → (r : SetRel α α) → α → RelSeries r

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

theorem RelSeries.singleton_toFun E0 #

∀ {α : Type u_1} (r : SetRel α α) (a : α) (x : Fin (0 + 1)), (RelSeries.singleton r a).toFun x = a

theorem RelSeries.singleton_length E0 #

∀ {α : Type u_1} (r : SetRel α α) (a : α), (RelSeries.singleton r a).length = 0

instance RelSeries.instIsEmpty E0 #

∀ {α : Type u_1} (r : SetRel α α) [IsEmpty α], IsEmpty (RelSeries r)

instance RelSeries.instInhabited E0 #

{α : Type u_1} → (r : SetRel α α) → [Inhabited α] → Inhabited (RelSeries r)

instance RelSeries.instNonempty E0 #

∀ {α : Type u_1} (r : SetRel α α) [Nonempty α], Nonempty (RelSeries r)

theorem RelSeries.ext E1 #

∀ {α : Type u_1} {r : SetRel α α} {x y : RelSeries r} (length_eq : x.length = y.length),
  x.toFun = y.toFun ∘ Fin.cast ⋯ → x = y

theorem RelSeries.rel_of_lt E1 #

∀ {α : Type u_1} {r : SetRel α α} [r.IsTrans] (x : RelSeries r) {i j : Fin (x.length + 1)},
  i < j → (x.toFun i, x.toFun j) ∈ r

theorem RelSeries.rel_or_eq_of_le E1 #

∀ {α : Type u_1} {r : SetRel α α} [r.IsTrans] (x : RelSeries r) {i j : Fin (x.length + 1)},
  i ≤ j → (x.toFun i, x.toFun j) ∈ r ∨ x.toFun i = x.toFun j

def RelSeries.ofLE E1 #

{α : Type u_1} → {r : SetRel α α} → RelSeries r → {s : SetRel α α} → r ⊆ s → RelSeries s

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

theorem RelSeries.ofLE_toFun E0 #

∀ {α : Type u_1} {r : SetRel α α} (x : RelSeries r) {s : SetRel α α} (h : r ⊆ s) (a : Fin (x.length + 1)),
  (x.ofLE h).toFun a = x.toFun a

theorem RelSeries.ofLE_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (x : RelSeries r) {s : SetRel α α} (h : r ⊆ s), (x.ofLE h).length = x.length

theorem RelSeries.coe_ofLE E0 #

∀ {α : Type u_1} {r : SetRel α α} (x : RelSeries r) {s : SetRel α α} (h : r ⊆ s), (x.ofLE h).toFun = x.toFun

def RelSeries.toList E1 #

{α : Type u_1} → {r : SetRel α α} → RelSeries r → List α

Every relation series gives a list

theorem RelSeries.length_toList E0 #

∀ {α : Type u_1} {r : SetRel α α} (x : RelSeries r), x.toList.length = x.length + 1

theorem RelSeries.toList_singleton E0 #

∀ {α : Type u_1} {r : SetRel α α} (x : α), (RelSeries.singleton r x).toList = [x]

theorem RelSeries.isChain_toList E1 #

∀ {α : Type u_1} {r : SetRel α α} (x : RelSeries r), List.IsChain (fun x1 x2 ↦ (x1, x2) ∈ r) x.toList

theorem RelSeries.toList_ne_nil E1 #

∀ {α : Type u_1} {r : SetRel α α} (x : RelSeries r), x.toList ≠ []

def RelSeries.fromListIsChain E1 #

{α : Type u_1} → {r : SetRel α α} → (x : List α) → x ≠ [] → List.IsChain (fun x1 x2 ↦ (x1, x2) ∈ r) x → RelSeries r

Every nonempty list satisfying the chain condition gives a relation series

theorem RelSeries.fromListIsChain_toFun E0 #

∀ {α : Type u_1} {r : SetRel α α} (x : List α) (x_ne_nil : x ≠ []) (hx : List.IsChain (fun x1 x2 ↦ (x1, x2) ∈ r) x)
  (i : Fin (x.length - 1 + 1)), (RelSeries.fromListIsChain x x_ne_nil hx).toFun i = x[Fin.cast ⋯ i]

theorem RelSeries.fromListIsChain_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (x : List α) (x_ne_nil : x ≠ []) (hx : List.IsChain (fun x1 x2 ↦ (x1, x2) ∈ r) x),
  (RelSeries.fromListIsChain x x_ne_nil hx).length = x.length - 1

def RelSeries.Equiv E1 #

{α : Type u_1} → {r : SetRel α α} → RelSeries r ≃ ↑{x | x ≠ [] ∧ List.IsChain (fun x1 x2 ↦ (x1, x2) ∈ r) x}

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

theorem RelSeries.toList_injective E1 #

∀ {α : Type u_1} {r : SetRel α α}, Function.Injective RelSeries.toList

class SetRel.FiniteDimensional E1 #

{α : Type u_1} → SetRel α α → Prop

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

theorem SetRel.finiteDimensional_iff E0 #

∀ {α : Type u_1} (r : SetRel α α), r.FiniteDimensional ↔ ∃ x, ∀ (y : RelSeries r), y.length ≤ x.length

ctor SetRel.FiniteDimensional.mk E0 #

∀ {α : Type u_1} {r : SetRel α α}, (∃ x, ∀ (y : RelSeries r), y.length ≤ x.length) → r.FiniteDimensional

theorem SetRel.FiniteDimensional.exists_longest_relSeries E1 #

∀ {α : Type u_1} {r : SetRel α α} [self : r.FiniteDimensional], ∃ x, ∀ (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.

class SetRel.InfiniteDimensional E1 #

{α : Type u_1} → SetRel α α → Prop

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

theorem SetRel.infiniteDimensional_iff E0 #

∀ {α : Type u_1} (r : SetRel α α), r.InfiniteDimensional ↔ ∀ (n : ℕ), ∃ x, x.length = n

ctor SetRel.InfiniteDimensional.mk E0 #

∀ {α : Type u_1} {r : SetRel α α}, (∀ (n : ℕ), ∃ x, x.length = n) → r.InfiniteDimensional

theorem SetRel.InfiniteDimensional.exists_relSeries_with_length E1 #

∀ {α : Type u_1} {r : SetRel α α} [self : r.InfiniteDimensional] (n : ℕ), ∃ x, x.length = n

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

def RelSeries.longestOf E1 #

{α : Type u_1} → (r : SetRel α α) → [r.FiniteDimensional] → RelSeries r

The longest relational series when a relation is finite dimensional

theorem RelSeries.length_le_length_longestOf E1 #

∀ {α : Type u_1} (r : SetRel α α) [inst : r.FiniteDimensional] (x : RelSeries r),
  x.length ≤ (RelSeries.longestOf r).length

def RelSeries.withLength E1 #

{α : Type u_1} → (r : SetRel α α) → [r.InfiniteDimensional] → ℕ → RelSeries r

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

theorem RelSeries.length_withLength E0 #

∀ {α : Type u_1} (r : SetRel α α) [inst : r.InfiniteDimensional] (n : ℕ), (RelSeries.withLength r n).length = n

theorem RelSeries.nonempty_of_infiniteDimensional E1 #

∀ {α : Type u_1} {r : SetRel α α} [r.InfiniteDimensional], Nonempty α

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

theorem RelSeries.nonempty_of_finiteDimensional E1 #

∀ {α : Type u_1} {r : SetRel α α} [r.FiniteDimensional], Nonempty α

instance RelSeries.membership E0 #

{α : Type u_1} → {r : SetRel α α} → Membership α (RelSeries r)

theorem RelSeries.mem_def E0 #

∀ {α : Type u_1} {r : SetRel α α} {s : RelSeries r} {x : α}, x ∈ s ↔ x ∈ Set.range s.toFun

theorem RelSeries.mem_toList E0 #

∀ {α : Type u_1} {r : SetRel α α} {s : RelSeries r} {x : α}, x ∈ s.toList ↔ x ∈ s

theorem RelSeries.subsingleton_of_length_eq_zero E1 #

∀ {α : Type u_1} {r : SetRel α α} {s : RelSeries r}, s.length = 0 → {x | x ∈ s}.Subsingleton

theorem RelSeries.length_ne_zero_of_nontrivial E1 #

∀ {α : Type u_1} {r : SetRel α α} {s : RelSeries r}, {x | x ∈ s}.Nontrivial → s.length ≠ 0

theorem RelSeries.length_pos_of_nontrivial E1 #

∀ {α : Type u_1} {r : SetRel α α} {s : RelSeries r}, {x | x ∈ s}.Nontrivial → 0 < s.length

theorem RelSeries.length_ne_zero E1 #

∀ {α : Type u_1} {r : SetRel α α} {s : RelSeries r} [r.IsIrrefl], s.length ≠ 0 ↔ {x | x ∈ s}.Nontrivial

theorem RelSeries.length_pos E1 #

∀ {α : Type u_1} {r : SetRel α α} {s : RelSeries r} [r.IsIrrefl], 0 < s.length ↔ {x | x ∈ s}.Nontrivial

theorem RelSeries.length_eq_zero E1 #

∀ {α : Type u_1} {r : SetRel α α} {s : RelSeries r} [r.IsIrrefl], s.length = 0 ↔ {x | x ∈ s}.Subsingleton

def RelSeries.head E1 #

{α : Type u_1} → {r : SetRel α α} → 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.

def RelSeries.last E1 #

{α : Type u_1} → {r : SetRel α α} → 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.

theorem RelSeries.apply_zero E1 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.toFun 0 = p.head

theorem RelSeries.apply_last E1 #

∀ {α : Type u_1} {r : SetRel α α} (x : RelSeries r), x.toFun (Fin.last x.length) = x.last

theorem RelSeries.head_mem E1 #

∀ {α : Type u_1} {r : SetRel α α} (x : RelSeries r), x.head ∈ x

theorem RelSeries.last_mem E1 #

∀ {α : Type u_1} {r : SetRel α α} (x : RelSeries r), x.last ∈ x

theorem RelSeries.head_singleton E0 #

∀ {α : Type u_1} {r : SetRel α α} (x : α), (RelSeries.singleton r x).head = x

theorem RelSeries.last_singleton E0 #

∀ {α : Type u_1} {r : SetRel α α} (x : α), (RelSeries.singleton r x).last = x

theorem RelSeries.head_toList E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.toList.head ⋯ = p.head

theorem RelSeries.toList_getElem E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) {i : ℕ} (hi : i < p.toList.length), p.toList[i] = p.toFun ⟨i, ⋯⟩

theorem RelSeries.toList_getElem_zero_eq_head E1 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.toList[0] = p.head

theorem RelSeries.toList_fromListIsChain E0 #

∀ {α : Type u_1} {r : SetRel α α} (l : List α) (l_ne_nil : l ≠ []) (hl : List.IsChain (fun x1 x2 ↦ (x1, x2) ∈ r) l),
  (RelSeries.fromListIsChain l l_ne_nil hl).toList = l

theorem RelSeries.head_fromListIsChain E0 #

∀ {α : Type u_1} {r : SetRel α α} (l : List α) (l_ne_nil : l ≠ []) (hl : List.IsChain (fun x1 x2 ↦ (x1, x2) ∈ r) l),
  (RelSeries.fromListIsChain l l_ne_nil hl).head = l.head l_ne_nil

theorem RelSeries.getLast_toList E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.toList.getLast ⋯ = p.last

def RelSeries.append E1 #

{α : Type u_1} → {r : SetRel α α} → (p q : RelSeries r) → (p.last, q.head) ∈ r → RelSeries r

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

theorem RelSeries.append_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (p q : RelSeries r) (connect : (p.last, q.head) ∈ r),
  (p.append q connect).length = p.length + q.length + 1

theorem RelSeries.append_toFun E0 #

∀ {α : Type u_1} {r : SetRel α α} (p q : RelSeries r) (connect : (p.last, q.head) ∈ r)
  (a : Fin (p.length + q.length + 1 + 1)), (p.append q connect).toFun a = (Fin.append p.toFun q.toFun ∘ Fin.cast ⋯) a

theorem RelSeries.append_apply_left E1 #

∀ {α : Type u_1} {r : SetRel α α} (p q : RelSeries r) (connect : (p.last, q.head) ∈ r) (i : Fin (p.length + 1)),
  (p.append q connect).toFun (Fin.cast ⋯ (Fin.castAdd (q.length + 1) i)) = p.toFun i

theorem RelSeries.append_apply_right E1 #

∀ {α : Type u_1} {r : SetRel α α} (p q : RelSeries r) (connect : (p.last, q.head) ∈ r) (i : Fin (q.length + 1)),
  (p.append q connect).toFun (Fin.cast ⋯ (Fin.natAdd (p.length + 1) i)) = q.toFun i

theorem RelSeries.head_append E0 #

∀ {α : Type u_1} {r : SetRel α α} (p q : RelSeries r) (connect : (p.last, q.head) ∈ r),
  (p.append q connect).head = p.head

theorem RelSeries.last_append E0 #

∀ {α : Type u_1} {r : SetRel α α} (p q : RelSeries r) (connect : (p.last, q.head) ∈ r),
  (p.append q connect).last = q.last

theorem RelSeries.append_assoc E1 #

∀ {α : Type u_1} {r : SetRel α α} (p q w : RelSeries r) (hpq : (p.last, q.head) ∈ r) (hqw : (q.last, w.head) ∈ r),
  (p.append q hpq).append w ⋯ = p.append (q.append w hqw) ⋯

theorem RelSeries.toList_append E0 #

∀ {α : Type u_1} {r : SetRel α α} (p q : RelSeries r) (connect : (p.last, q.head) ∈ r),
  (p.append q connect).toList = p.toList ++ q.toList

def RelSeries.map E1 #

{α : Type u_1} → {r : SetRel α α} → {β : Type u_2} → {s : SetRel β β} → RelSeries r → r.Hom s → RelSeries s

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ₙ

theorem RelSeries.map_length E0 #

∀ {α : Type u_1} {r : SetRel α α} {β : Type u_2} {s : SetRel β β} (p : RelSeries r) (f : r.Hom s),
  (p.map f).length = p.length

theorem RelSeries.map_apply E0 #

∀ {α : Type u_1} {r : SetRel α α} {β : Type u_2} {s : SetRel β β} (p : RelSeries r) (f : r.Hom s)
  (i : Fin (p.length + 1)), (p.map f).toFun i = f (p.toFun i)

theorem RelSeries.head_map E0 #

∀ {α : Type u_1} {r : SetRel α α} {β : Type u_2} {s : SetRel β β} (p : RelSeries r) (f : r.Hom s),
  (p.map f).head = f p.head

theorem RelSeries.last_map E0 #

∀ {α : Type u_1} {r : SetRel α α} {β : Type u_2} {s : SetRel β β} (p : RelSeries r) (f : r.Hom s),
  (p.map f).last = f p.last

def RelSeries.insertNth E1 #

{α : Type u_1} →
  {r : SetRel α α} →
    (p : RelSeries r) →
      (i : Fin p.length) → (a : α) → (p.toFun i.castSucc, a) ∈ r → (a, p.toFun i.succ) ∈ r → RelSeries r

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

theorem RelSeries.insertNth_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin p.length) (a : α)
  (prev_connect : (p.toFun i.castSucc, a) ∈ r) (connect_next : (a, p.toFun i.succ) ∈ r),
  (p.insertNth i a prev_connect connect_next).length = p.length + 1

theorem RelSeries.insertNth_toFun E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin p.length) (a : α)
  (prev_connect : (p.toFun i.castSucc, a) ∈ r) (connect_next : (a, p.toFun i.succ) ∈ r) (j : Fin (p.length + 1 + 1)),
  (p.insertNth i a prev_connect connect_next).toFun j = i.succ.castSucc.insertNth a p.toFun j

def RelSeries.reverse E1 #

{α : Type u_1} → {r : SetRel α α} → RelSeries r → RelSeries r.inv

A relation series a₀ -r→ a₁ -r→ ... -r→ aₙ of r gives a relation series of the reverse of r by reversing the series aₙ ←r- aₙ₋₁ ←r- ... ←r- a₁ ←r- a₀.

theorem RelSeries.reverse_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.reverse.length = p.length

theorem RelSeries.reverse_apply E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin (p.length + 1)), p.reverse.toFun i = p.toFun i.rev

theorem RelSeries.last_reverse E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.reverse.last = p.head

theorem RelSeries.head_reverse E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.reverse.head = p.last

theorem RelSeries.reverse_reverse E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.reverse.reverse = p

def RelSeries.cons E1 #

{α : Type u_1} → {r : SetRel α α} → (p : RelSeries r) → (newHead : α) → (newHead, p.head) ∈ r → RelSeries r

Given a series a₀ -r→ a₁ -r→ ... -r→ aₙ and an a such that a₀ -r→ a holds, there is a series of length n+1: a -r→ a₀ -r→ a₁ -r→ ... -r→ aₙ.

theorem RelSeries.cons_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (newHead : α) (rel : (newHead, p.head) ∈ r),
  (p.cons newHead rel).length = p.length + 1

theorem RelSeries.head_cons E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (newHead : α) (rel : (newHead, p.head) ∈ r),
  (p.cons newHead rel).head = newHead

theorem RelSeries.last_cons E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (newHead : α) (rel : (newHead, p.head) ∈ r),
  (p.cons newHead rel).last = p.last

theorem RelSeries.cons_cast_succ E1 #

∀ {α : Type u_1} {r : SetRel α α} (s : RelSeries r) (a : α) (h : (a, s.head) ∈ r) (i : Fin (s.length + 1)),
  (s.cons a h).toFun (Fin.cast ⋯ i.succ) = s.toFun i

theorem RelSeries.append_singleton_left E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (x : α) (hx : (x, p.head) ∈ r),
  (RelSeries.singleton r x).append p hx = p.cons x hx

theorem RelSeries.toList_cons E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (x : α) (hx : (x, p.head) ∈ r), (p.cons x hx).toList = x :: p.toList

theorem RelSeries.fromListIsChain_cons E1 #

∀ {α : Type u_1} {r : SetRel α α} (l : List α) (l_ne_nil : l ≠ []) (hl : List.IsChain (fun x1 x2 ↦ (x1, x2) ∈ r) l)
  (x : α) (hx : (x, l.head l_ne_nil) ∈ r),
  RelSeries.fromListIsChain (x :: l) ⋯ ⋯ = (RelSeries.fromListIsChain l l_ne_nil hl).cons x ⋯

theorem RelSeries.append_cons E1 #

∀ {α : Type u_1} {r : SetRel α α} {p q : RelSeries r} {x : α} (hx : (x, p.head) ∈ r) (hq : (p.last, q.head) ∈ r),
  (p.cons x hx).append q ⋯ = (p.append q hq).cons x ⋯

def RelSeries.snoc E1 #

{α : Type u_1} → {r : SetRel α α} → (p : RelSeries r) → (newLast : α) → (p.last, newLast) ∈ r → RelSeries r

Given a series a₀ -r→ a₁ -r→ ... -r→ aₙ and an a such that aₙ -r→ a holds, there is a series of length n+1: a₀ -r→ a₁ -r→ ... -r→ aₙ -r→ a.

theorem RelSeries.snoc_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (newLast : α) (rel : (p.last, newLast) ∈ r),
  (p.snoc newLast rel).length = p.length + 1

theorem RelSeries.head_snoc E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (newLast : α) (rel : (p.last, newLast) ∈ r),
  (p.snoc newLast rel).head = p.head

theorem RelSeries.last_snoc E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (newLast : α) (rel : (p.last, newLast) ∈ r),
  (p.snoc newLast rel).last = newLast

theorem RelSeries.snoc_cast_castSucc E1 #

∀ {α : Type u_1} {r : SetRel α α} (s : RelSeries r) (a : α) (h : (s.last, a) ∈ r) (i : Fin (s.length + 1)),
  (s.snoc a h).toFun (Fin.cast ⋯ i.castSucc) = s.toFun i

theorem RelSeries.last_snoc' E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (newLast : α) (rel : (p.last, newLast) ∈ r),
  (p.snoc newLast rel).toFun (Fin.last (p.length + 1)) = newLast

theorem RelSeries.snoc_castSucc E0 #

∀ {α : Type u_1} {r : SetRel α α} (s : RelSeries r) (a : α) (connect : (s.last, a) ∈ r) (i : Fin (s.length + 1)),
  (s.snoc a connect).toFun i.castSucc = s.toFun i

theorem RelSeries.mem_snoc E0 #

∀ {α : Type u_1} {r : SetRel α α} {p : RelSeries r} {newLast : α} {rel : (p.last, newLast) ∈ r} {x : α},
  x ∈ p.snoc newLast rel ↔ x ∈ p ∨ x = newLast

def RelSeries.tail E1 #

{α : Type u_1} → {r : SetRel α α} → (p : RelSeries r) → p.length ≠ 0 → RelSeries r

If a series a₀ -r→ a₁ -r→ ... has positive length, then a₁ -r→ ... is another series

theorem RelSeries.tail_toFun E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (len_pos : p.length ≠ 0) (a : Fin (p.length - 1 + 1)),
  (p.tail len_pos).toFun a = (Fin.tail p.toFun ∘ Fin.cast ⋯) a

theorem RelSeries.tail_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (len_pos : p.length ≠ 0), (p.tail len_pos).length = p.length - 1

theorem RelSeries.head_tail E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (len_pos : p.length ≠ 0), (p.tail len_pos).head = p.toFun 1

theorem RelSeries.last_tail E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (len_pos : p.length ≠ 0), (p.tail len_pos).last = p.last

theorem RelSeries.toList_tail E0 #

∀ {α : Type u_1} {r : SetRel α α} {p : RelSeries r} (hp : p.length ≠ 0), (p.tail hp).toList = p.toList.tail

theorem RelSeries.tail_cons E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (x : α) (hx : (x, p.head) ∈ r), (p.cons x hx).tail ⋯ = p

theorem RelSeries.cons_self_tail E1 #

∀ {α : Type u_1} {r : SetRel α α} {p : RelSeries r} (hp : p.length ≠ 0), (p.tail hp).cons p.head ⋯ = p

def RelSeries.inductionOn E1 #

{α : Type u_1} →
  {r : SetRel α α} →
    (motive : RelSeries r → Sort u_3) →
      ((x : α) → motive (RelSeries.singleton r x)) →
        ((p : RelSeries r) → (x : α) → (hx : (x, p.head) ∈ r) → motive p → motive (p.cons x hx)) →
          (p : RelSeries r) → motive p

To show a proposition p for xs : RelSeries r it suffices to show it for all singletons and to show that when p holds for xs it also holds for xs prepended with one element.

Note: This can also be used to construct data, but it does not have good definitional properties, since (p.cons x hx).tail _ = p is not a definitional equality.

theorem RelSeries.toList_snoc E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (newLast : α) (rel : (p.last, newLast) ∈ r),
  (p.snoc newLast rel).toList = p.toList ++ [newLast]

def RelSeries.eraseLast E1 #

{α : Type u_1} → {r : SetRel α α} → RelSeries r → RelSeries r

If a series a₀ -r→ a₁ -r→ ... -r→ aₙ, then a₀ -r→ a₁ -r→ ... -r→ aₙ₋₁ is another series

theorem RelSeries.eraseLast_toFun E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin (p.length - 1 + 1)), p.eraseLast.toFun i = p.toFun ⟨↑i, ⋯⟩

theorem RelSeries.eraseLast_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.eraseLast.length = p.length - 1

theorem RelSeries.head_eraseLast E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.eraseLast.head = p.head

theorem RelSeries.last_eraseLast E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.eraseLast.last = p.toFun ⟨p.length.pred, ⋯⟩

theorem RelSeries.eraseLast_last_rel_last E1 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.length ≠ 0 → (p.eraseLast.last, p.last) ∈ r

In a non-trivial series p, the last element of p.eraseLast is related to p.last

theorem RelSeries.toList_eraseLast E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r), p.length ≠ 0 → p.eraseLast.toList = p.toList.dropLast

theorem RelSeries.snoc_self_eraseLast E1 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (h : p.length ≠ 0), p.eraseLast.snoc p.last ⋯ = p

def RelSeries.inductionOn' E1 #

{α : Type u_1} →
  {r : SetRel α α} →
    (motive : RelSeries r → Sort u_3) →
      ((x : α) → motive (RelSeries.singleton r x)) →
        ((p : RelSeries r) → (x : α) → (hx : (p.last, x) ∈ r) → motive p → motive (p.snoc x hx)) →
          (p : RelSeries r) → motive p

To show a proposition p for xs : RelSeries r it suffices to show it for all singletons and to show that when p holds for xs it also holds for xs appended with one element.

def RelSeries.smash E1 #

{α : Type u_1} → {r : SetRel α α} → (p q : RelSeries r) → p.last = q.head → RelSeries r

Given two series of the form a₀ -r→ ... -r→ X and X -r→ b ---> ..., then a₀ -r→ ... -r→ X -r→ b ... is another series obtained by combining the given two.

theorem RelSeries.smash_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (p q : RelSeries r) (connect : p.last = q.head),
  (p.smash q connect).length = p.length + q.length

theorem RelSeries.smash_castLE E1 #

∀ {α : Type u_1} {r : SetRel α α} {p q : RelSeries r} (h : p.last = q.head) (i : Fin (p.length + 1)),
  (p.smash q h).toFun (Fin.castLE ⋯ i) = p.toFun i

theorem RelSeries.smash_castAdd E1 #

∀ {α : Type u_1} {r : SetRel α α} {p q : RelSeries r} (h : p.last = q.head) (i : Fin p.length),
  (p.smash q h).toFun (Fin.castAdd q.length i).castSucc = p.toFun i.castSucc

theorem RelSeries.smash_succ_castAdd E1 #

∀ {α : Type u_1} {r : SetRel α α} {p q : RelSeries r} (h : p.last = q.head) (i : Fin p.length),
  (p.smash q h).toFun (Fin.castAdd q.length i).succ = p.toFun i.succ

theorem RelSeries.smash_natAdd E1 #

∀ {α : Type u_1} {r : SetRel α α} {p q : RelSeries r} (h : p.last = q.head) (i : Fin q.length),
  (p.smash q h).toFun (Fin.natAdd p.length i).castSucc = q.toFun i.castSucc

theorem RelSeries.smash_succ_natAdd E1 #

∀ {α : Type u_1} {r : SetRel α α} {p q : RelSeries r} (h : p.last = q.head) (i : Fin q.length),
  (p.smash q h).toFun (Fin.natAdd p.length i).succ = q.toFun i.succ

theorem RelSeries.head_smash E0 #

∀ {α : Type u_1} {r : SetRel α α} {p q : RelSeries r} (h : p.last = q.head), (p.smash q h).head = p.head

theorem RelSeries.last_smash E0 #

∀ {α : Type u_1} {r : SetRel α α} {p q : RelSeries r} (h : p.last = q.head), (p.smash q h).last = q.last

def RelSeries.take E1 #

{α : Type u_1} → {r : SetRel α α} → (p : RelSeries r) → Fin (p.length + 1) → RelSeries r

Given the series a₀ -r→ … -r→ aᵢ -r→ … -r→ aₙ, the series a₀ -r→ … -r→ aᵢ.

theorem RelSeries.take_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin (p.length + 1)), (p.take i).length = ↑i

theorem RelSeries.head_take E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin (p.length + 1)), (p.take i).head = p.head

theorem RelSeries.last_take E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin (p.length + 1)), (p.take i).last = p.toFun i

def RelSeries.drop E1 #

{α : Type u_1} → {r : SetRel α α} → (p : RelSeries r) → Fin (p.length + 1) → RelSeries r

Given the series a₀ -r→ … -r→ aᵢ -r→ … -r→ aₙ, the series aᵢ₊₁ -r→ … -r→ aₙ.

theorem RelSeries.drop_length E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin (p.length + 1)), (p.drop i).length = p.length - ↑i

theorem RelSeries.head_drop E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin (p.length + 1)), (p.drop i).head = p.toFun i

theorem RelSeries.last_drop E0 #

∀ {α : Type u_1} {r : SetRel α α} (p : RelSeries r) (i : Fin (p.length + 1)), (p.drop i).last = p.last

theorem SetRel.not_finiteDimensional_iff E0 #

∀ {α : Type u_1} {r : SetRel α α} [Nonempty α], ¬r.FiniteDimensional ↔ r.InfiniteDimensional

theorem SetRel.not_infiniteDimensional_iff E0 #

∀ {α : Type u_1} {r : SetRel α α} [Nonempty α], ¬r.InfiniteDimensional ↔ r.FiniteDimensional

theorem SetRel.finiteDimensional_or_infiniteDimensional E1 #

∀ {α : Type u_1} (r : SetRel α α) [Nonempty α], r.FiniteDimensional ∨ r.InfiniteDimensional

instance SetRel.FiniteDimensional.inv E0 #

∀ {α : Type u_1} (r : SetRel α α) [r.FiniteDimensional], r.inv.FiniteDimensional

theorem SetRel.finiteDimensional_inv E0 #

∀ {α : Type u_1} {r : SetRel α α}, r.inv.FiniteDimensional ↔ r.FiniteDimensional

instance SetRel.InfiniteDimensional.inv E0 #

∀ {α : Type u_1} (r : SetRel α α) [r.InfiniteDimensional], r.inv.InfiniteDimensional

theorem SetRel.infiniteDimensional_inv E0 #

∀ {α : Type u_1} {r : SetRel α α}, r.inv.InfiniteDimensional ↔ r.InfiniteDimensional

theorem SetRel.IsWellFounded.inv_of_finiteDimensional E1 #

∀ {α : Type u_1} (r : SetRel α α) [r.FiniteDimensional], r.inv.IsWellFounded

theorem SetRel.IsWellFounded.of_finiteDimensional E1 #

∀ {α : Type u_1} (r : SetRel α α) [r.FiniteDimensional], r.IsWellFounded

abbrev FiniteDimensionalOrder E1 #

(γ : Type u_3) → [Preorder γ] → Prop

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

instance FiniteDimensionalOrder.ofUnique E0 #

∀ (γ : Type u_3) [inst : Preorder γ] [Unique γ], FiniteDimensionalOrder γ

abbrev InfiniteDimensionalOrder E1 #

(γ : Type u_3) → [Preorder γ] → Prop

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

abbrev LTSeries E1 #

(α : Type u_1) → [Preorder α] → Type u_1

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

def LTSeries.longestOf E1 #

(α : Type u_1) → [inst : Preorder α] → [FiniteDimensionalOrder α] → LTSeries α

The longest <-series when a type is finite dimensional

def LTSeries.withLength E1 #

(α : Type u_1) → [inst : Preorder α] → [InfiniteDimensionalOrder α] → ℕ → LTSeries α

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

theorem LTSeries.length_withLength E0 #

∀ (α : Type u_1) [inst : Preorder α] [inst_1 : InfiniteDimensionalOrder α] (n : ℕ), (LTSeries.withLength α n).length = n

theorem LTSeries.nonempty_of_infiniteDimensionalOrder E1 #

∀ (α : Type u_1) [inst : Preorder α] [InfiniteDimensionalOrder α], Nonempty α

if α is infinite dimensional, then α is nonempty.

theorem LTSeries.nonempty_of_finiteDimensionalOrder E1 #

∀ (α : Type u_1) [inst : Preorder α] [FiniteDimensionalOrder α], Nonempty α

theorem FiniteDimensionalOrder.wellFoundedLT E1 #

∀ (α : Type u_1) [inst : Preorder α] [FiniteDimensionalOrder α], WellFoundedLT α

This is not an instance because it causes a significant slowdown in typeclass synthesis via Submodules IsArtinian → IsNoetherian → FiniteDimensionalOrder instance.

theorem FiniteDimensionalOrder.wellFoundedGT E1 #

∀ (α : Type u_1) [inst : Preorder α] [FiniteDimensionalOrder α], WellFoundedGT α

This is not an instance because it causes a significant slowdown in typeclass synthesis via Submodules IsArtinian → IsNoetherian → FiniteDimensionalOrder instance.

theorem LTSeries.longestOf_is_longest E1 #

∀ {α : Type u_1} [inst : Preorder α] [inst_1 : FiniteDimensionalOrder α] (x : LTSeries α),
  x.length ≤ (LTSeries.longestOf α).length

theorem LTSeries.longestOf_len_unique E1 #

∀ {α : Type u_1} [inst : Preorder α] [inst_1 : FiniteDimensionalOrder α] (p : LTSeries α),
  (∀ (q : LTSeries α), q.length ≤ p.length) → p.length = (LTSeries.longestOf α).length

theorem LTSeries.strictMono E1 #

∀ {α : Type u_1} [inst : Preorder α] (x : LTSeries α), StrictMono x.toFun

theorem LTSeries.monotone E1 #

∀ {α : Type u_1} [inst : Preorder α] (x : LTSeries α), Monotone x.toFun

theorem LTSeries.head_le E1 #

∀ {α : Type u_1} [inst : Preorder α] (x : LTSeries α) (n : Fin (x.length + 1)), RelSeries.head x ≤ x.toFun n

theorem LTSeries.head_le_last E1 #

∀ {α : Type u_1} [inst : Preorder α] (x : LTSeries α), RelSeries.head x ≤ RelSeries.last x

def LTSeries.mk E1 #

{α : Type u_1} → [inst : Preorder α] → (length : ℕ) → (toFun : Fin (length + 1) → α) → StrictMono toFun → LTSeries α

An alternative constructor of LTSeries from a strictly monotone function.

theorem LTSeries.mk_length E0 #

∀ {α : Type u_1} [inst : Preorder α] (length : ℕ) (toFun : Fin (length + 1) → α) (strictMono : StrictMono toFun),
  (LTSeries.mk length toFun strictMono).length = length

theorem LTSeries.mk_toFun E0 #

∀ {α : Type u_1} [inst : Preorder α] (length : ℕ) (toFun : Fin (length + 1) → α) (strictMono : StrictMono toFun)
  (a : Fin (length + 1)), (LTSeries.mk length toFun strictMono).toFun a = toFun a

def LTSeries.injStrictMono E1 #

{α : Type u_1} → [inst : Preorder α] → (n : ℕ) → { f // StrictMono f.snd } ↪ LTSeries α

An injection from the type of strictly monotone functions with limited length to LTSeries.

def LTSeries.map E1 #

{α : Type u_1} →
  {β : Type u_2} → [inst : Preorder α] → [inst_1 : Preorder β] → LTSeries α → (f : α → β) → StrictMono f → LTSeries β

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ₙ

theorem LTSeries.map_length E0 #

∀ {α : Type u_1} {β : Type u_2} [inst : Preorder α] [inst_1 : Preorder β] (p : LTSeries α) (f : α → β)
  (hf : StrictMono f), (p.map f hf).length = p.length

theorem LTSeries.map_toFun E0 #

∀ {α : Type u_1} {β : Type u_2} [inst : Preorder α] [inst_1 : Preorder β] (p : LTSeries α) (f : α → β)
  (hf : StrictMono f) (a : Fin (p.length + 1)), (p.map f hf).toFun a = f (p.toFun a)

theorem LTSeries.head_map E0 #

∀ {α : Type u_1} {β : Type u_2} [inst : Preorder α] [inst_1 : Preorder β] (p : LTSeries α) (f : α → β)
  (hf : StrictMono f), RelSeries.head (p.map f hf) = f (RelSeries.head p)

theorem LTSeries.last_map E0 #

∀ {α : Type u_1} {β : Type u_2} [inst : Preorder α] [inst_1 : Preorder β] (p : LTSeries α) (f : α → β)
  (hf : StrictMono f), RelSeries.last (p.map f hf) = f (RelSeries.last p)

def LTSeries.comap E1 #

{α : Type u_1} →
  {β : Type u_2} →
    [inst : Preorder α] →
      [inst_1 : Preorder β] →
        LTSeries β → (f : α → β) → (∀ ⦃x y : α⦄, f x < f y → x < y) → Function.Surjective f → LTSeries α

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ᵢ}.

theorem LTSeries.comap_toFun E0 #

∀ {α : Type u_1} {β : Type u_2} [inst : Preorder α] [inst_1 : Preorder β] (p : LTSeries β) (f : α → β)
  (comap : ∀ ⦃x y : α⦄, f x < f y → x < y) (surjective : Function.Surjective f) (i : Fin (p.length + 1)),
  (p.comap f comap surjective).toFun i = ⋯.choose

theorem LTSeries.comap_length E0 #

∀ {α : Type u_1} {β : Type u_2} [inst : Preorder α] [inst_1 : Preorder β] (p : LTSeries β) (f : α → β)
  (comap : ∀ ⦃x y : α⦄, f x < f y → x < y) (surjective : Function.Surjective f),
  (p.comap f comap surjective).length = p.length

def LTSeries.range E1 #

ℕ → LTSeries ℕ

The strict series 0 < … < n in ℕ.

theorem LTSeries.length_range E0 #

∀ (n : ℕ), (LTSeries.range n).length = n

theorem LTSeries.range_apply E0 #

∀ (n : ℕ) (i : Fin (n + 1)), (LTSeries.range n).toFun i = ↑i

theorem LTSeries.head_range E0 #

∀ (n : ℕ), RelSeries.head (LTSeries.range n) = 0

theorem LTSeries.last_range E0 #

∀ (n : ℕ), RelSeries.last (LTSeries.range n) = n

theorem LTSeries.exists_relSeries_covBy E1 #

∀ {α : Type u_3} [inst : PartialOrder α] [WellFoundedLT α] [WellFoundedGT α] (s : LTSeries α),
  ∃ t i, t.toFun ∘ ⇑i = s.toFun ∧ i 0 = 0 ∧ i (Fin.last s.length) = Fin.last t.length

Any LTSeries can be refined to a CovBy-RelSeries in a bidirectionally well-founded order.

theorem LTSeries.exists_relSeries_covBy_and_head_eq_bot_and_last_eq_bot E1 #

∀ {α : Type u_3} [inst : PartialOrder α] [inst_1 : BoundedOrder α] [WellFoundedLT α] [WellFoundedGT α] (s : LTSeries α),
  ∃ t i, t.toFun ∘ ⇑i = s.toFun ∧ t.head = ⊥ ∧ t.last = ⊤

theorem LTSeries.apply_add_index_le_apply_add_index_nat E1 #

∀ (p : LTSeries ℕ) (i j : Fin (p.length + 1)), i ≤ j → p.toFun i + ↑j ≤ p.toFun j + ↑i

In ℕ, two entries in an LTSeries differ by at least the difference of their indices. (Expressed in a way that avoids subtraction).

theorem LTSeries.apply_add_index_le_apply_add_index_int E1 #

∀ (p : LTSeries ℤ) (i j : Fin (p.length + 1)), i ≤ j → p.toFun i + ↑↑j ≤ p.toFun j + ↑↑i

In ℤ, two entries in an LTSeries differ by at least the difference of their indices. (Expressed in a way that avoids subtraction).

theorem LTSeries.head_add_length_le_nat E1 #

∀ (p : LTSeries ℕ), RelSeries.head p + p.length ≤ RelSeries.last p

In ℕ, the head and tail of an LTSeries differ at least by the length of the series

theorem LTSeries.head_add_length_le_int E1 #

∀ (p : LTSeries ℤ), RelSeries.head p + ↑p.length ≤ RelSeries.last p

In ℤ, the head and tail of an LTSeries differ at least by the length of the series

theorem LTSeries.length_lt_card E1 #

∀ {α : Type u_1} [inst : Preorder α] [inst_1 : Fintype α] (s : LTSeries α), s.length < Fintype.card α

instance LTSeries.instFintypeOfDecidableLT E0 #

{α : Type u_1} → [inst : Preorder α] → [Fintype α] → [DecidableLT α] → Fintype (LTSeries α)

theorem not_finiteDimensionalOrder_iff E0 #

∀ {α : Type u_1} [inst : Preorder α] [Nonempty α], ¬FiniteDimensionalOrder α ↔ InfiniteDimensionalOrder α

theorem not_infiniteDimensionalOrder_iff E0 #

∀ {α : Type u_1} [inst : Preorder α] [Nonempty α], ¬InfiniteDimensionalOrder α ↔ FiniteDimensionalOrder α

theorem finiteDimensionalOrder_or_infiniteDimensionalOrder E1 #

∀ (α : Type u_1) [inst : Preorder α] [Nonempty α], FiniteDimensionalOrder α ∨ InfiniteDimensionalOrder α

theorem infiniteDimensionalOrder_of_strictMono E1 #

∀ {α : Type u_1} {β : Type u_2} [inst : Preorder α] [inst_1 : Preorder β] (f : α → β),
  StrictMono f → ∀ [InfiniteDimensionalOrder α], InfiniteDimensionalOrder β

If f : α → β is a strictly monotonic function and α is an infinite-dimensional type then so is β.