Documentation

CombinatorialGames.Nimber.SimplestExtension.Basic

Simplest extension theorems #

We say that a nimber x is a group when the lower set Iio x is closed under addition. Likewise, we say that x is a ring when Iio x is closed under addition and multiplication, and we say that x is a field when it's closed under addition, multiplication, and division.

The simplest extension theorem states:

This file proves the first 3/4 parts of the theorem. The last part will be proven in CombinatorialGames.Nimber.SimplestExtension.Algebraic.

The proof follows Aaron Siegel's Combinatorial Games, pp. 440-444.

Mathlib lemmas #

Order lemmas #

theorem Maximal.isGreatest {α : Type u_1} [LinearOrder α] {P : αProp} {x : α} (h : Maximal P x) :
IsGreatest {y : α | P y} x

Ordinal lemmas #

theorem Ordinal.div_two_opow_log {o : Ordinal.{u_1}} (ho : o 0) :
o / 2 ^ log 2 o = 1
theorem Ordinal.two_opow_log_add {o : Ordinal.{u_1}} (ho : o 0) :
2 ^ log 2 o + o % 2 ^ log 2 o = o
theorem Ordinal.mul_two (o : Ordinal.{u_1}) :
o * 2 = o + o
theorem Ordinal.lt_mul_iff {a b c : Ordinal.{u_1}} :
a < b * c q < c, r < b, a = b * q + r
theorem Ordinal.forall_lt_mul {b c : Ordinal.{u_1}} {P : Ordinal.{u_1}Prop} :
(∀ a < b * c, P a) q < c, r < b, P (b * q + r)
theorem Ordinal.exists_lt_mul {b c : Ordinal.{u_1}} {P : Ordinal.{u_1}Prop} :
(∃ a < b * c, P a) q < c, r < b, P (b * q + r)
theorem Ordinal.mul_add_lt {a b c d : Ordinal.{u_1}} (h₁ : c < a) (h₂ : b < d) :
a * b + c < a * d
theorem Ordinal.log_eq_zero' {b x : Ordinal.{u_1}} (hb : b 1) :
log b x = 0
theorem Ordinal.log_eq_zero_iff {b x : Ordinal.{u_1}} :
log b x = 0 b 1 x < b

Groups #

Add two nimbers as ordinal numbers.

