Context labels in the intervals of an ordered partition

Lax977378.Blocks · concepts/Lax977378/Blocks.lean · lax-977378

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Lemma

    The map from vertices to block indices is monotone. Each nonempty block has a first and a last vertex. A block label contributes once whenever any vertex of that block meets the gap. The internal interval and both exterior intervals are stated pointwise, so identical labels on different blocks are allowed.

    Concept map
    1 concept
    100%
    Proven claimThis conceptDescendants are omitted for concepts with more than 10 descendants.
    Evidence

    This concept declares 2 statements. Each proof establishes one of them relative to its assumptions.

    1 interval proven

    2 outerIntervals proven

    Lean source view on GitHub

    1import Mathlib.Order.Monotone.Basic
    2
    3/-!
    4---
    5title: Context labels in the intervals of an ordered partition
    6type: lemma
    7---
    8The map from vertices to block indices is monotone. Each nonempty block has
    9a first and a last vertex. A block label contributes once whenever any vertex
    10of that block meets the gap. The internal interval and both exterior intervals
    11are stated pointwise, so identical labels on different blocks are allowed.
    12-/
    13namespace Lax977378.Blocks
    14
    15structure Partition (V I : Type) [LinearOrder V] [LinearOrder I] where
    16 block : V → I
    17 monotone : Monotone block
    18 first : I → V
    19 last : I → V
    20 first_mem : ∀ i, block (first i) = i
    21 last_mem : ∀ i, block (last i) = i
    22 first_le : ∀ v, first (block v) ≤ v
    23 le_last : ∀ v, v ≤ last (block v)
    24
    25axiom interval {V I L : Type} [LinearOrder V] [LinearOrder I] (P : Partition V I)
    26 (label : I → L) (a b : V) (hab : P.block a < P.block b) (l : L) :
    27 (∃ x, a < x ∧ x < b ∧ label (P.block x) = l) ↔
    28 (∃ i, P.block a < i ∧ i < P.block b ∧ label i = l) ∨
    29 (a ≠ P.last (P.block a) ∧ label (P.block a) = l) ∨
    30 (b ≠ P.first (P.block b) ∧ label (P.block b) = l)
    31
    32axiom outerIntervals {V I L : Type} [LinearOrder V] [LinearOrder I] (P : Partition V I)
    33 (label : I → L) (a : V) (l : L) :
    34 ((∃ x, x < a ∧ label (P.block x) = l) ↔
    35 (∃ i, i < P.block a ∧ label i = l) ∨
    36 (a ≠ P.first (P.block a) ∧ label (P.block a) = l)) ∧
    37 ((∃ x, a < x ∧ label (P.block x) = l) ↔
    38 (∃ i, P.block a < i ∧ label i = l) ∨
    39 (a ≠ P.last (P.block a) ∧ label (P.block a) = l))
    40
    41end Lax977378.Blocks
    42
    Show ProofShow Proof

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…