Documentation

LeanPool.NFWeakPartition.Flypitch4.Fol

NF weak partition development: Flypitch4.Fol.

Valuation helpers (subst_realize) #

def NFChoice.Fol.substRealize {S : Type u} (v : ℕ → S) (x : S) (n k : ℕ) :
S

Given a valuation v, a nat n, and an x : S, return v truncated to its first n values, with the rest of the values replaced by x.

Equations
Instances For
    @[simp]
    theorem NFChoice.Fol.subst_realize_lt {S : Type u} (v : ℕ → S) (x : S) {n k : ℕ} (H : k < n) :
    substRealize v x n k = v k
    @[simp]
    theorem NFChoice.Fol.subst_realize_gt {S : Type u} (v : ℕ → S) (x : S) {n k : ℕ} (H : n < k) :
    substRealize v x n k = v (k - 1)
    @[simp]
    theorem NFChoice.Fol.subst_realize_var_eq {S : Type u} (v : ℕ → S) (x : S) (n : ℕ) :
    substRealize v x n n = x
    theorem NFChoice.Fol.subst_realize_congr {S : Type u} {v v' : ℕ → S} (hv : ∀ (k : ℕ), v k = v' k) (x : S) (n k : ℕ) :
    substRealize v x n k = substRealize v' x n k
    theorem NFChoice.Fol.subst_realize2 {S : Type u} (v : ℕ → S) (x x' : S) (n₁ n₂ k : ℕ) :
    substRealize (substRealize v x' (n₁ + n₂)) x n₁ k = substRealize (substRealize v x n₁) x' (n₁ + n₂ + 1) k
    theorem NFChoice.Fol.subst_realize2_0 {S : Type u} (v : ℕ → S) (x x' : S) (n k : ℕ) :
    substRealize (substRealize v x' n) x 0 k = substRealize (substRealize v x 0) x' (n + 1) k
    theorem NFChoice.Fol.subst_realize_irrel {S : Type u} {v₁ v₂ : ℕ → S} {n : ℕ} (hv : ∀ k < n, v₁ k = v₂ k) (x : S) {k : ℕ} (hk : k < n + 1) :
    substRealize v₁ x 0 k = substRealize v₂ x 0 k
    theorem NFChoice.Fol.lift_subst_realize_cancel {S : Type u} (v : ℕ → S) (k : ℕ) :
    substRealize (fun (n : ℕ) => v (n + 1)) (v 0) 0 k = v k
    theorem NFChoice.Fol.subst_fin_realize_eq {S : Type u} {n : ℕ} {v₁ : DVec S n} {v₂ : ℕ → S} (hv : ∀ (k : ℕ) (hk : k < n), v₁.nth k hk = v₂ k) (x : S) (k : ℕ) (hk : k < n + 1) :
    (DVec.cons x v₁).nth k hk = substRealize v₂ x 0 k

    Language #

    structure NFChoice.Fol.Language :
    Type (u + 1)

    Flypitch construction Language, retained by the first-order soundness and completeness development.

    • functions : ℕ → Type u

      The functions component of the corresponding first-order structure.

    • relations : ℕ → Type u

      The relations component of the corresponding first-order structure.

    Instances For

      Flypitch construction Language.constants, retained by the first-order soundness and completeness development.

      Equations
      Instances For

        preterm and term #

        inductive NFChoice.Fol.preterm (L : Language) :
        ℕ → Type u

        preterm L l is a partially applied term. If applied to l terms, it becomes a term (l=0). We use de Bruijn variables.

        Instances For
          @[reducible]

          Flypitch construction term, retained by the first-order soundness and completeness development.

          Equations
          Instances For

            Notation for the corresponding first-order syntax or interpretation operation.

            Equations
            Instances For
              def NFChoice.Fol.apps {L : Language} {l : ℕ} :
              preterm L l → DVec (term L) l → term L

              Flypitch construction apps, retained by the first-order soundness and completeness development.

              Equations
              Instances For
                @[simp]
                theorem NFChoice.Fol.apps_zero {L : Language} (t : term L) (ts : DVec (term L) 0) :
                apps t ts = t
                theorem NFChoice.Fol.apps_eq_app {L : Language} {l : ℕ} (t : preterm L (l + 1)) (s : term L) (ts : DVec (term L) l) :
                ∃ (t' : preterm L (0 + 1)) (s' : preterm L 0), apps t (DVec.cons s ts) = t'.app s'
                def NFChoice.Fol.preterm.changeArity' {L : Language} {l l' : ℕ} :
                l = l' → (_t : preterm L l) → preterm L l'

                Flypitch construction change_arity', retained by the first-order soundness and completeness development.

                Equations
                Instances For
                  @[simp]
                  theorem NFChoice.Fol.apps_ne_var {L : Language} {l : ℕ} {f : L.functions l} {ts : DVec (term L) l} {k : ℕ} :
                  theorem NFChoice.Fol.apps_inj' {L : Language} {l : ℕ} {t t' : preterm L l} {ts ts' : DVec (term L) l} (h : apps t ts = apps t' ts') :
                  t = t' ∧ ts = ts'
                  theorem NFChoice.Fol.apps_inj {L : Language} {l : ℕ} {f f' : L.functions l} {ts ts' : DVec (term L) l} (h : apps (preterm.func f) ts = apps (preterm.func f') ts') :
                  f = f' ∧ ts = ts'
                  def NFChoice.Fol.term_of_function {L : Language} {l : ℕ} (f : L.functions l) :
                  Arity' (term L) (term L) l

                  Flypitch construction term_of_function, retained by the first-order soundness and completeness development.

                  Equations
                  Instances For
                    def NFChoice.Fol.term.rec {L : Language} {C : term L → Sort v} (hvar : (k : ℕ) → C &k) (hfunc : {l : ℕ} → (f : L.functions l) → (ts : DVec (term L) l) → ((t : term L) → DVec.pmem t ts → C t) → C (apps (preterm.func f) ts)) (t : term L) :
                    C t

                    Flypitch construction term.rec, retained by the first-order soundness and completeness development.

                    Equations
                    Instances For
                      def NFChoice.Fol.term.rec.go {L : Language} {C : term L → Sort v} (hvar : (k : ℕ) → C &k) (hfunc : {l : ℕ} → (f : L.functions l) → (ts : DVec (term L) l) → ((t : term L) → DVec.pmem t ts → C t) → C (apps (preterm.func f) ts)) {l : ℕ} (t : preterm L l) (ts : DVec (term L) l) (ih_ts : (s : term L) → DVec.pmem s ts → C s) :
                      C (apps t ts)

                      Structural recursion accumulator.

                      Equations
                      Instances For
                        def NFChoice.Fol.term.elim' {L : Language} {C : Type v} (hvar : ℕ → C) (hfunc : ⦃l : ℕ⦄ → L.functions l → DVec (term L) l → DVec C l → C) {l : ℕ} (_t : preterm L l) (_ts : DVec (term L) l) (_ih_ts : DVec C l) :
                        C

                        Flypitch construction term.elim', retained by the first-order soundness and completeness development.

                        Equations
                        Instances For
                          def NFChoice.Fol.term.elim {L : Language} {C : Type v} (hvar : ℕ → C) (hfunc : ⦃l : ℕ⦄ → L.functions l → DVec (term L) l → DVec C l → C) (_t : term L) :
                          C

                          Flypitch construction term.elim, retained by the first-order soundness and completeness development.

                          Equations
                          Instances For
                            theorem NFChoice.Fol.term.elim'_apps {L : Language} {C : Type v} (hvar : ℕ → C) (hfunc : ⦃l : ℕ⦄ → L.functions l → DVec (term L) l → DVec C l → C) {l : ℕ} (t : preterm L l) (ts : DVec (term L) l) :
                            elim' hvar hfunc (apps t ts) DVec.nil DVec.nil = elim' hvar hfunc t ts (DVec.map (elim hvar hfunc) ts)
                            theorem NFChoice.Fol.term.elim_apps {L : Language} {C : Type v} (hvar : ℕ → C) (hfunc : ⦃l : ℕ⦄ → L.functions l → DVec (term L) l → DVec C l → C) {l : ℕ} (f : L.functions l) (ts : DVec (term L) l) :
                            elim hvar hfunc (apps (preterm.func f) ts) = hfunc f ts (DVec.map (elim hvar hfunc) ts)

                            lift_term_at — lifting variables #

                            def NFChoice.Fol.liftTermAt {L : Language} {l : ℕ} :
                            preterm L l → ℕ → ℕ → preterm L l

                            lift_term_at t n m raises variables in t which are ≥ m by n.

                            Equations
                            Instances For

                              Notation for the corresponding first-order syntax or interpretation operation.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                @[reducible]
                                def NFChoice.Fol.liftTerm {L : Language} {l : ℕ} (t : preterm L l) (n : ℕ) :

                                Flypitch construction lift_term, retained by the first-order soundness and completeness development.

                                Equations
                                Instances For

                                  Notation for the corresponding first-order syntax or interpretation operation.

                                  Equations
                                  Instances For
                                    @[reducible]
                                    def NFChoice.Fol.liftTerm1 {L : Language} {l : ℕ} (t : preterm L l) :

                                    Flypitch construction lift_term1, retained by the first-order soundness and completeness development.

                                    Equations
                                    Instances For
                                      @[simp]
                                      theorem NFChoice.Fol.lift_term_def {L : Language} {l : ℕ} (t : preterm L l) (n : ℕ) :
                                      (t ↑' n # 0) = t ↑ n
                                      @[simp]
                                      theorem NFChoice.Fol.lift_term_at_zero {L : Language} {l : ℕ} (t : preterm L l) (m : ℕ) :
                                      (t ↑' 0 # m) = t
                                      theorem NFChoice.Fol.lift_term_zero {L : Language} {l : ℕ} (t : preterm L l) :
                                      t ↑ 0 = t
                                      theorem NFChoice.Fol.lift_term_at2_small {L : Language} {l : ℕ} (t : preterm L l) (n n' : ℕ) {m m' : ℕ} :
                                      m' ≤ m → ((t ↑' n # m) ↑' n' # m') = (t ↑' n' # m') ↑' n # m + n'

                                      Iterated lifts: smaller new position

                                      theorem NFChoice.Fol.lift_term_at2_medium {L : Language} {l : ℕ} (t : preterm L l) {n : ℕ} (n' : ℕ) {m m' : ℕ} :
                                      m ≤ m' → m' ≤ m + n → ((t ↑' n # m) ↑' n' # m') = t ↑' n + n' # m
                                      theorem NFChoice.Fol.lift_term2_medium {L : Language} {l : ℕ} (t : preterm L l) {n : ℕ} (n' : ℕ) {m' : ℕ} (h : m' ≤ n) :
                                      (t ↑ n ↑' n' # m') = t ↑ (n + n')
                                      theorem NFChoice.Fol.lift_term2 {L : Language} {l : ℕ} (t : preterm L l) (n n' : ℕ) :
                                      t ↑ n ↑ n' = t ↑ (n + n')
                                      theorem NFChoice.Fol.lift_term_at2_eq {L : Language} {l : ℕ} (t : preterm L l) (n n' m : ℕ) :
                                      ((t ↑' n # m) ↑' n' # m + n) = t ↑' n + n' # m
                                      theorem NFChoice.Fol.lift_term_at2_large {L : Language} {l : ℕ} (t : preterm L l) {n : ℕ} (n' : ℕ) {m m' : ℕ} (H : m + n ≤ m') :
                                      ((t ↑' n # m) ↑' n' # m') = (t ↑' n' # m' - n) ↑' n # m
                                      @[simp]
                                      theorem NFChoice.Fol.lift_term_at_apps {L : Language} {l : ℕ} (t : preterm L l) (ts : DVec (term L) l) (n m : ℕ) :
                                      (apps t ts ↑' n # m) = apps (t ↑' n # m) (DVec.map (fun (x : preterm L 0) => x ↑' n # m) ts)
                                      theorem NFChoice.Fol.lift_term_apps {L : Language} {l : ℕ} (t : preterm L l) (ts : DVec (term L) l) (n : ℕ) :
                                      apps t ts ↑ n = apps (t ↑ n) (DVec.map (fun (x : preterm L 0) => x ↑ n) ts)

                                      subst_term — substitution #

                                      def NFChoice.Fol.substTerm {L : Language} {l : ℕ} :
                                      preterm L l → term L → ℕ → preterm L l

                                      subst_term t s n substitutes s for (&n) in t and reduces variable levels above n.

                                      Equations
                                      Instances For
                                        @[simp]
                                        theorem NFChoice.Fol.subst_term_var_lt {L : Language} (s : term L) {k n : ℕ} (H : k < n) :
                                        substTerm (&k) s n = &k
                                        @[simp]
                                        theorem NFChoice.Fol.subst_term_var_gt {L : Language} (s : term L) {k n : ℕ} (H : n < k) :
                                        substTerm (&k) s n = &(k - 1)
                                        @[simp]
                                        theorem NFChoice.Fol.subst_term_var_eq {L : Language} (s : term L) (n : ℕ) :
                                        substTerm (&n) s n = s ↑' n # 0
                                        @[simp]
                                        theorem NFChoice.Fol.subst_term_func {L : Language} {l : ℕ} (f : L.functions l) (s : term L) (n : ℕ) :
                                        @[simp]
                                        theorem NFChoice.Fol.subst_term_app {L : Language} {l : ℕ} (t₁ : preterm L (l + 1)) (t₂ s : term L) (n : ℕ) :
                                        substTerm (t₁.app t₂) s n = (substTerm t₁ s n).app (substTerm t₂ s n)
                                        @[simp]
                                        theorem NFChoice.Fol.subst_term_apps {L : Language} {l : ℕ} (t : preterm L l) (ts : DVec (term L) l) (s : term L) (n : ℕ) :
                                        substTerm (apps t ts) s n = apps (substTerm t s n) (DVec.map (fun (x : preterm L 0) => substTerm x s n) ts)
                                        theorem NFChoice.Fol.lift_at_subst_term_large {L : Language} {l : ℕ} (t : preterm L l) (s : term L) {n₁ : ℕ} (n₂ : ℕ) {m : ℕ} :
                                        m ≤ n₁ → substTerm (t ↑' n₂ # m) s (n₁ + n₂) = substTerm t s n₁ ↑' n₂ # m

                                        Lift then substitute: large case (substituted var is above the lift range)

                                        theorem NFChoice.Fol.lift_subst_term_large {L : Language} {l : ℕ} (t : preterm L l) (s : term L) (n₁ n₂ : ℕ) :
                                        substTerm (t ↑ n₂) s (n₁ + n₂) = substTerm t s n₁ ↑ n₂
                                        theorem NFChoice.Fol.lift_subst_term_large' {L : Language} {l : ℕ} (t : preterm L l) (s : term L) (n₁ n₂ : ℕ) :
                                        substTerm (t ↑ n₂) s (n₂ + n₁) = substTerm t s n₁ ↑ n₂
                                        theorem NFChoice.Fol.lift_at_subst_term_medium {L : Language} {l : ℕ} (t : preterm L l) (s : term L) {n₁ n₂ m : ℕ} :
                                        m ≤ n₂ → n₂ ≤ m + n₁ → substTerm (t ↑' n₁ + 1 # m) s n₂ = t ↑' n₁ # m

                                        Lift then substitute: medium case (substituted var is within the lift range)

                                        theorem NFChoice.Fol.lift_subst_term_medium {L : Language} {l : ℕ} (t : preterm L l) (s : term L) (n₁ n₂ : ℕ) :
                                        substTerm (t ↑ (n₁ + n₂ + 1)) s n₁ = t ↑ (n₁ + n₂)
                                        theorem NFChoice.Fol.lift_at_subst_term_eq {L : Language} {l : ℕ} (t : preterm L l) (s : term L) (n : ℕ) :
                                        substTerm (t ↑' 1 # n) s n = t
                                        @[simp]
                                        theorem NFChoice.Fol.lift_term1_subst_term {L : Language} {l : ℕ} (t : preterm L l) (s : term L) :
                                        substTerm (t ↑ 1) s 0 = t
                                        theorem NFChoice.Fol.lift_at_subst_term_small {L : Language} {l : ℕ} (t : preterm L l) (s : term L) (n₁ n₂ m : ℕ) :
                                        substTerm (t ↑' n₁ # m + n₂ + 1) (s ↑' n₁ # m) n₂ = substTerm t s n₂ ↑' n₁ # m + n₂

                                        Lift then substitute: small case

                                        theorem NFChoice.Fol.subst_term2 {L : Language} {l : ℕ} (t : preterm L l) (s₁ s₂ : term L) (n₁ n₂ : ℕ) :
                                        substTerm (substTerm t s₁ n₁) s₂ (n₁ + n₂) = substTerm (substTerm t s₂ (n₁ + n₂ + 1)) (substTerm s₁ s₂ n₂) n₁

                                        Double substitution lemma

                                        theorem NFChoice.Fol.subst_term2_0 {L : Language} {l : ℕ} (t : preterm L l) (s₁ s₂ : term L) (n : ℕ) :
                                        substTerm (substTerm t s₁ 0) s₂ n = substTerm (substTerm t s₂ (n + 1)) (substTerm s₁ s₂ n) 0
                                        theorem NFChoice.Fol.lift_subst_term_cancel {L : Language} {l : ℕ} (t : preterm L l) (n : ℕ) :
                                        substTerm (t ↑' 1 # n + 1) (&0) n = t

                                        preformula and formula #

                                        inductive NFChoice.Fol.preformula {L : Language} :
                                        ℕ → Type u

                                        preformula L l is a partially applied formula. If applied to l terms, it becomes a formula (l=0).

                                        Instances For
                                          @[reducible]

                                          Flypitch construction formula, retained by the first-order soundness and completeness development.

                                          Equations
                                          Instances For

                                            Notation for the corresponding first-order syntax or interpretation operation.

                                            Equations
                                            Instances For

                                              Notation for the corresponding first-order syntax or interpretation operation.

                                              Equations
                                              Instances For

                                                Notation for the corresponding first-order syntax or interpretation operation.

                                                Equations
                                                Instances For

                                                  Notation for the corresponding first-order syntax or interpretation operation.

                                                  Equations
                                                  Instances For

                                                    Flypitch construction not', retained by the first-order soundness and completeness development.

                                                    Equations
                                                    Instances For

                                                      Notation for the corresponding first-order syntax or interpretation operation.

                                                      Equations
                                                      Instances For
                                                        def NFChoice.Fol.and' {L : Language} (f₁ f₂ : formula L) :

                                                        Flypitch construction and', retained by the first-order soundness and completeness development.

                                                        Equations
                                                        Instances For

                                                          Notation for the corresponding first-order syntax or interpretation operation.

                                                          Equations
                                                          Instances For
                                                            def NFChoice.Fol.or' {L : Language} (f₁ f₂ : formula L) :

                                                            Flypitch construction or', retained by the first-order soundness and completeness development.

                                                            Equations
                                                            Instances For

                                                              Notation for the corresponding first-order syntax or interpretation operation.

                                                              Equations
                                                              Instances For
                                                                def NFChoice.Fol.biimp {L : Language} (f₁ f₂ : formula L) :

                                                                Flypitch construction biimp, retained by the first-order soundness and completeness development.

                                                                Equations
                                                                Instances For

                                                                  Notation for the corresponding first-order syntax or interpretation operation.

                                                                  Equations
                                                                  Instances For

                                                                    Flypitch construction ex', retained by the first-order soundness and completeness development.

                                                                    Equations
                                                                    Instances For

                                                                      Notation for the corresponding first-order syntax or interpretation operation.

                                                                      Equations
                                                                      Instances For
                                                                        def NFChoice.Fol.appsRel {L : Language} {l : ℕ} :
                                                                        preformula l → DVec (term L) l → formula L

                                                                        Flypitch construction apps_rel, retained by the first-order soundness and completeness development.

                                                                        Equations
                                                                        Instances For
                                                                          @[simp]
                                                                          theorem NFChoice.Fol.apps_rel_zero {L : Language} (f : formula L) (ts : DVec (term L) 0) :
                                                                          appsRel f ts = f

                                                                          Flypitch construction formula_of_relation, retained by the first-order soundness and completeness development.

                                                                          Equations
                                                                          Instances For
                                                                            def NFChoice.Fol.formula.rec' {L : Language} {C : formula L → Sort v} (hfalsum : C ⊥') (hequal : (t₁ t₂ : term L) → C (preformula.equal t₁ t₂)) (hrel : ⦃l : ℕ⦄ → (R : L.relations l) → (ts : DVec (term L) l) → C (appsRel (preformula.rel R) ts)) (himp : ⦃f₁ f₂ : formula L⦄ → C f₁ → C f₂ → C (preformula.imp f₁ f₂)) (hall : ⦃f : formula L⦄ → C f → C (preformula.all f)) {l : ℕ} (f : preformula l) (ts : DVec (term L) l) :
                                                                            C (appsRel f ts)

                                                                            Flypitch construction formula.rec', retained by the first-order soundness and completeness development.

                                                                            Equations
                                                                            Instances For
                                                                              def NFChoice.Fol.formula.rec {L : Language} {C : formula L → Sort v} (hfalsum : C ⊥') (hequal : (t₁ t₂ : term L) → C (preformula.equal t₁ t₂)) (hrel : ⦃l : ℕ⦄ → (R : L.relations l) → (ts : DVec (term L) l) → C (appsRel (preformula.rel R) ts)) (himp : ⦃f₁ f₂ : formula L⦄ → C f₁ → C f₂ → C (preformula.imp f₁ f₂)) (hall : ⦃f : formula L⦄ → C f → C (preformula.all f)) (f : formula L) :
                                                                              C f

                                                                              Flypitch construction formula.rec, retained by the first-order soundness and completeness development.

                                                                              Equations
                                                                              Instances For
                                                                                theorem NFChoice.Fol.formula.rec'_apps_rel {L : Language} {C : formula L → Sort v} (hfalsum : C ⊥') (hequal : (t₁ t₂ : term L) → C (preformula.equal t₁ t₂)) (hrel : ⦃l : ℕ⦄ → (R : L.relations l) → (ts : DVec (term L) l) → C (appsRel (preformula.rel R) ts)) (himp : ⦃f₁ f₂ : formula L⦄ → C f₁ → C f₂ → C (preformula.imp f₁ f₂)) (hall : ⦃f : formula L⦄ → C f → C (preformula.all f)) {l : ℕ} (f : preformula l) (ts : DVec (term L) l) :
                                                                                rec' hfalsum hequal hrel himp hall (appsRel f ts) DVec.nil = rec' hfalsum hequal hrel himp hall f ts
                                                                                theorem NFChoice.Fol.formula.rec_apps_rel {L : Language} {C : formula L → Sort v} (hfalsum : C ⊥') (hequal : (t₁ t₂ : term L) → C (preformula.equal t₁ t₂)) (hrel : ⦃l : ℕ⦄ → (R : L.relations l) → (ts : DVec (term L) l) → C (appsRel (preformula.rel R) ts)) (himp : ⦃f₁ f₂ : formula L⦄ → C f₁ → C f₂ → C (preformula.imp f₁ f₂)) (hall : ⦃f : formula L⦄ → C f → C (preformula.all f)) {l : ℕ} (R : L.relations l) (ts : DVec (term L) l) :
                                                                                rec hfalsum hequal hrel himp hall (appsRel (preformula.rel R) ts) = hrel R ts

                                                                                lift_formula_at — lifting variables in formulas #

                                                                                Flypitch construction lift_formula_at, retained by the first-order soundness and completeness development.

                                                                                Equations
                                                                                Instances For

                                                                                  Notation for the corresponding first-order syntax or interpretation operation.

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

                                                                                    Flypitch construction lift_formula, retained by the first-order soundness and completeness development.

                                                                                    Equations
                                                                                    Instances For

                                                                                      Notation for the corresponding first-order syntax or interpretation operation.

                                                                                      Equations
                                                                                      Instances For
                                                                                        @[reducible]

                                                                                        Flypitch construction lift_formula1, retained by the first-order soundness and completeness development.

                                                                                        Equations
                                                                                        Instances For
                                                                                          @[simp]
                                                                                          theorem NFChoice.Fol.lift_formula_def {L : Language} {l : ℕ} (f : preformula l) (n : ℕ) :
                                                                                          (f ↑f' n # 0) = f ↑f n
                                                                                          @[simp]
                                                                                          theorem NFChoice.Fol.lift_formula1_not {L : Language} (n : ℕ) (f : formula L) :
                                                                                          not' f ↑f n = not' (f ↑f n)
                                                                                          @[simp]
                                                                                          theorem NFChoice.Fol.lift_formula_at_zero {L : Language} {l : ℕ} (f : preformula l) (m : ℕ) :
                                                                                          (f ↑f' 0 # m) = f
                                                                                          theorem NFChoice.Fol.lift_formula_at2_small {L : Language} {l : ℕ} (f : preformula l) (n n' : ℕ) {m m' : ℕ} :
                                                                                          m' ≤ m → ((f ↑f' n # m) ↑f' n' # m') = (f ↑f' n' # m') ↑f' n # m + n'
                                                                                          theorem NFChoice.Fol.lift_formula_at2_medium {L : Language} {l : ℕ} (f : preformula l) (n n' : ℕ) {m m' : ℕ} :
                                                                                          m ≤ m' → m' ≤ m + n → ((f ↑f' n # m) ↑f' n' # m') = f ↑f' n + n' # m
                                                                                          theorem NFChoice.Fol.lift_formula_at2_eq {L : Language} {l : ℕ} (f : preformula l) (n n' m : ℕ) :
                                                                                          ((f ↑f' n # m) ↑f' n' # m + n) = f ↑f' n + n' # m
                                                                                          theorem NFChoice.Fol.lift_formula_at2_large {L : Language} {l : ℕ} (f : preformula l) (n n' : ℕ) {m m' : ℕ} (H : m + n ≤ m') :
                                                                                          ((f ↑f' n # m) ↑f' n' # m') = (f ↑f' n' # m' - n) ↑f' n # m
                                                                                          @[simp]
                                                                                          theorem NFChoice.Fol.lift_formula_at_apps_rel {L : Language} {l : ℕ} (f : preformula l) (ts : DVec (term L) l) (n m : ℕ) :
                                                                                          (appsRel f ts ↑f' n # m) = appsRel (f ↑f' n # m) (DVec.map (fun (x : preterm L 0) => x ↑' n # m) ts)
                                                                                          theorem NFChoice.Fol.lift_formula_apps_rel {L : Language} {l : ℕ} (f : preformula l) (ts : DVec (term L) l) (n : ℕ) :
                                                                                          appsRel f ts ↑f n = appsRel (f ↑f n) (DVec.map (fun (x : preterm L 0) => x ↑ n) ts)

                                                                                          subst_formula — substitution into formulas #

                                                                                          Flypitch construction subst_formula, retained by the first-order soundness and completeness development.

                                                                                          Equations
                                                                                          Instances For

                                                                                            Notation for the corresponding first-order syntax or interpretation operation.

                                                                                            Equations
                                                                                            • One or more equations did not get rendered due to their size.
                                                                                            Instances For
                                                                                              theorem NFChoice.Fol.subst_formula_equal {L : Language} (t₁ t₂ s : term L) (n : ℕ) :
                                                                                              preformula.equal t₁ t₂ [s // n]f = preformula.equal (substTerm t₁ s n) (substTerm t₂ s n)
                                                                                              @[simp]
                                                                                              theorem NFChoice.Fol.subst_formula_biimp {L : Language} (f₁ f₂ : formula L) (s : term L) (n : ℕ) :
                                                                                              biimp f₁ f₂ [s // n]f = biimp (f₁ [s // n]f) (f₂ [s // n]f)
                                                                                              theorem NFChoice.Fol.lift_at_subst_formula_large {L : Language} {l : ℕ} (f : preformula l) (s : term L) {n₁ : ℕ} (n₂ : ℕ) {m : ℕ} :
                                                                                              m ≤ n₁ → (f ↑f' n₂ # m) [s // n₁ + n₂]f = f [s // n₁]f ↑f' n₂ # m
                                                                                              theorem NFChoice.Fol.lift_subst_formula_large {L : Language} {l : ℕ} (f : preformula l) (s : term L) {n₁ n₂ : ℕ} :
                                                                                              f ↑f n₂ [s // n₁ + n₂]f = (f [s // n₁]f) ↑f n₂
                                                                                              theorem NFChoice.Fol.lift_subst_formula_large' {L : Language} {l : ℕ} (f : preformula l) (s : term L) {n₁ n₂ : ℕ} :
                                                                                              f ↑f n₂ [s // n₂ + n₁]f = (f [s // n₁]f) ↑f n₂
                                                                                              theorem NFChoice.Fol.lift_at_subst_formula_medium {L : Language} {l : ℕ} (f : preformula l) (s : term L) {n₁ n₂ m : ℕ} :
                                                                                              m ≤ n₂ → n₂ ≤ m + n₁ → (f ↑f' n₁ + 1 # m) [s // n₂]f = f ↑f' n₁ # m
                                                                                              theorem NFChoice.Fol.lift_subst_formula_medium {L : Language} {l : ℕ} (f : preformula l) (s : term L) (n₁ n₂ : ℕ) :
                                                                                              f ↑f (n₁ + n₂ + 1) [s // n₁]f = f ↑f (n₁ + n₂)
                                                                                              theorem NFChoice.Fol.lift_at_subst_formula_eq {L : Language} {l : ℕ} (f : preformula l) (s : term L) (n : ℕ) :
                                                                                              (f ↑f' 1 # n) [s // n]f = f
                                                                                              @[simp]
                                                                                              theorem NFChoice.Fol.lift_formula1_subst {L : Language} {l : ℕ} (f : preformula l) (s : term L) :
                                                                                              f ↑f 1 [s // 0]f = f
                                                                                              theorem NFChoice.Fol.lift_at_subst_formula_small {L : Language} {l : ℕ} (f : preformula l) (s : term L) (n₁ n₂ m : ℕ) :
                                                                                              (f ↑f' n₁ # m + n₂ + 1) [s ↑' n₁ # m // n₂]f = f [s // n₂]f ↑f' n₁ # m + n₂
                                                                                              theorem NFChoice.Fol.lift_at_subst_formula_small0 {L : Language} {l : ℕ} (f : preformula l) (s : term L) (n₁ m : ℕ) :
                                                                                              (f ↑f' n₁ # m + 1) [s ↑' n₁ # m // 0]f = f [s // 0]f ↑f' n₁ # m
                                                                                              theorem NFChoice.Fol.subst_formula2 {L : Language} {l : ℕ} (f : preformula l) (s₁ s₂ : term L) (n₁ n₂ : ℕ) :
                                                                                              f [s₁ // n₁]f [s₂ // n₁ + n₂]f = f [s₂ // n₁ + n₂ + 1]f [substTerm s₁ s₂ n₂ // n₁]f
                                                                                              theorem NFChoice.Fol.subst_formula2_zero {L : Language} {l : ℕ} (f : preformula l) (s₁ s₂ : term L) (n : ℕ) :
                                                                                              f [s₁ // 0]f [s₂ // n]f = f [s₂ // n + 1]f [substTerm s₁ s₂ n // 0]f
                                                                                              theorem NFChoice.Fol.lift_subst_formula_cancel {L : Language} {l : ℕ} (f : preformula l) (n : ℕ) :
                                                                                              (f ↑f' 1 # n + 1) [&0 // n]f = f
                                                                                              @[simp]
                                                                                              theorem NFChoice.Fol.subst_formula_apps_rel {L : Language} {l : ℕ} (f : preformula l) (ts : DVec (term L) l) (s : term L) (n : ℕ) :
                                                                                              appsRel f ts [s // n]f = appsRel (f [s // n]f) (DVec.map (fun (x : preterm L 0) => substTerm x s n) ts)

                                                                                              count_quantifiers and quantifier_free #

                                                                                              Flypitch construction quantifier_free, retained by the first-order soundness and completeness development.

                                                                                              Equations
                                                                                              Instances For

                                                                                                prf — the proof system (src/fol.lean lines 816-824) #

                                                                                                inductive NFChoice.Fol.prf {L : Language} :
                                                                                                Set (formula L) → formula L → Type u

                                                                                                prf Γ A is the type of proofs of A from hypotheses Γ in classical first-order logic.

                                                                                                Instances For

                                                                                                  Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    def NFChoice.Fol.provable {L : Language} (T : Set (formula L)) (f : formula L) :

                                                                                                    Flypitch construction provable, retained by the first-order soundness and completeness development.

                                                                                                    Equations
                                                                                                    Instances For

                                                                                                      Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                      Equations
                                                                                                      Instances For

                                                                                                        Derived proof rules (src/fol.lean lines 832-1103) #

                                                                                                        def NFChoice.Fol.allE {L : Language} {Γ : Set (formula L)} (A : formula L) (t : term L) {B : preformula 0} (H₁ : prf Γ (preformula.all A)) (H₂ : A [t // 0]f = B) :
                                                                                                        prf Γ B

                                                                                                        Flypitch construction allE, retained by the first-order soundness and completeness development.

                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          def NFChoice.Fol.prfSubst {L : Language} {Γ : Set (formula L)} {s t : term L} (f₁ : formula L) {f₂ : preformula 0} (H₁ : prf Γ (preformula.equal s t)) (H₂ : prf Γ (f₁ [s // 0]f)) (H₃ : f₁ [t // 0]f = f₂) :
                                                                                                          prf Γ f₂

                                                                                                          Flypitch construction prf_subst, retained by the first-order soundness and completeness development.

                                                                                                          Equations
                                                                                                          Instances For
                                                                                                            def NFChoice.Fol.axm1 {L : Language} {Γ : Set (formula L)} {A : formula L} :
                                                                                                            prf (insert A Γ) A

                                                                                                            Flypitch construction axm1, retained by the first-order soundness and completeness development.

                                                                                                            Equations
                                                                                                            Instances For
                                                                                                              def NFChoice.Fol.axm2 {L : Language} {Γ : Set (formula L)} {A B : formula L} :
                                                                                                              prf (insert A (insert B Γ)) B

                                                                                                              Flypitch construction axm2, retained by the first-order soundness and completeness development.

                                                                                                              Equations
                                                                                                              Instances For
                                                                                                                noncomputable def NFChoice.Fol.weakening {L : Language} {Γ Δ : Set (formula L)} {f : formula L} (H₁ : Γ ⊆ Δ) (H₂ : prf Γ f) :
                                                                                                                prf Δ f

                                                                                                                Flypitch construction weakening, retained by the first-order soundness and completeness development.

                                                                                                                Equations
                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                Instances For
                                                                                                                  noncomputable def NFChoice.Fol.prfLift {L : Language} {Γ : Set (formula L)} {f : formula L} (n m : ℕ) (H : prf Γ f) :
                                                                                                                  prf ((fun (f' : preformula 0) => f' ↑f' n # m) '' Γ) (f ↑f' n # m)

                                                                                                                  Flypitch construction prf_lift, retained by the first-order soundness and completeness development.

                                                                                                                  Equations
                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                  Instances For
                                                                                                                    noncomputable def NFChoice.Fol.prfSubstitution {L : Language} {Γ : Set (formula L)} {f : formula L} (t : term L) (n : ℕ) (H : prf Γ f) :
                                                                                                                    prf ((fun (x : preformula 0) => x [t // n]f) '' Γ) (f [t // n]f)

                                                                                                                    Flypitch construction prf_substitution, retained by the first-order soundness and completeness development.

                                                                                                                    Equations
                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                    Instances For
                                                                                                                      noncomputable def NFChoice.Fol.reflectPrfLift1 {L : Language} {Γ : Set (formula L)} {f : formula L} (h : prf (liftFormula1 '' Γ) (f ↑f 1)) :
                                                                                                                      prf Γ f

                                                                                                                      Flypitch construction reflect_prf_lift1, retained by the first-order soundness and completeness development.

                                                                                                                      Equations
                                                                                                                      Instances For
                                                                                                                        noncomputable def NFChoice.Fol.weakening1 {L : Language} {Γ : Set (formula L)} {f₁ f₂ : formula L} (H : prf Γ f₂) :
                                                                                                                        prf (insert f₁ Γ) f₂

                                                                                                                        Flypitch construction weakening1, retained by the first-order soundness and completeness development.

                                                                                                                        Equations
                                                                                                                        Instances For
                                                                                                                          noncomputable def NFChoice.Fol.weakening2 {L : Language} {Γ : Set (formula L)} {f₁ f₂ f₃ : formula L} (H : prf (insert f₁ Γ) f₂) :
                                                                                                                          prf (insert f₁ (insert f₃ Γ)) f₂

                                                                                                                          Flypitch construction weakening2, retained by the first-order soundness and completeness development.

                                                                                                                          Equations
                                                                                                                          Instances For
                                                                                                                            noncomputable def NFChoice.Fol.deduction {L : Language} {Γ : Set (formula L)} {A B : formula L} (H : prf Γ (preformula.imp A B)) :
                                                                                                                            prf (insert A Γ) B

                                                                                                                            Flypitch construction deduction, retained by the first-order soundness and completeness development.

                                                                                                                            Equations
                                                                                                                            Instances For
                                                                                                                              noncomputable def NFChoice.Fol.exfalso {L : Language} {Γ : Set (formula L)} {A : formula L} (H : prf Γ ⊥') :
                                                                                                                              prf Γ A

                                                                                                                              Flypitch construction exfalso, retained by the first-order soundness and completeness development.

                                                                                                                              Equations
                                                                                                                              Instances For
                                                                                                                                theorem NFChoice.Fol.exfalso' {L : Language} {Γ : Set (formula L)} {A : formula L} (H : provable Γ ⊥') :
                                                                                                                                noncomputable def NFChoice.Fol.notI {L : Language} {Γ : Set (formula L)} {A : formula L} (H : prf Γ (preformula.imp A ⊥')) :
                                                                                                                                prf Γ (not' A)

                                                                                                                                Flypitch construction notI, retained by the first-order soundness and completeness development.

                                                                                                                                Equations
                                                                                                                                Instances For
                                                                                                                                  noncomputable def NFChoice.Fol.andI {L : Language} {Γ : Set (formula L)} {f₁ f₂ : formula L} (H₁ : prf Γ f₁) (H₂ : prf Γ f₂) :
                                                                                                                                  prf Γ (and' f₁ f₂)

                                                                                                                                  Flypitch construction andI, retained by the first-order soundness and completeness development.

                                                                                                                                  Equations
                                                                                                                                  Instances For
                                                                                                                                    noncomputable def NFChoice.Fol.andE1 {L : Language} {Γ : Set (formula L)} {f₁ : formula L} (f₂ : formula L) (H : prf Γ (and' f₁ f₂)) :
                                                                                                                                    prf Γ f₁

                                                                                                                                    Flypitch construction andE1, retained by the first-order soundness and completeness development.

                                                                                                                                    Equations
                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                    Instances For
                                                                                                                                      noncomputable def NFChoice.Fol.andE2 {L : Language} {Γ : Set (formula L)} (f₁ : formula L) {f₂ : formula L} (H : prf Γ (and' f₁ f₂)) :
                                                                                                                                      prf Γ f₂

                                                                                                                                      Flypitch construction andE2, retained by the first-order soundness and completeness development.

                                                                                                                                      Equations
                                                                                                                                      Instances For
                                                                                                                                        noncomputable def NFChoice.Fol.orI1 {L : Language} {Γ : Set (formula L)} {A B : formula L} (H : prf Γ A) :
                                                                                                                                        prf Γ (or' A B)

                                                                                                                                        Flypitch construction orI1, retained by the first-order soundness and completeness development.

                                                                                                                                        Equations
                                                                                                                                        Instances For
                                                                                                                                          noncomputable def NFChoice.Fol.orI2 {L : Language} {Γ : Set (formula L)} {A B : formula L} (H : prf Γ B) :
                                                                                                                                          prf Γ (or' A B)

                                                                                                                                          Flypitch construction orI2, retained by the first-order soundness and completeness development.

                                                                                                                                          Equations
                                                                                                                                          Instances For
                                                                                                                                            noncomputable def NFChoice.Fol.orE {L : Language} {Γ : Set (formula L)} {A B C : formula L} (H₁ : prf Γ (or' A B)) (H₂ : prf (insert A Γ) C) (H₃ : prf (insert B Γ) C) :
                                                                                                                                            prf Γ C

                                                                                                                                            Flypitch construction orE, retained by the first-order soundness and completeness development.

                                                                                                                                            Equations
                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                            Instances For
                                                                                                                                              noncomputable def NFChoice.Fol.biimpI {L : Language} {Γ : Set (formula L)} {f₁ f₂ : formula L} (H₁ : prf (insert f₁ Γ) f₂) (H₂ : prf (insert f₂ Γ) f₁) :
                                                                                                                                              prf Γ (biimp f₁ f₂)

                                                                                                                                              Flypitch construction biimpI, retained by the first-order soundness and completeness development.

                                                                                                                                              Equations
                                                                                                                                              Instances For
                                                                                                                                                noncomputable def NFChoice.Fol.biimpE1 {L : Language} {Γ : Set (formula L)} {f₁ f₂ : formula L} (H : prf Γ (biimp f₁ f₂)) :
                                                                                                                                                prf (insert f₁ Γ) f₂

                                                                                                                                                Flypitch construction biimpE1, retained by the first-order soundness and completeness development.

                                                                                                                                                Equations
                                                                                                                                                Instances For
                                                                                                                                                  noncomputable def NFChoice.Fol.biimpE2 {L : Language} {Γ : Set (formula L)} {f₁ f₂ : formula L} (H : prf Γ (biimp f₁ f₂)) :
                                                                                                                                                  prf (insert f₂ Γ) f₁

                                                                                                                                                  Flypitch construction biimpE2, retained by the first-order soundness and completeness development.

                                                                                                                                                  Equations
                                                                                                                                                  Instances For
                                                                                                                                                    noncomputable def NFChoice.Fol.exI {L : Language} {Γ : Set (formula L)} {f : formula L} (t : term L) (H : prf Γ (f [t // 0]f)) :
                                                                                                                                                    prf Γ (ex' f)

                                                                                                                                                    Flypitch construction exI, retained by the first-order soundness and completeness development.

                                                                                                                                                    Equations
                                                                                                                                                    Instances For
                                                                                                                                                      noncomputable def NFChoice.Fol.exE {L : Language} {Γ : Set (formula L)} {f₁ f₂ : formula L} (H₁ : prf Γ (ex' f₁)) (H₂ : prf (insert f₁ (liftFormula1 '' Γ)) (liftFormula1 f₂)) :
                                                                                                                                                      prf Γ f₂

                                                                                                                                                      Flypitch construction exE, retained by the first-order soundness and completeness development.

                                                                                                                                                      Equations
                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                      Instances For
                                                                                                                                                        noncomputable def NFChoice.Fol.exNotOfNotAll {L : Language} {Γ : Set (formula L)} {f : formula L} (H : prf Γ (not' (preformula.all f))) :
                                                                                                                                                        prf Γ (ex' (not' f))

                                                                                                                                                        Flypitch construction ex_not_of_not_all, retained by the first-order soundness and completeness development.

                                                                                                                                                        Equations
                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                        Instances For
                                                                                                                                                          noncomputable def NFChoice.Fol.notAndSelf {L : Language} {Γ : Set (formula L)} {f : formula L} (H : prf Γ (and' f (not' f))) :

                                                                                                                                                          Flypitch construction not_and_self, retained by the first-order soundness and completeness development.

                                                                                                                                                          Equations
                                                                                                                                                          Instances For
                                                                                                                                                            noncomputable def NFChoice.Fol.prfSymm {L : Language} {Γ : Set (formula L)} {s t : term L} (H : prf Γ (preformula.equal s t)) :

                                                                                                                                                            Flypitch construction prf_symm, retained by the first-order soundness and completeness development.

                                                                                                                                                            Equations
                                                                                                                                                            Instances For
                                                                                                                                                              noncomputable def NFChoice.Fol.prfTrans {L : Language} {Γ : Set (formula L)} {t₁ t₂ t₃ : term L} (H : prf Γ (preformula.equal t₁ t₂)) (H' : prf Γ (preformula.equal t₂ t₃)) :
                                                                                                                                                              prf Γ (preformula.equal t₁ t₃)

                                                                                                                                                              Flypitch construction prf_trans, retained by the first-order soundness and completeness development.

                                                                                                                                                              Equations
                                                                                                                                                              Instances For
                                                                                                                                                                noncomputable def NFChoice.Fol.prfCongr {L : Language} {Γ : Set (formula L)} {t₁ t₂ : term L} (s : term L) (H : prf Γ (preformula.equal t₁ t₂)) :
                                                                                                                                                                prf Γ (preformula.equal (substTerm s t₁ 0) (substTerm s t₂ 0))

                                                                                                                                                                Flypitch construction prf_congr, retained by the first-order soundness and completeness development.

                                                                                                                                                                Equations
                                                                                                                                                                Instances For
                                                                                                                                                                  noncomputable def NFChoice.Fol.appCongr {L : Language} {Γ : Set (formula L)} {t₁ t₂ : term L} (s : preterm L 1) (H : prf Γ (preformula.equal t₁ t₂)) :
                                                                                                                                                                  prf Γ (preformula.equal (s.app t₁) (s.app t₂))

                                                                                                                                                                  Flypitch construction app_congr, retained by the first-order soundness and completeness development.

                                                                                                                                                                  Equations
                                                                                                                                                                  Instances For
                                                                                                                                                                    noncomputable def NFChoice.Fol.apprelCongr {L : Language} {Γ : Set (formula L)} {t₁ t₂ : term L} (f : preformula 1) (H : prf Γ (preformula.equal t₁ t₂)) (H₂ : prf Γ (f.apprel t₁)) :
                                                                                                                                                                    prf Γ (f.apprel t₂)

                                                                                                                                                                    Flypitch construction apprel_congr, retained by the first-order soundness and completeness development.

                                                                                                                                                                    Equations
                                                                                                                                                                    Instances For
                                                                                                                                                                      noncomputable def NFChoice.Fol.impTrans {L : Language} {Γ : Set (formula L)} {f₁ f₂ f₃ : formula L} (H₁ : prf Γ (preformula.imp f₁ f₂)) (H₂ : prf Γ (preformula.imp f₂ f₃)) :
                                                                                                                                                                      prf Γ (preformula.imp f₁ f₃)

                                                                                                                                                                      Flypitch construction imp_trans, retained by the first-order soundness and completeness development.

                                                                                                                                                                      Equations
                                                                                                                                                                      Instances For
                                                                                                                                                                        noncomputable def NFChoice.Fol.biimpReflCertificate {L : Language} (Γ : Set (formula L)) (f : formula L) :
                                                                                                                                                                        prf Γ (biimp f f)

                                                                                                                                                                        Flypitch construction biimp_refl, retained by the first-order soundness and completeness development.

                                                                                                                                                                        Equations
                                                                                                                                                                        Instances For
                                                                                                                                                                          noncomputable def NFChoice.Fol.biimpTrans {L : Language} {Γ : Set (formula L)} {f₁ f₂ f₃ : formula L} (H₁ : prf Γ (biimp f₁ f₂)) (H₂ : prf Γ (biimp f₂ f₃)) :
                                                                                                                                                                          prf Γ (biimp f₁ f₃)

                                                                                                                                                                          Flypitch construction biimp_trans, retained by the first-order soundness and completeness development.

                                                                                                                                                                          Equations
                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                          Instances For
                                                                                                                                                                            def NFChoice.Fol.equalPreterms {L : Language} (T : Set (formula L)) {l : ℕ} (t₁ t₂ : preterm L l) :

                                                                                                                                                                            Flypitch construction equal_preterms, retained by the first-order soundness and completeness development.

                                                                                                                                                                            Equations
                                                                                                                                                                            Instances For
                                                                                                                                                                              noncomputable def NFChoice.Fol.equalPretermsApp {L : Language} {T : Set (formula L)} {l : ℕ} {t t' : preterm L (l + 1)} {s s' : term L} (Ht : equalPreterms T t t') (Hs : prf T (preformula.equal s s')) :
                                                                                                                                                                              equalPreterms T (t.app s) (t'.app s')

                                                                                                                                                                              Flypitch construction equal_preterms_app, retained by the first-order soundness and completeness development.

                                                                                                                                                                              Equations
                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                              Instances For
                                                                                                                                                                                noncomputable def NFChoice.Fol.equalPretermsRefl {L : Language} (T : Set (formula L)) {l : ℕ} (t : preterm L l) :

                                                                                                                                                                                Flypitch construction equal_preterms_refl, retained by the first-order soundness and completeness development.

                                                                                                                                                                                Equations
                                                                                                                                                                                Instances For
                                                                                                                                                                                  def NFChoice.Fol.equivPreformulae {L : Language} (T : Set (formula L)) {l : ℕ} (f₁ f₂ : preformula l) :

                                                                                                                                                                                  Flypitch construction equiv_preformulae, retained by the first-order soundness and completeness development.

                                                                                                                                                                                  Equations
                                                                                                                                                                                  Instances For
                                                                                                                                                                                    noncomputable def NFChoice.Fol.equivPreformulaeApprel {L : Language} {T : Set (formula L)} {l : ℕ} {f f' : preformula (l + 1)} {s s' : term L} (Ht : equivPreformulae T f f') (Hs : prf T (preformula.equal s s')) :

                                                                                                                                                                                    Flypitch construction equiv_preformulae_apprel, retained by the first-order soundness and completeness development.

                                                                                                                                                                                    Equations
                                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                                    Instances For
                                                                                                                                                                                      noncomputable def NFChoice.Fol.equivPreformulaeRefl {L : Language} (T : Set (formula L)) {l : ℕ} (f : preformula l) :

                                                                                                                                                                                      Flypitch construction equiv_preformulae_refl, retained by the first-order soundness and completeness development.

                                                                                                                                                                                      Equations
                                                                                                                                                                                      Instances For
                                                                                                                                                                                        theorem NFChoice.Fol.impI' {L : Language} {Γ : Set (formula L)} {A B : formula L} (h : provable (insert A Γ) B) :
                                                                                                                                                                                        theorem NFChoice.Fol.impE' {L : Language} {Γ : Set (formula L)} (A : formula L) {B : formula L} (h₁ : provable Γ (preformula.imp A B)) (h₂ : provable Γ A) :
                                                                                                                                                                                        theorem NFChoice.Fol.falsumE' {L : Language} {Γ : Set (formula L)} {A : formula L} (h : provable (insert (not' A) Γ) ⊥') :
                                                                                                                                                                                        theorem NFChoice.Fol.allI' {L : Language} {Γ : Set (formula L)} {A : formula L} (h : provable (liftFormula1 '' Γ) A) :
                                                                                                                                                                                        theorem NFChoice.Fol.allE' {L : Language} {Γ : Set (formula L)} (A : formula L) (t : term L) {B : formula L} (H₁ : provable Γ (preformula.all A)) (H₂ : A [t // 0]f = B) :
                                                                                                                                                                                        theorem NFChoice.Fol.allE₂' {L : Language} {Γ : Set (formula L)} {A : formula L} {t : term L} (h : provable Γ (preformula.all A)) :
                                                                                                                                                                                        provable Γ (A [t // 0]f)
                                                                                                                                                                                        theorem NFChoice.Fol.ref' {L : Language} (Γ : Set (formula L)) (t : term L) :
                                                                                                                                                                                        theorem NFChoice.Fol.subst' {L : Language} {Γ : Set (formula L)} {s t : term L} (f₁ : formula L) {f₂ : formula L} (H₁ : provable Γ (preformula.equal s t)) (H₂ : provable Γ (f₁ [s // 0]f)) (H₃ : f₁ [t // 0]f = f₂) :
                                                                                                                                                                                        provable Γ f₂
                                                                                                                                                                                        theorem NFChoice.Fol.subst₂' {L : Language} {Γ : Set (formula L)} (s t : term L) (f : formula L) (h₁ : provable Γ (preformula.equal s t)) (h₂ : provable Γ (f [s // 0]f)) :
                                                                                                                                                                                        provable Γ (f [t // 0]f)
                                                                                                                                                                                        theorem NFChoice.Fol.weakening' {L : Language} {Γ Δ : Set (formula L)} {f : formula L} (H₁ : Γ ⊆ Δ) (H₂ : provable Γ f) :
                                                                                                                                                                                        theorem NFChoice.Fol.weakening1' {L : Language} {Γ : Set (formula L)} {f₁ f₂ : formula L} (H : provable Γ f₂) :
                                                                                                                                                                                        provable (insert f₁ Γ) f₂
                                                                                                                                                                                        theorem NFChoice.Fol.weakening2' {L : Language} {Γ : Set (formula L)} {f₁ f₂ f₃ : formula L} (H : provable (insert f₁ Γ) f₂) :
                                                                                                                                                                                        provable (insert f₁ (insert f₃ Γ)) f₂
                                                                                                                                                                                        theorem NFChoice.Fol.apprel_congr' {L : Language} {Γ : Set (formula L)} {t₁ t₂ : term L} (f : preformula 1) (H : prf Γ (preformula.equal t₁ t₂)) :
                                                                                                                                                                                        provable Γ (f.apprel t₁) ↔ provable Γ (f.apprel t₂)
                                                                                                                                                                                        theorem NFChoice.Fol.iff_of_biimp {L : Language} {Γ : Set (formula L)} {f₁ f₂ : formula L} (H : provable Γ (biimp f₁ f₂)) :
                                                                                                                                                                                        provable Γ f₁ ↔ provable Γ f₂
                                                                                                                                                                                        theorem NFChoice.Fol.prf_by_cases {L : Language} {Γ : Set (formula L)} (f₁ : formula L) {f₂ : formula L} (H₁ : provable (insert f₁ Γ) f₂) (H₂ : provable (insert (not' f₁) Γ) f₂) :
                                                                                                                                                                                        provable Γ f₂

                                                                                                                                                                                        Theory and consistency (src/fol.lean lines 1105-) #

                                                                                                                                                                                        Flypitch construction Theory, retained by the first-order soundness and completeness development.

                                                                                                                                                                                        Equations
                                                                                                                                                                                        Instances For

                                                                                                                                                                                          Flypitch construction is_consistent, retained by the first-order soundness and completeness development.

                                                                                                                                                                                          Equations
                                                                                                                                                                                          Instances For

                                                                                                                                                                                            Structure — L-structures (src/fol.lean line 1109) #

                                                                                                                                                                                            structure NFChoice.Fol.Structure (L : Language) :
                                                                                                                                                                                            Type (u + 1)

                                                                                                                                                                                            Flypitch construction Structure, retained by the first-order soundness and completeness development.

                                                                                                                                                                                            • carrier : Type u

                                                                                                                                                                                              The carrier component of the corresponding first-order structure.

                                                                                                                                                                                            • funMap {n : ℕ} : L.functions n → DVec self.carrier n → self.carrier

                                                                                                                                                                                              The fun_map component of the corresponding first-order structure.

                                                                                                                                                                                            • relMap {n : ℕ} : L.relations n → DVec self.carrier n → Prop

                                                                                                                                                                                              The rel_map component of the corresponding first-order structure.

                                                                                                                                                                                            Instances For

                                                                                                                                                                                              realize_term — realization of terms in a structure #

                                                                                                                                                                                              def NFChoice.Fol.realizeTerm {L : Language} {S : Structure L} (v : ℕ → S.carrier) {l : ℕ} (_t : preterm L l) (_xs : DVec S.carrier l) :

                                                                                                                                                                                              Flypitch construction realize_term, retained by the first-order soundness and completeness development.

                                                                                                                                                                                              Equations
                                                                                                                                                                                              Instances For
                                                                                                                                                                                                theorem NFChoice.Fol.realize_term_congr {L : Language} {S : Structure L} {v v' : ℕ → S.carrier} (h : ∀ (n : ℕ), v n = v' n) {l : ℕ} (t : preterm L l) (xs : DVec S.carrier l) :
                                                                                                                                                                                                realizeTerm v t xs = realizeTerm v' t xs
                                                                                                                                                                                                theorem NFChoice.Fol.realize_term_subst {L : Language} {S : Structure L} (v : ℕ → S.carrier) {l : ℕ} (n : ℕ) (t : preterm L l) (s : term L) (xs : DVec S.carrier l) :
                                                                                                                                                                                                theorem NFChoice.Fol.realize_term_subst_lift {L : Language} {S : Structure L} (v : ℕ → S.carrier) (x : S.carrier) (m : ℕ) {l : ℕ} (t : preterm L l) (xs : DVec S.carrier l) :
                                                                                                                                                                                                realizeTerm (substRealize v x m) (t ↑' 1 # m) xs = realizeTerm v t xs

                                                                                                                                                                                                realize_formula — satisfaction relation #

                                                                                                                                                                                                def NFChoice.Fol.realizeFormula {L : Language} {S : Structure L} {l : ℕ} :
                                                                                                                                                                                                (ℕ → S.carrier) → preformula l → DVec S.carrier l → Prop

                                                                                                                                                                                                Flypitch construction realize_formula, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                Equations
                                                                                                                                                                                                Instances For
                                                                                                                                                                                                  theorem NFChoice.Fol.realize_formula_congr {L : Language} {S : Structure L} {l : ℕ} {v v' : ℕ → S.carrier} (_h : ∀ (n : ℕ), v n = v' n) (f : preformula l) (xs : DVec S.carrier l) :
                                                                                                                                                                                                  theorem NFChoice.Fol.realize_formula_subst {L : Language} {S : Structure L} {l : ℕ} (v : ℕ → S.carrier) (n : ℕ) (f : preformula l) (s : term L) (xs : DVec S.carrier l) :
                                                                                                                                                                                                  theorem NFChoice.Fol.realize_formula_subst0 {L : Language} {S : Structure L} {l : ℕ} (v : ℕ → S.carrier) (f : preformula l) (s : term L) (xs : DVec S.carrier l) :
                                                                                                                                                                                                  theorem NFChoice.Fol.realize_formula_subst_lift {L : Language} {S : Structure L} {l : ℕ} (v : ℕ → S.carrier) (x : S.carrier) (m : ℕ) (f : preformula l) (xs : DVec S.carrier l) :

                                                                                                                                                                                                  Semantic notions — satisfaction and models #

                                                                                                                                                                                                  Flypitch construction satisfied_in, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                  Equations
                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                    Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                    Equations
                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                      Flypitch construction all_satisfied_in, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                      Equations
                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                        def NFChoice.Fol.satisfied {L : Language} (T : Set (formula L)) (f : formula L) :

                                                                                                                                                                                                        Flypitch construction satisfied, retained by the first-order soundness and completeness development.

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

                                                                                                                                                                                                          Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                          Equations
                                                                                                                                                                                                          Instances For

                                                                                                                                                                                                            Flypitch construction all_satisfied, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                            Equations
                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                              theorem NFChoice.Fol.satisfied_in_trans {L : Language} {S : Structure L} {T : Set (formula L)} {f : formula L} (H' : allSatisfiedIn S T) (H : satisfied T f) :
                                                                                                                                                                                                              theorem NFChoice.Fol.satisfied_of_mem {L : Language} {T : Set (formula L)} {f : formula L} (hf : f ∈ T) :
                                                                                                                                                                                                              theorem NFChoice.Fol.all_satisfied_of_subset {L : Language} {T T' : Set (formula L)} (h : T' ⊆ T) :
                                                                                                                                                                                                              theorem NFChoice.Fol.satisfied_trans {L : Language} {T₁ T₂ : Set (formula L)} {f : formula L} (H' : allSatisfied T₁ T₂) (H : satisfied T₂ f) :
                                                                                                                                                                                                              satisfied T₁ f
                                                                                                                                                                                                              theorem NFChoice.Fol.all_satisfied_trans {L : Language} {T₁ T₂ T₃ : Set (formula L)} (H' : allSatisfied T₁ T₂) (H : allSatisfied T₂ T₃) :
                                                                                                                                                                                                              allSatisfied T₁ T₃
                                                                                                                                                                                                              theorem NFChoice.Fol.satisfied_weakening {L : Language} {T T' : Set (formula L)} (H : T ⊆ T') {f : formula L} (HT : satisfied T f) :

                                                                                                                                                                                                              Soundness (src/fol.lean lines 1247-1261) #

                                                                                                                                                                                                              theorem NFChoice.Fol.formula_soundness {L : Language} {Γ : Set (formula L)} {A : formula L} (H : prf Γ A) :

                                                                                                                                                                                                              bounded_preterm, bounded_term, closed_preterm #

                                                                                                                                                                                                              (src/fol.lean lines 1265-1660)

                                                                                                                                                                                                              inductive NFChoice.Fol.BoundedPreterm (L : Language) (n : ℕ) :
                                                                                                                                                                                                              ℕ → Type u

                                                                                                                                                                                                              A bounded preterm: bounded_preterm L n l is a partially applied term with at most n free de Bruijn variables (indexed by Fin n) needing l more arguments.

                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                @[reducible, inline]

                                                                                                                                                                                                                A fully applied bounded term with at most n free variables.

                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                  @[reducible, inline]

                                                                                                                                                                                                                  A closed preterm (no free variables), needing l more arguments.

                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                    @[reducible, inline]

                                                                                                                                                                                                                    A closed term: no free variables and fully applied.

                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                                      Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                      Instances For

                                                                                                                                                                                                                        Flypitch construction bd_const, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                          def NFChoice.Fol.bdApps' {L : Language} {n l m : ℕ} :
                                                                                                                                                                                                                          BoundedPreterm L n (l + m) → DVec (boundedTerm L n) m → BoundedPreterm L n l

                                                                                                                                                                                                                          Apply a bounded preterm of level l + m to m bounded terms to get level l.

                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                            def NFChoice.Fol.bdApps {L : Language} {n l : ℕ} :
                                                                                                                                                                                                                            BoundedPreterm L n l → DVec (boundedTerm L n) l → boundedTerm L n

                                                                                                                                                                                                                            Apply a bounded preterm of level l to l bounded terms to get a bounded term.

                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                            Instances For

                                                                                                                                                                                                                              Forget boundedness: map a bounded preterm to an ordinary preterm.

                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                theorem NFChoice.Fol.BoundedPreterm.eq {L : Language} {n l : ℕ} {t₁ t₂ : BoundedPreterm L n l} :
                                                                                                                                                                                                                                t₁.fst = t₂.fst → t₁ = t₂

                                                                                                                                                                                                                                Equality of bounded preterms is determined by their underlying preterms.

                                                                                                                                                                                                                                theorem NFChoice.Fol.BoundedPreterm.eq_iff {L : Language} {n l : ℕ} {t₁ t₂ : BoundedPreterm L n l} :
                                                                                                                                                                                                                                t₁ = t₂ ↔ t₁.fst = t₂.fst
                                                                                                                                                                                                                                @[simp]
                                                                                                                                                                                                                                @[simp]
                                                                                                                                                                                                                                theorem NFChoice.Fol.BoundedPreterm.cast_bd_apps {L : Language} {n m : ℕ} (h : n ≤ m) {l : ℕ} {t : BoundedPreterm L n l} {ts : DVec (boundedTerm L n) l} :
                                                                                                                                                                                                                                @[simp]
                                                                                                                                                                                                                                @[simp]
                                                                                                                                                                                                                                theorem NFChoice.Fol.BoundedPreterm.cast_rfl {L : Language} {n : ℕ} {h : n ≤ n} {l : ℕ} (t : BoundedPreterm L n l) :
                                                                                                                                                                                                                                def NFChoice.Fol.BoundedPreterm.castEq {L : Language} {n m l : ℕ} (h : n = m) (t : BoundedPreterm L n l) :

                                                                                                                                                                                                                                Flypitch construction cast_eq, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                Instances For

                                                                                                                                                                                                                                  Flypitch construction cast1, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                    @[simp]
                                                                                                                                                                                                                                    theorem NFChoice.Fol.BoundedPreterm.cast_fst {L : Language} {n m : ℕ} (h : n ≤ m) {l : ℕ} (t : BoundedPreterm L n l) :
                                                                                                                                                                                                                                    @[simp]
                                                                                                                                                                                                                                    theorem NFChoice.Fol.BoundedPreterm.cast_eq_fst {L : Language} {n m l : ℕ} (h : n = m) (t : BoundedPreterm L n l) :
                                                                                                                                                                                                                                    @[simp]
                                                                                                                                                                                                                                    @[simp]
                                                                                                                                                                                                                                    theorem NFChoice.Fol.BoundedPreterm.cast_eq_bd_apps {L : Language} {n m : ℕ} (h : n = m) {l : ℕ} {t : BoundedPreterm L n l} {ts : DVec (boundedTerm L n) l} :
                                                                                                                                                                                                                                    @[reducible]

                                                                                                                                                                                                                                    Flypitch construction cast0, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                                                      bounded_term.rec — custom recursion principle #

                                                                                                                                                                                                                                      def NFChoice.Fol.boundedTerm.rec {L : Language} {n : ℕ} {C : boundedTerm L n → Sort v} (hvar : (k : Fin n) → C (bd_var k)) (hfunc : {l : ℕ} → (f : L.functions l) → (ts : DVec (boundedTerm L n) l) → ((t : boundedTerm L n) → DVec.pmem t ts → C t) → C (bdApps (bd_func f) ts)) (t : boundedTerm L n) :
                                                                                                                                                                                                                                      C t

                                                                                                                                                                                                                                      Custom recursion principle for bounded terms, analogous to term.rec.

                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                        def NFChoice.Fol.boundedTerm.rec.go {L : Language} {n : ℕ} {C : boundedTerm L n → Sort v} (hvar : (k : Fin n) → C (bd_var k)) (hfunc : {l : ℕ} → (f : L.functions l) → (ts : DVec (boundedTerm L n) l) → ((t : boundedTerm L n) → DVec.pmem t ts → C t) → C (bdApps (bd_func f) ts)) {l : ℕ} (t : BoundedPreterm L n l) (ts : DVec (boundedTerm L n) l) (ih_ts : (s : boundedTerm L n) → DVec.pmem s ts → C s) :
                                                                                                                                                                                                                                        C (bdApps t ts)

                                                                                                                                                                                                                                        Structural recursion accumulator.

                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                          def NFChoice.Fol.boundedTerm.rec1 {L : Language} {n : ℕ} {C : boundedTerm L (n + 1) → Sort v} (hvar : (k : Fin (n + 1)) → C (bd_var k)) (hfunc : {l : ℕ} → (f : L.functions l) → (ts : DVec (boundedTerm L (n + 1)) l) → ((t : boundedTerm L (n + 1)) → DVec.pmem t ts → C t) → C (bdApps (bd_func f) ts)) (t : boundedTerm L (n + 1)) :
                                                                                                                                                                                                                                          C t

                                                                                                                                                                                                                                          Version of bounded_term.rec specialized to n + 1.

                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                          Instances For

                                                                                                                                                                                                                                            Lift and substitution — irrel lemmas #

                                                                                                                                                                                                                                            theorem NFChoice.Fol.lift_bounded_term_irrel {L : Language} {n l : ℕ} (t : BoundedPreterm L n l) (n' : ℕ) {m : ℕ} (_h : n ≤ m) :
                                                                                                                                                                                                                                            (t.fst ↑' n' # m) = t.fst
                                                                                                                                                                                                                                            theorem NFChoice.Fol.subst_bounded_term_irrel {L : Language} {n l : ℕ} (t : BoundedPreterm L n l) {n' : ℕ} (s : term L) (_h : n ≤ n') :
                                                                                                                                                                                                                                            substTerm t.fst s n' = t.fst

                                                                                                                                                                                                                                            realize_bounded_term #

                                                                                                                                                                                                                                            def NFChoice.Fol.realizeBoundedTerm {L : Language} {S : Structure L} {n : ℕ} (v : DVec S.carrier n) {l : ℕ} (_t : BoundedPreterm L n l) (_xs : DVec S.carrier l) :

                                                                                                                                                                                                                                            Realize a bounded preterm given a valuation vector v : DVec S n and extra args xs : DVec S l.

                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                            Instances For

                                                                                                                                                                                                                                              Notation for realizing a bounded term with an empty extra argument list.

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

                                                                                                                                                                                                                                                Notation for the corresponding first-order syntax or interpretation operation.

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

                                                                                                                                                                                                                                                  Flypitch construction realize_closed_term, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                    theorem NFChoice.Fol.realize_bounded_term_eq {L : Language} {S : Structure L} {n : ℕ} {v₁ : DVec S.carrier n} {v₂ : ℕ → S.carrier} (hv : ∀ (k : ℕ) (hk : k < n), v₁.nth k hk = v₂ k) {l : ℕ} (t : BoundedPreterm L n l) (xs : DVec S.carrier l) :
                                                                                                                                                                                                                                                    realizeBoundedTerm v₁ t xs = realizeTerm v₂ t.fst xs
                                                                                                                                                                                                                                                    theorem NFChoice.Fol.realize_bounded_term_irrel' {L : Language} {S : Structure L} {n n' : ℕ} {v₁ : DVec S.carrier n} {v₂ : DVec S.carrier n'} (h : ∀ (m : ℕ) (hn : m < n) (hn' : m < n'), v₁.nth m hn = v₂.nth m hn') {l : ℕ} (t : BoundedPreterm L n l) (t' : BoundedPreterm L n' l) (ht : t.fst = t'.fst) (xs : DVec S.carrier l) :
                                                                                                                                                                                                                                                    @[simp]
                                                                                                                                                                                                                                                    theorem NFChoice.Fol.realize_bounded_term_cast_eq_irrel {L : Language} {S : Structure L} {n m l : ℕ} {h : n = m} {v : DVec S.carrier m} {t : BoundedPreterm L n l} (xs : DVec S.carrier l) :
                                                                                                                                                                                                                                                    @[simp]

                                                                                                                                                                                                                                                    lift_bounded_term_at — lifting bounded terms #

                                                                                                                                                                                                                                                    def NFChoice.Fol.liftBoundedTermAt {L : Language} {n l : ℕ} (_t : BoundedPreterm L n l) (n' _m : ℕ) :
                                                                                                                                                                                                                                                    BoundedPreterm L (n + n') l

                                                                                                                                                                                                                                                    Lift a bounded term by inserting n' new variables at position m.

                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                                                                      Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                        @[reducible]
                                                                                                                                                                                                                                                        def NFChoice.Fol.liftBoundedTerm {L : Language} {n l : ℕ} (t : BoundedPreterm L n l) (n' : ℕ) :
                                                                                                                                                                                                                                                        BoundedPreterm L (n + n') l

                                                                                                                                                                                                                                                        Flypitch construction lift_bounded_term, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                                                                          Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                            @[reducible]
                                                                                                                                                                                                                                                            def NFChoice.Fol.liftBoundedTerm1 {L : Language} {n' l : ℕ} (t : BoundedPreterm L n' l) :
                                                                                                                                                                                                                                                            BoundedPreterm L (n' + 1) l

                                                                                                                                                                                                                                                            Flypitch construction lift_bounded_term1, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                              @[simp]
                                                                                                                                                                                                                                                              theorem NFChoice.Fol.lift_bounded_term_fst {L : Language} {n l : ℕ} (t : BoundedPreterm L n l) (n' m : ℕ) :
                                                                                                                                                                                                                                                              (t ↑ᵇ' n' # m).fst = t.fst ↑' n' # m

                                                                                                                                                                                                                                                              subst_bounded_term — substitution in bounded terms #

                                                                                                                                                                                                                                                              def NFChoice.Fol.substBoundedTerm {L : Language} {n n' l : ℕ} (_t : BoundedPreterm L (n + n' + 1) l) (_s : boundedTerm L n') :
                                                                                                                                                                                                                                                              BoundedPreterm L (n + n') l

                                                                                                                                                                                                                                                              Substitute the variable at position n (within the bound `n

                                                                                                                                                                                                                                                              • n' + 1) with a bounded term s`.
                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                              Instances For

                                                                                                                                                                                                                                                                Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                  theorem NFChoice.Fol.subst_bounded_term_var_lt {L : Language} {n n' : ℕ} (s : boundedTerm L n') (k : Fin (n + n' + 1)) (h : ↑k < n) :
                                                                                                                                                                                                                                                                  theorem NFChoice.Fol.subst_bounded_term_var_gt {L : Language} {n n' : ℕ} (s : boundedTerm L n') (k : Fin (n + n' + 1)) (h : n < ↑k) :
                                                                                                                                                                                                                                                                  (substBoundedTerm (bd_var k) s).fst = &(↑k - 1)
                                                                                                                                                                                                                                                                  theorem NFChoice.Fol.subst_bounded_term_var_eq {L : Language} {n n' : ℕ} (s : boundedTerm L n') (k : Fin (n + n' + 1)) (h : ↑k = n) :
                                                                                                                                                                                                                                                                  @[simp]
                                                                                                                                                                                                                                                                  theorem NFChoice.Fol.subst_bounded_term_bd_app {L : Language} {n n' l : ℕ} (t₁ : BoundedPreterm L (n + n' + 1) (l + 1)) (t₂ : boundedTerm L (n + n' + 1)) (s : boundedTerm L n') :
                                                                                                                                                                                                                                                                  @[simp]
                                                                                                                                                                                                                                                                  theorem NFChoice.Fol.subst_bounded_term_fst {L : Language} {n n' l : ℕ} (t : BoundedPreterm L (n + n' + 1) l) (s : boundedTerm L n') :
                                                                                                                                                                                                                                                                  def NFChoice.Fol.subst0BoundedTerm {L : Language} {n l : ℕ} (t : BoundedPreterm L (n + 1) l) (s : boundedTerm L n) :

                                                                                                                                                                                                                                                                  Substitute the last (max) variable with a closed term.

                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                    def NFChoice.Fol.substmaxBoundedTerm {L : Language} {n l : ℕ} (t : BoundedPreterm L (n + 1) l) (s : closedTerm L) :

                                                                                                                                                                                                                                                                    Substitute the last (max) variable with a closed term.

                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                                                                      @[simp]
                                                                                                                                                                                                                                                                      theorem NFChoice.Fol.substmax_bounded_term_bd_app {L : Language} {n l : ℕ} (t₁ : BoundedPreterm L (n + 1) (l + 1)) (t₂ : boundedTerm L (n + 1)) (s : closedTerm L) :
                                                                                                                                                                                                                                                                      theorem NFChoice.Fol.substmax_var_lt {L : Language} {n : ℕ} (k : Fin (n + 1)) (s : closedTerm L) (h : ↑k < n) :
                                                                                                                                                                                                                                                                      theorem NFChoice.Fol.substmax_var_eq {L : Language} {n : ℕ} (k : Fin (n + 1)) (s : closedTerm L) (h : ↑k = n) :

                                                                                                                                                                                                                                                                      Flypitch construction bounded_term_of_function, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                      Instances For

                                                                                                                                                                                                                                                                        realize_bounded_term lemmas #

                                                                                                                                                                                                                                                                        @[simp]
                                                                                                                                                                                                                                                                        theorem NFChoice.Fol.realize_bounded_term_bd_app {L : Language} {S : Structure L} {n l : ℕ} (t : BoundedPreterm L n (l + 1)) (s : boundedTerm L n) (xs : DVec S.carrier n) (xs' : DVec S.carrier l) :

                                                                                                                                                                                                                                                                        When realizing a closed term, the realizing dvector is irrelevant.

                                                                                                                                                                                                                                                                        bounded_preformula, bounded_formula, presentence, sentence #

                                                                                                                                                                                                                                                                        (src/fol.lean lines 1660-2200)

                                                                                                                                                                                                                                                                        A bounded pre-formula: bounded_preformula L n l is a partially applied formula with at most n free de Bruijn variables (< n), needing l more term arguments. bounded_formula L n = bounded_preformula L n 0, and sentence L = bounded_preformula L 0 0.

                                                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                                                          @[reducible]

                                                                                                                                                                                                                                                                          Flypitch construction bounded_formula, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                            @[reducible]

                                                                                                                                                                                                                                                                            Flypitch construction presentence, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                                              @[reducible]

                                                                                                                                                                                                                                                                              Flypitch construction sentence, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                              Instances For

                                                                                                                                                                                                                                                                                bounded_preformula notations #

                                                                                                                                                                                                                                                                                Flypitch construction bd_not, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                Instances For

                                                                                                                                                                                                                                                                                  Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                    def NFChoice.Fol.bdAnd {L : Language} {n : ℕ} (f₁ f₂ : boundedFormula L n) :

                                                                                                                                                                                                                                                                                    Flypitch construction bd_and, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                                                                                                      Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                        def NFChoice.Fol.bdOr {L : Language} {n : ℕ} (f₁ f₂ : boundedFormula L n) :

                                                                                                                                                                                                                                                                                        Flypitch construction bd_or, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                                                                                                          Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                            def NFChoice.Fol.bdBiimp {L : Language} {n : ℕ} (f₁ f₂ : boundedFormula L n) :

                                                                                                                                                                                                                                                                                            Flypitch construction bd_biimp, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                            Instances For

                                                                                                                                                                                                                                                                                              Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                def NFChoice.Fol.bdEx {L : Language} {n : ℕ} (f : boundedFormula L (n + 1)) :

                                                                                                                                                                                                                                                                                                Flypitch construction bd_ex, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                Instances For

                                                                                                                                                                                                                                                                                                  Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                                                                                                                    bd_apps_rel #

                                                                                                                                                                                                                                                                                                    def NFChoice.Fol.bdAppsRel {L : Language} {n l : ℕ} (_f : BoundedPreformula L n l) (_ts : DVec (boundedTerm L n) l) :

                                                                                                                                                                                                                                                                                                    Flypitch construction bd_apps_rel, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                                                                                                      @[simp]
                                                                                                                                                                                                                                                                                                      theorem NFChoice.Fol.bd_apps_rel_zero {L : Language} {n : ℕ} (f : boundedFormula L n) (ts : DVec (boundedTerm L n) 0) :
                                                                                                                                                                                                                                                                                                      bdAppsRel f ts = f

                                                                                                                                                                                                                                                                                                      namespace bounded_preformula #

                                                                                                                                                                                                                                                                                                      theorem NFChoice.Fol.BoundedPreformula.eq {L : Language} {n l : ℕ} {f₁ f₂ : BoundedPreformula L n l} :
                                                                                                                                                                                                                                                                                                      f₁.fst = f₂.fst → f₁ = f₂

                                                                                                                                                                                                                                                                                                      Equality of bounded_preformulas is determined by their underlying preformulas.

                                                                                                                                                                                                                                                                                                      theorem NFChoice.Fol.BoundedPreformula.eq_iff {L : Language} {n l : ℕ} {f₁ f₂ : BoundedPreformula L n l} :
                                                                                                                                                                                                                                                                                                      f₁ = f₂ ↔ f₁.fst = f₂.fst
                                                                                                                                                                                                                                                                                                      @[simp]

                                                                                                                                                                                                                                                                                                      Flypitch construction cast_eq, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                      Instances For

                                                                                                                                                                                                                                                                                                        Flypitch construction cast_eqr, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                                                                                                                          Flypitch construction cast1, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                            @[simp]

                                                                                                                                                                                                                                                                                                            A bounded_preformula is quantifier-free if its underlying preformula is.

                                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                                            Instances For

                                                                                                                                                                                                                                                                                                              namespace presentence #

                                                                                                                                                                                                                                                                                                              @[reducible]

                                                                                                                                                                                                                                                                                                              Flypitch construction cast0, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                                              Instances For

                                                                                                                                                                                                                                                                                                                Irrel lemmas for bounded formulas #

                                                                                                                                                                                                                                                                                                                theorem NFChoice.Fol.lift_bounded_formula_irrel {L : Language} {n l : ℕ} (f : BoundedPreformula L n l) (n' : ℕ) {m : ℕ} (_h : n ≤ m) :
                                                                                                                                                                                                                                                                                                                (f.fst ↑f' n' # m) = f.fst
                                                                                                                                                                                                                                                                                                                @[simp]
                                                                                                                                                                                                                                                                                                                theorem NFChoice.Fol.subst_bounded_formula_irrel {L : Language} {n l : ℕ} (f : BoundedPreformula L n l) {n' : ℕ} (s : term L) (_h : n ≤ n') :
                                                                                                                                                                                                                                                                                                                f.fst [s // n']f = f.fst

                                                                                                                                                                                                                                                                                                                realize_bounded_formula #

                                                                                                                                                                                                                                                                                                                @[reducible]

                                                                                                                                                                                                                                                                                                                Flypitch construction realize_sentence, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                                Instances For

                                                                                                                                                                                                                                                                                                                  Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                                                                                                                                    realize_bounded_formula lemmas #

                                                                                                                                                                                                                                                                                                                    theorem NFChoice.Fol.realize_bounded_formula_iff_aux {L : Language} {S : Structure L} {n l : ℕ} (f : BoundedPreformula L n l) (v₁ : DVec S.carrier n) (v₂ : ℕ → S.carrier) (_hv : ∀ (k : ℕ) (hk : k < n), v₁.nth k hk = v₂ k) (xs : DVec S.carrier l) :
                                                                                                                                                                                                                                                                                                                    theorem NFChoice.Fol.realize_bounded_formula_iff {L : Language} {S : Structure L} {n : ℕ} {v₁ : DVec S.carrier n} {v₂ : ℕ → S.carrier} (hv : ∀ (k : ℕ) (hk : k < n), v₁.nth k hk = v₂ k) {l : ℕ} (f : BoundedPreformula L n l) (xs : DVec S.carrier l) :
                                                                                                                                                                                                                                                                                                                    theorem NFChoice.Fol.realize_bounded_formula_iff_of_fst {L : Language} {S : Structure L} {n : ℕ} {v₁ w₁ : DVec S.carrier n} {v₂ w₂ : ℕ → S.carrier} (hv₁ : ∀ (k : ℕ) (hk : k < n), v₁.nth k hk = v₂ k) (hw₁ : ∀ (k : ℕ) (hk : k < n), w₁.nth k hk = w₂ k) {l₁ l₂ : ℕ} (t₁ : BoundedPreformula L n l₁) (t₂ : BoundedPreformula L n l₂) (xs₁ : DVec S.carrier l₁) (xs₂ : DVec S.carrier l₂) (H : realizeFormula v₂ t₁.fst xs₁ ↔ realizeFormula w₂ t₂.fst xs₂) :
                                                                                                                                                                                                                                                                                                                    realizeBoundedFormula v₁ t₁ xs₁ ↔ realizeBoundedFormula w₁ t₂ xs₂
                                                                                                                                                                                                                                                                                                                    theorem NFChoice.Fol.realize_bounded_formula_irrel' {L : Language} {S : Structure L} {n n' : ℕ} {v₁ : DVec S.carrier n} {v₂ : DVec S.carrier n'} (h : ∀ (m : ℕ) (hn : m < n) (hn' : m < n'), v₁.nth m hn = v₂.nth m hn') {l : ℕ} (f : BoundedPreformula L n l) (f' : BoundedPreformula L n' l) (hf : f.fst = f'.fst) (xs : DVec S.carrier l) :

                                                                                                                                                                                                                                                                                                                    bounded_formula_of_relation #

                                                                                                                                                                                                                                                                                                                    Flypitch construction bounded_formula_of_relation, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                                                                                                                                      Recursors for bounded_preformula / bounded_formula #

                                                                                                                                                                                                                                                                                                                      (src/fol.lean lines 1984-2038)

                                                                                                                                                                                                                                                                                                                      def NFChoice.Fol.BoundedPreformula.rec1 {L : Language} {C : (n l : ℕ) → BoundedPreformula L (n + 1) l → Sort v} (H0 : {n : ℕ} → C n 0 bd_falsum) (H1 : {n : ℕ} → (t₁ t₂ : boundedTerm L (n + 1)) → C n 0 (bd_equal t₁ t₂)) (H2 : {n l : ℕ} → (R : L.relations l) → C n l (bd_rel R)) (H3 : {n l : ℕ} → (f : BoundedPreformula L (n + 1) (l + 1)) → (t : boundedTerm L (n + 1)) → C n (l + 1) f → C n l (f.bd_apprel t)) (H4 : {n : ℕ} → (f₁ f₂ : boundedFormula L (n + 1)) → C n 0 f₁ → C n 0 f₂ → C n 0 (bd_imp f₁ f₂)) (H5 : {n : ℕ} → (f : boundedFormula L (n + 2)) → C (n + 1) 0 f → C n 0 (bd_all f)) ⦃n l : ℕ⦄ (f : BoundedPreformula L (n + 1) l) :
                                                                                                                                                                                                                                                                                                                      C n l f

                                                                                                                                                                                                                                                                                                                      Recursor for bounded_preformula at n+1 (i.e., where there is at least one free variable).

                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                                        def NFChoice.Fol.BoundedPreformula.rec1.key {L : Language} {C : (n l : ℕ) → BoundedPreformula L (n + 1) l → Sort v} (H0 : {n : ℕ} → C n 0 bd_falsum) (H1 : {n : ℕ} → (t₁ t₂ : boundedTerm L (n + 1)) → C n 0 (bd_equal t₁ t₂)) (H2 : {n l : ℕ} → (R : L.relations l) → C n l (bd_rel R)) (H3 : {n l : ℕ} → (f : BoundedPreformula L (n + 1) (l + 1)) → (t : boundedTerm L (n + 1)) → C n (l + 1) f → C n l (f.bd_apprel t)) (H4 : {n : ℕ} → (f₁ f₂ : boundedFormula L (n + 1)) → C n 0 f₁ → C n 0 f₂ → C n 0 (bd_imp f₁ f₂)) (H5 : {n : ℕ} → (f : boundedFormula L (n + 2)) → C (n + 1) 0 f → C n 0 (bd_all f)) (n l : ℕ) (f : BoundedPreformula L n l) :
                                                                                                                                                                                                                                                                                                                        have C' := fun (n : ℕ) => match (motive := (n l : ℕ) → BoundedPreformula L n l → Sort v) n with | 0 => fun (_l : ℕ) (_f : BoundedPreformula L 0 _l) => PUnit.{v} | k.succ => C k; C' n l f

                                                                                                                                                                                                                                                                                                                        Recursive extension of the positive-arity motive.

                                                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                                                                                                          def NFChoice.Fol.boundedFormula.rec1 {L : Language} {C : (n : ℕ) → boundedFormula L (n + 1) → Sort v} (hfalsum : {n : ℕ} → C n bd_falsum) (hequal : {n : ℕ} → (t₁ t₂ : boundedTerm L (n + 1)) → C n (bd_equal t₁ t₂)) (hrel : {n l : ℕ} → (R : L.relations l) → (ts : DVec (boundedTerm L (n + 1)) l) → C n (bdAppsRel (bd_rel R) ts)) (himp : {n : ℕ} → {f₁ f₂ : boundedFormula L (n + 1)} → C n f₁ → C n f₂ → C n (bd_imp f₁ f₂)) (hall : {n : ℕ} → {f : boundedFormula L (n + 2)} → C (n + 1) f → C n (bd_all f)) ⦃n : ℕ⦄ (f : boundedFormula L (n + 1)) :
                                                                                                                                                                                                                                                                                                                          C n f

                                                                                                                                                                                                                                                                                                                          Recursor for bounded_formula at n+1 (fully applied).

                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                                            @[irreducible]
                                                                                                                                                                                                                                                                                                                            def NFChoice.Fol.boundedFormula.rec1.go {L : Language} {C : (n : ℕ) → boundedFormula L (n + 1) → Sort v} (hfalsum : {n : ℕ} → C n bd_falsum) (hequal : {n : ℕ} → (t₁ t₂ : boundedTerm L (n + 1)) → C n (bd_equal t₁ t₂)) (hrel : {n l : ℕ} → (R : L.relations l) → (ts : DVec (boundedTerm L (n + 1)) l) → C n (bdAppsRel (bd_rel R) ts)) (himp : {n : ℕ} → {f₁ f₂ : boundedFormula L (n + 1)} → C n f₁ → C n f₂ → C n (bd_imp f₁ f₂)) (hall : {n : ℕ} → {f : boundedFormula L (n + 2)} → C (n + 1) f → C n (bd_all f)) {n' l : ℕ} (f' : BoundedPreformula L (n' + 1) l) (ts : DVec (boundedTerm L (n' + 1)) l) :
                                                                                                                                                                                                                                                                                                                            C n' (bdAppsRel f' ts)

                                                                                                                                                                                                                                                                                                                            Structural recursion accumulator.

                                                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                                                                                              def NFChoice.Fol.boundedFormula.rec {L : Language} {C : (n : ℕ) → boundedFormula L n → Sort v} (hfalsum : {n : ℕ} → C n bd_falsum) (hequal : {n : ℕ} → (t₁ t₂ : boundedTerm L n) → C n (bd_equal t₁ t₂)) (hrel : {n l : ℕ} → (R : L.relations l) → (ts : DVec (boundedTerm L n) l) → C n (bdAppsRel (bd_rel R) ts)) (himp : {n : ℕ} → {f₁ f₂ : boundedFormula L n} → C n f₁ → C n f₂ → C n (bd_imp f₁ f₂)) (hall : {n : ℕ} → {f : boundedFormula L (n + 1)} → C (n + 1) f → C n (bd_all f)) ⦃n : ℕ⦄ (f : boundedFormula L n) :
                                                                                                                                                                                                                                                                                                                              C n f

                                                                                                                                                                                                                                                                                                                              Recursor for bounded_formula at any n.

                                                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                                                def NFChoice.Fol.boundedFormula.rec.go {L : Language} {C : (n : ℕ) → boundedFormula L n → Sort v} (hfalsum : {n : ℕ} → C n bd_falsum) (hequal : {n : ℕ} → (t₁ t₂ : boundedTerm L n) → C n (bd_equal t₁ t₂)) (hrel : {n l : ℕ} → (R : L.relations l) → (ts : DVec (boundedTerm L n) l) → C n (bdAppsRel (bd_rel R) ts)) (himp : {n : ℕ} → {f₁ f₂ : boundedFormula L n} → C n f₁ → C n f₂ → C n (bd_imp f₁ f₂)) (hall : {n : ℕ} → {f : boundedFormula L (n + 1)} → C (n + 1) f → C n (bd_all f)) {n l : ℕ} (f : BoundedPreformula L n l) (ts : DVec (boundedTerm L n) l) :
                                                                                                                                                                                                                                                                                                                                C n (bdAppsRel f ts)

                                                                                                                                                                                                                                                                                                                                Structural recursion accumulator.

                                                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                                                Instances For

                                                                                                                                                                                                                                                                                                                                  substmax_bounded_formula — substitute the max (last) #

                                                                                                                                                                                                                                                                                                                                  variable

                                                                                                                                                                                                                                                                                                                                  @[simp]
                                                                                                                                                                                                                                                                                                                                  theorem NFChoice.Fol.subst_bounded_formula_fst {L : Language} {n n' n'' l : ℕ} (f : BoundedPreformula L n'' l) (s : boundedTerm L n') (h : n + n' + 1 = n'') :

                                                                                                                                                                                                                                                                                                                                  Flypitch construction substmax_bounded_formula, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                                                                                                                                                    Flypitch construction subst0_bounded_formula, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                                                                                                                                                      realize_sentence lemmas #

                                                                                                                                                                                                                                                                                                                                      theorem NFChoice.Fol.realize_sentence_imp {L : Language} {S : Structure L} {f₁ f₂ : sentence L} :
                                                                                                                                                                                                                                                                                                                                      realizeSentence S (bd_imp f₁ f₂) ↔ realizeSentence S f₁ → realizeSentence S f₂

                                                                                                                                                                                                                                                                                                                                      lift_bounded_formula_at — lift bounded formulas #

                                                                                                                                                                                                                                                                                                                                      def NFChoice.Fol.liftBoundedFormulaAt {L : Language} {n l : ℕ} (_f : BoundedPreformula L n l) (n' _m : ℕ) :
                                                                                                                                                                                                                                                                                                                                      BoundedPreformula L (n + n') l

                                                                                                                                                                                                                                                                                                                                      Flypitch construction lift_bounded_formula_at, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                                      Instances For

                                                                                                                                                                                                                                                                                                                                        Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                                                                                                                          @[reducible]
                                                                                                                                                                                                                                                                                                                                          def NFChoice.Fol.liftBoundedFormula {L : Language} {n l : ℕ} (f : BoundedPreformula L n l) (n' : ℕ) :
                                                                                                                                                                                                                                                                                                                                          BoundedPreformula L (n + n') l

                                                                                                                                                                                                                                                                                                                                          Flypitch construction lift_bounded_formula, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                                          Instances For

                                                                                                                                                                                                                                                                                                                                            Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                                                                                                              @[reducible]

                                                                                                                                                                                                                                                                                                                                              Flypitch construction lift_bounded_formula1, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                                                                @[simp]
                                                                                                                                                                                                                                                                                                                                                theorem NFChoice.Fol.lift_bounded_formula_fst {L : Language} {n l : ℕ} (f : BoundedPreformula L n l) (n' m : ℕ) :
                                                                                                                                                                                                                                                                                                                                                (f ↑ᶠᵇ' n' # m).fst = f.fst ↑f' n' # m

                                                                                                                                                                                                                                                                                                                                                Sentence theories (src/fol.lean lines 2233-2759) #

                                                                                                                                                                                                                                                                                                                                                @[reducible, inline]

                                                                                                                                                                                                                                                                                                                                                A SentTheory is a set of sentences (Lean 3: Theory L = set (sentence L)).

                                                                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                                                                                                  @[reducible]

                                                                                                                                                                                                                                                                                                                                                  Project a sentence theory to a set of formulas

                                                                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                                                                                                                                                                    Derivability for sentence theories: T.fst ⊢ f.fst

                                                                                                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                                                                                                                                                                      Provability (nonempty-wrapped) for sentence theories

                                                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                                                      Instances For

                                                                                                                                                                                                                                                                                                                                                        Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                                                                                                                                                                          Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                                                          Instances For

                                                                                                                                                                                                                                                                                                                                                            All-realize-sentence — a structure models a sentence #

                                                                                                                                                                                                                                                                                                                                                            theory

                                                                                                                                                                                                                                                                                                                                                            A structure S realizes all sentences in T

                                                                                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                                                                                            Instances For

                                                                                                                                                                                                                                                                                                                                                              Notation for the corresponding first-order syntax or interpretation operation.

                                                                                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                                                                                theorem NFChoice.Fol.all_realize_sentence_of_subset {L : Language} {S : Structure L} {T₁ T₂ : SentTheory L} (H : allRealizeSentence S T₂) (h_sub : T₁ ⊆ T₂) :

                                                                                                                                                                                                                                                                                                                                                                ssatisfied — semantic consequence for sentence theories #

                                                                                                                                                                                                                                                                                                                                                                T semantically entails ψ: every nonempty model of T satisfies ψ

                                                                                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                                                                                Instances For

                                                                                                                                                                                                                                                                                                                                                                  Flypitch construction all_ssatisfied, retained by the first-order soundness and completeness development.

                                                                                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                                                                                                                                                                                    Connection between ssatisfied and satisfied #

                                                                                                                                                                                                                                                                                                                                                                    Model — bundled structure satisfying a sentence theory #

                                                                                                                                                                                                                                                                                                                                                                    def NFChoice.Fol.Model {L : Language} (T : SentTheory L) :
                                                                                                                                                                                                                                                                                                                                                                    Type (u + 1)

                                                                                                                                                                                                                                                                                                                                                                    A model of T is a structure satisfying T. Lean 3 Σ' (S : Structure L), S ⊨ T → Lean 4 {S : Structure L // all_realize_sentence S T}

                                                                                                                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                                                                                                                                                                      @[reducible, inline]
                                                                                                                                                                                                                                                                                                                                                                      abbrev NFChoice.Fol.Model.str {L : Language} {T : SentTheory L} (M : Model T) :

                                                                                                                                                                                                                                                                                                                                                                      The underlying structure of a model

                                                                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                                                                      Instances For

                                                                                                                                                                                                                                                                                                                                                                        The model satisfies its theory

                                                                                                                                                                                                                                                                                                                                                                        @[reducible]
                                                                                                                                                                                                                                                                                                                                                                        def NFChoice.Fol.Model.realize {L : Language} {T : SentTheory L} (M : Model T) (ψ : sentence L) :

                                                                                                                                                                                                                                                                                                                                                                        A model realizes a sentence

                                                                                                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                                                                                                                                                          @[simp]
                                                                                                                                                                                                                                                                                                                                                                          theorem NFChoice.Fol.Model_realize_of_theory {L : Language} {T : SentTheory L} (M : Model T) {ψ : sentence L} (h : ψ ∈ T) :
                                                                                                                                                                                                                                                                                                                                                                          M.realize ψ
                                                                                                                                                                                                                                                                                                                                                                          theorem NFChoice.Fol.false_of_Model_absurd {L : Language} {T : SentTheory L} (M : Model T) {ψ : sentence L} (h : M.realize ψ) (h' : M.realize (bdNot ψ)) :

                                                                                                                                                                                                                                                                                                                                                                          Soundness at sentence level #

                                                                                                                                                                                                                                                                                                                                                                          theorem NFChoice.Fol.not_ssatisfied_of_model_not {L : Language} {T : SentTheory L} {ψ : sentence L} (M : Model T) (hM : M.realize (bdNot ψ)) (h_nonempty : Nonempty M.str.carrier) :

                                                                                                                                                                                                                                                                                                                                                                          Given a model M with M realizes ¬ψ, we have ¬ ssatisfied T ψ

                                                                                                                                                                                                                                                                                                                                                                          Sentence-level is_consistent #

                                                                                                                                                                                                                                                                                                                                                                          T is consistent if T.fst ⊬' ⊥ (at sentence/formula level)

                                                                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                                                                          Instances For

                                                                                                                                                                                                                                                                                                                                                                            Theory of a structure #

                                                                                                                                                                                                                                                                                                                                                                            The theory of a structure S: all sentences true in S

                                                                                                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                                                                                                            Instances For

                                                                                                                                                                                                                                                                                                                                                                              eliminates_quantifiers #

                                                                                                                                                                                                                                                                                                                                                                              Flypitch construction eliminates_quantifiers, retained by the first-order soundness and completeness development.

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

                                                                                                                                                                                                                                                                                                                                                                                L_empty, T_empty, T_equality #

                                                                                                                                                                                                                                                                                                                                                                                The empty language with no functions and no relations

                                                                                                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                                                                                                Instances For

                                                                                                                                                                                                                                                                                                                                                                                  The empty theory over a language

                                                                                                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                                                                                                                    @[reducible]

                                                                                                                                                                                                                                                                                                                                                                                    The equality theory: empty theory over the empty language

                                                                                                                                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                                                                                                                                                                                                      Section bd_alls (src/fol.lean lines 2706-2757) #

                                                                                                                                                                                                                                                                                                                                                                                      def NFChoice.Fol.alls {L : Language} (_n : ℕ) :

                                                                                                                                                                                                                                                                                                                                                                                      Apply ∀' n times to an unbounded formula

                                                                                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                                                                                                        def NFChoice.Fol.bdAlls' {L : Language} (k n : ℕ) :

                                                                                                                                                                                                                                                                                                                                                                                        Apply bd_all k times, reducing the bound index from n+k to n

                                                                                                                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                                                                                                                                                                                                          Close off a bounded formula by universally quantifying all n free variables

                                                                                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                                                                                                            @[simp]
                                                                                                                                                                                                                                                                                                                                                                                            @[simp]
                                                                                                                                                                                                                                                                                                                                                                                            theorem NFChoice.Fol.alls'_all_commute {L : Language} {n k : ℕ} (f : boundedFormula L (n + k + 1)) :
                                                                                                                                                                                                                                                                                                                                                                                            @[simp]
                                                                                                                                                                                                                                                                                                                                                                                            theorem NFChoice.Fol.alls_0 {L : Language} (ψ : formula L) :
                                                                                                                                                                                                                                                                                                                                                                                            alls 0 ψ = ψ
                                                                                                                                                                                                                                                                                                                                                                                            @[simp]
                                                                                                                                                                                                                                                                                                                                                                                            theorem NFChoice.Fol.alls_succ_k {L : Language} (f : formula L) {k : ℕ} :
                                                                                                                                                                                                                                                                                                                                                                                            alls (k + 1) f = preformula.all (alls k f)