Equations
Instances For
    structure Nimber.IsGroup (x : Nimber) :

    A nonzero nimber x is a group when Iio x is closed under addition.

    • add_lt y z : Nimber (hy : y < x) (hz : z < x) : y + z < x
    • ne_zero : x 0
    Instances For
      theorem Nimber.isGroup_iff (x : Nimber) :
      x.IsGroup (∀ ⦃y z : Nimber⦄, y < xz < xy + z < x) x 0
      theorem Nimber.IsGroup.zero_lt {x : Nimber} (h : x.IsGroup) :
      0 < x
      theorem Nimber.IsGroup.pos {x : Nimber} (h : x.IsGroup) :
      0 < x

      Alias of Nimber.IsGroup.zero_lt.

      theorem Nimber.IsGroup.sum_lt {x : Nimber} (h : x.IsGroup) {ι : Type u_2} {s : Finset ι} {f : ιNimber} (hs : ys, f y < x) :
      s.sum f < x

      Iio x as a subgroup of Nimber.

      Equations
      Instances For
        @[simp]
        theorem Nimber.val_toAddSubgroup_lt {x : Nimber} (h : x.IsGroup) (y : h.toAddSubgroup) :
        y < x
        @[simp]
        theorem Nimber.IsGroup.sSup {s : Set Nimber} (H : xs, x.IsGroup) (ne : s.Nonempty) (bdd : BddAbove s) :
        theorem Nimber.IsGroup.iSup {ι : Sort u_1} [Nonempty ι] {f : ιNimber} (H : ∀ (i : ι), (f i).IsGroup) (bdd : BddAbove (Set.range f) := by apply Nimber.bddAbove_of_small) :
        (⨆ (i : ι), f i).IsGroup
        theorem Nimber.IsGroup.le_add_self {x y : Nimber} (h : x.IsGroup) (hy : y < x) :
        x x + y
        theorem Nimber.exists_add_of_not_isGroup {x : Nimber} (h : ¬x.IsGroup) (ne : x 0) :
        y < x, z < x, y + z = x

        The first simplest extension theorem: if x ≠ 0 is not a group, then x can be written as y + z for some y, z < x.

        @[irreducible]
        theorem Nimber.IsGroup.mul_add_eq_of_lt' {x y : Ordinal.{u_1}} (h : (of x).IsGroup) (hy : y < x) (z : Ordinal.{u_1}) :
        of (x * z + y) = of (x * z) + of y

        A version of IsGroup.mul_add_eq_of_lt stated in terms of Ordinal.

        theorem Nimber.IsGroup.mul_add_eq_of_lt {x y : Nimber} (h : x.IsGroup) (hy : y < x) (z : Ordinal.{u_1}) :
        of (val x * z + val y) = of (val x * z) + y
        theorem Nimber.IsGroup.add_eq_of_lt {x y : Nimber} (h : x.IsGroup) (hy : y < x) :
        of (val x + val y) = x + y
        theorem Nimber.IsGroup.add_eq_of_lt' {x y : Ordinal.{u_1}} (h : (of x).IsGroup) (hy : y < x) :
        x + y = val (of x + of y)

        A version of IsGroup.add_eq_of_lt stated in terms of Ordinal.

        @[simp, irreducible]
        @[simp]
        theorem Nimber.two_opow_log_add {o : Ordinal.{u_1}} (ho : o 0) :
        of (2 ^ Ordinal.log 2 o) + of (o % 2 ^ Ordinal.log 2 o) = of o
        theorem Nimber.add_lt_of_log_eq {a b : Ordinal.{u_1}} (ha₀ : a 0) (hb₀ : b 0) (h : Ordinal.log 2 a = Ordinal.log 2 b) :
        of a + of b < of (2 ^ Ordinal.log 2 a)
        theorem Nimber.exists_isGroup_add_lt {x : Nimber} (hx : x 0) :
        yx, y.IsGroup x + y < y

        The nimbers that are groups are exactly the powers of 2.

        A version of isGroup_iff_zero_or_mem_range_two_opow stated in terms of Ordinal.

        theorem Nimber.IsGroup.opow {x : Nimber} (h : x.IsGroup) (a : Ordinal.{u_1}) :
        (of (val x ^ a)).IsGroup
        theorem Nimber.IsGroup.pow {x : Nimber} (h : x.IsGroup) (n : ) :
        (of (val x ^ n)).IsGroup

        Rings #

        Multiply two nimbers as ordinal numbers.

        Equations
        Instances For
          structure Nimber.IsRing (x : Nimber) extends x.IsGroup :

          A nimber x is a ring when 1 < x and Iio x is closed under addition and multiplication.

          Instances For
            theorem Nimber.isRing_iff (x : Nimber) :
            x.IsRing x.IsGroup (∀ ⦃y z : Nimber⦄, y < xz < xy * z < x) x 1
            theorem Nimber.IsRing.one_lt {x : Nimber} (h : x.IsRing) :
            1 < x
            theorem Nimber.IsRing.pow_lt {x y : Nimber} (h : x.IsRing) {n : } (hy : y < x) :
            y ^ n < x
            @[simp]

            Iio x as a subring of Nimber.

            Equations
            Instances For
              @[simp]
              theorem Nimber.val_toSubring_lt {x : Nimber} (h : x.IsRing) (y : h.toSubring) :
              y < x
              @[simp]
              theorem Nimber.mem_toSubring_iff {x y : Nimber} (h : x.IsRing) :
              y h.toSubring y < x
              theorem Nimber.IsRing.sSup {s : Set Nimber} (H : xs, x.IsRing) (ne : s.Nonempty) (bdd : BddAbove s) :
              theorem Nimber.IsRing.iSup {ι : Sort u_1} [Nonempty ι] {f : ιNimber} (H : ∀ (i : ι), (f i).IsRing) (bdd : BddAbove (Set.range f) := by apply Nimber.bddAbove_of_small) :
              (⨆ (i : ι), f i).IsRing
              theorem Nimber.IsGroup.exists_mul_of_not_isRing {x : Nimber} (h' : x.IsGroup) (h : ¬x.IsRing) (ne : x 1) :
              y < x, z < x, y * z = x

              The second simplest extension theorem: if x ≠ 1 is a group but not a ring, then x can be written as y * z for some y, z < x.

              @[irreducible]
              theorem Nimber.IsGroup.mul_eq_of_lt' {x y z w : Ordinal.{u_1}} (hx : (of x).IsGroup) (hy : (of y).IsGroup) (hw : (of w).IsGroup) (hyx : y x) (hzy : z < y) (hyw : y w) (H : z < y, (of z)⁻¹ < of w) (H' : ∀ ⦃a b : Ordinal.{u_1}⦄, a < xb < wof a * of b < of x) :
              x * z = val (of x * of z)

              A version of IsGroup.mul_eq_of_lt stated in terms of Ordinal.

              theorem Nimber.IsGroup.mul_eq_of_lt {x y z w : Nimber} (hx : x.IsGroup) (hy : y.IsGroup) (hw : w.IsGroup) (hyx : y x) (hzy : z < y) (hyw : y w) (H : z < y, z⁻¹ < w) (H' : ∀ ⦃a b : Nimber⦄, a < xb < wa * b < x) :
              of (val x * val z) = x * z
              theorem Nimber.IsRing.mul_eq_of_lt' {x y z : Ordinal.{u_1}} (hx : (of x).IsRing) (hy : (of y).IsGroup) (hyx : y x) (hzy : z < y) (H : z < y, (of z)⁻¹ < of x) :
              x * z = val (of x * of z)

              A version of IsRing.mul_eq_of_lt stated in terms of Ordinal.

              theorem Nimber.IsRing.mul_eq_of_lt {x y z : Nimber} (hx : x.IsRing) (hy : y.IsGroup) (hyx : y x) (hzy : z < y) (H : z < y, z⁻¹ < x) :
              of (val x * val z) = x * z

              Fields #

              structure Nimber.IsField (x : Nimber) extends x.IsRing :

              A nimber x is a field when 1 < x and Iio x is closed under addition, multiplication, and division.

              For simplicity, the constructor takes a redundant y ≠ 0 assumption. The lemma IsField.inv_lt proves that this theorem applies when y = 0 as well.

              Instances For
                theorem Nimber.isField_iff (x : Nimber) :
                x.IsField x.IsRing ∀ ⦃y : Nimber⦄, y 0y < xy⁻¹ < x
                theorem Nimber.IsField.inv_lt {x y : Nimber} (h : x.IsField) (hy : y < x) :
                y⁻¹ < x
                theorem Nimber.IsField.div_lt {x y z : Nimber} (h : x.IsField) (hy : y < x) (hz : z < x) :
                y / z < x
                @[simp]

                Iio x as a subring of Nimber.

                Equations
                Instances For
                  @[simp]
                  theorem Nimber.val_toSubfield_lt {x : Nimber} (h : x.IsField) (y : h.toSubfield) :
                  y < x
                  @[simp]
                  theorem Nimber.mem_toSubfield_iff {x y : Nimber} (h : x.IsField) :
                  theorem Nimber.IsField.mul_eq_of_lt {x y z : Nimber} (hx : x.IsRing) (hy : y.IsField) (hyx : y x) (hzy : z < y) :
                  of (val x * val z) = x * z
                  theorem Nimber.IsField.mul_eq_of_lt' {x y z : Ordinal.{u_1}} (hx : (of x).IsRing) (hy : (of y).IsField) (hyx : y x) (hzy : z < y) :
                  x * z = val (of x * of z)

                  A version of IsField.mul_eq_of_lt stated in terms of Ordinal.

                  theorem Nimber.IsRing.inv_lt_of_not_isField {x y : Nimber} (h' : x.IsRing) (h : ¬x.IsField) (hy : y < x⁻¹) :
                  y⁻¹ < x
                  theorem Nimber.IsRing.inv_le_of_not_isField {x y : Nimber} (h' : x.IsRing) (h : ¬x.IsField) (hy : y x⁻¹) :

                  The third simplest extension theorem: if x is a ring but not a field, then x can be written as y⁻¹ for some y < x. In simpler wording, x⁻¹ < x.