Documentation

MathematicalLogic.FirstOrder.Theories.Peano.Theory

Theory of first-order arithmetic #

This file formalizes Peano arithmetic and Robinson's Q, two first-order theories of arithmetic. The goal is to prove Gödel's first incompleteness theorem under Q and second incompleteness theorem under PA.

Instances For

    The language of first-order arithmetic.

    Equations
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[simp]
        theorem FirstOrder.Language.peano.add_eq {n : } {t₁ t₂ : peano.Term n} :
        peanoFunc.add ⬝ᶠ [t₁, t₂]ᵥ = t₁ + t₂
        @[simp]
        theorem FirstOrder.Language.peano.mul_eq {n : } {t₁ t₂ : peano.Term n} :
        peanoFunc.mul ⬝ᶠ [t₁, t₂]ᵥ = t₁ * t₂
        @[simp]
        theorem FirstOrder.Language.peano.subst_zero {n m✝ : } {σ : peano.Subst n m✝} :
        0[σ]ₜ = 0
        @[simp]
        theorem FirstOrder.Language.peano.subst_succ {n : } {t : peano.Term n} {m✝ : } {σ : peano.Subst n m✝} :
        @[simp]
        theorem FirstOrder.Language.peano.subst_one {n m✝ : } {σ : peano.Subst n m✝} :
        1[σ]ₜ = 1
        @[simp]
        theorem FirstOrder.Language.peano.subst_add {n : } {t₁ t₂ : peano.Term n} {m✝ : } {σ : peano.Subst n m✝} :
        (t₁ + t₂)[σ]ₜ = t₁[σ]ₜ + t₂[σ]ₜ
        @[simp]
        theorem FirstOrder.Language.peano.subst_mul {n : } {t₁ t₂ : peano.Term n} {m✝ : } {σ : peano.Subst n m✝} :
        (t₁ * t₂)[σ]ₜ = t₁[σ]ₜ * t₂[σ]ₜ
        @[simp]
        theorem FirstOrder.Language.peano.subst_ofNat {n n✝ m✝ : } {σ : peano.Subst n✝ m✝} :
        @[simp]
        theorem FirstOrder.Language.peano.subst_ofEncode {α : Type u_1} {n✝ m✝ : } {σ : peano.Subst n✝ m✝} [Encodable α] {a : α} :
        theorem FirstOrder.Language.peano.le_def {n : } {t₁ t₂ : peano.Term n} :
        t₁ t₂ = ∃' (#0 + ↑ₜt₁ ↑ₜt₂)
        theorem FirstOrder.Language.peano.lt_def {n : } {t₁ t₂ : peano.Term n} :
        t₁ t₂ = succ t₁ t₂
        theorem FirstOrder.Language.peano.eq_congr_succ {n : } {t₁ t₂ : peano.Term n} {Γ : peano.FormulaSet n} :
        Γt₁ t₂ succ t₁ succ t₂
        theorem FirstOrder.Language.peano.eq_congr_add {n : } {t₁ t₂ : peano.Term n} {Γ : peano.FormulaSet n} {t₁' t₂' : peano.Term n} :
        Γt₁ t₁' t₂ t₂' t₁ + t₂ t₁' + t₂'
        theorem FirstOrder.Language.peano.eq_congr_mul {n : } {t₁ t₂ : peano.Term n} {Γ : peano.FormulaSet n} {t₁' t₂' : peano.Term n} :
        Γt₁ t₁' t₂ t₂' t₁ * t₂ t₁' * t₂'
        Equations
        • One or more equations did not get rendered due to their size.

        Robinson's Q.

        Instances For
          theorem FirstOrder.Language.Theory.Q.succ_inj {n : } {t₁ t₂ : peano.Term n} :
          ↑ᵀ^[n] Qpeano.succ t₁ peano.succ t₂ t₁ t₂
          theorem FirstOrder.Language.Theory.Q.add_succ {n : } (t₁ t₂ : peano.Term n) :
          ↑ᵀ^[n] Qt₁ + peano.succ t₂ peano.succ (t₁ + t₂)
          theorem FirstOrder.Language.Theory.Q.mul_succ {n : } (t₁ t₂ : peano.Term n) :
          ↑ᵀ^[n] Qt₁ * peano.succ t₂ t₁ * t₂ + t₁
          theorem FirstOrder.Language.Theory.Q.succ_inj_iff {n : } {t₁ t₂ : peano.Term n} :
          ↑ᵀ^[n] Qpeano.succ t₁ peano.succ t₂ t₁ t₂
          theorem FirstOrder.Language.Theory.Q.add_eq_zero_iff {n : } {t₁ t₂ : peano.Term n} :
          ↑ᵀ^[n] Qt₁ + t₂ 0 t₁ 0 t₂ 0
          theorem FirstOrder.Language.Theory.Q.le_of_add_eq {n : } {t₁ t₂ t₃ : peano.Term n} :
          ↑ᵀ^[n] Qt₁ + t₂ t₃ t₂ t₃
          theorem FirstOrder.Language.Theory.Q.succ_le_iff_lt {n : } {t₁ t₂ : peano.Term n} :
          ↑ᵀ^[n] Qpeano.succ t₁ t₂ t₁ t₂
          theorem FirstOrder.Language.Theory.Q.lt_succ_iff_le {n : } {t₁ t₂ : peano.Term n} :
          ↑ᵀ^[n] Qt₁ peano.succ t₂ t₁ t₂
          theorem FirstOrder.Language.Theory.Q.add_assoc_ofNat {n : } {t₁ t₂ : peano.Term n} {a : } :
          ↑ᵀ^[n] Qt₁ + t₂ + peano.ofNat a t₁ + (t₂ + peano.ofNat a)
          theorem FirstOrder.Language.Theory.Q.add_ofNat_cancel {n : } {t₁ t₂ : peano.Term n} {a : } :
          ↑ᵀ^[n] Qt₁ + peano.ofNat a t₂ + peano.ofNat a t₁ t₂
          theorem FirstOrder.Language.Theory.Q.add_le_add_ofNat_iff {n : } {t₁ t₂ : peano.Term n} {a : } :
          ↑ᵀ^[n] Qt₁ + peano.ofNat a t₂ + peano.ofNat a t₁ t₂
          theorem FirstOrder.Language.Theory.Q.add_lt_add_ofNat_iff {n : } {t₁ t₂ : peano.Term n} {a : } :
          ↑ᵀ^[n] Qt₁ + peano.ofNat a t₂ + peano.ofNat a t₁ t₂

          Peano arithmetic.

          Instances For
            theorem FirstOrder.Language.Theory.PA.succ_add {n : } (t₁ t₂ : peano.Term n) :
            ↑ᵀ^[n] PApeano.succ t₁ + t₂ peano.succ (t₁ + t₂)
            theorem FirstOrder.Language.Theory.PA.add_comm {n : } (t₁ t₂ : peano.Term n) :
            ↑ᵀ^[n] PAt₁ + t₂ t₂ + t₁
            theorem FirstOrder.Language.Theory.PA.add_assoc {n : } (t₁ t₂ t₃ : peano.Term n) :
            ↑ᵀ^[n] PAt₁ + t₂ + t₃ t₁ + (t₂ + t₃)
            theorem FirstOrder.Language.Theory.PA.add_right_comm {n : } (t₁ t₂ t₃ : peano.Term n) :
            ↑ᵀ^[n] PAt₁ + t₂ + t₃ t₁ + t₃ + t₂
            theorem FirstOrder.Language.Theory.PA.add_right_cancel {n : } {t₁ t₂ : peano.Term n} (t : peano.Term n) :
            ↑ᵀ^[n] PAt₁ + t t₂ + t t₁ t₂
            theorem FirstOrder.Language.Theory.PA.add_left_cancel {n : } {t₁ t₂ : peano.Term n} (t : peano.Term n) :
            ↑ᵀ^[n] PAt + t₁ t + t₂ t₁ t₂
            theorem FirstOrder.Language.Theory.PA.succ_mul {n : } (t₁ t₂ : peano.Term n) :
            ↑ᵀ^[n] PApeano.succ t₁ * t₂ t₁ * t₂ + t₂
            theorem FirstOrder.Language.Theory.PA.mul_comm {n : } (t₁ t₂ : peano.Term n) :
            ↑ᵀ^[n] PAt₁ * t₂ t₂ * t₁
            theorem FirstOrder.Language.Theory.PA.right_distrib {n : } (t₁ t₂ t₃ : peano.Term n) :
            ↑ᵀ^[n] PA ⊢ (t₁ + t₂) * t₃ t₁ * t₃ + t₂ * t₃
            theorem FirstOrder.Language.Theory.PA.left_distrib {n : } (t₁ t₂ t₃ : peano.Term n) :
            ↑ᵀ^[n] PAt₁ * (t₂ + t₃) t₁ * t₂ + t₁ * t₃
            theorem FirstOrder.Language.Theory.PA.mul_assoc {n : } (t₁ t₂ t₃ : peano.Term n) :
            ↑ᵀ^[n] PAt₁ * t₂ * t₃ t₁ * (t₂ * t₃)
            theorem FirstOrder.Language.Theory.PA.mul_right_comm {n : } {t₁ t₂ t₃ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ * t₂ * t₃ t₁ * t₃ * t₂
            theorem FirstOrder.Language.Theory.PA.mul_eq_zero_iff {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ * t₂ 0 t₁ 0 t₂ 0
            theorem FirstOrder.Language.Theory.PA.mul_eq_one_iff {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ * t₂ 1 t₁ 1 t₂ 1
            theorem FirstOrder.Language.Theory.PA.le_antisymm {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₂ t₁ t₁ t₂
            theorem FirstOrder.Language.Theory.PA.le_trans {n : } {t₁ t₂ t₃ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₂ t₃ t₁ t₃
            theorem FirstOrder.Language.Theory.PA.lt_iff_le_not_ge {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₁ t₂ ~ t₂ t₁
            theorem FirstOrder.Language.Theory.PA.le_total {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₂ t₁
            theorem FirstOrder.Language.Theory.PA.le_succ_of_le {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₁ peano.succ t₂
            theorem FirstOrder.Language.Theory.PA.lt_succ_of_lt {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₁ peano.succ t₂
            theorem FirstOrder.Language.Theory.PA.lt_succ_iff_lt_or_eq {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ peano.succ t₂ t₁ t₂ t₁ t₂
            theorem FirstOrder.Language.Theory.PA.pos_of_lt {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ 0 t₂
            theorem FirstOrder.Language.Theory.PA.add_le_add {n : } {t₁ t₂ t₃ t₄ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₃ t₄ t₁ + t₃ t₂ + t₄
            theorem FirstOrder.Language.Theory.PA.add_le_add_iff_left {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt + t₁ t + t₂ t₁ t₂
            theorem FirstOrder.Language.Theory.PA.add_le_add_iff_right {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ + t t₂ + t t₁ t₂
            theorem FirstOrder.Language.Theory.PA.le_add_of_le_left {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₁ t + t₂
            theorem FirstOrder.Language.Theory.PA.le_add_of_le_right {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₁ t₂ + t
            theorem FirstOrder.Language.Theory.PA.le_add_left {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ + t₁
            theorem FirstOrder.Language.Theory.PA.le_add_right {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₁ + t₂
            theorem FirstOrder.Language.Theory.PA.add_lt_add_of_le_of_lt {n : } {t₁ t₂ t₃ t₄ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₃ t₄ t₁ + t₃ t₂ + t₄
            theorem FirstOrder.Language.Theory.PA.add_lt_add_of_lt_of_le {n : } {t₁ t₂ t₃ t₄ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₃ t₄ t₁ + t₃ t₂ + t₄
            theorem FirstOrder.Language.Theory.PA.add_lt_add_iff_left {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt + t₁ t + t₂ t₁ t₂
            theorem FirstOrder.Language.Theory.PA.add_lt_add_iff_right {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ + t t₂ + t t₁ t₂
            theorem FirstOrder.Language.Theory.PA.lt_add_of_lt_left {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₁ t + t₂
            theorem FirstOrder.Language.Theory.PA.lt_add_of_lt_right {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₁ t₂ + t
            theorem FirstOrder.Language.Theory.PA.lt_add_of_pos_left {n : } {t t₁ : peano.Term n} :
            ↑ᵀ^[n] PA0 t t₁ t + t₁
            theorem FirstOrder.Language.Theory.PA.mul_le_mul {n : } {t₁ t₂ t₃ t₄ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₃ t₄ t₁ * t₃ t₂ * t₄
            theorem FirstOrder.Language.Theory.PA.mul_le_mul_left {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t * t₁ t * t₂
            theorem FirstOrder.Language.Theory.PA.mul_le_mul_right {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PAt₁ t₂ t₁ * t t₂ * t
            theorem FirstOrder.Language.Theory.PA.le_mul_of_le_left {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t t₁ t₂ t₁ t * t₂
            theorem FirstOrder.Language.Theory.PA.le_mul_of_le_right {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t t₁ t₂ t₁ t₂ * t
            theorem FirstOrder.Language.Theory.PA.le_mul_left {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t₂ t₁ t₂ * t₁
            theorem FirstOrder.Language.Theory.PA.le_mul_right {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t₂ t₁ t₁ * t₂
            theorem FirstOrder.Language.Theory.PA.mul_lt_mul_left {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t t₁ t₂ t * t₁ t * t₂
            theorem FirstOrder.Language.Theory.PA.mul_lt_mul_right {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t t₁ t₂ t₁ * t t₂ * t
            theorem FirstOrder.Language.Theory.PA.lt_mul_left {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t₁ 1 t₂ t₁ t₂ * t₁
            theorem FirstOrder.Language.Theory.PA.lt_mul_right {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t₁ 1 t₂ t₁ t₁ * t₂
            theorem FirstOrder.Language.Theory.PA.mul_le_mul_iff_left {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t t * t₁ t * t₂ t₁ t₂
            theorem FirstOrder.Language.Theory.PA.mul_le_mul_iff_right {n : } {t t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t t₁ * t t₂ * t t₁ t₂
            theorem FirstOrder.Language.Theory.PA.mul_pos_iff {n : } {t₁ t₂ : peano.Term n} :
            ↑ᵀ^[n] PA0 t₁ * t₂ 0 t₁ 0 t₂

            Strong induction principle formalized in PA.

            Least number principle formalized in PA.