Jump to content

User:Nayru25/sandbox/A Style Guide for Boolean Connectives

From Wikipedia, the free encyclopedia

Motivation

[edit]

Currently (May 2018) the pages for the Logical Connectives are a mess of competing styles and presentations, which hinders comprehension. I propose this style guide to define a common presentation for all the boolean connectives.

Scope

[edit]

The article Logical connectives, and the articles

Boolean Connective Logic Gate
Alternative denial NAND gate
Converse implication
Implication IMPLY gate
Disjunction OR gate
Negation NOT gate
Exclusive or XOR gate
Biconditional XNOR gate
Statement
Joint denial NOR gate
Material nonimplication
Converse nonimplication
Logical conjunction AND gate

Boolean Connectives

[edit]

Article Layout

[edit]

With exception to Negation and Material Conditional, as they have a more general scope.

  • The Lead section should
    • Provide the unicode characters for the connective so people can copy and paste it
    • Have a link to the equivalent logic gate, if there is one
    • Include the relevant Venn Diagram
    • Discuss prominent alternative notation
  • Sections should include, in this order
    • A section for the definition, including
      • A sub-section on the truth table of the connective.
      • If there is anything more to add on the Venn diagram for the connective, a sub-section for that.
      • A sub-section on equivalent logical formulas
    • Other alternative notation, not noted in the Lead
    • History, if any of note

Typesetting of Formulas

[edit]
  • In general, use <math>...</math> to display logical formulas.
  • Use math upper case roman letters, that is not for terminal symbols.
  • Prefer over
    • Current exceptions include
      • Logical_conjunction and Logical_disjunction, which uses and , because there's too much to change at the moment
      • Material_implication, which uses and , because of historical reasons
        • This is mostly fine because material implication has a broader reach than the boolean operators
      • Logical_biconditional which uses and until about halfway, then uses and because of the images

Connectives

[edit]

In general,

Sheffer stroke Prefer to
Converse implication Prefer to
Implication Prefer to
Disjunction Prefer to
Negation Prefer to , or
Exclusive or Prefer to , or
Biconditional Prefer to , or
Joint denial Use
Material nonimplication Prefer to
Converse nonimplication Prefer to
Logical conjunction Prefer to , , or

Truth Tables

[edit]

For boolean connectives the table should look like

T T ?
T F ?
F T ?
F F ?

using T and F for the truth-values, and without the headings "Input" and "Output", as a boolean connective expresses a relation, not a computation.

Logic Gates

[edit]

Article Layout

[edit]
  • The Lead section should have a link to the equivalent boolean connective.

Typesetting of Operators

[edit]
  • Terminal symbols should be upper case roman, sans-serif (i.e. A over a)
  • Prefer A, B, C to P, Q, R

Truth Tables

[edit]

For logic gates, the truth table should look like

Input Output
A B A OP B
0 0 ?
0 1 ?
1 0 ?
1 1 ?

using 1 and 0 as the truth-values, and starting with "0 0" at the top.

(This appears to be the style used in the articles on logic gates; I would prefer to start with "1 1", but there may be some reason I'm not aware of that they start with "0 0")

Engineering Notation

[edit]

Engineering notation is recommended when writing formulae for logic gates.

Typesetting

[edit]
  • Use <math>...</math>
  • Use math upper case roman letters, that is not for terminal symbols
  • Prefer over
Disjunction Use
Negation Use , not
Exclusive or Use
Logical conjunction Prefer over , except when used for emphasis