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.Interval.Finset.Box

11 declarations. Mathlib docs · Source

Decomposing a locally finite ordered ring into boxes

This file proves that any locally finite ordered ring can be decomposed into "boxes", namely differences of consecutive intervals.

Implementation notes

We don't need the full ring structure, only that there is an order embedding ℤ →

General locally finite ordered ring

Product of locally finite ordered rings

ℤ × ℤ

def Finset.box E1 #

{α : Type u_1} → [Ring α] → [inst : PartialOrder α] → [LocallyFiniteOrder α] → [DecidableEq α] → ℕ → Finset α

Hollow box centered at 0 : α going from -n to n.

theorem Finset.box_zero E0 #

∀ {α : Type u_1} [inst : Ring α] [inst_1 : PartialOrder α] [inst_2 : LocallyFiniteOrder α] [inst_3 : DecidableEq α],
  Finset.box 0 = {0}

theorem Finset.box_succ_eq_sdiff E1 #

∀ {α : Type u_1} [inst : Ring α] [inst_1 : PartialOrder α] [IsOrderedRing α] [inst_3 : LocallyFiniteOrder α]
  [inst_4 : DecidableEq α] (n : ℕ), Finset.box (n + 1) = Finset.Icc (-↑n.succ) ↑n.succ \ Finset.Icc (-↑n) ↑n

theorem Finset.disjoint_box_succ_prod E1 #

∀ {α : Type u_1} [inst : Ring α] [inst_1 : PartialOrder α] [IsOrderedRing α] [inst_3 : LocallyFiniteOrder α]
  [inst_4 : DecidableEq α] (n : ℕ), Disjoint (Finset.box (n + 1)) (Finset.Icc (-↑n) ↑n)

theorem Finset.box_succ_union_prod E0 #

∀ {α : Type u_1} [inst : Ring α] [inst_1 : PartialOrder α] [IsOrderedRing α] [inst_3 : LocallyFiniteOrder α]
  [inst_4 : DecidableEq α] (n : ℕ), Finset.box (n + 1) ∪ Finset.Icc (-↑n) ↑n = Finset.Icc (-↑n.succ) ↑n.succ

theorem Finset.box_succ_disjUnion E1 #

∀ {α : Type u_1} [inst : Ring α] [inst_1 : PartialOrder α] [inst_2 : IsOrderedRing α] [inst_3 : LocallyFiniteOrder α]
  [inst_4 : DecidableEq α] (n : ℕ),
  (Finset.box (n + 1)).disjUnion (Finset.Icc (-↑n) ↑n) ⋯ = Finset.Icc (-↑n.succ) ↑n.succ

theorem Finset.zero_mem_box E0 #

∀ {α : Type u_1} [inst : Ring α] [inst_1 : PartialOrder α] [IsOrderedRing α] [inst_3 : LocallyFiniteOrder α] {n : ℕ}
  [inst_4 : DecidableEq α], 0 ∈ Finset.box n ↔ n = 0

theorem Prod.card_box_succ E0 #

∀ {α : Type u_1} {β : Type u_2} [inst : Ring α] [inst_1 : PartialOrder α] [IsOrderedRing α] [inst_3 : Ring β]
  [inst_4 : PartialOrder β] [IsOrderedRing β] [inst_6 : LocallyFiniteOrder α] [inst_7 : LocallyFiniteOrder β]
  [inst_8 : DecidableEq α] [inst_9 : DecidableEq β] [inst_10 : DecidableLE (α × β)] (n : ℕ),
  (Finset.box (n + 1)).card =
    (Finset.Icc (-↑n.succ) ↑n.succ).card * (Finset.Icc (-↑n.succ) ↑n.succ).card -
      (Finset.Icc (-↑n) ↑n).card * (Finset.Icc (-↑n) ↑n).card

theorem Int.card_box E1 #

∀ {n : ℕ}, n ≠ 0 → (Finset.box n).card = 8 * n

theorem Int.mem_box E0 #

∀ {x : ℤ × ℤ} {n : ℕ}, x ∈ Finset.box n ↔ max x.1.natAbs x.2.natAbs = n

theorem Int.existsUnique_mem_box E1 #

∀ (x : ℤ × ℤ), ∃! n, x ∈ Finset.box n