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

#NAE-SAT and #Set Splitting

Lax859101.CountingNaeSat · concepts/Lax859101/CountingNaeSat.lean · lax-859101

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

    A not-all-equal model of a CNF instance is a set of variables such that every clause has a true literal and a false one; #NAE-SAT counts them. On a set system, a splitting color class is a set of ground elements meeting every set of the family and its complement; #Set Splitting counts them.

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

    Lean source view on GitHub

    1import Mathlib.Algebra.BigOperators.Ring.Finset
    2import Mathlib.Algebra.Order.BigOperators.Group.Finset
    3import Mathlib.Data.Fintype.BigOperators
    4import Mathlib.SetTheory.Cardinal.Finite
    5import Mathlib.Algebra.Group.Action.Defs
    6import Mathlib.Tactic.Ring
    7import Mathlib.Order.PiLex
    8import Mathlib.Data.Prod.Lex
    9import Mathlib.Data.Fintype.EquivFin
    10import Mathlib.ModelTheory.Order
    11import Mathlib.ModelTheory.Semantics
    12import Mathlib.ModelTheory.Complexity
    13import Mathlib.Tactic.FinCases
    14import Mathlib.Logic.Equiv.Fin.Basic
    15import Mathlib.Data.Fintype.Lattice
    16import Mathlib.Data.Finite.Sigma
    17import Mathlib.Order.Lattice.Nat
    18import Mathlib.Data.Set.Card
    19import Mathlib.Data.Fintype.Pigeonhole
    20import Mathlib.Dynamics.FixedPoints.Basic
    21import Mathlib.ModelTheory.Syntax
    22import Mathlib.Data.Fintype.Card
    23import Mathlib.Logic.Equiv.Prod
    24import Mathlib.Data.Set.Finite.Lemmas
    25import Lax366625.CountingSat
    26import Lax799700.NaeSat
    27import Lax799700.SetFamily
    28import Lax904597.Sat
    29import Lax366625.CountingProblems
    30
    31/-!
    32---
    33title: #NAE-SAT and #Set Splitting
    34type: definition
    35---
    36A not-all-equal model of a CNF instance is a set of variables such that
    37every clause has a true literal and a false one; #NAE-SAT counts them. On a
    38set system, a splitting color class is a set of ground elements meeting
    39every set of the family and its complement; #Set Splitting counts them.
    40-/
    41
    42namespace Lax859101.CountingNaeSat
    43
    44open Lax366625.CountingSat Lax799700.NaeSat Lax799700.SetFamily Lax904597.Sat
    45
    46open FirstOrder
    47
    48open Language Structure
    49
    50section Problem
    51
    52variable (A : Type) [sat.Structure A]
    53
    54/-- A **not-all-equal model**: a not-all-equal proper set of variables of the
    55formula. -/
    56def NAEModel (ν : A → Prop) : Prop :=
    57 NAEProper ν ∧ ∀ x : A, ν x → SatOccurs A x
    58
    59end Problem
    60
    61section Split
    62
    63variable (A : Type) [setSystem.Structure A]
    64
    65/-- A **splitting color class**: a set of ground elements meeting every set of
    66the family and its complement. -/
    67def SplitColoring (S : A → Prop) : Prop :=
    68 (∀ x : A, S x → SSElem x) ∧ ∀ f : A, SSFam f →
    69 (∃ x : A, SSElem x ∧ SSMem x f ∧ S x) ∧ ∃ x : A, SSElem x ∧ SSMem x f ∧ ¬S x
    70
    71end Split
    72
    73open Lax366625.CountingProblems
    74
    75/-- **#NAE-SAT**, as a counting problem. -/
    76noncomputable def SharpNAESAT : CountingProblem Lax904597.Sat.sat :=
    77 CountingProblem.ofFun fun A _ =>
    78 Nat.card {ν : A → Prop // NAEModel A ν}
    79
    80/-- **#Set Splitting**, as a counting problem. -/
    81noncomputable def SharpSetSplitting : CountingProblem Lax799700.SetFamily.setSystem :=
    82 CountingProblem.ofFun fun A _ =>
    83 Nat.card {S : A → Prop // SplitColoring A S}
    84
    85end Lax859101.CountingNaeSat
    86

    Discussion

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

    Loading discussion…