Tautology of DNF formulas

Lax564036.Tautology · concepts/Lax564036/Tautology.lean · lax-564036

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

    An instance is a structure over the vocabulary of CNF instances of the NP core, read here as a formula in disjunctive normal form: its clauses are terms, conjunctions of literals. It is a tautology when every assignment of truth values to its elements satisfies all the literals of some term. TAUT is the decision problem of the structures isomorphic to a tautology.

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

    Lean source view on GitHub

    1import Mathlib.ModelTheory.Semantics
    2import Lax904597.Problems
    3import Lax485149.Problems
    4import Lax904597.Sat
    5
    6/-!
    7---
    8title: Tautology of DNF formulas
    9type: definition
    10---
    11An instance is a structure over the vocabulary of CNF instances of the NP
    12core, read here as a formula in disjunctive normal form: its clauses are
    13terms, conjunctions of literals. It is a tautology when every assignment of
    14truth values to its elements satisfies all the literals of some term. TAUT
    15is the decision problem of the structures isomorphic to a tautology.
    16-/
    17
    18namespace Lax564036.Tautology
    19
    20open Lax904597.Problems Lax485149.Problems
    21
    22open Lax904597.Sat
    23
    24open FirstOrder
    25
    26open Language Structure BoundedFormula
    27
    28section Taut
    29
    30variable (A : Type) [sat.Structure A]
    31
    32/-- A CNF instance of the NP core, read as a formula in disjunctive normal form,
    33is a *tautology* when every assignment of truth values to its elements makes
    34some term true – that is, satisfies every literal of that term. (Elements that
    35are not variables of the formula may be assigned arbitrarily; they are harmless
    36since no term mentions them.) -/
    37def Tautology : Prop :=
    38 ∀ ν : A → Prop, ∃ c : A, RelMap satIsClause ![c] ∧
    39 ∀ x : A, (RelMap satPosIn ![c, x] → ν x) ∧ (RelMap satNegIn ![c, x] → ¬ν x)
    40
    41end Taut
    42
    43/-- TAUT: is the instance, read as a formula in disjunctive normal form, a
    44tautology? -/
    45def TAUT : DecisionProblem sat := DecisionProblem.ofPred fun A _ => Tautology A
    46
    47end Lax564036.Tautology
    48

    Discussion

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

    Loading discussion…