Documentation

CslibFrontier.Logics.Propositional.DNF.Encoding

Encodings of terms and DNF formulas #

A machine reads a formula in disjunctive normal form through an encoding enc : V ↪ List Bool of its variables, dually to Cslib.Logic.PL.encCNFOver. A literal (v, b) is the framed enc v followed by its polarity bit b (encPair enc encBool); a term is the concatenation of its framed literals (Cslib.Logic.PL.encTermOver), and a formula the concatenation of its framed terms (Cslib.Logic.PL.encDNFOver). Both are reducible abbreviations, so fun_prop and the combinators' lemmas see through the names.

Cslib.Complexity.encDNF, the encoding of the instances of #DNF, is defined as encDNFOver encNat: variables numbered by natural numbers written in binary.

Main definitions #

@[reducible, inline]

Terms over variables encoded by enc: the concatenation of the framed literals, a literal (v, b) being the framed enc v followed by the polarity bit b.

@[reducible, inline]

Formulas in disjunctive normal form over variables encoded by enc: the concatenation of the framed terms, each encoded by encTermOver enc.