Documentation

Linglib.Core.Logic.Opposition.Square

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.Opposition.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
    def Core.Opposition.instReprSquare.repr {α✝ : Type u_1} [Repr α✝] :
    Square α✝Std.Format
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[implicit_reducible]
      instance Core.Opposition.instReprSquare {α✝ : Type u_1} [Repr α✝] :
      Repr (Square α✝)
      Equations
      structure Core.Opposition.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.Opposition.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.Opposition.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
            Instances For

              The standard GQ duality operations.

              Equations
              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.Opposition.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.Opposition.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.Opposition.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.

                The SquareRelations axioms above are deliberately weaker than the Aristotelian-relation predicates from Aristotelian.lean: each field asserts just one direction (e.g., subalternAI asserts AI but not its strictness; contraryAE asserts impossibility of joint truth but not impossibility of joint falsity). This is intentional — it lets users provide minimal axioms and have the rest derived via subaltern_from_contradictions etc.

                The bridge lemmas below convert those weaker axioms into the full Aristotelian predicates, when the necessary side conditions (proper-subalternation witnesses, etc.) are provided.

                theorem Core.Opposition.SquareRelations.toContradictoryAO {W : Type u_1} {sq : Square (WBool)} (rel : SquareRelations sq) :

                The contradAO axiom is exactly Contradictory sq.A sq.O.

                theorem Core.Opposition.SquareRelations.toContradictoryEI {W : Type u_1} {sq : Square (WBool)} (rel : SquareRelations sq) :

                The contradEI axiom is exactly Contradictory sq.E sq.I.

                theorem Core.Opposition.SquareRelations.toSubalternAI {W : Type u_1} {sq : Square (WBool)} (rel : SquareRelations sq) (w : W) (hwI : sq.I w = true) (hwA : sq.A w = false) :
                Subaltern sq.A sq.I

                A SquareRelations lifts to Subaltern sq.A sq.I when given a witness w showing I does not entail A. The witness is needed because Aristotelian.Subaltern is proper subalternation (strict).

                theorem Core.Opposition.SquareRelations.toContraryAE {W : Type u_1} {sq : Square (WBool)} (rel : SquareRelations sq) (w : W) (hwA : sq.A w = false) (hwE : sq.E w = false) :
                Contrary sq.A sq.E

                A SquareRelations lifts to Contrary sq.A sq.E when given a witness w where neither A nor E holds (the joint-non-exhaustion condition that distinguishes Aristotelian Contrary from mere "cannot both be true").

                theorem Core.Opposition.outerNeg_contradiction {α : Type u_1} (q : Quantification.GQ α) (R S : αProp) :
                q R S ¬Quantification.outerNeg q R S

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

                def Core.Opposition.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
                • Core.Opposition.Square.fromBox box p = { A := box p, E := box fun (w : W) => !p w, I := fun (w : W) => !box (fun (w' : W) => !p w') w, O := fun (w : W) => !box p w }
                Instances For
                  theorem Core.Opposition.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.Opposition.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.

                  TODO: Open conjectures (previously stubbed in deleted Core/Conjectures.lean):

                  theorem Core.Opposition.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⟩.