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

Counting feedback vertex and arc sets

Lax280166.CountingFeedbackSets · concepts/Lax280166/CountingFeedbackSets.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 directed graph with kk marked vertices, #Feedback Vertex Set counts the sets of exactly kk vertices whose removal leaves no directed cycle. On a finite directed graph with a marked relation of kk pairs, #Feedback Arc Set counts the sets of exactly kk arcs whose removal leaves no directed cycle.

    Concept map
    10 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 Mathlib.Data.Set.Finite.Lemmas
    23import Lax799700.CliqueFamily
    24import Lax799700.Feedback
    25import Mathlib.SetTheory.Cardinal.Finite
    26import Lax366625.CountingProblems
    27
    28/-!
    29---
    30title: Counting feedback vertex and arc sets
    31type: definition
    32---
    33On a finite directed graph with kk marked vertices, #Feedback Vertex Set
    34counts the sets of exactly kk vertices whose removal leaves no directed
    35cycle. On a finite directed graph with a marked relation of kk pairs,
    36#Feedback Arc Set counts the sets of exactly kk arcs whose removal leaves no
    37directed cycle.
    38-/
    39
    40namespace Lax280166.CountingFeedbackSets
    41
    42open Lax799700.CliqueFamily Lax799700.Feedback
    43
    44open FirstOrder
    45
    46open Language Structure
    47
    48section Generic
    49
    50variable {A B : Type}
    51
    52/-- The removal of the set `C` leaves an acyclic digraph, and `C` has exactly
    53as many elements as the `Kp`-marked set. -/
    54def FeedbackOfSizeOn (Adjp : A → A → Prop) (Kp : A → Prop) (C : A → Prop) : Prop :=
    55 AcyclicRel (SurvivingArc Adjp C) ∧ {x | C x}.ncard = {x | Kp x}.ncard
    56
    57end Generic
    58
    59section Problem
    60
    61variable (A : Type) [markedGraph.Structure A]
    62
    63/-- The set `C` is a feedback vertex set with exactly as many vertices as the
    64marked set, in a finite marked digraph. -/
    65def FvsOfSize (C : A → Prop) : Prop :=
    66 Finite A ∧ FeedbackOfSizeOn (fun x y : A => MGAdj x y) (fun x => MGMarked x) C
    67
    68end Problem
    69
    70open FirstOrder
    71
    72open Language Structure
    73
    74section Generic
    75
    76variable {A B : Type}
    77
    78/-- The relation `F` is a set of arcs whose removal leaves an acyclic digraph,
    79with exactly as many pairs as the marked relation. -/
    80def FasOfSizeOn (Adjp Kp : A → A → Prop) (F : A → A → Prop) : Prop :=
    81 (∀ a b, F a b → Adjp a b) ∧ AcyclicRel (UncutArc Adjp F) ∧
    82 {p : A × A | F p.1 p.2}.ncard = {p : A × A | Kp p.1 p.2}.ncard
    83
    84end Generic
    85
    86section Problem
    87
    88variable (A : Type) [markedArcGraph.Structure A]
    89
    90/-- The relation `F` is a feedback arc set with exactly as many arcs as the
    91marked relation has pairs, in a finite arc-marked digraph. -/
    92def FasOfSize (F : A → A → Prop) : Prop :=
    93 Finite A ∧ FasOfSizeOn (fun a b : A => MAGAdj a b) (fun a b => MAGMarked a b) F
    94
    95end Problem
    96
    97open Lax366625.CountingProblems
    98
    99/-- **#Feedback Vertex Set**, as a counting problem. -/
    100noncomputable def SharpFeedbackVertexSet : CountingProblem Lax799700.CliqueFamily.markedGraph :=
    101 CountingProblem.ofFun fun A _ =>
    102 Nat.card {C : A → Prop // FvsOfSize A C}
    103
    104/-- **#Feedback Arc Set**, as a counting problem. -/
    105noncomputable def SharpFeedbackArcSet : CountingProblem Lax799700.Feedback.markedArcGraph :=
    106 CountingProblem.ofFun fun A _ =>
    107 Nat.card {F : A → A → Prop // FasOfSize A F}
    108
    109end Lax280166.CountingFeedbackSets
    110

    Discussion

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

    Loading discussion…