Unordered neighbourhood and exceptional-window tests

Lax977378.RecordTests · concepts/Lax977378/RecordTests.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

    A diagram enumerates a finite induced graph with its original unary predicates. The window condition says exactly which vertices are within a fixed radius of one of the marked vertices. A pointed type is a one-centre window with a distinguished root. A finite record can prescribe truncated type counts and require its distinguished rare vertices to be precisely those outside its list of frequent types, using the very same witnesses as its window.

    Concept map
    3 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on ADescendants are omitted for concepts with more than 10 descendants.
    Evidence

    Each proof establishes this claim relative to its assumptions.

    Lean source view on GitHub

    1import Lax977378.OuterContexts
    2
    3/-!
    4---
    5title: Unordered neighbourhood and exceptional-window tests
    6type: lemma
    7---
    8A diagram enumerates a finite induced graph with its original unary predicates.
    9The window condition says exactly which vertices are within a fixed radius
    10of one of the marked vertices. A pointed type is a one-centre window with
    11a distinguished root. A finite record can prescribe truncated type counts
    12and require its distinguished rare vertices to be precisely those outside
    13its list of frequent types, using the very same witnesses as its window.
    14-/
    15namespace Lax977378.RecordTests
    16open Lax977378.Logic Lax977378.OuterContexts
    17
    18def Diagram {c : Nat} (W G : Graph c) (y : Fin W.size → Fin G.size) : Prop :=
    19 Function.Injective y ∧ (∀ i j, W.edge i j ↔ G.edge (y i) (y j)) ∧
    20 ∀ p i, W.pred p i ↔ G.pred p (y i)
    21
    22def Window {c : Nat} (W G : Graph c) (r : Nat) (marked : Finset (Fin W.size))
    23 (y : Fin W.size → Fin G.size) : Prop :=
    24 Diagram W G y ∧ ∀ x, (∃ i, y i = x) ↔ ∃ i ∈ marked, within G r (y i) x
    25
    26structure Pointed (c : Nat) where
    27 pattern : Graph c
    28 center : Fin pattern.size
    29
    30def Occurs {c : Nat} (t : Pointed c) (r : Nat) (G : Graph c) (x : Fin G.size) : Prop :=
    31 ∃ y, Window t.pattern G r {t.center} y ∧ y t.center = x
    32
    33def AtLeast {c : Nat} (t : Pointed c) (r k : Nat) (G : Graph c) : Prop :=
    34 ∃ xs : Fin k → Fin G.size, Function.Injective xs ∧ ∀ i, Occurs t r G (xs i)
    35
    36structure TestData (c : Nat) where
    37 radius : Nat
    38 windowRadius : Nat
    39 windowGraph : Graph c
    40 marked : Finset (Fin windowGraph.size)
    41 rare : Finset (Fin windowGraph.size)
    42 cap : Nat
    43 counts : List (Pointed c × Nat)
    44 frequent : List (Pointed c)
    45
    46def Passes {c : Nat} (D : TestData c) (G : Graph c) : Prop :=
    47 (∀ tv ∈ D.counts, tv.2 ≤ D.cap ∧ AtLeast tv.1 D.radius tv.2 G ∧
    48 (tv.2 < D.cap → ¬ AtLeast tv.1 D.radius (tv.2+1) G)) ∧
    49 ∃ y, Window D.windowGraph G D.windowRadius D.marked y ∧
    50 ∀ x, (∃ i ∈ D.rare, y i = x) ↔ ¬ ∃ t ∈ D.frequent, Occurs t D.radius G x
    51
    52axiom recordTest {c : Nat} (D : TestData c) :
    53 ∃ f : Formula c, Plain [] f ∧ ∀ G, Unordered G f ↔ Passes D G
    54
    55end Lax977378.RecordTests
    56
    Show Proof

    Discussion

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

    Loading discussion…