Documentation

Linglib.Core.Logic.SquareOfOpposition

Square of Opposition #

@cite{barwise-cooper-1981} @cite{horn-2001}

The Aristotelian Square of Opposition reified as a first-class algebraic object.

The square arranges four operators at its vertices:

       contraries
  A ──────────────── E
  │ │
  │ subalterns subalterns
  │ │
  I ──────────────── O
     subcontraries

The six relations:

The square unifies quantifiers, modals, connectives, and attitudes:

The three duality operations (outer negation, inner negation, dual) generate the square from any single vertex. This module provides the abstract framework; concrete instantiations live in their respective theory modules.

structure Core.SquareOfOpposition.Square (α : Type u_1) :
Type u_1

The four vertices of a Square of Opposition.

  • A : α

    A-corner: universal affirmative (every, □, Bel(p))

  • E : α

    E-corner: universal negative (no, □¬, Bel(¬p))

  • I : α

    I-corner: particular affirmative (some, ◇, ◇p)

  • O : α

    O-corner: particular negative (not-every, ¬□, ¬Bel(p))

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      structure Core.SquareOfOpposition.SquareOps (α : Type u_1) :
      Type u_1

      The three operations that generate the square from a single vertex.

      Given a vertex A, the other three are determined by:

      • E = innerNeg A (negate the scope / complement)
      • O = outerNeg A (negate the result)
      • I = dual A = outerNeg (innerNeg A)
      • inner : αα

        Inner negation: A ↦ E, I ↦ O

      • outer : αα

        Outer negation: A ↦ O, E ↦ I

      • dual : αα

        Dual: A ↦ I, E ↦ O. Should equal outer ∘ inner.

      Instances For
        def Core.SquareOfOpposition.Square.fromOps {α : Type u_1} (a : α) (ops : SquareOps α) :

        Build a square from a single vertex and the three duality operations.

        Equations
        Instances For
          structure Core.SquareOfOpposition.SquareRelations {W : Type u_1} (sq : Square (WBool)) :

          The six logical relations of the Square of Opposition.

          Defined over W → Bool (decidable propositions over a domain W). The relations are pointwise: they hold at every point w : W.

          • subalternAI (w : W) : sq.A w = truesq.I w = true

            A entails I (subalternation).

          • subalternEO (w : W) : sq.E w = truesq.O w = true

            E entails O (subalternation).

          • contradAO (w : W) : sq.A w = !sq.O w

            A and O are contradictories: A = ¬O.

          • contradEI (w : W) : sq.E w = !sq.I w

            E and I are contradictories: E = ¬I.

          • contraryAE (w : W) : sq.A w = truesq.E w = false

            A and E are contraries: cannot both be true.

          • subcontrIO (w : W) : sq.I w = falsesq.O w = true

            I and O are subcontraries: cannot both be false.

          Instances For

            Build a square from any operator and the GQ duality operations.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              The six relations are not independent. Given the two contradiction diagonals (A = ¬O, E = ¬I), the other four relations follow:

              So the contradiction diagonals are the primitive relations; the rest are consequences. This matches Horn's analysis: contradiction is fundamental.

              theorem Core.SquareOfOpposition.contraries_not_both_true {W : Type u_1} (sq : Square (WBool)) (rel : SquareRelations sq) (w : W) (hA : sq.A w = true) :
              sq.E w = false

              Contraries cannot both be true.

              theorem Core.SquareOfOpposition.subcontraries_not_both_false {W : Type u_1} (sq : Square (WBool)) (rel : SquareRelations sq) (w : W) (hI : sq.I w = false) :
              sq.O w = true

              Subcontraries cannot both be false.

              theorem Core.SquareOfOpposition.subaltern_from_contradictions {W : Type u_1} (sq : Square (WBool)) (_hAO : ∀ (w : W), sq.A w = !sq.O w) (hEI : ∀ (w : W), sq.E w = !sq.I w) (hAE : ∀ (w : W), sq.A w = truesq.E w = false) (w : W) (hA : sq.A w = true) :
              sq.I w = true

              From the contradiction diagonals, derive that A entails I.

              From the outer/inner negation structure, the contradiction diagonals hold definitionally: A = ¬(outerNeg A) and innerNeg A = ¬(dual A).

              def Core.SquareOfOpposition.Square.fromBox {W : Type u_1} (box : (WBool)WBool) (p : WBool) :
              Square (WBool)

              Build a square of propositions from a box-like operator.

              Given box : (W → Bool) → W → Bool (e.g., □ = "all accessible worlds satisfy"), and a proposition p, produce the four corners:

              • A = box p (□p: necessarily p)
              • E = box (¬p) (□¬p: necessarily not-p)
              • I = ¬(box (¬p)) (◇p: possibly p)
              • O = ¬(box p) (¬□p: not necessarily p)
              Equations
              Instances For
                theorem Core.SquareOfOpposition.fromBox_contradAO {W : Type u_1} (box : (WBool)WBool) (p : WBool) (w : W) :
                (Square.fromBox box p).A w = !(Square.fromBox box p).O w

                The box-derived square always satisfies the contradiction diagonals.

                theorem Core.SquareOfOpposition.fromBox_contradEI {W : Type u_1} (box : (WBool)WBool) (p : WBool) (w : W) :
                (Square.fromBox box p).E w = !(Square.fromBox box p).I w

                Subalternation is the entailment relation that underlies Horn scales.

                The I–A edge of the quantifier square (some → every) is precisely the ⟨some, all⟩ Horn scale from Core.Scale. More generally:

                This means the square of opposition IS the algebraic structure underlying scalar implicature: using the weak term (I) implicates the negation of the strong term (¬A = O). The "O-corner gap" — the non-lexicalization of O — is pragmatically explained: O is always recoverable as the implicature of I.

                See Core.Conjectures.o_corner_gap for the formal statement.

                theorem Core.SquareOfOpposition.subalternation_is_scale_ordering {W : Type u_1} (sq : Square (WBool)) (rel : SquareRelations sq) (w : W) :
                sq.A w = truesq.I w = true

                Subalternation A→I is equivalent to the Horn-scale ordering: the A-corner entails the I-corner, which is the scale ⟨I, A⟩.