Documentation

InfinitaryLogic.Lomega1omega.Polarity

Polarity of relation-symbol occurrences (issue #14, Unit 0 layer 1) #

The signed occurrence traversal underlying Lyndon interpolation: relationsInSigned s φ collects the relation symbols occurring in φ with sign s, where

positiveRelationsIn and negativeRelationsIn are the two instances. Negation needs no clause of its own: φ.not = φ.imp ⊥, so the swap laws positiveRelationsIn φ.not = negativeRelationsIn φ and its dual fall out of the imp clause, and the same computation gives and, or, ex, , einf, esup.

This file is deliberately syntax only and sits in the Lomega1omega layer: it mentions no occurrence machinery from Methods/ (in particular not relationsIn, baseRelationsIn, or the constant-expansion calculus). The bridge relationsIn = positive ∪ negative and the signed twins of the Methods-level calculus live in Methods/PolarityCalculus.lean.

Simp discipline #

Only the generic relationsInSigned equations are @[simp]; the positiveRelationsIn / negativeRelationsIn forms are reducible abbreviations of those, so no derived rewrite is installed alongside them and nothing can loop through not, and, or, or ex.

The signed occurrence traversal. relationsInSigned true φ is the set of relation symbols with a positive occurrence in φ, and relationsInSigned false φ those with a negative occurrence: antecedents flip the sign, quantifiers and the countable connectives preserve it, and equality contributes nothing.

Equations
Instances For
    @[reducible, inline]

    The relation symbols occurring positively in φ.

    Equations
    Instances For
      @[reducible, inline]

      The relation symbols occurring negatively in φ.

      Equations
      Instances For

        Constructor equations #

        @[simp]
        theorem FirstOrder.Language.BoundedFormulaω.relationsInSigned_equal {L : Language} {α : Type} {n : } (s : Bool) (t₁ t₂ : L.Term (α Fin n)) :
        @[simp]
        theorem FirstOrder.Language.BoundedFormulaω.relationsInSigned_rel {L : Language} {α : Type} {n l : } (s : Bool) (R : L.Relations l) (ts : Fin lL.Term (α Fin n)) :
        @[simp]
        theorem FirstOrder.Language.BoundedFormulaω.relationsInSigned_iSup {L : Language} {α : Type} {n : } (s : Bool) (φs : L.BoundedFormulaω α n) :
        relationsInSigned s (iSup φs) = ⋃ (i : ), relationsInSigned s (φs i)
        @[simp]
        theorem FirstOrder.Language.BoundedFormulaω.relationsInSigned_iInf {L : Language} {α : Type} {n : } (s : Bool) (φs : L.BoundedFormulaω α n) :
        relationsInSigned s (iInf φs) = ⋃ (i : ), relationsInSigned s (φs i)

        Negation swaps and the derived connectives #

        @[simp]

        Negation swaps the signs (the acceptance gate, generic form).

        Acceptance gate: positive occurrences of ¬φ are the negative occurrences of φ.

        Acceptance gate: negative occurrences of ¬φ are the positive occurrences of φ.

        @[simp]

        Existential quantification preserves the signs (two flips cancel).

        theorem FirstOrder.Language.BoundedFormulaω.relationsInSigned_einf {L : Language} {α : Type} {ι : Type u_1} [Encodable ι] {n : } (s : Bool) (φs : ιL.BoundedFormulaω α n) :
        relationsInSigned s (einf φs) = ⋃ (i : ι), relationsInSigned s (φs i)

        An Encodable-indexed conjunction collects the branches' signed occurrences (the padding of undecodable indices contributes nothing).

        theorem FirstOrder.Language.BoundedFormulaω.relationsInSigned_esup {L : Language} {α : Type} {ι : Type u_1} [Encodable ι] {n : } (s : Bool) (φs : ιL.BoundedFormulaω α n) :
        relationsInSigned s (esup φs) = ⋃ (i : ι), relationsInSigned s (φs i)

        An Encodable-indexed disjunction collects the branches' signed occurrences (the padding of undecodable indices contributes nothing).

        Countability #