While this submission is a draft, it cannot be used by other submissions.

Counting dominating sets

Lax280166.CountingDominatingSets · concepts/Lax280166/CountingDominatingSets.lean · lax-280166

definition

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

    Definition

    On a finite marked graph with kk marked vertices, #Dominating Set counts the sets of exactly kk vertices such that every vertex is in the set or adjacent to one of its elements.

    Concept map
    9 concepts; 25 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Mathlib.Tactic.FinCases
    2import Mathlib.Order.PiLex
    3import Mathlib.Data.Prod.Lex
    4import Mathlib.Data.Fintype.EquivFin
    5import Mathlib.ModelTheory.Order
    6import Mathlib.ModelTheory.Semantics
    7import Mathlib.ModelTheory.Complexity
    8import Mathlib.Logic.Equiv.Fin.Basic
    9import Mathlib.Data.Fintype.Lattice
    10import Mathlib.Data.Finite.Sigma
    11import Mathlib.Order.Lattice.Nat
    12import Mathlib.Data.Set.Card
    13import Mathlib.Data.Fintype.Pigeonhole
    14import Mathlib.Dynamics.FixedPoints.Basic
    15import Mathlib.ModelTheory.Syntax
    16import Mathlib.Algebra.Order.BigOperators.Group.Finset
    17import Mathlib.Data.Fintype.Card
    18import Mathlib.SetTheory.Cardinal.Finite
    19import Mathlib.Data.Fintype.Sort
    20import Mathlib.Order.Hom.Set
    21import Mathlib.Logic.Equiv.Prod
    22import Lax799700.CliqueFamily
    23import Mathlib.SetTheory.Cardinal.Finite
    24import Lax366625.CountingProblems
    25
    26/-!
    27---
    28title: Counting dominating sets
    29type: definition
    30---
    31On a finite marked graph with kk marked vertices, #Dominating Set counts the
    32sets of exactly kk vertices such that every vertex is in the set or adjacent
    33to one of its elements.
    34-/
    35
    36namespace Lax280166.CountingDominatingSets
    37
    38open Lax799700.CliqueFamily
    39
    40open FirstOrder
    41
    42open Language Structure
    43
    44section Generic
    45
    46variable {A B : Type}
    47
    48/-- The set `D` dominates every vertex and has exactly as many elements as the
    49`Kp`-marked set. -/
    50def DomOfSizeOn (Adjp : A → A → Prop) (Kp : A → Prop) (D : A → Prop) : Prop :=
    51 (∀ v, D v ∨ ∃ u, D u ∧ Adjp u v) ∧ {v | D v}.ncard = {v | Kp v}.ncard
    52
    53end Generic
    54
    55section Solutions
    56
    57variable (A : Type) [markedGraph.Structure A]
    58
    59/-- The set `D` is a dominating set with exactly as many vertices as the marked
    60set, in a finite marked graph. -/
    61def DomSetOfSize (D : A → Prop) : Prop :=
    62 Finite A ∧ DomOfSizeOn (fun u v : A => MGAdj u v) (fun v => MGMarked v) D
    63
    64end Solutions
    65
    66open Lax366625.CountingProblems
    67
    68/-- **#Dominating Set**, as a counting problem. -/
    69noncomputable def SharpDominatingSet : CountingProblem Lax799700.CliqueFamily.markedGraph :=
    70 CountingProblem.ofFun fun A _ =>
    71 Nat.card {D : A → Prop // DomSetOfSize A D}
    72
    73end Lax280166.CountingDominatingSets
    74

    Discussion

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

    Loading discussion…