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.Types.Arithmetic

23 declarations. Mathlib docs · Source

Arithmetic on OrderTypes

We define addition and multiplication of OrderTypes, the isomorphism classes of linear orders, via the lexicographic sum and the lexicographic product. These make OrderType into a monoid. We also define the cardinality of an order type.

Note that, as for ordinals, multiplication is "reversed": type α * type β := type (Lex (β × α)) (see OrderType.type_lex_prod).

Main definitions

  • OrderType.card o: the cardinality of an OrderType o.
  • o₁ + o₂: the lexicographic sum of order types, which forms an AddMonoid.
  • o₁ * o₂: the lexicographic product of order types, which forms a MonoidWithZero.

Notation

The following are notations in the OrderType namespace:

  • η is a notation for the order type of ℚ with its natural order.
  • θ is a notation for the order type of ℝ with its natural order.

References

  • https://en.wikipedia.org/wiki/Order_type
  • [Dauben, J. W., Georg Cantor: His Mathematics and Philosophy of the Infinite. Princeton, NJ: Princeton University Press, 1990.][dauben_1990]
  • [Enderton, Herbert B., Elements of Set Theory. United Kingdom: Academic Press, 1977.][enderton_1977]

Tags

order type, order isomorphism, linear order

theorem OrderType.liftOn₂.congr_simp E1 #

∀ {δ : Sort v} (o₁ o₁_1 : OrderType.{u_1}),
  o₁ = o₁_1 →
    ∀ (o₂ o₂_1 : OrderType.{u_2}),
      o₂ = o₂_1 →
        ∀ (f f_1 : (α : Type u_1) → [LinearOrder α] → (β : Type u_2) → [LinearOrder β] → δ) (e_f : f = f_1)
          (c :
            ∀ (α₁ : Type u_1) [inst : LinearOrder α₁] (β₁ : Type u_2) [inst_1 : LinearOrder β₁] (α₂ : Type u_1)
              [inst_2 : LinearOrder α₂] (β₂ : Type u_2) [inst_3 : LinearOrder β₂],
              OrderType.type α₁ = OrderType.type α₂ → OrderType.type β₁ = OrderType.type β₂ → f α₁ β₁ = f α₂ β₂),
          o₁.liftOn₂ o₂ f c = o₁_1.liftOn₂ o₂_1 f_1 ⋯

theorem OrderType.liftOn.congr_simp E1 #

∀ {δ : Sort v} (o o_1 : OrderType.{u_1}),
  o = o_1 →
    ∀ (f f_1 : (α : Type u_1) → [LinearOrder α] → δ) (e_f : f = f_1)
      (c :
        ∀ (α : Type u_1) [inst : LinearOrder α] (β : Type u_1) [inst_1 : LinearOrder β],
          OrderType.type α = OrderType.type β → f α = f β),
      o.liftOn f c = o_1.liftOn f_1 ⋯

instance OrderType.instZeroLEOneClass E0 #

ZeroLEOneClass OrderType.{u_1}

instance OrderType.instHAdd E0 #

HAdd OrderType.{u} OrderType.{v} OrderType.{max u v}

instance OrderType.instAdd E0 #

Add OrderType.{u}

theorem OrderType.type_lex_sum E0 #

∀ (α : Type u) (β : Type v) [inst : LinearOrder α] [inst_1 : LinearOrder β],
  OrderType.type (α ⊕ₗ β) = OrderType.type α + OrderType.type β

instance OrderType.instAddMonoid E0 #

AddMonoid OrderType.{u}

instance OrderType.instHMul E0 #

HMul OrderType.{u} OrderType.{v} OrderType.{max u v}

instance OrderType.instMul E0 #

Mul OrderType.{u}

theorem OrderType.type_lex_prod E0 #

∀ (α : Type u) (β : Type v) [inst : LinearOrder α] [inst_1 : LinearOrder β],
  OrderType.type (Lex (α × β)) = OrderType.type β * OrderType.type α

instance OrderType.instMonoid E0 #

Monoid OrderType.{u}

def OrderType.card E1 #

OrderType.{u_1} → Cardinal.{u_1}

The cardinal of an OrderType is the cardinality of any type on which a relation with that order type is defined.

theorem OrderType.card_type E0 #

∀ {α : Type u} [inst : LinearOrder α], (OrderType.type α).card = Cardinal.mk α

theorem OrderType.card_mono E1 #

∀ {o₁ o₂ : OrderType.{u_1}}, o₁ ≤ o₂ → o₁.card ≤ o₂.card

theorem OrderType.card_monotone E1 #

Monotone OrderType.card

theorem OrderType.card_zero E0 #

OrderType.card 0 = 0

theorem OrderType.card_one E0 #

OrderType.card 1 = 1

instance OrderType.instOfNat E0 #

(n : ℕ) → OfNat OrderType.{0} n

instance OrderType.instLeftDistribClass E0 #

LeftDistribClass OrderType.{u_1}

def OrderType.eta E1 #

OrderType.{0}

The order type of the rational numbers.

Conventions for notations in identifiers:

  • The recommended spelling of η in identifiers is eta.

def OrderType.theta E1 #

OrderType.{0}

The order type of the real numbers.

Conventions for notations in identifiers:

  • The recommended spelling of θ in identifiers is theta.

def OrderType.termη E1 #

Lean.ParserDescr

The order type of the rational numbers.

Conventions for notations in identifiers:

  • The recommended spelling of η in identifiers is eta.

def OrderType.termθ E1 #

Lean.ParserDescr

The order type of the real numbers.

Conventions for notations in identifiers:

  • The recommended spelling of θ in identifiers is theta.