Documentation

Foundation.IntFO.Basic.Formula

Formulas of intuitionistic first-order logic #

This file defines the formulas of first-order logic.

φ : Semiformulaᵢ L ξ n is a (semi-)formula of language L with bounded variables of Fin n and free variables of ξ. The quantification is represented by de Bruijn index.

inductive LO.FirstOrder.Semiformulaᵢ (L : LO.FirstOrder.Language) (ξ : Type u_1) :
Type (max u_1 u_2)
Instances For
    @[reducible, inline]
    abbrev LO.FirstOrder.Formulaᵢ (L : LO.FirstOrder.Language) (ξ : Type u_1) :
    Type (max u_1 u_2)
    Equations
    Instances For
      Equations
      • LO.FirstOrder.Semiformulaᵢ.instBot = { bot := LO.FirstOrder.Semiformulaᵢ.falsum }
      Equations
      • LO.FirstOrder.Semiformulaᵢ.instArrow = { arrow := LO.FirstOrder.Semiformulaᵢ.imp }
      @[reducible, inline]
      Equations
      Instances For
        Equations
        • LO.FirstOrder.Semiformulaᵢ.instLogicalConnective = LO.LogicalConnective.mk
        Equations
        • LO.FirstOrder.Semiformulaᵢ.instQuantifier = LO.Quantifier.mk
        def LO.FirstOrder.Semiformulaᵢ.toStr {ξ : Type u_1} {L : LO.FirstOrder.Language} [(k : ) → ToString (L.Func k)] [(k : ) → ToString (L.Rel k)] [ToString ξ] {n : } :
        Equations
        Instances For
          instance LO.FirstOrder.Semiformulaᵢ.instRepr {ξ : Type u_1} {L : LO.FirstOrder.Language} [(k : ) → ToString (L.Func k)] [(k : ) → ToString (L.Rel k)] [ToString ξ] {n : } :
          Equations
          instance LO.FirstOrder.Semiformulaᵢ.instToString {ξ : Type u_1} {L : LO.FirstOrder.Language} [(k : ) → ToString (L.Func k)] [(k : ) → ToString (L.Rel k)] [ToString ξ] {n : } :
          Equations
          • LO.FirstOrder.Semiformulaᵢ.instToString = { toString := LO.FirstOrder.Semiformulaᵢ.toStr }
          @[simp]
          theorem LO.FirstOrder.Semiformulaᵢ.and_inj {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ₁ ψ₁ φ₂ ψ₂ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
          φ₁ φ₂ = ψ₁ ψ₂ φ₁ = ψ₁ φ₂ = ψ₂
          @[simp]
          theorem LO.FirstOrder.Semiformulaᵢ.or_inj {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ₁ ψ₁ φ₂ ψ₂ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
          φ₁ φ₂ = ψ₁ ψ₂ φ₁ = ψ₁ φ₂ = ψ₂
          @[simp]
          theorem LO.FirstOrder.Semiformulaᵢ.imp_inj {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } {φ₁ φ₂ ψ₁ ψ₂ : LO.FirstOrder.Semiformulaᵢ L ξ n} :
          φ₁ φ₂ = ψ₁ ψ₂ φ₁ = ψ₁ φ₂ = ψ₂
          @[simp]
          theorem LO.FirstOrder.Semiformulaᵢ.all_inj {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)) :
          ∀' φ = ∀' ψ φ = ψ
          @[simp]
          theorem LO.FirstOrder.Semiformulaᵢ.ex_inj {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)) :
          ∃' φ = ∃' ψ φ = ψ
          @[simp]
          theorem LO.FirstOrder.Semiformulaᵢ.univItr_inj {L : LO.FirstOrder.Language} {ξ : Type u_1} {n k : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ (n + k)) :
          ∀^[k] φ = ∀^[k] ψ φ = ψ
          @[simp]
          theorem LO.FirstOrder.Semiformulaᵢ.exItr_inj {L : LO.FirstOrder.Language} {ξ : Type u_1} {n k : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ (n + k)) :
          ∃^[k] φ = ∃^[k] ψ φ = ψ
          Equations
          • LO.FirstOrder.Semiformulaᵢ.verum.complexity = 0
          • LO.FirstOrder.Semiformulaᵢ.falsum.complexity = 0
          • (LO.FirstOrder.Semiformulaᵢ.rel a a_1).complexity = 0
          • (φ.and ψ).complexity = φ.complexity ψ.complexity + 1
          • (φ.or ψ).complexity = φ.complexity ψ.complexity + 1
          • (φ.imp ψ).complexity = φ.complexity ψ.complexity + 1
          • φ.all.complexity = φ.complexity + 1
          • φ.ex.complexity = φ.complexity + 1
          Instances For
            @[simp]
            @[simp]
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_rel {L : LO.FirstOrder.Language} {ξ : Type u_1} {n k : } (r : L.Rel k) (v : Fin kLO.FirstOrder.Semiterm L ξ n) :
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_and {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
            (φ ψ).complexity = φ.complexity ψ.complexity + 1
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_and' {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
            (φ.and ψ).complexity = φ.complexity ψ.complexity + 1
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_or {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
            (φ ψ).complexity = φ.complexity ψ.complexity + 1
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_or' {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
            (φ.or ψ).complexity = φ.complexity ψ.complexity + 1
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_imp {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
            (φ ψ).complexity = φ.complexity ψ.complexity + 1
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_imp' {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
            (φ.imp ψ).complexity = φ.complexity ψ.complexity + 1
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_all {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)) :
            (∀' φ).complexity = φ.complexity + 1
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_all' {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)) :
            φ.all.complexity = φ.complexity + 1
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_ex {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)) :
            (∃' φ).complexity = φ.complexity + 1
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_ex' {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)) :
            φ.ex.complexity = φ.complexity + 1
            @[simp]
            theorem LO.FirstOrder.Semiformulaᵢ.complexity_neg {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } (φ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
            (φ).complexity = φ.complexity + 1
            def LO.FirstOrder.Semiformulaᵢ.cases' {L : LO.FirstOrder.Language} {ξ : Type u_2} {C : (n : ) → LO.FirstOrder.Semiformulaᵢ L ξ nSort w} (hRel : {n k : } → (r : L.Rel k) → (v : Fin kLO.FirstOrder.Semiterm L ξ n) → C n (LO.FirstOrder.Semiformulaᵢ.rel r v)) (hVerum : {n : } → C n ) (hFalsum : {n : } → C n ) (hAnd : {n : } → (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) → C n (φ ψ)) (hOr : {n : } → (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) → C n (φ ψ)) (hImp : {n : } → (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) → C n (φ ψ)) (hAll : {n : } → (φ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)) → C n (∀' φ)) (hEx : {n : } → (φ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)) → C n (∃' φ)) {n : } (φ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
            C n φ
            Equations
            Instances For
              def LO.FirstOrder.Semiformulaᵢ.rec' {L : LO.FirstOrder.Language} {ξ : Type u_2} {C : (n : ) → LO.FirstOrder.Semiformulaᵢ L ξ nSort w} (hRel : {n k : } → (r : L.Rel k) → (v : Fin kLO.FirstOrder.Semiterm L ξ n) → C n (LO.FirstOrder.Semiformulaᵢ.rel r v)) (hVerum : {n : } → C n ) (hFalsum : {n : } → C n ) (hAnd : {n : } → (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) → C n φC n ψC n (φ ψ)) (hOr : {n : } → (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) → C n φC n ψC n (φ ψ)) (hImp : {n : } → (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) → C n φC n ψC n (φ ψ)) (hAll : {n : } → (φ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)) → C (n + 1) φC n (∀' φ)) (hEx : {n : } → (φ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)) → C (n + 1) φC n (∃' φ)) {n : } (φ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
              C n φ
              Equations
              Instances For
                def LO.FirstOrder.Semiformulaᵢ.hasDecEq {ξ : Type u_1} {L : LO.FirstOrder.Language} [L.DecidableEq] [DecidableEq ξ] {n : } (φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n) :
                Decidable (φ = ψ)
                Instances For
                  Equations
                  • LO.FirstOrder.Semiformulaᵢ.instDecidableEq = LO.FirstOrder.Semiformulaᵢ.hasDecEq
                  Equations
                  • LO.FirstOrder.instCollectionSyntacticFormulaᵢTheoryᵢ = inferInstance
                  Equations
                  • LO.FirstOrder.instCollectionSentenceᵢClosedTheoryᵢ = inferInstance
                  Equations

                  Negative Formula

                  Instances For
                    @[simp]
                    theorem LO.FirstOrder.Semiformulaᵢ.IsNegative.and_iff {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } {φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n} :
                    (φ ψ).IsNegative φ.IsNegative ψ.IsNegative
                    @[simp]
                    theorem LO.FirstOrder.Semiformulaᵢ.IsNegative.imp_iff {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } {φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n} :
                    (φ ψ).IsNegative ψ.IsNegative
                    @[simp]
                    theorem LO.FirstOrder.Semiformulaᵢ.IsNegative.all_iff {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } {φ : LO.FirstOrder.Semiformulaᵢ L ξ (n + 1)} :
                    (∀' φ).IsNegative φ.IsNegative
                    @[simp]
                    theorem LO.FirstOrder.Semiformulaᵢ.IsNegative.not_or {L : LO.FirstOrder.Language} {ξ : Type u_1} {n : } {φ ψ : LO.FirstOrder.Semiformulaᵢ L ξ n} :
                    ¬(φ ψ).IsNegative
                    @[simp]
                    @[simp]
                    theorem LO.FirstOrder.Semiformulaᵢ.IsNegative.not_rel {L : LO.FirstOrder.Language} {ξ : Type u_1} {n k : } (r : L.Rel k) (v : Fin kLO.FirstOrder.Semiterm L ξ n) :
                    @[simp]