Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  rs_integral_prep.prf

  Sprache: Lisp
 

(rs_integral_prep
 (IMP_rs_integral_def_TCC1 0
  (IMP_rs_integral_def_TCC1-1 nil 3494857844
   ("" (lemma "connected_domain") (("" (propax) nil nil)) nil)
   ((connected_domain formula-decl nil rs_integral_prep nil)) nil))
 (IMP_rs_integral_def_TCC2 0
  (IMP_rs_integral_def_TCC2-1 nil 3494857844
   ("" (lemma "not_one_element") (("" (propax) nil nil)) nil)
   ((not_one_element formula-decl nil rs_integral_prep nil)) nil))
 (integral_const_fun 0
  (integral_const_fun-1 nil 3253532115
   ("" (skosimp*)
    (("" (rewrite "integral_def")
      (("" (expand "integral?")
        (("" (skosimp*)
          (("" (auto-rewrite "Rie_sum")
            (("" (inst + "1")
              (("" (skosimp*)
                (("" (case-replace "R!1 = D!1*(g!1(b!1)-g!1(a!1))")
                  (("1" (assert)
                    (("1" (expand "abs") (("1" (assertnil nil)) nil))
                    nil)
                   ("2" (hide 2)
                    (("2" (typepred "R!1")
                      (("2" (expand "Riemann_sum?")
                        (("2" (skosimp*)
                          (("2" (replace -1)
                            (("2" (hide -1)
                              (("2"
                                (assert)
                                (("2"
                                  (expand "const_fun")
                                  (("2"
                                    (case
                                     "FORALL (n: below(length(P!1))): n > 0 IMPLIES          sigma[below(length(P!1) - 1)]          (0, n-1,           LAMBDA (n: below(length(P!1) - 1)):             g!1(seq(P!1)(1 + n)) * D!1 - g!1(seq(P!1)(n)) * D!1) =   D!1*g!1(seq(P!1)(n)) - D!1*g!1(seq(P!1)(0))")
                                    (("1"
                                      (inst -1 "length(P!1)-1")
                                      (("1" (assertnil nil))
                                      nil)
                                     ("2"
                                      (hide 2)
                                      (("2"
                                        (induct
                                         "n"
                                         1
                                         "below_induction[length(P!1)]")
                                        (("1" (assertnil nil)
                                         ("2"
                                          (skosimp*)
                                          (("2"
                                            (assert)
                                            (("2"
                                              (case-replace "jb!1 = 0")
                                              (("1"
                                                (hide -3)
                                                (("1"
                                                  (expand "sigma")
                                                  (("1"
                                                    (assert)
                                                    nil
                                                    nil))
                                                  nil))
                                                nil)
                                               ("2"
                                                (assert)
                                                (("2"
                                                  (expand "sigma" 2)
                                                  (("2"
                                                    (replace -2)
                                                    (("2"
                                                      (assert)
                                                      nil
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil)
                                         ("3"
                                          (skosimp*)
                                          (("3" (assertnil nil))
                                          nil)
                                         ("4"
                                          (skosimp*)
                                          (("4" (assertnil nil))
                                          nil))
                                        nil))
                                      nil)
                                     ("3"
                                      (hide 2)
                                      (("3"
                                        (skosimp*)
                                        (("3" (assertnil nil))
                                        nil))
                                      nil)
                                     ("4"
                                      (hide 2)
                                      (("4"
                                        (skosimp*)
                                        (("4" (assertnil nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((real_times_real_is_real application-judgement "real" reals nil)
    (integral_def formula-decl nil rs_integral_def nil)
    (const_fun const-decl "[T -> real]" real_fun_ops "reals/")
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (number nonempty-type-decl nil numbers nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (real nonempty-type-from-decl nil reals nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (>= const-decl "bool" reals nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (< const-decl "bool" reals nil)
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (barray type-eq-decl nil fseqs "structures/")
    (fseq type-eq-decl nil fseqs "structures/")
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (restrict const-decl "R" restrict nil)
    (<= const-decl "bool" reals nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (below type-eq-decl nil naturalnumbers nil)
    (partition type-eq-decl nil rs_partition nil)
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (abs const-decl "{n: nonneg_real | n >= m AND n >= -m}" real_defs
         nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (NOT const-decl "[bool -> bool]" booleans nil)
    (odd_plus_even_is_odd application-judgement "odd_int" integers nil)
    (real_plus_real_is_real application-judgement "real" reals nil)
    (minus_odd_is_odd application-judgement "odd_int" integers nil)
    (nnint_plus_posint_is_posint application-judgement "posint"
     integers nil)
    (sigma_0_neg formula-decl nil sigma_below "reals/")
    (below_induction formula-decl nil bounded_nat_inductions nil)
    (pred type-eq-decl nil defined_types nil)
    (P!1 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (b!1 skolem-const-decl "T" rs_integral_prep nil)
    (a!1 skolem-const-decl "T" rs_integral_prep nil)
    (integer nonempty-type-from-decl nil integers nil)
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (sigma def-decl "real" sigma "reals/")
    (T_high type-eq-decl nil sigma "reals/")
    (T_low type-eq-decl nil sigma "reals/")
    (OR const-decl "[bool, bool -> bool]" booleans nil)
    (IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
    (posint_plus_nnint_is_posint application-judgement "posint"
     integers nil)
    (Rie_sum const-decl "real" rs_integral_def nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_gt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (int_minus_int_is_int application-judgement "int" integers nil)
    (integral? const-decl "bool" rs_integral_def nil))
   nil))
 (integral_const_restrict 0
  (integral_const_restrict-3 nil 3278176127
   ("" (skosimp*)
    (("" (lemma "integral_const_fun")
      (("" (inst?)
        (("" (assert)
          (("" (flatten)
            (("" (typepred "integral(a!1, b!1,g!1, const_fun(D!1))")
              (("" (expand "integral?")
                (("" (skosimp*)
                  (("" (inst -1 "epsi!1")
                    (("" (skosimp*)
                      (("" (inst + "delta!1")
                        (("" (skosimp*)
                          (("" (inst?)
                            (("" (assert)
                              ((""
                                (replace -3)
                                ((""
                                  (typepred "R!1")
                                  ((""
                                    (inst -2 "R!1")
                                    (("1" (assertnil nil)
                                     ("2"
                                      (hide 2)
                                      (("2"
                                        (expand "Riemann_sum?")
                                        (("2"
                                          (auto-rewrite "Rie_sum")
                                          (("2"
                                            (skosimp*)
                                            (("2"
                                              (assert)
                                              (("2"
                                                (inst + "xis!1")
                                                (("2"
                                                  (replace -1)
                                                  (("2"
                                                    (hide -1)
                                                    (("2"
                                                      (assert)
                                                      (("2"
                                                        (expand
                                                         "const_fun")
                                                        (("2"
                                                          (rewrite
                                                           "sigma_restrict_eq[below(length(P!1) - 1)]")
                                                          (("1"
                                                            (hide 2)
                                                            (("1"
                                                              (expand
                                                               "restrict")
                                                              (("1"
                                                                (apply-extensionality
                                                                 1
                                                                 :hide?
                                                                 t)
                                                                (("1"
                                                                  (inst?)
                                                                  (("1"
                                                                    (assert)
                                                                    nil
                                                                    nil)
                                                                   ("2"
                                                                    (typepred
                                                                     "xis!1")
                                                                    (("2"
                                                                      (inst
                                                                       -
                                                                       "x!1")
                                                                      (("2"
                                                                        (typepred
                                                                         "P!1")
                                                                        (("2"
                                                                          (inst-cp
                                                                           -
                                                                           "x!1")
                                                                          (("2"
                                                                            (inst
                                                                             -
                                                                             "x!1+1")
                                                                            (("2"
                                                                              (ground)
                                                                              nil
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil)
                                                           ("2"
                                                            (hide 2)
                                                            (("2"
                                                              (skosimp*)
                                                              (("2"
                                                                (assert)
                                                                nil
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((integral_const_fun formula-decl nil rs_integral_prep nil)
    (real_times_real_is_real application-judgement "real" reals nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (integral const-decl "{S: real | integral?(a, b, gg, ff, S)}"
     rs_integral_def nil)
    (integrable? const-decl "bool" rs_integral_def nil)
    (const_fun const-decl "[T -> real]" real_fun_ops "reals/")
    (integral? const-decl "bool" rs_integral_def nil)
    (< const-decl "bool" reals nil)
    (NOT const-decl "[bool -> bool]" booleans nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (real_gt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (Rie_sum const-decl "real" rs_integral_def nil)
    (integer nonempty-type-from-decl nil integers nil)
    (IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
    (T_low type-eq-decl nil sigma "reals/")
    (T_high type-eq-decl nil sigma "reals/")
    (OR const-decl "[bool, bool -> bool]" booleans nil)
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (sigma_restrict_eq formula-decl nil sigma "reals/")
    (posint_plus_nnint_is_posint application-judgement "posint"
     integers nil)
    (restrict const-decl "[T -> real]" sigma "reals/")
    (xis!1 skolem-const-decl "xis?[T](a!1, b!1, P!1)" rs_integral_prep
     nil)
    (x!1 skolem-const-decl "below(length(P!1) - 1)" rs_integral_prep
     nil)
    (closed_interval type-eq-decl nil intervals_real "reals/")
    (nnint_plus_posint_is_posint application-judgement "posint"
     integers nil)
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (xis? type-eq-decl nil rs_integral_def nil)
    (int_minus_int_is_int application-judgement "int" integers nil)
    (R!1 skolem-const-decl "(Riemann_sum?(a!1, b!1, P!1, g!1, f!1))"
     rs_integral_prep nil)
    (f!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (D!1 skolem-const-decl "real" rs_integral_prep nil)
    (g!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (P!1 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (b!1 skolem-const-decl "T" rs_integral_prep nil)
    (a!1 skolem-const-decl "T" rs_integral_prep nil)
    (minus_odd_is_odd application-judgement "odd_int" integers nil)
    (partition type-eq-decl nil rs_partition nil)
    (below type-eq-decl nil naturalnumbers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (<= const-decl "bool" reals nil)
    (restrict const-decl "R" restrict nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (fseq type-eq-decl nil fseqs "structures/")
    (barray type-eq-decl nil fseqs "structures/")
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (>= const-decl "bool" reals nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number nonempty-type-decl nil numbers nil)
    (real_minus_real_is_real application-judgement "real" reals nil))
   nil)
  (integral_const_restrict-2 nil 3277741047
   ("" (skosimp*)
    (("" (lemma "integral_const_fun")
      (("" (inst?)
        (("" (assert)
          (("" (flatten)
            (("" (typepred "integral(a!1, b!1, const_fun[T](D!1))")
              (("1" (expand "integral?")
                (("1" (skosimp*)
                  (("1" (inst -1 "epsi!1")
                    (("1" (skosimp*)
                      (("1" (inst + "delta!1")
                        (("1" (skosimp*)
                          (("1" (inst?)
                            (("1" (assert)
                              (("1"
                                (replace -3)
                                (("1"
                                  (typepred "R!1")
                                  (("1"
                                    (inst -2 "R!1")
                                    (("1" (assertnil nil)
                                     ("2"
                                      (hide 2)
                                      (("2"
                                        (expand "Riemann_sum?")
                                        (("2"
                                          (skosimp*)
                                          (("2"
                                            (assert)
                                            (("2"
                                              (inst + "xis!1")
                                              (("2"
                                                (replace -1)
                                                (("2"
                                                  (hide -1)
                                                  (("2"
                                                    (assert)
                                                    (("2"
                                                      (expand
                                                       "const_fun")
                                                      (("2"
                                                        (rewrite
                                                         "sigma_restrict_eq[below(length(P!1) - 1)]")
                                                        (("1"
                                                          (hide 2)
                                                          (("1"
                                                            (expand
                                                             "restrict")
                                                            (("1"
                                                              (apply-extensionality
                                                               1
                                                               :hide?
                                                               t)
                                                              (("1"
                                                                (inst?)
                                                                (("1"
                                                                  (assert)
                                                                  nil
                                                                  nil)
                                                                 ("2"
                                                                  (hide
                                                                   2)
                                                                  (("2"
                                                                    (typepred
                                                                     "P!1")
                                                                    (("2"
                                                                      (typepred
                                                                       "xis!1")
                                                                      (("2"
                                                                        (assert)
                                                                        (("2"
                                                                          (flatten)
                                                                          (("2"
                                                                            (assert)
                                                                            nil
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil)
                                                               ("2"
                                                                (skosimp*)
                                                                (("2"
                                                                  (typepred
                                                                   "xis!1")
                                                                  (("2"
                                                                    (assert)
                                                                    (("2"
                                                                      (flatten)
                                                                      (("2"
                                                                        (assert)
                                                                        nil
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil)
                                                         ("2"
                                                          (skosimp*)
                                                          (("2"
                                                            (hide 2)
                                                            (("2"
                                                              (typepred
                                                               "xis!1")
                                                              (("2"
                                                                (assert)
                                                                (("2"
                                                                  (flatten)
                                                                  (("2"
                                                                    (assert)
                                                                    nil
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil)
                                                         ("3"
                                                          (hide 2)
                                                          (("3"
                                                            (skosimp*)
                                                            (("3"
                                                              (assert)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil)
               ("2" (propax) nil nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((const_fun const-decl "[T -> real]" real_fun_ops "reals/")
    (restrict const-decl "[T -> real]" sigma "reals/")
    (sigma_restrict_eq formula-decl nil sigma "reals/"))
   nil)
  (integral_const_restrict-1 nil 3253532115
   ("" (skosimp*)
    (("" (lemma "integral_const_fun")
      (("" (inst?)
        (("" (assert)
          (("" (flatten)
            (("" (typepred "integral(a!1, b!1, const_fun[T](D!1))")
              (("1" (expand "is_integral")
                (("1" (skosimp*)
                  (("1" (inst -1 "epsi!1")
                    (("1" (skosimp*)
                      (("1" (inst + "delta!1")
                        (("1" (skosimp*)
                          (("1" (inst?)
                            (("1" (assert)
                              (("1"
                                (replace -3)
                                (("1"
                                  (hide -3)
                                  (("1"
                                    (case-replace
                                     "Riemann_sum(a!1, b!1, P!1, f!1) = Riemann_sum(a!1, b!1, P!1, const_fun[T](D!1))")
                                    (("1" (assertnil nil)
                                     ("2"
                                      (hide -1 2)
                                      (("2"
                                        (expand "Riemann_sum")
                                        (("2"
                                          (rewrite "sigma_restrict_eq")
                                          (("1"
                                            (hide 2)
                                            (("1"
                                              (expand "restrict")
                                              (("1"
                                                (apply-extensionality
                                                 1
                                                 :hide?
                                                 t)
                                                (("1"
                                                  (lift-if)
                                                  (("1"
                                                    (ground)
                                                    (("1"
                                                      (expand
                                                       "const_fun")
                                                      (("1"
                                                        (inst?)
                                                        (("1"
                                                          (replace -3)
                                                          (("1"
                                                            (propax)
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil)
                                                 ("2"
                                                  (skosimp*)
                                                  (("2"
                                                    (typepred "P!1")
                                                    (("2"
                                                      (inst - "i!1-1")
                                                      (("1"
                                                        (assert)
                                                        nil
                                                        nil)
                                                       ("2"
                                                        (assert)
                                                        nil
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil)
                                                 ("3"
                                                  (skosimp*)
                                                  (("3"
                                                    (assert)
                                                    nil
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil)
                                           ("2"
                                            (hide 2)
                                            (("2"
                                              (skosimp*)
                                              (("2"
                                                (assert)
                                                (("2"
                                                  (typepred "P!1")
                                                  (("2"
                                                    (inst - "n!1-1")
                                                    (("2"
                                                      (assert)
                                                      nil
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil)
                                           ("3"
                                            (hide-all-but 1)
                                            (("3"
                                              (skosimp*)
                                              (("3" (assertnil nil))
                                              nil))
                                            nil)
                                           ("4"
                                            (hide-all-but 1)
                                            (("4"
                                              (skosimp*)
                                              (("4" (ground) nil nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil)
               ("2" (propax) nil nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((const_fun const-decl "[T -> real]" real_fun_ops "reals/")
    (sigma_restrict_eq formula-decl nil sigma "reals/")
    (restrict const-decl "[T -> real]" sigma "reals/"))
   nil))
 (integral_scal 0
  (integral_scal-3 nil 3280253820
   ("" (skosimp*)
    (("" (case-replace "D!1 = 0")
      (("1" (assert)
        (("1" (expand "*")
          (("1" (lemma "integral_const_fun")
            (("1" (inst - "0" "a!1" "b!1" "g!1")
              (("1" (expand "const_fun")
                (("1" (flatten) (("1" (assertnil nil)) nil)) nil))
              nil))
            nil))
          nil))
        nil)
       ("2" (rewrite "integral_def")
        (("2" (typepred "integral(a!1, b!1, g!1,f!1)")
          (("2" (expand "integral?")
            (("2" (skosimp*)
              (("2" (inst -1 "epsi!1/abs(D!1)")
                (("1" (skosimp*)
                  (("1" (inst + "delta!1")
                    (("1" (skosimp*)
                      (("1" (inst?)
                        (("1" (assert)
                          (("1" (typepred "R!1")
                            (("1" (expand "Riemann_sum?")
                              (("1"
                                (auto-rewrite "Rie_sum")
                                (("1"
                                  (assert)
                                  (("1"
                                    (skosimp*)
                                    (("1"
                                      (replace -1)
                                      (("1"
                                        (hide -1)
                                        (("1"
                                          (case-replace
                                           "Rie_sum(a!1, b!1,g!1, P!1, xis!1, D!1 * f!1) = D!1*Rie_sum(a!1, b!1, g!1,P!1, xis!1, f!1)")
                                          (("1"
                                            (expand "Rie_sum")
                                            (("1"
                                              (assert)
                                              (("1"
                                                (replace -1)
                                                (("1"
                                                  (hide -1)
                                                  (("1"
                                                    (inst
                                                     -
                                                     "sigma[below(length(P!1) - 1)]
                                              (0, length(P!1) - 2,
                                               LAMBDA (n: below(length(P!1) - 1)):
                                                 g!1(P!1`seq(1 + n)) * f!1(xis!1(n)) -
                                                  g!1(P!1`seq(n)) * f!1(xis!1(n)))")
                                                    (("1"
                                                      (cross-mult -1)
                                                      (("1"
                                                        (assert)
                                                        (("1"
                                                          (split -1)
                                                          (("1"
                                                            (flatten)
                                                            (("1"
                                                              (rewrite
                                                               "abs_mult "
                                                               :dir
                                                               rl)
                                                              (("1"
                                                                (assert)
                                                                nil
                                                                nil)
                                                               ("2"
                                                                (hide
                                                                 3)
                                                                (("2"
                                                                  (skosimp*)
                                                                  (("2"
                                                                    (assert)
                                                                    nil
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil)
                                                           ("2"
                                                            (flatten)
                                                            (("2"
                                                              (hide-all-but
                                                               (1 2))
                                                              (("2"
                                                                (expand
                                                                 "abs")
                                                                (("2"
                                                                  (lift-if)
                                                                  (("2"
                                                                    (ground)
                                                                    nil
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil)
                                                       ("2"
                                                        (skosimp*)
                                                        (("2"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("2"
                                                      (hide-all-but
                                                       (1 2))
                                                      (("2"
                                                        (grind)
                                                        nil
                                                        nil))
                                                      nil)
                                                     ("3"
                                                      (hide 3)
                                                      (("3"
                                                        (skosimp*)
                                                        (("3"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil)
                                           ("2"
                                            (hide 2)
                                            (("2"
                                              (hide 2)
                                              (("2"
                                                (expand "Rie_sum")
                                                (("2"
                                                  (assert)
                                                  (("2"
                                                    (lemma
                                                     "sigma_scal[below(length(P!1) - 1)]")
                                                    (("1"
                                                      (inst?)
                                                      (("1"
                                                        (assert)
                                                        (("1"
                                                          (expand "*")
                                                          (("1"
                                                            (propax)
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("2"
                                                      (assert)
                                                      (("2"
                                                        (skosimp*)
                                                        (("2"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil)
                 ("2" (case "epsi!1 / abs(D!1) > 0")
                  (("1" (assertnil nil)
                   ("2" (hide-all-but (1 3))
                    (("2" (cross-mult 1) (("2" (assertnil nil)) nil))
                    nil)
                   ("3" (lemma "abs_eq_0")
                    (("3" (inst?) (("3" (assertnil nil)) nil)) nil))
                  nil)
                 ("3" (lemma "abs_eq_0")
                  (("3" (inst?) (("3" (assertnil nil)) nil)) nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((number nonempty-type-decl nil numbers nil)
    (boolean nonempty-type-decl nil booleans nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (real nonempty-type-from-decl nil reals nil)
    (* const-decl "[T -> real]" real_fun_ops "reals/")
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real_times_real_is_real application-judgement "real" reals nil)
    (const_fun const-decl "[T -> real]" real_fun_ops "reals/")
    (integral_const_fun formula-decl nil rs_integral_prep nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (NOT const-decl "[bool -> bool]" booleans nil)
    (div_mult_pos_gt1 formula-decl nil extra_real_props nil)
    (abs_nat formula-decl nil abs_lems "reals/")
    (abs_eq_0 formula-decl nil abs_lems "reals/")
    (int_minus_int_is_int application-judgement "int" integers nil)
    (Rie_sum const-decl "real" rs_integral_def nil)
    (xis? type-eq-decl nil rs_integral_def nil)
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_plus_real_is_real application-judgement "real" reals nil)
    (int_plus_int_is_int application-judgement "int" integers nil)
    (div_mult_pos_neg_lt2 formula-decl nil extra_real_props nil)
    (nonzero_real nonempty-type-eq-decl nil reals nil)
    (abs_mult formula-decl nil real_props nil)
    (nnreal_times_nnreal_is_nnreal application-judgement "nnreal"
     real_types nil)
    (xis!1 skolem-const-decl "xis?[T](a!1, b!1, P!1)" rs_integral_prep
     nil)
    (sigma def-decl "real" sigma "reals/")
    (T_high type-eq-decl nil sigma "reals/")
    (T_low type-eq-decl nil sigma "reals/")
    (OR const-decl "[bool, bool -> bool]" booleans nil)
    (f!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (g!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
    (integer nonempty-type-from-decl nil integers nil)
    (P!1 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (b!1 skolem-const-decl "T" rs_integral_prep nil)
    (a!1 skolem-const-decl "T" rs_integral_prep nil)
    (posint_plus_nnint_is_posint application-judgement "posint"
     integers nil)
    (sigma_scal formula-decl nil sigma "reals/")
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (barray type-eq-decl nil fseqs "structures/")
    (fseq type-eq-decl nil fseqs "structures/")
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (restrict const-decl "R" restrict nil)
    (<= const-decl "bool" reals nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (below type-eq-decl nil naturalnumbers nil)
    (partition type-eq-decl nil rs_partition nil)
    (epsi!1 skolem-const-decl "posreal" rs_integral_prep nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (/ const-decl "[numfield, nznum -> numfield]" number_fields nil)
    (nznum nonempty-type-eq-decl nil number_fields nil)
    (D!1 skolem-const-decl "real" rs_integral_prep nil)
    (abs const-decl "{n: nonneg_real | n >= m AND n >= -m}" real_defs
         nil)
    (- const-decl "[numfield -> numfield]" number_fields nil)
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (>= const-decl "bool" reals nil)
    (/= const-decl "boolean" notequal nil)
    (nzreal_div_nzreal_is_nzreal application-judgement "nzreal"
     real_types nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_gt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (integral const-decl "{S: real | integral?(a, b, gg, ff, S)}"
     rs_integral_def nil)
    (integral? const-decl "bool" rs_integral_def nil)
    (integrable? const-decl "bool" rs_integral_def nil)
    (< const-decl "bool" reals nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (integral_def formula-decl nil rs_integral_def nil))
   nil)
  (integral_scal-2 nil 3278176311
   ("" (skosimp*)
    (("" (case-replace "D!1 = 0")
      (("1" (assert)
        (("1" (expand "*")
          (("1" (lemma "integral_const_fun")
            (("1" (inst - "0" "a!1" "b!1")
              (("1" (expand "const_fun")
                (("1" (flatten) (("1" (assertnil nil)) nil)) nil))
              nil))
            nil))
          nil))
        nil)
       ("2" (rewrite "integral_def")
        (("2" (typepred "integral(a!1, b!1, f!1)")
          (("1" (expand "integral?")
            (("1" (skosimp*)
              (("1" (inst -1 "epsi!1/abs(D!1)")
                (("1" (skosimp*)
                  (("1" (inst + "delta!1")
                    (("1" (skosimp*)
                      (("1" (inst?)
                        (("1" (assert)
                          (("1" (typepred "R!1")
                            (("1" (expand "Riemann_sum?")
                              (("1"
                                (auto-rewrite "Rie_sum")
                                (("1"
                                  (assert)
                                  (("1"
                                    (skosimp*)
                                    (("1"
                                      (replace -1)
                                      (("1"
                                        (hide -1)
                                        (("1"
                                          (case-replace
                                           "Rie_sum(a!1, b!1, P!1, xis!1, D!1 * f!1) = D!1*Rie_sum(a!1, b!1, P!1, xis!1, f!1)")
                                          (("1"
                                            (expand "Rie_sum")
                                            (("1"
                                              (assert)
                                              (("1"
                                                (replace -1)
                                                (("1"
                                                  (hide -1)
                                                  (("1"
                                                    (inst
                                                     -
                                                     "sigma[below(length(P!1) - 1)]
                          (0, length(P!1) - 2,
                           LAMBDA (n: below(length(P!1) - 1)):
                             P!1`seq(1 + n) * f!1(xis!1`seq(n)) -
                              P!1`seq(n) * f!1(xis!1`seq(n)))")
                                                    (("1"
                                                      (cross-mult -1)
                                                      (("1"
                                                        (assert)
                                                        (("1"
                                                          (split -1)
                                                          (("1"
                                                            (flatten)
                                                            (("1"
                                                              (rewrite
                                                               "abs_mult "
                                                               :dir
                                                               rl)
                                                              (("1"
                                                                (assert)
                                                                nil
                                                                nil)
                                                               ("2"
                                                                (hide
                                                                 3)
                                                                (("2"
                                                                  (skosimp*)
                                                                  (("2"
                                                                    (assert)
                                                                    nil
                                                                    nil))
                                                                  nil))
                                                                nil)
                                                               ("3"
                                                                (skosimp*)
                                                                (("3"
                                                                  (assert)
                                                                  (("3"
                                                                    (typepred
                                                                     "xis!1")
                                                                    (("3"
                                                                      (assert)
                                                                      nil
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil)
                                                           ("2"
                                                            (flatten)
                                                            (("2"
                                                              (hide-all-but
                                                               (1 2))
                                                              (("2"
                                                                (expand
                                                                 "abs")
                                                                (("2"
                                                                  (lift-if)
                                                                  (("2"
                                                                    (ground)
                                                                    nil
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil)
                                                       ("2"
                                                        (skosimp*)
                                                        (("2"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil)
                                                       ("3"
                                                        (skosimp*)
                                                        (("3"
                                                          (assert)
                                                          (("3"
                                                            (typepred
                                                             "xis!1")
                                                            (("3"
                                                              (assert)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil)
                                                       ("4"
                                                        (hide-all-but
                                                         (1 2))
                                                        (("4"
                                                          (expand
                                                           "abs")
                                                          (("4"
                                                            (lift-if)
                                                            (("4"
                                                              (ground)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("2"
                                                      (hide 3)
                                                      (("2"
                                                        (expand
                                                         "Riemann_sum?")
                                                        (("2"
                                                          (assert)
                                                          (("2"
                                                            (inst
                                                             +
                                                             "xis!1")
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("3"
                                                      (skosimp*)
                                                      (("3"
                                                        (assert)
                                                        nil
                                                        nil))
                                                      nil)
                                                     ("4"
                                                      (skosimp*)
                                                      (("4"
                                                        (assert)
                                                        (("4"
                                                          (typepred
                                                           "xis!1")
                                                          (("4"
                                                            (assert)
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil)
                                           ("2"
                                            (hide 2)
                                            (("2"
                                              (hide 2)
                                              (("2"
                                                (expand "Rie_sum")
                                                (("2"
                                                  (assert)
                                                  (("2"
                                                    (lemma
                                                     "sigma_scal[below(length(P!1) - 1)]")
                                                    (("1"
                                                      (inst?)
                                                      (("1"
                                                        (assert)
                                                        (("1"
                                                          (expand "*")
                                                          (("1"
                                                            (assert)
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil)
                                                       ("2"
                                                        (hide 2)
                                                        (("2"
                                                          (skosimp*)
                                                          (("2"
                                                            (assert)
                                                            (("2"
                                                              (typepred
                                                               "xis!1")
                                                              (("2"
                                                                (assert)
                                                                nil
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("2"
                                                      (skosimp*)
                                                      (("2"
                                                        (assert)
                                                        nil
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil)
                 ("2" (hide 3)
                  (("2" (assert)
                    (("2" (case "epsi!1 / abs(D!1) > 0")
                      (("1" (assertnil nil)
                       ("2" (hide 2)
                        (("2" (hide -2)
                          (("2" (cross-mult 1)
                            (("1" (grind) nil nil)
                             ("2" (assert)
                              (("2"
                                (hide 2)
                                (("2" (grind) nil nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil)
                       ("3" (hide 2) (("3" (grind) nil nil)) nil))
                      nil))
                    nil))
                  nil)
                 ("3" (hide -2 3) (("3" (grind) nil nil)) nil))
                nil))
              nil))
            nil)
           ("2" (propax) nil nil) ("3" (propax) nil nil))
          nil))
        nil))
      nil))
    nil)
   ((const_fun const-decl "[T -> real]" real_fun_ops "reals/")
    (sigma def-decl "real" sigma "reals/")
    (sigma_scal formula-decl nil sigma "reals/"))
   nil)
  (integral_scal-1 nil 3253532115
   ("" (skosimp*)
    (("" (case-replace "D!1 = 0")
      (("1" (assert)
        (("1" (expand "*")
          (("1" (lemma "integral_const_fun")
            (("1" (inst - "0" "a!1" "b!1")
              (("1" (expand "const_fun")
                (("1" (flatten) (("1" (assertnil nil)) nil)) nil))
              nil))
            nil))
          nil))
        nil)
       ("2" (rewrite "integral_def")
        (("2" (typepred "integral(a!1, b!1, f!1)")
          (("1" (expand "integral?")
            (("1" (skosimp*)
              (("1" (inst -1 "epsi!1/abs(D!1)")
                (("1" (skosimp*)
                  (("1" (inst + "delta!1")
                    (("1" (skosimp*)
                      (("1" (inst?)
                        (("1" (assert)
                          (("1" (typepred "R!1")
                            (("1" (expand "Riemann_sum?")
                              (("1"
                                (assert)
                                (("1"
                                  (skosimp*)
                                  (("1"
                                    (replace -1)
                                    (("1"
                                      (hide -1)
                                      (("1"
                                        (case-replace
                                         "Rie_sum(a!1, b!1, P!1, xis!1, D!1 * f!1) = D!1*Rie_sum(a!1, b!1, P!1, xis!1, f!1)")
                                        (("1"
                                          (expand "Rie_sum")
                                          (("1"
                                            (assert)
                                            (("1"
                                              (replace -1)
                                              (("1"
                                                (hide -1)
                                                (("1"
                                                  (inst
                                                   -
                                                   "sigma[below(length(P!1) - 1)]
                (0, length(P!1) - 2,
                 LAMBDA (n: below(length(P!1) - 1)):
                   P!1`seq(1 + n) * f!1(xis!1`seq(n)) -
                    P!1`seq(n) * f!1(xis!1`seq(n)))")
                                                  (("1"
                                                    (cross-mult -1)
                                                    (("1"
                                                      (assert)
                                                      (("1"
                                                        (split -1)
                                                        (("1"
                                                          (flatten)
                                                          (("1"
                                                            (rewrite
                                                             "abs_mult "
                                                             :dir
                                                             rl)
                                                            (("1"
                                                              (assert)
                                                              nil
                                                              nil)
                                                             ("2"
                                                              (hide 3)
                                                              (("2"
                                                                (skosimp*)
                                                                (("2"
                                                                  (assert)
                                                                  nil
                                                                  nil))
                                                                nil))
                                                              nil)
                                                             ("3"
                                                              (skosimp*)
                                                              (("3"
                                                                (assert)
                                                                (("3"
                                                                  (typepred
                                                                   "xis!1")
                                                                  (("3"
                                                                    (assert)
                                                                    nil
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil)
                                                         ("2"
                                                          (flatten)
                                                          (("2"
                                                            (hide-all-but
                                                             (1 2))
                                                            (("2"
                                                              (grind)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("2"
                                                      (skosimp*)
                                                      (("2"
                                                        (assert)
                                                        nil
                                                        nil))
                                                      nil)
                                                     ("3"
                                                      (skosimp*)
                                                      (("3"
                                                        (assert)
                                                        (("3"
                                                          (typepred
                                                           "xis!1")
                                                          (("3"
                                                            (assert)
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("4"
                                                      (hide-all-but
                                                       (1 2))
                                                      (("4"
                                                        (expand "abs")
                                                        (("4"
                                                          (lift-if)
                                                          (("4"
                                                            (ground)
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil)
                                                   ("2"
                                                    (hide 3)
                                                    (("2"
                                                      (expand
                                                       "Riemann_sum?")
                                                      (("2"
                                                        (assert)
                                                        (("2"
                                                          (inst
                                                           +
                                                           "xis!1")
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil)
                                                   ("3"
                                                    (skosimp*)
                                                    (("3"
                                                      (assert)
                                                      nil
                                                      nil))
                                                    nil)
                                                   ("4"
                                                    (skosimp*)
                                                    (("4"
                                                      (assert)
                                                      (("4"
                                                        (typepred
                                                         "xis!1")
                                                        (("4"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil)
                                         ("2"
                                          (hide 2)
                                          (("2"
                                            (hide 2)
                                            (("2"
                                              (expand "Rie_sum")
                                              (("2"
                                                (assert)
                                                (("2"
                                                  (lemma
                                                   "sigma_scal[below(length(P!1) - 1)]")
                                                  (("1"
                                                    (inst?)
                                                    (("1"
                                                      (assert)
                                                      (("1"
                                                        (expand "*")
                                                        (("1"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("2"
                                                      (hide 2)
                                                      (("2"
                                                        (skosimp*)
                                                        (("2"
                                                          (assert)
                                                          (("2"
                                                            (typepred
                                                             "xis!1")
                                                            (("2"
                                                              (assert)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil)
                                                   ("2"
                                                    (skosimp*)
                                                    (("2"
                                                      (assert)
                                                      nil
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil)
                 ("2" (hide 3)
                  (("2" (assert)
                    (("2" (case "epsi!1 / abs(D!1) > 0")
                      (("1" (assertnil nil)
                       ("2" (hide 2)
                        (("2" (hide -2)
                          (("2" (cross-mult 1)
                            (("1" (grind) nil nil)
                             ("2" (assert)
                              (("2"
                                (hide 2)
                                (("2" (grind) nil nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil)
                       ("3" (hide 2) (("3" (grind) nil nil)) nil))
                      nil))
                    nil))
                  nil)
                 ("3" (hide -2 3) (("3" (grind) nil nil)) nil))
                nil))
              nil))
            nil)
           ("2" (propax) nil nil) ("3" (propax) nil nil))
          nil))
        nil))
      nil))
    nil)
   ((const_fun const-decl "[T -> real]" real_fun_ops "reals/")
    (sigma_scal formula-decl nil sigma "reals/")
    (sigma def-decl "real" sigma "reals/"))
   nil))
 (integral_scal_g 0
  (integral_scal_g-1 nil 3488722885
   ("" (skosimp*)
    (("" (case-replace "D!1 = 0")
      (("1" (assert)
        (("1"
          (case "integral?(a!1, b!1, LAMBDA (x: T): 0 * g!1(x), f!1, 0)")
          (("1" (expand "integrable?")
            (("1" (split +)
              (("1" (inst + "0")
                (("1" (assert)
                  (("1" (expand "*") (("1" (propax) nil nil)) nil))
                  nil))
                nil)
               ("2" (typepred "integral(a!1, b!1, 0 * g!1, f!1)")
                (("2" (lemma "integral_unique")
                  (("2"
                    (inst - "0" "integral(a!1, b!1, 0 * g!1, f!1)"
                     "a!1" "b!1" "f!1" "0*g!1")
                    (("2" (assert)
                      (("2" (expand "*") (("2" (propax) nil nil)) nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil)
           ("2" (hide 2)
            (("2" (expand "integral?")
              (("2" (skosimp*)
                (("2" (inst + "1")
                  (("2" (skosimp*)
                    (("2" (typepred "R!1")
                      (("2" (expand "Riemann_sum?")
                        (("2" (skosimp*)
                          (("2"
                            (case "Rie_sum(a!1, b!1, LAMBDA (x: T): 0 * g!1(x), P!1, xis!1, f!1) = 0")
                            (("1" (lemma "abs_0")
                              (("1" (assertnil nil)) nil)
                             ("2" (hide 2)
                              (("2"
                                (hide -1)
                                (("2"
                                  (expand "Rie_sum")
                                  (("2"
                                    (lemma
                                     "sigma_zero[below(P!1`length-1)]")
                                    (("1"
                                      (inst?)
                                      (("1" (assertnil nil))
                                      nil)
                                     ("2"
                                      (skosimp*)
                                      (("2" (assertnil nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil)
       ("2" (rewrite "integral_def")
        (("2" (typepred "integral(a!1, b!1, g!1,f!1)")
          (("2" (expand "integral?")
            (("2" (skosimp*)
              (("2" (inst -1 "epsi!1/abs(D!1)")
                (("1" (skosimp*)
                  (("1" (inst + "delta!1")
                    (("1" (skosimp*)
                      (("1" (inst?)
                        (("1" (assert)
                          (("1" (typepred "R!1")
                            (("1" (expand "Riemann_sum?")
                              (("1"
                                (auto-rewrite "Rie_sum")
                                (("1"
                                  (assert)
                                  (("1"
                                    (skosimp*)
                                    (("1"
                                      (replace -1)
                                      (("1"
                                        (hide -1)
                                        (("1"
                                          (case-replace
                                           "Rie_sum(a!1, b!1,g!1, P!1, xis!1, D!1 * f!1) = D!1*Rie_sum(a!1, b!1, g!1,P!1, xis!1, f!1)")
                                          (("1"
                                            (expand "Rie_sum")
                                            (("1"
                                              (assert)
                                              (("1"
                                                (hide -1)
                                                (("1"
                                                  (inst
                                                   -
                                                   "sigma[below(P!1`length - 1)]
                                                 (0, P!1`length - 2,
                                                  LAMBDA (n: below(P!1`length - 1)):
                                                    g!1(P!1`seq(1 + n)) * f!1(xis!1`seq(n)) -
                                                     g!1(P!1`seq(n)) * f!1(xis!1`seq(n)))")
                                                  (("1"
                                                    (cross-mult -1)
                                                    (("1"
                                                      (assert)
                                                      (("1"
                                                        (split -1)
                                                        (("1"
                                                          (flatten)
                                                          (("1"
                                                            (lemma
                                                             "sigma_scal[below(P!1`length - 1)]")
                                                            (("1"
                                                              (inst?)
                                                              (("1"
                                                                (inst
                                                                 -
                                                                 "D!1")
                                                                (("1"
                                                                  (expand
                                                                   "*")
                                                                  (("1"
                                                                    (assert)
                                                                    (("1"
                                                                      (replace
                                                                       -1)
                                                                      (("1"
                                                                        (lemma
                                                                         "abs_mult")
                                                                        (("1"
                                                                          (inst
                                                                           -
                                                                           "integral(a!1, b!1, g!1, f!1) -
                                                           sigma[below(P!1`length - 1)]
                                                               (0, P!1`length - 2,
                                                                LAMBDA (n: below(P!1`length - 1)):
                                                                  g!1(P!1`seq(1 + n)) * f!1(xis!1`seq(n)) -
                                                                   g!1(P!1`seq(n)) * f!1(xis!1`seq(n)))"
                                                                           "D!1")
                                                                          (("1"
                                                                            (assert)
                                                                            nil
                                                                            nil)
                                                                           ("2"
                                                                            (skosimp*)
                                                                            (("2"
                                                                              (assert)
                                                                              nil
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil)
                                                             ("2"
                                                              (skosimp*)
                                                              (("2"
                                                                (assert)
                                                                nil
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil)
                                                         ("2"
                                                          (flatten)
                                                          (("2"
                                                            (hide-all-but
                                                             (1 2))
                                                            (("2"
                                                              (grind)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("2"
                                                      (skosimp*)
                                                      (("2"
                                                        (assert)
                                                        nil
                                                        nil))
                                                      nil))
                                                    nil)
                                                   ("2"
                                                    (hide 3)
                                                    (("2"
                                                      (expand
                                                       "Riemann_sum?")
                                                      (("2"
                                                        (inst
                                                         +
                                                         "xis!1")
                                                        (("2"
                                                          (expand
                                                           "Rie_sum")
                                                          (("2"
                                                            (assert)
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil)
                                                   ("3"
                                                    (skosimp*)
                                                    (("3"
                                                      (assert)
                                                      nil
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil)
                                           ("2"
                                            (hide -1)
                                            (("2"
                                              (hide 3)
                                              (("2"
                                                (expand "Rie_sum")
                                                (("2"
                                                  (expand "*")
                                                  (("2"
                                                    (lemma
                                                     "sigma_scal[below(P!1`length - 1)]")
                                                    (("1"
                                                      (inst
                                                       -
                                                       "LAMBDA (n: below(P!1`length - 1)):
                                           f!1(xis!1`seq(n)) * g!1(P!1`seq(1 + n)) -
                                            f!1(xis!1`seq(n)) * g!1(P!1`seq(n))"
                                                       "D!1"
                                                       "P!1`length-2"
                                                       "0")
                                                      (("1"
                                                        (assert)
                                                        nil
                                                        nil))
                                                      nil)
                                                     ("2"
                                                      (skosimp*)
                                                      (("2"
                                                        (assert)
                                                        nil
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil)
                 ("2" (case "epsi!1/abs(D!1)>0")
                  (("1" (assertnil nil)
                   ("2" (cross-mult 1) (("2" (assertnil nil)) nil)
                   ("3" (assertnil nil))
                  nil)
                 ("3" (assertnil nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((number nonempty-type-decl nil numbers nil)
    (boolean nonempty-type-decl nil booleans nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (real nonempty-type-from-decl nil reals nil)
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (integral? const-decl "bool" rs_integral_def nil)
    (< const-decl "bool" reals nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real_times_real_is_real application-judgement "real" reals nil)
    (* const-decl "[T -> real]" real_fun_ops "reals/")
    (integral_unique formula-decl nil rs_integral_def nil)
    (integral const-decl "{S: real | integral?(a, b, gg, ff, S)}"
     rs_integral_def nil)
    (NOT const-decl "[bool -> bool]" booleans nil)
    (integrable? const-decl "bool" rs_integral_def nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (>= const-decl "bool" reals nil)
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (partition type-eq-decl nil rs_partition nil)
    (below type-eq-decl nil naturalnumbers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (<= const-decl "bool" reals nil)
    (restrict const-decl "R" restrict nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (fseq type-eq-decl nil fseqs "structures/")
    (barray type-eq-decl nil fseqs "structures/")
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (T_low type-eq-decl nil sigma "reals/")
    (T_high type-eq-decl nil sigma "reals/")
    (OR const-decl "[bool, bool -> bool]" booleans nil)
    (sigma_nat application-judgement "nat" sigma_below "reals/")
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (integer nonempty-type-from-decl nil integers nil)
    (IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
    (sigma_zero formula-decl nil sigma "reals/")
    (abs_0 formula-decl nil abs_lems "reals/")
    (int_abs_is_nonneg application-judgement "{j: nonneg_int | j >= i}"
     real_defs nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (abs_nat formula-decl nil abs_lems "reals/")
    (Rie_sum const-decl "real" rs_integral_def nil)
    (xis? type-eq-decl nil rs_integral_def nil)
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (int_minus_int_is_int application-judgement "int" integers nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (div_mult_pos_gt1 formula-decl nil extra_real_props nil)
    (posint_plus_nnint_is_posint application-judgement "posint"
     integers nil)
    (a!1 skolem-const-decl "T" rs_integral_prep nil)
    (b!1 skolem-const-decl "T" rs_integral_prep nil)
    (P!1 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (g!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (f!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (sigma def-decl "real" sigma "reals/")
    (xis!1 skolem-const-decl "xis?[T](a!1, b!1, P!1)" rs_integral_prep
     nil)
    (nnreal_times_nnreal_is_nnreal application-judgement "nnreal"
     real_types nil)
    (abs_mult formula-decl nil real_props nil)
    (sigma_scal formula-decl nil sigma "reals/")
    (nonzero_real nonempty-type-eq-decl nil reals nil)
    (div_mult_pos_neg_lt2 formula-decl nil extra_real_props nil)
    (epsi!1 skolem-const-decl "posreal" rs_integral_prep nil)
    (/ const-decl "[numfield, nznum -> numfield]" number_fields nil)
    (nznum nonempty-type-eq-decl nil number_fields nil)
    (D!1 skolem-const-decl "real" rs_integral_prep nil)
    (abs const-decl "{n: nonneg_real | n >= m AND n >= -m}" real_defs
         nil)
    (- const-decl "[numfield -> numfield]" number_fields nil)
    (/= const-decl "boolean" notequal nil)
    (nzreal_div_nzreal_is_nzreal application-judgement "nzreal"
     real_types nil)
    (real_gt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (integral_def formula-decl nil rs_integral_def nil))
   nil))
 (integral_sum 0
  (integral_sum-1 nil 3253532115
   ("" (skosimp*)
    (("" (rewrite "integral_def")
      (("" (typepred "integral(a!1, b!1, g!1, f!1)")
        (("" (typepred "integral(a!1, b!1, g!1, h!1)")
          (("" (name-replace "I1" "integral(a!1, b!1, g!1, f!1)")
            (("" (name-replace "I2" "integral(a!1, b!1, g!1, h!1)")
              (("" (expand "integral?")
                (("" (skosimp*)
                  (("" (inst -1 "epsi!1/2")
                    (("" (inst - "epsi!1/2")
                      (("" (skosimp*)
                        (("" (inst + "min(delta!1,delta!2)")
                          (("" (skosimp*)
                            (("" (inst - "P!1")
                              ((""
                                (inst - "P!1")
                                ((""
                                  (split -1)
                                  (("1"
                                    (split -2)
                                    (("1"
                                      (hide -4 -5 -6)
                                      (("1"
                                        (typepred "R!1")
                                        (("1"
                                          (expand "Riemann_sum?")
                                          (("1"
                                            (skosimp*)
                                            (("1"
                                              (replace -1)
                                              (("1"
                                                (hide -1)
                                                (("1"
                                                  (case-replace
                                                   "Rie_sum(a!1, b!1, g!1, P!1, xis!1, LAMBDA x: f!1(x) + h!1(x)) =                       Rie_sum(a!1, b!1, g!1,P!1, xis!1, f!1) + Rie_sum(a!1, b!1, g!1,P!1, xis!1, h!1)")
                                                  (("1"
                                                    (hide -1)
                                                    (("1"
                                                      (inst
                                                       -
                                                       "Rie_sum(a!1, b!1, g!1, P!1, xis!1, f!1)")
                                                      (("1"
                                                        (inst
                                                         -
                                                         "Rie_sum(a!1, b!1, g!1, P!1, xis!1, h!1)")
                                                        (("1"
                                                          (lemma
                                                           "triangle")
                                                          (("1"
                                                            (inst
                                                             -1
                                                             "I1 - Rie_sum(a!1, b!1,g!1, P!1, xis!1, f!1)"
                                                             "I2 - Rie_sum(a!1, b!1, g!1,P!1, xis!1, h!1)")
                                                            (("1"
                                                              (assert)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil)
                                                         ("2"
                                                          (hide-all-but
                                                           1)
                                                          (("2"
                                                            (expand
                                                             "Riemann_sum?")
                                                            (("2"
                                                              (inst?)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil)
                                                       ("2"
                                                        (hide-all-but
                                                         1)
                                                        (("2"
                                                          (expand
                                                           "Riemann_sum?")
                                                          (("2"
                                                            (inst?)
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil)
                                                   ("2"
                                                    (hide 2)
                                                    (("2"
                                                      (hide -1 -2)
                                                      (("2"
                                                        (expand
                                                         "Rie_sum")
                                                        (("2"
                                                          (assert)
                                                          (("2"
                                                            (lemma
                                                             "sigma_sum[below(length(P!1) - 1)]")
                                                            (("1"
                                                              (inst?)
                                                              (("1"
                                                                (assert)
                                                                nil
                                                                nil))
                                                              nil)
                                                             ("2"
                                                              (hide 2)
                                                              (("2"
                                                                (skosimp*)
                                                                (("2"
                                                                  (assert)
                                                                  nil
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil)
                                     ("2" (assertnil nil))
                                    nil)
                                   ("2" (assertnil nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((real_plus_real_is_real application-judgement "real" reals nil)
    (integral_def formula-decl nil rs_integral_def nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (< const-decl "bool" reals nil)
    (integrable? const-decl "bool" rs_integral_def nil)
    (integral? const-decl "bool" rs_integral_def nil)
    (integral const-decl "{S: real | integral?(a, b, gg, ff, S)}"
     rs_integral_def nil)
    (number nonempty-type-decl nil numbers nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (real nonempty-type-from-decl nil reals nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (posreal_min application-judgement
     "{z: posreal | z <= x AND z <= y}" real_defs nil)
    (min const-decl "{p: real | p <= m AND p <= n}" real_defs nil)
    (<= const-decl "bool" reals nil)
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (partition type-eq-decl nil rs_partition nil)
    (below type-eq-decl nil naturalnumbers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (restrict const-decl "R" restrict nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (fseq type-eq-decl nil fseqs "structures/")
    (barray type-eq-decl nil fseqs "structures/")
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (int_minus_int_is_int application-judgement "int" integers nil)
    (Rie_sum const-decl "real" rs_integral_def nil)
    (xis? type-eq-decl nil rs_integral_def nil)
    (a!1 skolem-const-decl "T" rs_integral_prep nil)
    (b!1 skolem-const-decl "T" rs_integral_prep nil)
    (P!1 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (g!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (f!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (xis!1 skolem-const-decl "xis?[T](a!1, b!1, P!1)" rs_integral_prep
     nil)
    (triangle formula-decl nil real_props nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (nnreal_plus_nnreal_is_nnreal application-judgement "nnreal"
     real_types nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (h!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (real_gt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (posint_plus_nnint_is_posint application-judgement "posint"
     integers nil)
    (T_low type-eq-decl nil sigma "reals/")
    (T_high type-eq-decl nil sigma "reals/")
    (OR const-decl "[bool, bool -> bool]" booleans nil)
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (integer nonempty-type-from-decl nil integers nil)
    (IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
    (sigma_sum formula-decl nil sigma "reals/")
    (real_times_real_is_real application-judgement "real" reals nil)
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (>= const-decl "bool" reals nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (/= const-decl "boolean" notequal nil)
    (nznum nonempty-type-eq-decl nil number_fields nil)
    (/ const-decl "[numfield, nznum -> numfield]" number_fields nil)
    (posreal_div_posreal_is_posreal application-judgement "posreal"
     real_types nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (NOT const-decl "[bool -> bool]" booleans nil))
   nil))
 (integral_sum_g 0
  (integral_sum_g-1 nil 3488732672
   ("" (skosimp*)
    (("" (rewrite "integral_def")
      (("" (typepred "integral(a!1, b!1, g!1, f!1)")
        (("" (typepred "integral(a!1, b!1, h!1, f!1)")
          (("" (name-replace "I1" "integral(a!1, b!1, g!1, f!1)")
            (("" (name-replace "I2" "integral(a!1, b!1, h!1, f!1)")
              (("" (expand "integral?")
                (("" (skosimp*)
                  (("" (inst -1 "epsi!1/2")
                    (("" (inst - "epsi!1/2")
                      (("" (skosimp*)
                        (("" (inst + "min(delta!1,delta!2)")
                          (("" (skosimp*)
                            (("" (inst - "P!1")
                              ((""
                                (inst - "P!1")
                                ((""
                                  (split -1)
                                  (("1"
                                    (split -2)
                                    (("1"
                                      (hide -4 -5 -6)
                                      (("1"
                                        (typepred "R!1")
                                        (("1"
                                          (expand "Riemann_sum?")
                                          (("1"
                                            (skosimp*)
                                            (("1"
                                              (replace -1)
                                              (("1"
                                                (hide -1)
                                                (("1"
                                                  (case-replace
                                                   "Rie_sum(a!1, b!1, LAMBDA x: g!1(x) + h!1(x), P!1, xis!1, f!1) =                       Rie_sum(a!1, b!1, g!1,P!1, xis!1, f!1) + Rie_sum(a!1, b!1, h!1,P!1, xis!1, f!1)")
                                                  (("1"
                                                    (hide -1)
                                                    (("1"
                                                      (inst
                                                       -
                                                       "Rie_sum(a!1, b!1, g!1, P!1, xis!1, f!1)")
                                                      (("1"
                                                        (inst
                                                         -
                                                         "Rie_sum(a!1, b!1, h!1, P!1, xis!1, f!1)")
                                                        (("1"
                                                          (lemma
                                                           "triangle")
                                                          (("1"
                                                            (inst
                                                             -1
                                                             "I1 - Rie_sum(a!1, b!1,g!1, P!1, xis!1, f!1)"
                                                             "I2 - Rie_sum(a!1, b!1, h!1,P!1, xis!1, f!1)")
                                                            (("1"
                                                              (assert)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil)
                                                         ("2"
                                                          (hide-all-but
                                                           1)
                                                          (("2"
                                                            (expand
                                                             "Riemann_sum?")
                                                            (("2"
                                                              (inst?)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil)
                                                       ("2"
                                                        (hide-all-but
                                                         1)
                                                        (("2"
                                                          (expand
                                                           "Riemann_sum?")
                                                          (("2"
                                                            (inst?)
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil)
                                                   ("2"
                                                    (hide 2)
                                                    (("2"
                                                      (hide -1 -2)
                                                      (("2"
                                                        (expand
                                                         "Rie_sum")
                                                        (("2"
                                                          (assert)
                                                          (("2"
                                                            (lemma
                                                             "sigma_sum[below(length(P!1) - 1)]")
                                                            (("1"
                                                              (inst?)
                                                              (("1"
                                                                (assert)
                                                                nil
                                                                nil))
                                                              nil)
                                                             ("2"
                                                              (hide 2)
                                                              (("2"
                                                                (skosimp*)
                                                                (("2"
                                                                  (assert)
                                                                  nil
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil)
                                     ("2" (assertnil nil))
                                    nil)
                                   ("2" (assertnil nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((real_plus_real_is_real application-judgement "real" reals nil)
    (integral_def formula-decl nil rs_integral_def nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (< const-decl "bool" reals nil)
    (integrable? const-decl "bool" rs_integral_def nil)
    (integral? const-decl "bool" rs_integral_def nil)
    (integral const-decl "{S: real | integral?(a, b, gg, ff, S)}"
     rs_integral_def nil)
    (number nonempty-type-decl nil numbers nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (real nonempty-type-from-decl nil reals nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (posreal_min application-judgement
     "{z: posreal | z <= x AND z <= y}" real_defs nil)
    (min const-decl "{p: real | p <= m AND p <= n}" real_defs nil)
    (<= const-decl "bool" reals nil)
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (partition type-eq-decl nil rs_partition nil)
    (below type-eq-decl nil naturalnumbers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (restrict const-decl "R" restrict nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (fseq type-eq-decl nil fseqs "structures/")
    (barray type-eq-decl nil fseqs "structures/")
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (int_minus_int_is_int application-judgement "int" integers nil)
    (Rie_sum const-decl "real" rs_integral_def nil)
    (xis? type-eq-decl nil rs_integral_def nil)
    (a!1 skolem-const-decl "T" rs_integral_prep nil)
    (b!1 skolem-const-decl "T" rs_integral_prep nil)
    (P!1 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (g!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (f!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (xis!1 skolem-const-decl "xis?[T](a!1, b!1, P!1)" rs_integral_prep
     nil)
    (triangle formula-decl nil real_props nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (nnreal_plus_nnreal_is_nnreal application-judgement "nnreal"
     real_types nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (h!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (real_gt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (posint_plus_nnint_is_posint application-judgement "posint"
     integers nil)
    (T_low type-eq-decl nil sigma "reals/")
    (T_high type-eq-decl nil sigma "reals/")
    (OR const-decl "[bool, bool -> bool]" booleans nil)
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (integer nonempty-type-from-decl nil integers nil)
    (IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
    (sigma_sum formula-decl nil sigma "reals/")
    (real_times_real_is_real application-judgement "real" reals nil)
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (>= const-decl "bool" reals nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (/= const-decl "boolean" notequal nil)
    (nznum nonempty-type-eq-decl nil number_fields nil)
    (/ const-decl "[numfield, nznum -> numfield]" number_fields nil)
    (posreal_div_posreal_is_posreal application-judgement "posreal"
     real_types nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (NOT const-decl "[bool -> bool]" booleans nil))
   nil))
 (integral?_sum 0
  (integral?_sum-1 nil 3278177576
   ("" (skosimp*)
    (("" (lemma "integral_sum")
      (("" (inst?)
        (("" (inst?)
          (("" (assert)
            (("" (lemma "integral_def")
              (("" (inst - "a!1" "b!1" "f!1" "g!1" "v1!1")
                (("" (assert)
                  (("" (lemma "integral_def")
                    (("" (inst - "a!1" "b!1" "h!1" "g!1" "v2!1")
                      (("" (assert)
                        (("" (flatten)
                          (("" (assert)
                            (("" (inst - "g!1")
                              ((""
                                (assert)
                                ((""
                                  (flatten)
                                  (("" (assertnil nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((integral_sum formula-decl nil rs_integral_prep nil)
    (integral_def formula-decl nil rs_integral_def nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (real_plus_real_is_real application-judgement "real" reals nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number nonempty-type-decl nil numbers nil))
   shostak))
 (integral?_sum_g 0
  (integral?_sum_g-1 nil 3489152310
   ("" (skosimp*)
    (("" (lemma "integral_sum_g")
      (("" (inst?)
        (("" (inst?)
          (("" (inst - "f!1")
            (("" (assert)
              (("" (lemma "integral_def")
                (("" (inst - "a!1" "b!1" "f!1" "g!1" "v1!1")
                  (("" (assert)
                    (("" (lemma "integral_def")
                      (("" (inst - "a!1" "b!1" "f!1" "h!1" "v2!1")
                        (("" (assert)
                          (("" (flatten)
                            (("" (assert)
                              ((""
                                (replace -2)
                                ((""
                                  (replace -4)
                                  ((""
                                    (flatten)
                                    (("" (assertnil nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((integral_sum_g formula-decl nil rs_integral_prep nil)
    (real_plus_real_is_real application-judgement "real" reals nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (integral_def formula-decl nil rs_integral_def nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number nonempty-type-decl nil numbers nil))
   nil))
 (integral_diff 0
  (integral_diff-1 nil 3253532115
   ("" (skosimp*)
    (("" (lemma "integral_sum")
      (("" (inst -1 "a!1" "b!1" "f!1" "g!1" "-h!1")
        (("" (assert)
          (("" (split -1)
            (("1" (flatten)
              (("1" (assert)
                (("1" (expand "-")
                  (("1" (assert)
                    (("1" (assert)
                      (("1" (replace -2)
                        (("1" (assert)
                          (("1" (lemma "integral_scal")
                            (("1" (inst?)
                              (("1"
                                (assert)
                                (("1"
                                  (flatten)
                                  (("1"
                                    (case-replace
                                     "(LAMBDA (x: T): -h!1(x)) = -1 * h!1")
                                    (("1" (assertnil nil)
                                     ("2"
                                      (apply-extensionality 1 :hide? t)
                                      (("2"
                                        (expand "*")
                                        (("2" (assertnil nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil)
             ("2" (hide 2)
              (("2" (lemma "integral_scal")
                (("2" (inst -1 "-1" "a!1" "b!1" "h!1" "g!1")
                  (("2" (assert)
                    (("2" (flatten)
                      (("2" (assert)
                        (("2" (case-replace "-h!1 = -1*h!1")
                          (("2" (apply-extensionality 1 :hide? t)
                            (("2" (expand "*")
                              (("2"
                                (assert)
                                (("2"
                                  (expand "-")
                                  (("2" (assertnil nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((integral_sum formula-decl nil rs_integral_prep nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (minus_real_is_real application-judgement "real" reals nil)
    (minus_odd_is_odd application-judgement "odd_int" integers nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (- const-decl "[numfield -> numfield]" number_fields nil)
    (* const-decl "[T -> real]" real_fun_ops "reals/")
    (real_times_real_is_real application-judgement "real" reals nil)
    (integral_scal formula-decl nil rs_integral_prep nil)
    (real_plus_real_is_real application-judgement "real" reals nil)
    (- const-decl "[T -> real]" real_fun_ops "reals/")
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number nonempty-type-decl nil numbers nil))
   nil))
 (integral_diff_g 0
  (integral_diff_g-1 nil 3489152523
   ("" (skosimp*)
    (("" (lemma "integral_sum_g")
      (("" (inst -1 "a!1" "b!1" "f!1" "g!1" "-h!1")
        (("" (assert)
          (("" (split -1)
            (("1" (flatten)
              (("1" (assert)
                (("1"
                  (case "(LAMBDA x: (-h!1)(x) + g!1(x)) = (LAMBDA x: g!1(x) - h!1(x))")
                  (("1" (assert)
                    (("1" (replace -1)
                      (("1" (lemma "integral_scal_g")
                        (("1" (inst - "-1" "a!1" "b!1" "f!1" "h!1")
                          (("1" (assert)
                            (("1" (flatten)
                              (("1"
                                (case "-1*h!1 = -h!1")
                                (("1" (assertnil nil)
                                 ("2"
                                  (hide-all-but 1)
                                  (("2"
                                    (expand "*")
                                    (("2"
                                      (decompose-equality)
                                      (("2"
                                        (expand "-")
                                        (("2" (assertnil nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil)
                   ("2" (hide-all-but 1) (("2" (grind) nil nil)) nil))
                  nil))
                nil))
              nil)
             ("2" (lemma "integral_scal_g")
              (("2" (inst - "-1" "a!1" "b!1" "f!1" "h!1")
                (("2" (assert)
                  (("2" (flatten)
                    (("2" (case "-1*h!1 = -h!1")
                      (("1" (assertnil nil)
                       ("2" (hide-all-but 1)
                        (("2" (decompose-equality)
                          (("2" (grind) nil nil)) nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((integral_sum_g formula-decl nil rs_integral_prep nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (minus_odd_is_odd application-judgement "odd_int" integers nil)
    (- const-decl "[numfield -> numfield]" number_fields nil)
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (minus_real_is_real application-judgement "real" reals nil)
    (real_times_real_is_real application-judgement "real" reals nil)
    (* const-decl "[T -> real]" real_fun_ops "reals/")
    (integral_scal_g formula-decl nil rs_integral_prep nil)
    (real_plus_real_is_real application-judgement "real" reals nil)
    (- const-decl "[T -> real]" real_fun_ops "reals/")
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number nonempty-type-decl nil numbers nil))
   nil))
 (integral_ge_0 0
  (integral_ge_0-1 nil 3253532115
   ("" (skosimp*)
    (("" (typepred "integral(a!1, b!1,g!1, f!1)")
      (("" (expand "integral?")
        ((""
          (case "FORALL (eps: posreal): integral(a!1, b!1, g!1, f!1) >= -eps")
          (("1" (hide -2 -3 -5)
            (("1" (inst -1 "-integral(a!1, b!1, g!1, f!1)/2")
              (("1" (assertnil nil)
               ("2" (prop)
                (("1" (assertnil nil) ("2" (assertnil nil)) nil))
              nil))
            nil)
           ("2" (skosimp*)
            (("2" (assert)
              (("2" (inst -1 "eps!1")
                (("2" (skosimp*)
                  (("2" (lemma "axiom_of_archimedes")
                    (("2" (inst -1 "(b!1-a!1)/delta!1+2")
                      (("2" (skosimp*)
                        (("2" (name "NM" "real_defs.max(i!1,2)")
                          (("2" (inst - "eq_partition(a!1,b!1,NM)")
                            (("1" (split -3)
                              (("1"
                                (inst
                                 -
                                 "Rie_sum(a!1, b!1, g!1, eq_partition(a!1, b!1, NM), gen_xis(a!1, b!1, eq_partition(a!1, b!1, NM)), f!1)")
                                (("1"
                                  (name-replace
                                   "II"
                                   "integral(a!1, b!1, g!1, f!1)")
                                  (("1"
                                    (case
                                     "Rie_sum(a!1, b!1, g!1, eq_partition(a!1, b!1, NM), gen_xis(a!1,b!1,eq_partition(a!1, b!1, NM)), f!1) >= 0")
                                    (("1"
                                      (expand "abs")
                                      (("1"
                                        (lift-if)
                                        (("1" (ground) nil nil))
                                        nil))
                                      nil)
                                     ("2"
                                      (hide -1 -4 2 3)
                                      (("2"
                                        (name
                                         "NN"
                                         "eq_partition(a!1, b!1, NM)")
                                        (("2"
                                          (replace -1)
                                          (("2"
                                            (expand "Rie_sum")
                                            (("2"
                                              (lemma
                                               "sigma_nonneg[below(length(NN) - 1)]")
                                              (("1"
                                                (assert)
                                                (("1"
                                                  (inst?)
                                                  (("1"
                                                    (assert)
                                                    (("1"
                                                      (hide 2)
                                                      (("1"
                                                        (skosimp*)
                                                        (("1"
                                                          (factor 1 l)
                                                          (("1"
                                                            (inst?)
                                                            (("1"
                                                              (case
                                                               "g!1(NN`seq(1 + i!2)) - g!1(NN`seq(i!2)) >= 0")
                                                              (("1"
                                                                (mult-by
                                                                 -1
                                                                 "f!1(gen_xis(a!1, b!1, NN)`seq(i!2))")
                                                                (("1"
                                                                  (assert)
                                                                  nil
                                                                  nil))
                                                                nil)
                                                               ("2"
                                                                (hide
                                                                 2)
                                                                (("2"
                                                                  (typepred
                                                                   "NN")
                                                                  (("2"
                                                                    (inst
                                                                     -
                                                                     "i!2")
                                                                    (("2"
                                                                      (assert)
                                                                      (("2"
                                                                        (expand
                                                                         "increasing?")
                                                                        (("2"
                                                                          (assert)
                                                                          (("2"
                                                                            (inst
                                                                             -9
                                                                             "seq(NN)(i!2)"
                                                                             "seq(NN)(1+i!2)")
                                                                            (("2"
                                                                              (assert)
                                                                              (("2"
                                                                                (inst?)
                                                                                (("2"
                                                                                  (assert)
                                                                                  nil
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil)
                                                             ("2"
                                                              (assert)
                                                              (("2"
                                                                (hide
                                                                 2)
                                                                (("2"
                                                                  (typepred
                                                                   "gen_xis(a!1, b!1, NN)")
                                                                  (("2"
                                                                    (inst
                                                                     -
                                                                     "i!2")
                                                                    (("2"
                                                                      (flatten)
                                                                      (("2"
                                                                        (typepred
                                                                         "NN")
                                                                        (("2"
                                                                          (inst-cp
                                                                           -
                                                                           "i!2")
                                                                          (("2"
                                                                            (inst
                                                                             -
                                                                             "i!2+1")
                                                                            (("2"
                                                                              (ground)
                                                                              nil
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil)
                                                 ("2"
                                                  (assert)
                                                  nil
                                                  nil))
                                                nil)
                                               ("2"
                                                (hide 2)
                                                (("2"
                                                  (skosimp*)
                                                  (("2"
                                                    (assert)
                                                    nil
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil)
                                 ("2"
                                  (lemma "Riemann?_Rie")
                                  (("2"
                                    (inst -1 "a!1" "b!1" "f!1" "g!1")
                                    (("2"
                                      (split -)
                                      (("1" (inst?) nil nil)
                                       ("2" (propax) nil nil))
                                      nil))
                                    nil))
                                  nil)
                                 ("3"
                                  (expand "max" -1)
                                  (("3"
                                    (lift-if)
                                    (("3" (ground) nil nil))
                                    nil))
                                  nil))
                                nil)
                               ("2"
                                (rewrite "width_eq_part")
                                (("2"
                                  (hide -3 -4 -5 2 3)
                                  (("2"
                                    (name-replace ba "b!1-a!1")
                                    (("2"
                                      (move-terms -2 l 2)
                                      (("2"
                                        (case "ba / delta!1 < i!1 - 1")
                                        (("1"
                                          (hide -3)
                                          (("1"
                                            (mult-by -1 "delta!1")
                                            (("1"
                                              (mult-by 1 "NM-1")
                                              (("1"
                                                (expand "max")
                                                (("1"
                                                  (lift-if)
                                                  (("1"
                                                    (ground)
                                                    (("1"
                                                      (replace -2 * rl)
                                                      (("1"
                                                        (hide -2)
                                                        (("1"
                                                          (assert)
                                                          (("1"
                                                            (typepred
                                                             "i!1")
                                                            (("1"
                                                              (factor
                                                               -3
                                                               r)
                                                              (("1"
                                                                (case
                                                                 "i!1-1 < 1")
                                                                (("1"
                                                                  (mult-by
                                                                   -1
                                                                   "delta!1")
                                                                  (("1"
                                                                    (assert)
                                                                    nil
                                                                    nil))
                                                                  nil)
                                                                 ("2"
                                                                  (assert)
                                                                  nil
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil)
                                         ("2" (assertnil nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil)
                             ("2" (assertnil nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((integral const-decl "{S: real | integral?(a, b, gg, ff, S)}"
     rs_integral_def nil)
    (integrable? const-decl "bool" rs_integral_def nil)
    (integral? const-decl "bool" rs_integral_def nil)
    (< const-decl "bool" reals nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (number nonempty-type-decl nil numbers nil)
    (NOT const-decl "[bool -> bool]" booleans nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (boolean nonempty-type-decl nil booleans nil)
    (- const-decl "[numfield -> numfield]" number_fields nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (>= const-decl "bool" reals nil)
    (minus_nzreal_is_nzreal application-judgement "nzreal" real_types
     nil)
    (real_gt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (minus_real_is_real application-judgement "real" reals nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_div_nzreal_is_real application-judgement "real" reals nil)
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (/= const-decl "boolean" notequal nil)
    (nznum nonempty-type-eq-decl nil number_fields nil)
    (/ const-decl "[numfield, nznum -> numfield]" number_fields nil)
    (a!1 skolem-const-decl "T" rs_integral_prep nil)
    (b!1 skolem-const-decl "T" rs_integral_prep nil)
    (g!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (f!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (real_plus_real_is_real application-judgement "real" reals nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (int_max application-judgement "{k: int | i <= k AND j <= k}"
     real_defs nil)
    (rat_max application-judgement "{s: rat | s >= q AND s >= r}"
     real_defs nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (max const-decl "{p: real | p >= m AND p >= n}" real_defs nil)
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (<= const-decl "bool" reals nil)
    (Riemann?_Rie formula-decl nil rs_integral_def nil)
    (minus_odd_is_odd application-judgement "odd_int" integers nil)
    (sigma_nonneg formula-decl nil sigma "reals/")
    (IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
    (integer nonempty-type-from-decl nil integers nil)
    (posint_plus_nnint_is_posint application-judgement "posint"
     integers nil)
    (T_low type-eq-decl nil sigma "reals/")
    (T_high type-eq-decl nil sigma "reals/")
    (OR const-decl "[bool, bool -> bool]" booleans nil)
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (nnint_plus_posint_is_posint application-judgement "posint"
     integers nil)
    (both_sides_times_pos_ge1_imp formula-decl nil extra_real_props
     nil)
    (increasing? const-decl "bool" real_fun_preds "reals/")
    (closed_interval type-eq-decl nil intervals_real "reals/")
    (i!2 skolem-const-decl "below(length(NN) - 1)" rs_integral_prep
     nil)
    (NN skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (int_minus_int_is_int application-judgement "int" integers nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_times_real_is_real application-judgement "real" reals nil)
    (abs const-decl "{n: nonneg_real | n >= m AND n >= -m}" real_defs
         nil)
    (gen_xis const-decl "xis?(a, b, P)" rs_integral_def nil)
    (Rie_sum const-decl "real" rs_integral_def nil)
    (xis? type-eq-decl nil rs_integral_def nil)
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (IFF const-decl "[bool, bool -> bool]" booleans nil)
    (posreal_times_posreal_is_posreal application-judgement "posreal"
     real_types nil)
    (nonzero_real nonempty-type-eq-decl nil reals nil)
    (div_cancel2 formula-decl nil real_props nil)
    (both_sides_times_pos_lt1 formula-decl nil real_props nil)
    (width_eq_part formula-decl nil rs_partition nil)
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (barray type-eq-decl nil fseqs "structures/")
    (fseq type-eq-decl nil fseqs "structures/")
    (restrict const-decl "R" restrict nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (below type-eq-decl nil naturalnumbers nil)
    (partition type-eq-decl nil rs_partition nil)
    (above nonempty-type-eq-decl nil integers nil)
    (eq_partition const-decl "partition(a, b)" rs_partition nil)
    (NM skolem-const-decl "{k: int | i!1 <= k AND 2 <= k}"
     rs_integral_prep nil)
    (i!1 skolem-const-decl "int" rs_integral_prep nil)
    (axiom_of_archimedes formula-decl nil real_props nil)
    (real_minus_real_is_real application-judgement "real" reals nil))
   nil))
 (integral_restr_eq 0
  (integral_restr_eq-1 nil 3281700217
   ("" (skosimp*)
    (("" (lemma "integral_restrict_eq")
      (("" (inst?) (("" (assert) (("" (ground) nil nil)) nil)) nil))
      nil))
    nil)
   ((T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number nonempty-type-decl nil numbers nil)
    (integral_restrict_eq formula-decl nil rs_integral_def nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil))
   nil))
 (integral_bound_above 0
  (integral_bound_above-2 nil 3494858073
   ("" (skosimp*)
    (("" (lemma "integral_const_fun")
      (("" (inst -1 "_" "a!1" "b!1" "g!1")
        (("" (lemma "integral_diff")
          (("" (inst -1 "a!1" "b!1" "_" "g!1" "_")
            (("" (lemma "integral_ge_0")
              ((""
                (inst -1 "a!1" "b!1" "(LAMBDA (t:T): M!1 - f!1(t))"
                 "g!1")
                (("" (assert)
                  ((""
                    (case "integrable?(a!1, b!1, g!1,(LAMBDA (t: T): M!1 - f!1(t)))")
                    (("1" (assert)
                      (("1" (inst -4 "M!1")
                        (("1" (flatten)
                          (("1" (expand "const_fun")
                            (("1"
                              (inst -3 "(LAMBDA (x: T): M!1)" "f!1")
                              (("1"
                                (assert)
                                (("1"
                                  (split -2)
                                  (("1"
                                    (replace -5)
                                    (("1"
                                      (hide -5)
                                      (("1"
                                        (replace -3)
                                        (("1"
                                          (hide -3)
                                          (("1" (assertnil nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil)
                                   ("2"
                                    (hide -1 -2 -3 -4 -6 2)
                                    (("2"
                                      (skosimp*)
                                      (("2"
                                        (inst?)
                                        (("2" (assertnil nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil)
                     ("2" (inst -2 "(LAMBDA (x: T): M!1)" "f!1")
                      (("2" (assert)
                        (("2" (inst -2 "M!1")
                          (("2" (flatten)
                            (("2" (assert)
                              (("2"
                                (expand "const_fun")
                                (("2" (propax) nil nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((integral_const_fun formula-decl nil rs_integral_prep nil)
    (integral_diff formula-decl nil rs_integral_prep nil)
    (integral_ge_0 formula-decl nil rs_integral_prep nil)
    (real_times_real_is_real application-judgement "real" reals nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (const_fun_continuous application-judgement "continuous_fun"
     continuous_functions nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (minus_odd_is_odd application-judgement "odd_int" integers nil)
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (<= const-decl "bool" reals nil)
    (closed_interval type-eq-decl nil intervals_real "reals/")
    (const_fun const-decl "[T -> real]" real_fun_ops "reals/")
    (integrable? const-decl "bool" rs_integral_def nil)
    (< const-decl "bool" reals nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number nonempty-type-decl nil numbers nil))
   nil)
  (integral_bound_above-1 nil 3489155712
   ("" (skosimp*)
    (("" (lemma "integral_const_fun")
      (("" (inst -1 "_" "a!1" "b!1" "g!1")
        (("" (lemma "integral_diff")
          (("" (inst -1 "a!1" "b!1" "_" "g!1" "_")
            (("" (lemma "integral_ge_0")
              ((""
                (inst -1 "a!1" "b!1" "(LAMBDA (t:real): M!1 - f!1(t))"
                 "g!1")
                (("" (assert)
                  ((""
                    (case "integrable?(a!1, b!1, g!1,(LAMBDA (t: real): M!1 - f!1(t)))")
                    (("1" (assert)
                      (("1" (inst -4 "M!1")
                        (("1" (flatten)
                          (("1" (expand "const_fun")
                            (("1"
                              (inst -3 "(LAMBDA (x: real): M!1)" "f!1")
                              (("1"
                                (assert)
                                (("1"
                                  (split -2)
                                  (("1"
                                    (replace -5)
                                    (("1"
                                      (hide -5)
                                      (("1"
                                        (replace -3)
                                        (("1"
                                          (hide -3)
                                          (("1" (assertnil nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil)
                                   ("2"
                                    (hide -1 -2 -3 -4 -6 2)
                                    (("2"
                                      (skosimp*)
                                      (("2"
                                        (inst?)
                                        (("2" (assertnil nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil)
                     ("2" (inst -2 "(LAMBDA (x: real): M!1)" "f!1")
                      (("2" (assert)
                        (("2" (inst -2 "M!1")
                          (("2" (flatten)
                            (("2" (assert)
                              (("2"
                                (expand "const_fun")
                                (("2" (propax) nil nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((const_fun_continuous application-judgement "continuous_fun"
     continuous_functions nil)
    (closed_interval type-eq-decl nil intervals_real "reals/")
    (const_fun const-decl "[T -> real]" real_fun_ops "reals/"))
   nil))
 (integral_bound_below 0
  (integral_bound_below-2 nil 3494858091
   ("" (skosimp*)
    (("" (lemma "integral_const_fun")
      (("" (inst -1 "_" "a!1" "b!1" "g!1")
        (("" (lemma "integral_diff")
          (("" (inst -1 "a!1" "b!1" "_" "g!1" "_")
            (("" (lemma "integral_ge_0")
              ((""
                (inst -1 "a!1" "b!1" "(LAMBDA (t:T): f!1(t) - m!1)"
                 "g!1")
                (("" (assert)
                  ((""
                    (case "integrable?(a!1, b!1, g!1,(LAMBDA (t: T): f!1(t) - m!1))")
                    (("1" (assert)
                      (("1" (inst -4 "m!1")
                        (("1" (flatten)
                          (("1" (inst -3 "f!1" "const_fun(m!1)")
                            (("1" (assert)
                              (("1"
                                (expand "const_fun")
                                (("1"
                                  (replace -5)
                                  (("1"
                                    (hide -5)
                                    (("1"
                                      (split -2)
                                      (("1" (assertnil nil)
                                       ("2"
                                        (hide -1 -2 -3 -5 2)
                                        (("2"
                                          (skosimp*)
                                          (("2"
                                            (inst?)
                                            (("2" (assertnil nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil)
                     ("2" (inst -2 "f!1" "const_fun(m!1)")
                      (("2" (assert)
                        (("2" (inst -3 "m!1")
                          (("2" (expand "const_fun")
                            (("2" (assertnil nil)) nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((integral_const_fun formula-decl nil rs_integral_prep nil)
    (integral_diff formula-decl nil rs_integral_prep nil)
    (integral_ge_0 formula-decl nil rs_integral_prep nil)
    (real_times_real_is_real application-judgement "real" reals nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (const_fun_continuous application-judgement "continuous_fun"
     continuous_functions nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (<= const-decl "bool" reals nil)
    (closed_interval type-eq-decl nil intervals_real "reals/")
    (const_fun const-decl "[T -> real]" real_fun_ops "reals/")
    (integrable? const-decl "bool" rs_integral_def nil)
    (< const-decl "bool" reals nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number nonempty-type-decl nil numbers nil))
   nil)
  (integral_bound_below-1 nil 3489155718
   ("" (skosimp*)
    (("" (lemma "integral_const_fun")
      (("" (inst -1 "_" "a!1" "b!1" "g!1")
        (("" (lemma "integral_diff")
          (("" (inst -1 "a!1" "b!1" "_" "g!1" "_")
            (("" (lemma "integral_ge_0")
              ((""
                (inst -1 "a!1" "b!1" "(LAMBDA (t:real): f!1(t) - m!1)"
                 "g!1")
                (("" (assert)
                  ((""
                    (case "integrable?(a!1, b!1, g!1,(LAMBDA (t: real): f!1(t) - m!1))")
                    (("1" (assert)
                      (("1" (inst -4 "m!1")
                        (("1" (flatten)
                          (("1" (inst -3 "f!1" "const_fun(m!1)")
                            (("1" (assert)
                              (("1"
                                (expand "const_fun")
                                (("1"
                                  (replace -5)
                                  (("1"
                                    (hide -5)
                                    (("1"
                                      (split -2)
                                      (("1" (assertnil nil)
                                       ("2"
                                        (hide -1 -2 -3 -5 2)
                                        (("2"
                                          (skosimp*)
                                          (("2"
                                            (inst?)
                                            (("2" (assertnil nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil)
                     ("2" (inst -2 "f!1" "const_fun(m!1)")
                      (("2" (assert)
                        (("2" (inst -3 "m!1")
                          (("2" (expand "const_fun")
                            (("2" (assertnil nil)) nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((const_fun_continuous application-judgement "continuous_fun"
     continuous_functions nil)
    (closed_interval type-eq-decl nil intervals_real "reals/")
    (const_fun const-decl "[T -> real]" real_fun_ops "reals/"))
   nil))
 (integral_le 0
  (integral_le-1 nil 3297781017
   ("" (skosimp*)
    (("" (lemma "integral_diff")
      (("" (inst - "a!1" "b!1" "h!1" "g!1" "f!1")
        (("" (assert)
          (("" (flatten)
            ((""
              (case "integral(a!1, b!1, g!1, LAMBDA x: h!1(x) - f!1(x)) >= 0")
              (("1" (assertnil nil)
               ("2" (hide 2)
                (("2" (lemma "integral_bound_below")
                  (("2"
                    (inst - "a!1" "b!1" "LAMBDA x: h!1(x) - f!1(x)"
                     "g!1" "0")
                    (("2" (assertnil nil)) nil))
                  nil))
                nil)
               ("3" (propax) nil nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((integral_diff formula-decl nil rs_integral_prep nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (integral const-decl "{S: real | integral?(a, b, gg, ff, S)}"
     rs_integral_def nil)
    (integral? const-decl "bool" rs_integral_def nil)
    (integrable? const-decl "bool" rs_integral_def nil)
    (< const-decl "bool" reals nil) (>= const-decl "bool" reals nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (integral_bound_below formula-decl nil rs_integral_prep nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number nonempty-type-decl nil numbers nil))
   shostak))
 (Lemma_1 0
  (Lemma_1-2 nil 3282496507
   ("" (skosimp*)
    (("" (expand "integrable?")
      (("" (skosimp*)
        (("" (expand "integral?")
          (("" (inst - "eps!1/2")
            (("" (skosimp*)
              (("" (inst + "delta!1")
                (("" (skosimp*)
                  (("" (copy -2)
                    (("" (inst - "P1!1")
                      (("" (inst - "P2!1")
                        (("" (assert)
                          (("" (flatten)
                            (("" (assert)
                              ((""
                                (name
                                 "R1"
                                 "Rie_sum(a!1, b!1,g!1, P1!1, xis1!1, f!1)")
                                ((""
                                  (replace -1)
                                  ((""
                                    (name
                                     "R2"
                                     "Rie_sum(a!1, b!1, g!1,P2!1, xis2!1, f!1)")
                                    ((""
                                      (replace -1)
                                      ((""
                                        (case-replace
                                         "R1 - R2 = (R1 - S!1) - (R2 - S!1)")
                                        (("1"
                                          (lemma "triangle")
                                          (("1"
                                            (inst
                                             -
                                             "R1-S!1"
                                             "-(R2 - S!1)")
                                            (("1"
                                              (assert)
                                              (("1"
                                                (assert)
                                                (("1"
                                                  (case-replace
                                                   "abs(S!1 - R2) = abs(R2 - S!1)")
                                                  (("1"
                                                    (case-replace
                                                     "abs(S!1 - R1) = abs(R1 - S!1)")
                                                    (("1"
                                                      (assert)
                                                      (("1"
                                                        (inst - "R1")
                                                        (("1"
                                                          (inst - "R2")
                                                          (("1"
                                                            (assert)
                                                            nil
                                                            nil)
                                                           ("2"
                                                            (lemma
                                                             "Riemann?_Rie")
                                                            (("2"
                                                              (inst
                                                               -
                                                               "a!1"
                                                               "b!1"
                                                               "f!1"
                                                               "g!1")
                                                              (("2"
                                                                (split
                                                                 -1)
                                                                (("1"
                                                                  (inst
                                                                   -
                                                                   "P2!1"
                                                                   "xis2!1")
                                                                  (("1"
                                                                    (assert)
                                                                    nil
                                                                    nil))
                                                                  nil)
                                                                 ("2"
                                                                  (propax)
                                                                  nil
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil)
                                                         ("2"
                                                          (lemma
                                                           "Riemann?_Rie")
                                                          (("2"
                                                            (inst
                                                             -
                                                             "a!1"
                                                             "b!1"
                                                             "f!1"
                                                             "g!1")
                                                            (("2"
                                                              (split
                                                               -1)
                                                              (("1"
                                                                (inst
                                                                 -
                                                                 "P1!1"
                                                                 "xis1!1")
                                                                (("1"
                                                                  (assert)
                                                                  nil
                                                                  nil))
                                                                nil)
                                                               ("2"
                                                                (propax)
                                                                nil
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("2"
                                                      (hide-all-but 1)
                                                      (("2"
                                                        (grind)
                                                        nil
                                                        nil))
                                                      nil))
                                                    nil)
                                                   ("2"
                                                    (hide-all-but 1)
                                                    (("2"
                                                      (grind)
                                                      nil
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil)
                                         ("2" (assertnil nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((integrable? const-decl "bool" rs_integral_def nil)
    (real_minus_real_is_real application-judgement "real" reals nil)
    (integral? const-decl "bool" rs_integral_def nil)
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (barray type-eq-decl nil fseqs "structures/")
    (fseq type-eq-decl nil fseqs "structures/")
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (restrict const-decl "R" restrict nil)
    (<= const-decl "bool" reals nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (< const-decl "bool" reals nil)
    (below type-eq-decl nil naturalnumbers nil)
    (partition type-eq-decl nil rs_partition nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (minus_odd_is_odd application-judgement "odd_int" integers nil)
    (triangle formula-decl nil real_props nil)
    (nnreal_plus_nnreal_is_nnreal application-judgement "nnreal"
     real_types nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (abs const-decl "{n: nonneg_real | n >= m AND n >= -m}" real_defs
         nil)
    (P2!1 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (R2 skolem-const-decl "real" rs_integral_prep nil)
    (Riemann?_Rie formula-decl nil rs_integral_def nil)
    (R1 skolem-const-decl "real" rs_integral_prep nil)
    (f!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (g!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (P1!1 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (b!1 skolem-const-decl "T" rs_integral_prep nil)
    (a!1 skolem-const-decl "T" rs_integral_prep nil)
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (- const-decl "[numfield -> numfield]" number_fields nil)
    (minus_real_is_real application-judgement "real" reals nil)
    (real_plus_real_is_real application-judgement "real" reals nil)
    (Rie_sum const-decl "real" rs_integral_def nil)
    (xis? type-eq-decl nil rs_integral_def nil)
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (/ const-decl "[numfield, nznum -> numfield]" number_fields nil)
    (nznum nonempty-type-eq-decl nil number_fields nil)
    (/= const-decl "boolean" notequal nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (>= const-decl "bool" reals nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (real nonempty-type-from-decl nil reals nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number nonempty-type-decl nil numbers nil)
    (posreal_div_posreal_is_posreal application-judgement "posreal"
     real_types nil))
   nil)
  (Lemma_1-1 nil 3282496495 ("" (postpone) nil nilnil shostak))
 (integrable_lem 0
  (integrable_lem-3 "DEbugging PVS 3.2" 3495206489
   ("" (auto-rewrite + "member")
    (("" (skosimp*)
      (("" (prop)
        (("1" (skosimp*)
          (("1" (expand "integrable?")
            (("1" (skosimp*)
              (("1" (expand "integral?")
                (("1" (inst -1 "epsi!1/2")
                  (("1" (skosimp*)
                    (("1" (inst + "delta!1")
                      (("1" (skosimp*)
                        (("1" (inst-cp -1 "P1!1")
                          (("1" (inst -1 "P2!1")
                            (("1" (assert)
                              (("1"
                                (inst -1 "RS2!1")
                                (("1"
                                  (inst -2 "RS1!1")
                                  (("1"
                                    (case-replace
                                     "RS1!1 - RS2!1 = (RS1!1 - S!1) - (RS2!1 - S!1)")
                                    (("1"
                                      (lemma "triangle")
                                      (("1"
                                        (inst
                                         -1
                                         "RS1!1-S!1"
                                         "-(RS2!1-S!1)")
                                        (("1"
                                          (case-replace
                                           "abs(-(RS2!1 - S!1)) = abs(S!1 - RS2!1)")
                                          (("1"
                                            (case-replace
                                             "abs(RS1!1 - S!1) = abs(S!1 - RS1!1)")
                                            (("1" (assertnil nil)
                                             ("2"
                                              (hide-all-but 1)
                                              (("2"
                                                (expand "abs")
                                                (("2"
                                                  (lift-if)
                                                  (("2"
                                                    (lift-if)
                                                    (("2"
                                                      (lift-if)
                                                      (("2"
                                                        (ground)
                                                        nil
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil)
                                           ("2"
                                            (hide-all-but 1)
                                            (("2"
                                              (expand "abs")
                                              (("2"
                                                (lift-if)
                                                (("2"
                                                  (lift-if)
                                                  (("2"
                                                    (lift-if)
                                                    (("2"
                                                      (ground)
                                                      nil
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil)
                                     ("2" (assertnil nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil)
         ("2"
          (case "  FORALL (n: nat): nonempty?({S: real |  EXISTS (P: partition(a!1, b!1),xis:xis?(a!1,b!1,P)):  width(a!1, b!1, P) < 1 / (1 + n) AND  S = Rie_sum(a!1, b!1, g!1,P, xis, f!1)})")
          (("1"
            (name "SS"
                  "(LAMBDA (n: nat): choose({S:real| EXISTS (P: partition(a!1,b!1),
                                                                                                                                                                xis: xis?(a!1, b!1, P)):
                                                                                                                             width(a!1,b!1,P) < 1/(n+1) AND
                                                                                                                                    S = Rie_sum(a!1, b!1, g!1,P, xis, f!1)})                                    )")
            (("1" (case "cauchy(SS)")
              (("1" (lemma "convergence_cauchy2")
                (("1" (inst?)
                  (("1" (assert)
                    (("1" (expand "convergent?")
                      (("1" (skosimp*)
                        (("1" (expand "integrable?")
                          (("1" (inst + "l!1")
                            (("1" (expand "integral?")
                              (("1"
                                (skosimp*)
                                (("1"
                                  (inst -5 "epsi!1/2")
                                  (("1"
                                    (skosimp*)
                                    (("1"
                                      (inst + "delta!1")
                                      (("1"
                                        (skosimp*)
                                        (("1"
                                          (typepred "R!1")
                                          (("1"
                                            (expand "Riemann_sum?")
                                            (("1"
                                              (skosimp*)
                                              (("1"
                                                (replace -1)
                                                (("1"
                                                  (hide -1)
                                                  (("1"
                                                    (expand
                                                     "convergence")
                                                    (("1"
                                                      (inst
                                                       -
                                                       "epsi!1/2")
                                                      (("1"
                                                        (skosimp*)
                                                        (("1"
                                                          (name
                                                           "NN"
                                                           "choose({nn: nat | nn > n!1 AND nn > 1/delta!1})")
                                                          (("1"
                                                            (inst
                                                             -
                                                             "NN")
                                                            (("1"
                                                              (assert)
                                                              (("1"
                                                                (typepred
                                                                 "choose({S: real | EXISTS (P: partition(a!1, b!1),
                                                                                                                                                       xis: xis?(a!1, b!1, P)):
                                                                                                                                                  width(a!1, b!1, P) < 1 / (NN+1) AND  S = Rie_sum(a!1, b!1, g!1,P, xis, f!1)})")
                                                                (("1"
                                                                  (skosimp*)
                                                                  (("1"
                                                                    (inst
                                                                     -8
                                                                     "P!1"
                                                                     "P!2")
                                                                    (("1"
                                                                      (assert)
                                                                      (("1"
                                                                        (case
                                                                         "width(a!1, b!1, P!2) < delta!1")
                                                                        (("1"
                                                                          (assert)
                                                                          (("1"
                                                                            (name
                                                                             "ST"
                                                                             "Rie_sum(a!1, b!1,g!1, P!1, xis!1, f!1)")
                                                                            (("1"
                                                                              (replace
                                                                               -1)
                                                                              (("1"
                                                                                (case-replace
                                                                                 "abs(l!1 - ST) = abs(ST - l!1)")
                                                                                (("1"
                                                                                  (case-replace
                                                                                   "ST- l!1 = (ST - SS(NN))  + (SS(NN) - l!1)")
                                                                                  (("1"
                                                                                    (lemma
                                                                                     "triangle")
                                                                                    (("1"
                                                                                      (inst
                                                                                       -
                                                                                       "ST- SS(NN)"
                                                                                       "SS(NN) - l!1")
                                                                                      (("1"
                                                                                        (inst
                                                                                         -13
                                                                                         "ST"
                                                                                         "SS(NN)")
                                                                                        (("1"
                                                                                          (assert)
                                                                                          nil
                                                                                          nil)
                                                                                         ("2"
                                                                                          (hide
                                                                                           2)
                                                                                          (("2"
                                                                                            (case
                                                                                             "SS(NN) = Rie_sum(a!1, b!1, g!1,P!2, xis!2, f!1)")
                                                                                            (("1"
                                                                                              (replace
                                                                                               -1)
                                                                                              (("1"
                                                                                                (hide-all-but
                                                                                                 1)
                                                                                                (("1"
                                                                                                  (lemma
                                                                                                   "Riemann?_Rie")
                                                                                                  (("1"
                                                                                                    (inst
                                                                                                     -
                                                                                                     "a!1"
                                                                                                     "b!1"
                                                                                                     "f!1"
                                                                                                     "g!1")
                                                                                                    (("1"
                                                                                                      (split
                                                                                                       -1)
                                                                                                      (("1"
                                                                                                        (inst?)
                                                                                                        nil
                                                                                                        nil)
                                                                                                       ("2"
                                                                                                        (assert)
                                                                                                        nil
                                                                                                        nil))
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil)
                                                                                             ("2"
                                                                                              (assert)
                                                                                              (("2"
                                                                                                (hide
                                                                                                 2)
                                                                                                (("2"
                                                                                                  (replace
                                                                                                   -11
                                                                                                   +
                                                                                                   rl)
                                                                                                  (("2"
                                                                                                    (assert)
                                                                                                    nil
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil)
                                                                                         ("3"
                                                                                          (hide
                                                                                           2)
                                                                                          (("3"
                                                                                            (replace
                                                                                             -4
                                                                                             +
                                                                                             rl)
                                                                                            (("3"
                                                                                              (hide-all-but
                                                                                               1)
                                                                                              (("3"
                                                                                                (lemma
                                                                                                 "Riemann?_Rie")
                                                                                                (("3"
                                                                                                  (inst
                                                                                                   -
                                                                                                   "a!1"
                                                                                                   "b!1"
                                                                                                   "f!1"
                                                                                                   "g!1")
                                                                                                  (("3"
                                                                                                    (split
                                                                                                     -1)
                                                                                                    (("1"
                                                                                                      (inst?)
                                                                                                      nil
                                                                                                      nil)
                                                                                                     ("2"
                                                                                                      (assert)
                                                                                                      nil
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil)
                                                                                   ("2"
                                                                                    (assert)
                                                                                    nil
                                                                                    nil))
                                                                                  nil)
                                                                                 ("2"
                                                                                  (hide-all-but
                                                                                   1)
                                                                                  (("2"
                                                                                    (grind)
                                                                                    nil
                                                                                    nil))
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil)
                                                                         ("2"
                                                                          (assert)
                                                                          (("2"
                                                                            (hide
                                                                             2)
                                                                            (("2"
                                                                              (case
                                                                               "1 / (1 + NN) < delta!1")
                                                                              (("1"
                                                                                (assert)
                                                                                nil
                                                                                nil)
                                                                               ("2"
                                                                                (hide
                                                                                 2)
                                                                                (("2"
                                                                                  (cross-mult
                                                                                   1)
                                                                                  (("2"
                                                                                    (typepred
                                                                                     "NN")
                                                                                    (("2"
                                                                                      (cross-mult
                                                                                       -2)
                                                                                      nil
                                                                                      nil))
                                                                                    nil))
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil)
                                                                 ("2"
                                                                  (inst
                                                                   -5
                                                                   "NN")
                                                                  nil
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil)
                                                           ("2"
                                                            (hide 2)
                                                            (("2"
                                                              (hide-all-but
                                                               1)
                                                              (("2"
                                                                (expand
                                                                 "nonempty?")
                                                                (("2"
                                                                  (expand
                                                                   "empty?")
                                                                  (("2"
                                                                    (expand
                                                                     "member")
                                                                    (("2"
                                                                      (lemma
                                                                       "axiom_of_archimedes")
                                                                      (("2"
                                                                        (case
                                                                         "n!1 > 1/delta!1")
                                                                        (("1"
                                                                          (inst
                                                                           -2
                                                                           "n!1")
                                                                          (("1"
                                                                            (skosimp*)
                                                                            (("1"
                                                                              (inst
                                                                               -3
                                                                               "i!1")
                                                                              (("1"
                                                                                (assert)
                                                                                nil
                                                                                nil)
                                                                               ("2"
                                                                                (assert)
                                                                                nil
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil)
                                                                         ("2"
                                                                          (assert)
                                                                          (("2"
                                                                            (inst
                                                                             -1
                                                                             "1/delta!1")
                                                                            (("2"
                                                                              (skosimp*)
                                                                              (("2"
                                                                                (inst
                                                                                 -2
                                                                                 "i!1")
                                                                                (("1"
                                                                                  (assert)
                                                                                  nil
                                                                                  nil)
                                                                                 ("2"
                                                                                  (assert)
                                                                                  nil
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil)
               ("2" (hide 2)
                (("2" (expand "cauchy")
                  (("2" (skosimp*)
                    (("2" (inst -3 "epsilon!1")
                      (("2" (skosimp*)
                        (("2"
                          (name "NN"
                                "choose({n: posnat | 1/n < delta!1})")
                          (("1" (inst + "NN")
                            (("1" (skosimp*)
                              (("1"
                                (typepred
                                 "choose({S: real | EXISTS (P: partition(a!1, b!1),
                                                                                                                                                               xis: xis?(a!1, b!1, P)):
                                                                                                                                               width(a!1, b!1, P) < 1 / (i!1 + 1) AND
                                                                                                                                        S = Rie_sum(a!1, b!1,g!1, P, xis, f!1)})")
                                (("1"
                                  (skosimp*)
                                  (("1"
                                    (typepred
                                     "choose({S: real |  EXISTS (P: partition(a!1, b!1),
                                                                                                                                                                                     xis: xis?(a!1, b!1, P)):
                                                                                                                                                  width(a!1, b!1, P) < 1 / (j!1 + 1) AND
                                                                                                                                                      S = Rie_sum(a!1, b!1, g!1,P, xis, f!1)})")
                                    (("1"
                                      (skosimp*)
                                      (("1"
                                        (assert)
                                        (("1"
                                          (inst - "P!1" "P!2")
                                          (("1"
                                            (split -10)
                                            (("1"
                                              (assert)
                                              (("1"
                                                (hide -2 -4 -8)
                                                (("1"
                                                  (inst?)
                                                  (("1"
                                                    (hide 2)
                                                    (("1"
                                                      (replace
                                                       -5
                                                       :dir
                                                       RL)
                                                      (("1"
                                                        (beta)
                                                        (("1"
                                                          (replace -1)
                                                          (("1"
                                                            (expand
                                                             "Riemann_sum?")
                                                            (("1"
                                                              (inst?)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil)
                                                   ("2"
                                                    (hide 2)
                                                    (("2"
                                                      (replace
                                                       -5
                                                       :dir
                                                       RL)
                                                      (("2"
                                                        (beta)
                                                        (("2"
                                                          (replace -2)
                                                          (("2"
                                                            (expand
                                                             "Riemann_sum?")
                                                            (("2"
                                                              (inst?)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil)
                                             ("2"
                                              (hide -2 -4 -8)
                                              (("2"
                                                (case
                                                 "1 / NN < delta!1")
                                                (("1"
                                                  (case
                                                   "1 / (1 + i!1) <= 1/NN")
                                                  (("1"
                                                    (assert)
                                                    nil
                                                    nil)
                                                   ("2"
                                                    (hide 2 3)
                                                    (("2"
                                                      (hide
                                                       -1
                                                       -2
                                                       -3
                                                       -7)
                                                      (("2"
                                                        (name
                                                         "ip1"
                                                         "i!1+1")
                                                        (("2"
                                                          (replace -1)
                                                          (("2"
                                                            (cross-mult
                                                             1)
                                                            (("2"
                                                              (assert)
                                                              nil
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil)
                                                 ("2"
                                                  (assert)
                                                  nil
                                                  nil))
                                                nil))
                                              nil)
                                             ("3"
                                              (case-replace
                                               "1 / (1 + j!1) <= 1/NN")
                                              (("1" (assertnil nil)
                                               ("2"
                                                (hide 2 3)
                                                (("2"
                                                  (hide
                                                   -1
                                                   -2
                                                   -3
                                                   -4
                                                   -5
                                                   -8
                                                   -9)
                                                  (("2"
                                                    (name
                                                     "jp1"
                                                     "j!1+1")
                                                    (("2"
                                                      (replace -1)
                                                      (("2"
                                                        (cross-mult 1)
                                                        (("2"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil)
                                     ("2" (inst -7 "j!1"nil nil))
                                    nil))
                                  nil)
                                 ("2" (inst -5 "i!1"nil nil)
                                 ("3" (skosimp*) nil nil)
                                 ("4" (skosimp*) nil nil))
                                nil))
                              nil))
                            nil)
                           ("2" (assert)
                            (("2" (hide 2)
                              (("2"
                                (hide-all-but 1)
                                (("2"
                                  (expand "nonempty?")
                                  (("2"
                                    (expand "empty?")
                                    (("2"
                                      (expand "member")
                                      (("2"
                                        (lemma "axiom_of_archimedes")
                                        (("2"
                                          (inst -1 "1/delta!1")
                                          (("2"
                                            (skosimp*)
                                            (("2"
                                              (inst -2 "i!1")
                                              (("1"
                                                (case "i!1 >= 0")
                                                (("1"
                                                  (lemma
                                                   "div_mult_pos_lt1")
                                                  (("1"
                                                    (inst?)
                                                    (("1"
                                                      (lemma
                                                       "div_mult_pos_lt1")
                                                      (("1"
                                                        (inst
                                                         -1
                                                         "i!1"
                                                         "delta!1"
                                                         "1")
                                                        (("1"
                                                          (assert)
                                                          nil
                                                          nil)
                                                         ("2"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil)
                                                 ("2"
                                                  (cross-mult 2)
                                                  (("2"
                                                    (assert)
                                                    nil
                                                    nil))
                                                  nil))
                                                nil)
                                               ("2" (assertnil nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil)
             ("2" (propax) nil nil))
            nil)
           ("2" (skosimp*)
            (("2" (hide -1 2)
              (("2" (expand "nonempty?")
                (("2" (expand "empty?")
                  (("2" (expand "member")
                    (("2" (assert)
                      (("2" (name "BMA" "b!1-a!1")
                        (("2"
                          (name "NP"
                                "choose({n: above(1) | BMA/(n-1) < 1/(1+n!1)})")
                          (("1"
                            (inst -
                             "Rie_sum(a!1, b!1,g!1, eq_partition(a!1,b!1,NP), gen_xis(a!1,b!1,eq_partition(a!1,b!1,NP)), f!1)")
                            (("1" (inst?)
                              (("1"
                                (rewrite "width_eq_part")
                                (("1"
                                  (assert)
                                  (("1"
                                    (replace -2 :dir rl)
                                    (("1"
                                      (hide -2)
                                      (("1" (assertnil nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil)
                           ("2" (expand "nonempty?")
                            (("2" (expand "empty?")
                              (("2"
                                (expand "member")
                                (("2"
                                  (lemma "axiom_of_archimedes")
                                  (("2"
                                    (inst -1 "2 + BMA*(n!1+1)")
                                    (("2"
                                      (skosimp*)
                                      (("2"
                                        (lemma "pos_times_lt")
                                        (("2"
                                          (inst?)
                                          (("2"
                                            (assert)
                                            (("2"
                                              (inst - "i!1")
                                              (("2"
                                                (case
                                                 "BMA / (i!1 - 1) < BMA / (1 + BMA * (n!1 + 1) )")
                                                (("1"
                                                  (name "np1" "n!1+1")
                                                  (("1"
                                                    (case-replace
                                                     "BMA / (1 + BMA * np1) < 1/np1")
                                                    (("1"
                                                      (assert)
                                                      nil
                                                      nil)
                                                     ("2"
                                                      (hide 2)
                                                      (("2"
                                                        (hide -6)
                                                        (("2"
                                                          (cross-mult
                                                           1)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil)
                                                     ("3"
                                                      (ground)
                                                      nil
                                                      nil))
                                                    nil))
                                                  nil)
                                                 ("2"
                                                  (assert)
                                                  (("2"
                                                    (hide -4)
                                                    (("2"
                                                      (hide 2)
                                                      (("2"
                                                        (assert)
                                                        (("2"
                                                          (case-replace
                                                           "1 + BMA + BMA * n!1 < i!1 -1")
                                                          (("1"
                                                            (hide -3)
                                                            (("1"
                                                              (name
                                                               "TT"
                                                               "1 + BMA + BMA * n!1")
                                                              (("1"
                                                                (name
                                                                 "im1"
                                                                 "i!1-1")
                                                                (("1"
                                                                  (cancel
                                                                   1)
                                                                  nil
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil)
                                                           ("2"
                                                            (assert)
                                                            nil
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((real_minus_real_is_real application-judgement "real" reals nil)
    (Rie_sum const-decl "real" rs_integral_def nil)
    (width const-decl "posreal" rs_partition nil)
    (xis? type-eq-decl nil rs_integral_def nil)
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (nonempty? const-decl "bool" sets nil)
    (set type-eq-decl nil sets nil)
    (posrat_div_posrat_is_posrat application-judgement "posrat"
     rationals nil)
    (posint_plus_nnint_is_posint application-judgement "posint"
     integers nil)
    (sequence type-eq-decl nil sequences nil)
    (cauchy const-decl "bool" convergence_sequences nil)
    (convergent? const-decl "bool" convergence_sequences nil)
    (NOT const-decl "[bool -> bool]" booleans nil)
    (div_mult_pos_lt1 formula-decl nil real_props nil)
    (posreal_times_posreal_is_posreal application-judgement "posreal"
     real_types nil)
    (nnreal_times_nnreal_is_nnreal application-judgement "nnreal"
     real_types nil)
    (div_mult_pos_gt2 formula-decl nil extra_real_props nil)
    (real_gt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (Riemann?_Rie formula-decl nil rs_integral_def nil)
    (NN skolem-const-decl "({nn: nat | nn > n!1 AND nn > 1 / delta!1})"
     rs_integral_prep nil)
    (delta!1 skolem-const-decl "posreal" rs_integral_prep nil)
    (n!1 skolem-const-decl "nat" rs_integral_prep nil)
    (SS skolem-const-decl "[n: nat ->
   ({S: real |
       EXISTS (P: partition(a!1, b!1), xis: xis?(a!1, b!1, P)):
         width(a!1, b!1, P) < 1 / (n + 1) AND
          S = Rie_sum(a!1, b!1, g!1, P, xis, f!1)})]" rs_integral_prep
     nil)
    (P!2 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (ST skolem-const-decl "real" rs_integral_prep nil)
    (f!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (g!1 skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (P!1 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (b!1 skolem-const-decl "T" rs_integral_prep nil)
    (a!1 skolem-const-decl "T" rs_integral_prep nil)
    (empty? const-decl "bool" sets nil)
    (axiom_of_archimedes formula-decl nil real_props nil)
    (i!1 skolem-const-decl "int" rs_integral_prep nil)
    (i!1 skolem-const-decl "int" rs_integral_prep nil)
    (member const-decl "bool" sets nil)
    (convergence const-decl "bool" convergence_sequences nil)
    (int_minus_int_is_int application-judgement "int" integers nil)
    (convergence_cauchy2 formula-decl nil convergence_sequences nil)
    (nonneg_int nonempty-type-eq-decl nil integers nil)
    (posnat nonempty-type-eq-decl nil integers nil)
    (rat_minus_rat_is_rat application-judgement "rat" rationals nil)
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (div_mult_pos_le2 formula-decl nil real_props nil)
    (nonzero_real nonempty-type-eq-decl nil reals nil)
    (times_div2 formula-decl nil real_props nil)
    (mult_divides2 application-judgement "(divides(m))" divides nil)
    (mult_divides1 application-judgement "(divides(n))" divides nil)
    (posint_times_posint_is_posint application-judgement "posint"
     integers nil)
    (div_mult_pos_le1 formula-decl nil real_props nil)
    (posint nonempty-type-eq-decl nil integers nil)
    (P!1 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (i!1 skolem-const-decl "nat" rs_integral_prep nil)
    (P!2 skolem-const-decl "partition[T](a!1, b!1)" rs_integral_prep
     nil)
    (j!1 skolem-const-decl "nat" rs_integral_prep nil)
    (IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
    (i!1 skolem-const-decl "int" rs_integral_prep nil)
    (real_times_real_is_real application-judgement "real" reals nil)
    (nzrat_div_nzrat_is_nzrat application-judgement "nzrat" rationals
     nil)
    (choose const-decl "(p)" sets nil)
    (nnint_plus_posint_is_posint application-judgement "posint"
     integers nil)
    (real_div_nzreal_is_real application-judgement "real" reals nil)
    (above nonempty-type-eq-decl nil integers nil)
    (width_eq_part formula-decl nil rs_partition nil)
    (eq_partition const-decl "partition(a, b)" rs_partition nil)
    (gen_xis const-decl "xis?(a, b, P)" rs_integral_def nil)
    (even_minus_odd_is_odd application-judgement "odd_int" integers
     nil)
    (both_sides_div_pos_lt2 formula-decl nil real_props nil)
    (div_mult_pos_lt2 formula-decl nil real_props nil)
    (np1 skolem-const-decl "posint" rs_integral_prep nil)
    (BMA skolem-const-decl "real" rs_integral_prep nil)
    (pos_times_lt formula-decl nil real_props nil)
    (posreal_div_posreal_is_posreal application-judgement "posreal"
     real_types nil)
    (number nonempty-type-decl nil numbers nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (real nonempty-type-from-decl nil reals nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (>= const-decl "bool" reals nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (/= const-decl "boolean" notequal nil)
    (nznum nonempty-type-eq-decl nil number_fields nil)
    (/ const-decl "[numfield, nznum -> numfield]" number_fields nil)
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (barray type-eq-decl nil fseqs "structures/")
    (fseq type-eq-decl nil fseqs "structures/")
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (= const-decl "[T, T -> boolean]" equalities nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (restrict const-decl "R" restrict nil)
    (<= const-decl "bool" reals nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (< const-decl "bool" reals nil)
    (below type-eq-decl nil naturalnumbers nil)
    (partition type-eq-decl nil rs_partition nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (triangle formula-decl nil real_props nil)
    (abs const-decl "{n: nonneg_real | n >= m AND n >= -m}" real_defs
         nil)
    (nnreal_plus_nnreal_is_nnreal application-judgement "nnreal"
     real_types nil)
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (- const-decl "[numfield -> numfield]" number_fields nil)
    (minus_real_is_real application-judgement "real" reals nil)
    (real_plus_real_is_real application-judgement "real" reals nil)
    (minus_odd_is_odd application-judgement "odd_int" integers nil)
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (integral? const-decl "bool" rs_integral_def nil)
    (integrable? const-decl "bool" rs_integral_def nil))
   nil))
 (integrable_lem2_alt 0
  (integrable_lem2_alt-1 nil 3492182124
   (""
    (case "FORALL (a, b:T, f, g: [T -> real]):
                                                                       a < b AND
                                                                        increasing?[(LAMBDA (x:T): a <= x AND x <= b)]
                                                                            (restrict[T, (LAMBDA (x:T): a <= x AND x <= b), real]
                                                                                 (g))
                                                                        IMPLIES
                                                                        (integrable?(a, b, g, f) IFF
                                                                          (FORALL (epsi: posreal):
                                                                             EXISTS (delta: posreal):
                                                                               FORALL (P: partition(a, b)):
                                                                                 width(a, b, P) < delta IMPLIES
                                                                                  (FORALL (RS1: (Riemann_sum?(a, b, P, g, f)),
                                                                                           RS2: (Riemann_sum?(a, b, P, g, f))):
                                                                                     abs(RS1 - RS2) < epsi)))")
    (("1" (skolem 1 ("a" "b" "f" "gg"))
      (("1" (flatten)
        (("1" (assert)
          (("1" (expand "monotonic?")
            (("1" (flatten)
              (("1" (split -)
                (("1" (inst?) (("1" (assertnil nil)) nil)
                 ("2" (case "NOT increasing?[(closed_intv(a,b))](-gg)")
                  (("1" (hide-all-but (-1 1))
                    (("1" (expand "increasing?")
                      (("1" (expand "decreasing?")
                        (("1" (skeep)
                          (("1" (inst - "x" "y")
                            (("1" (assert)
                              (("1"
                                (expand "restrict")
                                (("1"
                                  (expand "-")
                                  (("1" (assertnil nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil)
                   ("2" (hide -2)
                    (("2" (inst - "a" "b" "f" "-gg")
                      (("2" (assert)
                        (("2" (split +)
                          (("1" (flatten)
                            (("1" (case "integrable?(a,b,-gg,f)")
                              (("1"
                                (assert)
                                (("1"
                                  (hide -5)
                                  (("1"
                                    (skeep)
                                    (("1"
                                      (inst - "epsi")
                                      (("1"
                                        (skeep -4)
                                        (("1"
                                          (inst + "delta")
                                          (("1"
                                            (skeep)
                                            (("1"
                                              (inst - "P")
                                              (("1"
                                                (assert)
                                                (("1"
                                                  (skolem
                                                   1
                                                   ("RSS1" "RSS2"))
                                                  (("1"
                                                    (typepred "RSS1")
                                                    (("1"
                                                      (typepred "RSS2")
                                                      (("1"
                                                        (expand
                                                         "Riemann_sum?")
                                                        (("1"
                                                          (skolem
                                                           -1
                                                           "xis2")
                                                          (("1"
                                                            (skolem
                                                             -2
                                                             "xis1")
                                                            (("1"
                                                              (name
                                                               "RSP1"
                                                               "Rie_sum(a,b,-gg,P,xis1,f)")
                                                              (("1"
                                                                (name
                                                                 "RSP2"
                                                                 "Rie_sum(a,b,-gg,P,xis2,f)")
                                                                (("1"
                                                                  (case
                                                                   "RSP1 = -RSS1 AND RSP2 = -RSS2")
                                                                  (("1"
                                                                    (flatten)
                                                                    (("1"
                                                                      (inst
                                                                       -
                                                                       "RSP1"
                                                                       "RSP2")
                                                                      (("1"
                                                                        (hide-all-but
                                                                         (-1
                                                                          -2
                                                                          -11
                                                                          +))
                                                                        (("1"
                                                                          (grind)
                                                                          nil
                                                                          nil))
                                                                        nil)
                                                                       ("2"
                                                                        (replace
                                                                         -3
                                                                         +
                                                                         :dir
                                                                         rl)
                                                                        (("2"
                                                                          (lemma
                                                                           "Riemann?_Rie")
                                                                          (("2"
                                                                            (inst
                                                                             -
                                                                             "a"
                                                                             "b"
                                                                             "f"
                                                                             "-gg")
                                                                            (("2"
                                                                              (split
                                                                               -)
                                                                              (("1"
                                                                                (inst
                                                                                 -
                                                                                 "P"
                                                                                 "xis2")
                                                                                nil
                                                                                nil)
                                                                               ("2"
                                                                                (propax)
                                                                                nil
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil)
                                                                       ("3"
                                                                        (replace
                                                                         -4
                                                                         +
                                                                         :dir
                                                                         rl)
                                                                        (("3"
                                                                          (lemma
                                                                           "Riemann?_Rie")
                                                                          (("3"
                                                                            (inst
                                                                             -
                                                                             "a"
                                                                             "b"
                                                                             "f"
                                                                             "-gg")
                                                                            (("3"
                                                                              (split
                                                                               -)
                                                                              (("1"
                                                                                (inst
                                                                                 -
                                                                                 "P"
                                                                                 "xis1")
                                                                                nil
                                                                                nil)
                                                                               ("2"
                                                                                (propax)
                                                                                nil
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil)
                                                                   ("2"
                                                                    (replace
                                                                     -1
                                                                     1
                                                                     :dir
                                                                     rl)
                                                                    (("2"
                                                                      (replace
                                                                       -2
                                                                       1
                                                                       :dir
                                                                       rl)
                                                                      (("2"
                                                                        (replace
                                                                         -3
                                                                         1)
                                                                        (("2"
                                                                          (replace
                                                                           -4
                                                                           1)
                                                                          (("2"
                                                                            (hide-all-but
                                                                             1)
                                                                            (("2"
                                                                              (expand
                                                                               "Rie_sum")
                                                                              (("2"
                                                                                (split
                                                                                 +)
                                                                                (("1"
                                                                                  (lemma
                                                                                   "sigma_scal[below(P`length-1)]")
                                                                                  (("1"
                                                                                    (inst
                                                                                     -
                                                                                     "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                 f(xis1`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                                                                                                  f(xis1`seq(n)) * gg(P`seq(n))"
                                                                                     "-1"
                                                                                     "P`length-2"
                                                                                     "0")
                                                                                    (("1"
                                                                                      (replace
                                                                                       -1
                                                                                       :dir
                                                                                       rl)
                                                                                      (("1"
                                                                                        (hide
                                                                                         -1)
                                                                                        (("1"
                                                                                          (lemma
                                                                                           "sigma_restrict_eq[below(P`length-1)]")
                                                                                          (("1"
                                                                                            (inst?)
                                                                                            (("1"
                                                                                              (assert)
                                                                                              (("1"
                                                                                                (hide
                                                                                                 2)
                                                                                                (("1"
                                                                                                  (expand
                                                                                                   "restrict")
                                                                                                  (("1"
                                                                                                    (expand
                                                                                                     "-")
                                                                                                    (("1"
                                                                                                      (assert)
                                                                                                      nil
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil)
                                                                                   ("2"
                                                                                    (skosimp*)
                                                                                    (("2"
                                                                                      (assert)
                                                                                      nil
                                                                                      nil))
                                                                                    nil))
                                                                                  nil)
                                                                                 ("2"
                                                                                  (lemma
                                                                                   "sigma_scal[below(P`length-1)]")
                                                                                  (("1"
                                                                                    (inst
                                                                                     -
                                                                                     "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                 f(xis2`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                                                                                                  f(xis2`seq(n)) * gg(P`seq(n))"
                                                                                     "-1"
                                                                                     "P`length-2"
                                                                                     "0")
                                                                                    (("1"
                                                                                      (replace
                                                                                       -1
                                                                                       :dir
                                                                                       rl)
                                                                                      (("1"
                                                                                        (hide
                                                                                         -)
                                                                                        (("1"
                                                                                          (lemma
                                                                                           "sigma_restrict_eq[below(P`length-1)]")
                                                                                          (("1"
                                                                                            (inst?)
                                                                                            (("1"
                                                                                              (assert)
                                                                                              (("1"
                                                                                                (hide
                                                                                                 2)
                                                                                                (("1"
                                                                                                  (expand
                                                                                                   "restrict")
                                                                                                  (("1"
                                                                                                    (expand
                                                                                                     "-")
                                                                                                    (("1"
                                                                                                      (assert)
                                                                                                      nil
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil)
                                                                                   ("2"
                                                                                    (skosimp*)
                                                                                    (("2"
                                                                                      (assert)
                                                                                      nil
                                                                                      nil))
                                                                                    nil))
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil)
                               ("2"
                                (hide-all-but (-1 1))
                                (("2"
                                  (lemma "integral_scal_g")
                                  (("2"
                                    (inst - "-1" "a" "b" "f" "gg")
                                    (("2"
                                      (assert)
                                      (("2"
                                        (flatten)
                                        (("2"
                                          (assert)
                                          (("2"
                                            (expand "-")
                                            (("2"
                                              (expand "*")
                                              (("2" (assertnil nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil)
                           ("2" (flatten)
                            (("2" (case "integrable?(a,b,-gg,f)")
                              (("1"
                                (hide-all-but (-1 1))
                                (("1"
                                  (lemma "integral_scal_g")
                                  (("1"
                                    (inst - "-1" "a" "b" "f" "-gg")
                                    (("1"
                                      (assert)
                                      (("1"
                                        (flatten)
                                        (("1"
                                          (expand "-")
                                          (("1"
                                            (expand "*")
                                            (("1"
                                              (case
                                               "gg = (LAMBDA (x_1:T): -1 * -gg(x_1))")
                                              (("1" (assertnil nil)
                                               ("2"
                                                (decompose-equality 1)
                                                nil
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil)
                               ("2"
                                (hide 2)
                                (("2"
                                  (assert)
                                  (("2"
                                    (hide -3)
                                    (("2"
                                      (hide 1)
                                      (("2"
                                        (skeep)
                                        (("2"
                                          (inst - "epsi")
                                          (("2"
                                            (skeep -1)
                                            (("2"
                                              (inst + "delta")
                                              (("2"
                                                (skeep)
                                                (("2"
                                                  (inst - "P")
                                                  (("2"
                                                    (assert)
                                                    (("2"
                                                      (skolem
                                                       1
                                                       ("RSS1" "RSS2"))
                                                      (("2"
                                                        (typepred
                                                         "RSS1")
                                                        (("2"
                                                          (typepred
                                                           "RSS2")
                                                          (("2"
                                                            (expand
                                                             "Riemann_sum?")
                                                            (("2"
                                                              (skolem
                                                               -1
                                                               "xis2")
                                                              (("2"
                                                                (skolem
                                                                 -2
                                                                 "xis1")
                                                                (("2"
                                                                  (name
                                                                   "RSP1"
                                                                   "Rie_sum(a,b,gg,P,xis1,f)")
                                                                  (("2"
                                                                    (name
                                                                     "RSP2"
                                                                     "Rie_sum(a,b,gg,P,xis2,f)")
                                                                    (("2"
                                                                      (case
                                                                       "RSP1 = -RSS1 AND RSP2 = -RSS2")
                                                                      (("1"
                                                                        (flatten)
                                                                        (("1"
                                                                          (inst
                                                                           -
                                                                           "RSP1"
                                                                           "RSP2")
                                                                          (("1"
                                                                            (hide-all-but
                                                                             (-1
                                                                              -2
                                                                              -7
                                                                              +))
                                                                            (("1"
                                                                              (grind)
                                                                              nil
                                                                              nil))
                                                                            nil)
                                                                           ("2"
                                                                            (lemma
                                                                             "Riemann?_Rie")
                                                                            (("2"
                                                                              (inst
                                                                               -
                                                                               "a"
                                                                               "b"
                                                                               "f"
                                                                               "gg")
                                                                              (("2"
                                                                                (split
                                                                                 -)
                                                                                (("1"
                                                                                  (inst
                                                                                   -
                                                                                   "P"
                                                                                   "xis2")
                                                                                  (("1"
                                                                                    (assert)
                                                                                    nil
                                                                                    nil))
                                                                                  nil)
                                                                                 ("2"
                                                                                  (propax)
                                                                                  nil
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil)
                                                                           ("3"
                                                                            (lemma
                                                                             "Riemann?_Rie")
                                                                            (("3"
                                                                              (inst
                                                                               -
                                                                               "a"
                                                                               "b"
                                                                               "f"
                                                                               "gg")
                                                                              (("3"
                                                                                (split
                                                                                 -)
                                                                                (("1"
                                                                                  (inst
                                                                                   -
                                                                                   "P"
                                                                                   "xis1")
                                                                                  (("1"
                                                                                    (assert)
                                                                                    nil
                                                                                    nil))
                                                                                  nil)
                                                                                 ("2"
                                                                                  (propax)
                                                                                  nil
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil)
                                                                       ("2"
                                                                        (replace
                                                                         -1
                                                                         1
                                                                         :dir
                                                                         rl)
                                                                        (("2"
                                                                          (replace
                                                                           -2
                                                                           1
                                                                           :dir
                                                                           rl)
                                                                          (("2"
                                                                            (replace
                                                                             -3
                                                                             1)
                                                                            (("2"
                                                                              (replace
                                                                               -4
                                                                               1)
                                                                              (("2"
                                                                                (hide-all-but
                                                                                 1)
                                                                                (("2"
                                                                                  (expand
                                                                                   "Rie_sum")
                                                                                  (("2"
                                                                                    (split
                                                                                     +)
                                                                                    (("1"
                                                                                      (lemma
                                                                                       "sigma_scal[below(P`length-1)]")
                                                                                      (("1"
                                                                                        (inst
                                                                                         -
                                                                                         "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                 (-gg)(P`seq(1 + n)) * f(xis1`seq(n)) -
                                                                                                                                                                                  (-gg)(P`seq(n)) * f(xis1`seq(n))"
                                                                                         "-1"
                                                                                         "P`length-2"
                                                                                         "0")
                                                                                        (("1"
                                                                                          (replace
                                                                                           -1
                                                                                           :dir
                                                                                           rl)
                                                                                          (("1"
                                                                                            (hide
                                                                                             -1)
                                                                                            (("1"
                                                                                              (lemma
                                                                                               "sigma_restrict_eq[below(P`length-1)]")
                                                                                              (("1"
                                                                                                (inst?)
                                                                                                (("1"
                                                                                                  (assert)
                                                                                                  (("1"
                                                                                                    (hide
                                                                                                     2)
                                                                                                    (("1"
                                                                                                      (expand
                                                                                                       "restrict")
                                                                                                      (("1"
                                                                                                        (expand
                                                                                                         "-")
                                                                                                        (("1"
                                                                                                          (assert)
                                                                                                          nil
                                                                                                          nil))
                                                                                                        nil))
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil)
                                                                                       ("2"
                                                                                        (skosimp*)
                                                                                        (("2"
                                                                                          (assert)
                                                                                          nil
                                                                                          nil))
                                                                                        nil))
                                                                                      nil)
                                                                                     ("2"
                                                                                      (lemma
                                                                                       "sigma_scal[below(P`length-1)]")
                                                                                      (("1"
                                                                                        (inst
                                                                                         -
                                                                                         "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                 (-gg)(P`seq(1 + n)) * f(xis2`seq(n)) -
                                                                                                                                                                                  (-gg)(P`seq(n)) * f(xis2`seq(n))"
                                                                                         "-1"
                                                                                         "P`length-2"
                                                                                         "0")
                                                                                        (("1"
                                                                                          (replace
                                                                                           -1
                                                                                           :dir
                                                                                           rl)
                                                                                          (("1"
                                                                                            (hide
                                                                                             -)
                                                                                            (("1"
                                                                                              (lemma
                                                                                               "sigma_restrict_eq[below(P`length-1)]")
                                                                                              (("1"
                                                                                                (inst?)
                                                                                                (("1"
                                                                                                  (assert)
                                                                                                  (("1"
                                                                                                    (hide
                                                                                                     2)
                                                                                                    (("1"
                                                                                                      (expand
                                                                                                       "restrict")
                                                                                                      (("1"
                                                                                                        (expand
                                                                                                         "-")
                                                                                                        (("1"
                                                                                                          (assert)
                                                                                                          nil
                                                                                                          nil))
                                                                                                        nil))
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil)
                                                                                       ("2"
                                                                                        (skosimp*)
                                                                                        (("2"
                                                                                          (assert)
                                                                                          nil
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil))
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil)
     ("2" (hide 2)
      (("2" (skolem 1 ("a" "b" "f" "gg"))
        (("2" (flatten)
          (("2" (label "gincreasing?" -2)
            (("2" (hide "gincreasing?")
              (("2" (ground)
                (("1" (rewrite "integrable_lem")
                  (("1" (skeep)
                    (("1" (inst - "epsi")
                      (("1" (skeep -1)
                        (("1" (inst + "delta")
                          (("1" (skeep)
                            (("1" (inst - "P" "P")
                              (("1" (assertnil nil)) nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil)
                 ("2"
                  (case "FORALL (epsi:posreal): EXISTS (delta: posreal):
                                                                                                                    FORALL (P1, P2: partition(a,b)):
                                                                                                                      width(a, b, P1) < delta IMPLIES
                                                                                                                       (FORALL (RS1: (Riemann_sum?(a, b, P1, gg, f)),
                                                                                                                                RS2: (Riemann_sum?(a, b, partition_union(a,b)(P1,P2), gg, f))):
                                                                                                                          abs(RS1 - RS2) < epsi)")
                  (("1" (hide -2)
                    (("1" (rewrite "integrable_lem")
                      (("1" (skeep)
                        (("1" (inst - "epsi/2")
                          (("1" (skeep -1)
                            (("1" (inst + "delta")
                              (("1"
                                (skeep)
                                (("1"
                                  (inst-cp - "P1" "P2")
                                  (("1"
                                    (inst - "P2" "P1")
                                    (("1"
                                      (assert)
                                      (("1"
                                        (case
                                         "EXISTS (RS12: (Riemann_sum?(a, b, partition_union(a, b)(P1, P2), gg,f))): TRUE")
                                        (("1"
                                          (skeep -1)
                                          (("1"
                                            (skosimp*)
                                            (("1"
                                              (inst - "RS2!1" "RS12")
                                              (("1"
                                                (inst - "RS1!1" "RS12")
                                                (("1"
                                                  (hide -3)
                                                  (("1"
                                                    (hide -3)
                                                    (("1"
                                                      (grind)
                                                      nil
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil)
                                               ("2"
                                                (typepred "RS12")
                                                (("2"
                                                  (lemma
                                                   "partition_union_sym")
                                                  (("2"
                                                    (inst - "a" "b")
                                                    (("2"
                                                      (assert)
                                                      (("2"
                                                        (inst
                                                         -
                                                         "P1"
                                                         "P2")
                                                        (("2"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil)
                                         ("2"
                                          (lemma "Riemann?_Rie")
                                          (("2"
                                            (inst - "a" "b" "f" "gg")
                                            (("2"
                                              (split -)
                                              (("1"
                                                (inst
                                                 -
                                                 "partition_union(a,b)(P1,P2)"
                                                 "gen_xis(a,b,partition_union(a,b)(P1,P2))")
                                                (("1"
                                                  (inst
                                                   +
                                                   "Rie_sum(a, b, gg, partition_union(a, b)(P1, P2),
                                                                                                                                                 gen_xis(a, b, partition_union(a, b)(P1, P2)), f)")
                                                  nil
                                                  nil))
                                                nil)
                                               ("2" (propax) nil nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil)
                   ("2" (hide 2)
                    (("2" (lemma "Rie_sum_diff_extend_union")
                      (("2" (skeep)
                        (("2" (inst -2 "epsi")
                          (("2" (skeep -2)
                            (("2" (inst + "delta")
                              (("2"
                                (skolem 1 ("P" "Q"))
                                (("2"
                                  (inst - "a" "b" "f" "gg")
                                  (("2"
                                    (assert)
                                    (("2"
                                      (reveal "gincreasing?")
                                      (("2"
                                        (replace "gincreasing?")
                                        (("2"
                                          (hide "gincreasing?")
                                          (("2"
                                            (inst - "P" "Q")
                                            (("2"
                                              (flatten)
                                              (("2"
                                                (skolem
                                                 1
                                                 ("RSS1" "RSS2"))
                                                (("2"
                                                  (typepred "RSS1")
                                                  (("2"
                                                    (typepred "RSS2")
                                                    (("2"
                                                      (expand
                                                       "Riemann_sum?")
                                                      (("2"
                                                        (skolem
                                                         -1
                                                         "xispq")
                                                        (("2"
                                                          (skolem
                                                           -2
                                                           "xis")
                                                          (("2"
                                                            (inst
                                                             -
                                                             "xispq"
                                                             "xis")
                                                            (("2"
                                                              (skeep
                                                               -3)
                                                              (("2"
                                                                (inst
                                                                 -
                                                                 "P")
                                                                (("2"
                                                                  (assert)
                                                                  (("2"
                                                                    (inst
                                                                     -
                                                                     "RSS1"
                                                                     "Rie_sum(a, b, gg, P, xis2, f)")
                                                                    (("1"
                                                                      (assert)
                                                                      nil
                                                                      nil)
                                                                     ("2"
                                                                      (lemma
                                                                       "Riemann?_Rie")
                                                                      (("2"
                                                                        (inst
                                                                         -
                                                                         "a"
                                                                         "b"
                                                                         "f"
                                                                         "gg")
                                                                        (("2"
                                                                          (split
                                                                           -)
                                                                          (("1"
                                                                            (inst
                                                                             -
                                                                             "P"
                                                                             "xis2")
                                                                            nil
                                                                            nil)
                                                                           ("2"
                                                                            (propax)
                                                                            nil
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((partition_union const-decl "{PQ: partition(a, b) |
         (FORALL (x: T): member(x, PQ) IFF (member(x, P) OR member(x, Q)))
          AND strictly_increasing?(PQ)}" rs_partition nil)
    (strictly_increasing? const-decl "bool" sort_fseq "structures/")
    (member const-decl "bool" fseqs "structures/")
    (posreal_div_posreal_is_posreal application-judgement "posreal"
     real_types nil)
    (/ const-decl "[numfield, nznum -> numfield]" number_fields nil)
    (nznum nonempty-type-eq-decl nil number_fields nil)
    (/= const-decl "boolean" notequal nil)
    (gen_xis const-decl "xis?(a, b, P)" rs_integral_def nil)
    (a skolem-const-decl "T" rs_integral_prep nil)
    (b skolem-const-decl "T" rs_integral_prep nil)
    (P2 skolem-const-decl "partition[T](a, b)" rs_integral_prep nil)
    (P1 skolem-const-decl "partition[T](a, b)" rs_integral_prep nil)
    (gg skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (f skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (RS12 skolem-const-decl
     "(Riemann_sum?(a, b, partition_union(a, b)(P1, P2), gg, f))"
     rs_integral_prep nil)
    (partition_union_sym formula-decl nil rs_partition nil)
    (TRUE const-decl "bool" booleans nil)
    (Rie_sum_diff_extend_union formula-decl nil rs_integral_def nil)
    (xis2 skolem-const-decl "xis?[T](a, b, P)" rs_integral_prep nil)
    (P skolem-const-decl "partition[T](a, b)" rs_integral_prep nil)
    (integrable_lem formula-decl nil rs_integral_prep nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (NOT const-decl "[bool -> bool]" booleans nil)
    (- const-decl "[T -> real]" real_fun_ops "reals/")
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (minus_real_is_real application-judgement "real" reals nil)
    (decreasing? const-decl "bool" real_fun_preds "reals/")
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (xis? type-eq-decl nil rs_integral_def nil)
    (Rie_sum const-decl "real" rs_integral_def nil)
    (a skolem-const-decl "T" rs_integral_prep nil)
    (b skolem-const-decl "T" rs_integral_prep nil)
    (P skolem-const-decl "partition[T](a, b)" rs_integral_prep nil)
    (gg skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (f skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (RSP1 skolem-const-decl "real" rs_integral_prep nil)
    (RSP2 skolem-const-decl "real" rs_integral_prep nil)
    (minus_odd_is_odd application-judgement "odd_int" integers nil)
    (Riemann?_Rie formula-decl nil rs_integral_def nil)
    (real_times_real_is_real application-judgement "real" reals nil)
    (sigma_scal formula-decl nil sigma "reals/")
    (integer nonempty-type-from-decl nil integers nil)
    (sigma_restrict_eq formula-decl nil sigma "reals/")
    (real_gt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (restrict const-decl "[T -> real]" sigma "reals/")
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (OR const-decl "[bool, bool -> bool]" booleans nil)
    (T_high type-eq-decl nil sigma "reals/")
    (T_low type-eq-decl nil sigma "reals/")
    (posint_plus_nnint_is_posint application-judgement "posint"
     integers nil)
    (int_minus_int_is_int application-judgement "int" integers nil)
    (integral_scal_g formula-decl nil rs_integral_prep nil)
    (* const-decl "[T -> real]" real_fun_ops "reals/")
    (P skolem-const-decl "partition[T](a, b)" rs_integral_prep nil)
    (RSP1 skolem-const-decl "real" rs_integral_prep nil)
    (RSP2 skolem-const-decl "real" rs_integral_prep nil)
    (monotonic? const-decl "bool" real_fun_preds "reals/")
    (real_minus_real_is_real application-judgement "real" reals nil)
    (number nonempty-type-decl nil numbers nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (real nonempty-type-from-decl nil reals nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (< const-decl "bool" reals nil) (<= const-decl "bool" reals nil)
    (increasing? const-decl "bool" real_fun_preds "reals/")
    (restrict const-decl "R" restrict nil)
    (IFF const-decl "[bool, bool -> bool]" booleans nil)
    (integrable? const-decl "bool" rs_integral_def nil)
    (>= const-decl "bool" reals nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (barray type-eq-decl nil fseqs "structures/")
    (fseq type-eq-decl nil fseqs "structures/")
    (= const-decl "[T, T -> boolean]" equalities nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (below type-eq-decl nil naturalnumbers nil)
    (partition type-eq-decl nil rs_partition nil)
    (width const-decl "posreal" rs_partition nil)
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (- const-decl "[numfield -> numfield]" number_fields nil)
    (abs const-decl "{n: nonneg_real | n >= m AND n >= -m}" real_defs
         nil))
   nil))
 (integrable_lem2 0
  (integrable_lem2-3 nil 3494858376
   (""
    (case "FORALL (a, b:T, f, g: [T -> real]):
                                                                              a < b AND
                                                                               increasing?[(LAMBDA (x:T): a <= x AND x <= b)]
                                                                                   (restrict[T, (LAMBDA (x:T): a <= x AND x <= b), real]
                                                                                        (g))
                                                                               IMPLIES
                                                                               (integrable?(a, b, g, f) IFF
                                                                                 (FORALL (epsi: posreal):
                                                                                    EXISTS (delta: posreal):
                                                                                      FORALL (P: partition(a, b)):
                                                                                        width(a, b, P) < delta IMPLIES
                                                                                         (FORALL (RS1: (Riemann_sum?(a, b, P, g, f)),
                                                                                                  RS2: (Riemann_sum?(a, b, P, g, f))):
                                                                                            abs(RS1 - RS2) < epsi)))")
    (("1" (skolem 1 ("a" "b" "f" "gg"))
      (("1" (flatten)
        (("1" (assert)
          (("1" (expand "monotonic?")
            (("1" (flatten)
              (("1" (split -)
                (("1" (inst?) (("1" (assertnil nil)) nil)
                 ("2" (case "NOT increasing?[(closed_intv(a,b))](-gg)")
                  (("1" (hide-all-but (-1 1))
                    (("1" (expand "increasing?")
                      (("1" (expand "decreasing?")
                        (("1" (skeep)
                          (("1" (inst - "x" "y")
                            (("1" (assert)
                              (("1"
                                (expand "restrict")
                                (("1"
                                  (expand "-")
                                  (("1" (assertnil nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil)
                   ("2" (hide -2)
                    (("2" (inst - "a" "b" "f" "-gg")
                      (("2" (assert)
                        (("2" (split +)
                          (("1" (flatten)
                            (("1" (case "integrable?(a,b,-gg,f)")
                              (("1"
                                (assert)
                                (("1"
                                  (hide -5)
                                  (("1"
                                    (skeep)
                                    (("1"
                                      (inst - "epsi")
                                      (("1"
                                        (skeep -4)
                                        (("1"
                                          (inst + "delta")
                                          (("1"
                                            (skeep)
                                            (("1"
                                              (inst - "P")
                                              (("1"
                                                (assert)
                                                (("1"
                                                  (skolem
                                                   1
                                                   ("RSS1" "RSS2"))
                                                  (("1"
                                                    (typepred "RSS1")
                                                    (("1"
                                                      (typepred "RSS2")
                                                      (("1"
                                                        (expand
                                                         "Riemann_sum?")
                                                        (("1"
                                                          (skolem
                                                           -1
                                                           "xis2")
                                                          (("1"
                                                            (skolem
                                                             -2
                                                             "xis1")
                                                            (("1"
                                                              (name
                                                               "RSP1"
                                                               "Rie_sum(a,b,-gg,P,xis1,f)")
                                                              (("1"
                                                                (name
                                                                 "RSP2"
                                                                 "Rie_sum(a,b,-gg,P,xis2,f)")
                                                                (("1"
                                                                  (case
                                                                   "RSP1 = -RSS1 AND RSP2 = -RSS2")
                                                                  (("1"
                                                                    (flatten)
                                                                    (("1"
                                                                      (inst
                                                                       -
                                                                       "RSP1"
                                                                       "RSP2")
                                                                      (("1"
                                                                        (hide-all-but
                                                                         (-1
                                                                          -2
                                                                          -11
                                                                          +))
                                                                        (("1"
                                                                          (grind)
                                                                          nil
                                                                          nil))
                                                                        nil)
                                                                       ("2"
                                                                        (replace
                                                                         -3
                                                                         +
                                                                         :dir
                                                                         rl)
                                                                        (("2"
                                                                          (lemma
                                                                           "Riemann?_Rie")
                                                                          (("2"
                                                                            (inst
                                                                             -
                                                                             "a"
                                                                             "b"
                                                                             "f"
                                                                             "-gg")
                                                                            (("2"
                                                                              (split
                                                                               -)
                                                                              (("1"
                                                                                (inst
                                                                                 -
                                                                                 "P"
                                                                                 "xis2")
                                                                                nil
                                                                                nil)
                                                                               ("2"
                                                                                (propax)
                                                                                nil
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil)
                                                                       ("3"
                                                                        (replace
                                                                         -4
                                                                         +
                                                                         :dir
                                                                         rl)
                                                                        (("3"
                                                                          (lemma
                                                                           "Riemann?_Rie")
                                                                          (("3"
                                                                            (inst
                                                                             -
                                                                             "a"
                                                                             "b"
                                                                             "f"
                                                                             "-gg")
                                                                            (("3"
                                                                              (split
                                                                               -)
                                                                              (("1"
                                                                                (inst
                                                                                 -
                                                                                 "P"
                                                                                 "xis1")
                                                                                nil
                                                                                nil)
                                                                               ("2"
                                                                                (propax)
                                                                                nil
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil)
                                                                   ("2"
                                                                    (replace
                                                                     -1
                                                                     1
                                                                     :dir
                                                                     rl)
                                                                    (("2"
                                                                      (replace
                                                                       -2
                                                                       1
                                                                       :dir
                                                                       rl)
                                                                      (("2"
                                                                        (replace
                                                                         -3
                                                                         1)
                                                                        (("2"
                                                                          (replace
                                                                           -4
                                                                           1)
                                                                          (("2"
                                                                            (hide-all-but
                                                                             1)
                                                                            (("2"
                                                                              (expand
                                                                               "Rie_sum")
                                                                              (("2"
                                                                                (split
                                                                                 +)
                                                                                (("1"
                                                                                  (lemma
                                                                                   "sigma_scal[below(P`length-1)]")
                                                                                  (("1"
                                                                                    (inst
                                                                                     -
                                                                                     "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                   f(xis1`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                                                                                                                    f(xis1`seq(n)) * gg(P`seq(n))"
                                                                                     "-1"
                                                                                     "P`length-2"
                                                                                     "0")
                                                                                    (("1"
                                                                                      (replace
                                                                                       -1
                                                                                       :dir
                                                                                       rl)
                                                                                      (("1"
                                                                                        (hide
                                                                                         -1)
                                                                                        (("1"
                                                                                          (lemma
                                                                                           "sigma_restrict_eq[below(P`length-1)]")
                                                                                          (("1"
                                                                                            (inst?)
                                                                                            (("1"
                                                                                              (assert)
                                                                                              (("1"
                                                                                                (hide
                                                                                                 2)
                                                                                                (("1"
                                                                                                  (expand
                                                                                                   "restrict")
                                                                                                  (("1"
                                                                                                    (expand
                                                                                                     "-")
                                                                                                    (("1"
                                                                                                      (assert)
                                                                                                      nil
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil)
                                                                                   ("2"
                                                                                    (skosimp*)
                                                                                    (("2"
                                                                                      (assert)
                                                                                      nil
                                                                                      nil))
                                                                                    nil))
                                                                                  nil)
                                                                                 ("2"
                                                                                  (lemma
                                                                                   "sigma_scal[below(P`length-1)]")
                                                                                  (("1"
                                                                                    (inst
                                                                                     -
                                                                                     "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                   f(xis2`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                                                                                                                    f(xis2`seq(n)) * gg(P`seq(n))"
                                                                                     "-1"
                                                                                     "P`length-2"
                                                                                     "0")
                                                                                    (("1"
                                                                                      (replace
                                                                                       -1
                                                                                       :dir
                                                                                       rl)
                                                                                      (("1"
                                                                                        (hide
                                                                                         -)
                                                                                        (("1"
                                                                                          (lemma
                                                                                           "sigma_restrict_eq[below(P`length-1)]")
                                                                                          (("1"
                                                                                            (inst?)
                                                                                            (("1"
                                                                                              (assert)
                                                                                              (("1"
                                                                                                (hide
                                                                                                 2)
                                                                                                (("1"
                                                                                                  (expand
                                                                                                   "restrict")
                                                                                                  (("1"
                                                                                                    (expand
                                                                                                     "-")
                                                                                                    (("1"
                                                                                                      (assert)
                                                                                                      nil
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil)
                                                                                   ("2"
                                                                                    (skosimp*)
                                                                                    (("2"
                                                                                      (assert)
                                                                                      nil
                                                                                      nil))
                                                                                    nil))
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil)
                               ("2"
                                (hide-all-but (-1 1))
                                (("2"
                                  (lemma "integral_scal_g")
                                  (("2"
                                    (inst - "-1" "a" "b" "f" "gg")
                                    (("2"
                                      (assert)
                                      (("2"
                                        (flatten)
                                        (("2"
                                          (assert)
                                          (("2"
                                            (expand "-")
                                            (("2"
                                              (expand "*")
                                              (("2" (assertnil nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil)
                           ("2" (flatten)
                            (("2" (case "integrable?(a,b,-gg,f)")
                              (("1"
                                (hide-all-but (-1 1))
                                (("1"
                                  (lemma "integral_scal_g")
                                  (("1"
                                    (inst - "-1" "a" "b" "f" "-gg")
                                    (("1"
                                      (assert)
                                      (("1"
                                        (flatten)
                                        (("1"
                                          (expand "-")
                                          (("1"
                                            (expand "*")
                                            (("1"
                                              (case
                                               "gg = (LAMBDA (x_1:T): -1 * -gg(x_1))")
                                              (("1" (assertnil nil)
                                               ("2"
                                                (decompose-equality 1)
                                                nil
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil)
                               ("2"
                                (hide 2)
                                (("2"
                                  (assert)
                                  (("2"
                                    (hide -3)
                                    (("2"
                                      (hide 1)
                                      (("2"
                                        (skeep)
                                        (("2"
                                          (inst - "epsi")
                                          (("2"
                                            (skeep -1)
                                            (("2"
                                              (inst + "delta")
                                              (("2"
                                                (skeep)
                                                (("2"
                                                  (inst - "P")
                                                  (("2"
                                                    (assert)
                                                    (("2"
                                                      (skolem
                                                       1
                                                       ("RSS1" "RSS2"))
                                                      (("2"
                                                        (typepred
                                                         "RSS1")
                                                        (("2"
                                                          (typepred
                                                           "RSS2")
                                                          (("2"
                                                            (expand
                                                             "Riemann_sum?")
                                                            (("2"
                                                              (skolem
                                                               -1
                                                               "xis2")
                                                              (("2"
                                                                (skolem
                                                                 -2
                                                                 "xis1")
                                                                (("2"
                                                                  (name
                                                                   "RSP1"
                                                                   "Rie_sum(a,b,gg,P,xis1,f)")
                                                                  (("2"
                                                                    (name
                                                                     "RSP2"
                                                                     "Rie_sum(a,b,gg,P,xis2,f)")
                                                                    (("2"
                                                                      (case
                                                                       "RSP1 = -RSS1 AND RSP2 = -RSS2")
                                                                      (("1"
                                                                        (flatten)
                                                                        (("1"
                                                                          (inst
                                                                           -
                                                                           "RSP1"
                                                                           "RSP2")
                                                                          (("1"
                                                                            (hide-all-but
                                                                             (-1
                                                                              -2
                                                                              -7
                                                                              +))
                                                                            (("1"
                                                                              (grind)
                                                                              nil
                                                                              nil))
                                                                            nil)
                                                                           ("2"
                                                                            (lemma
                                                                             "Riemann?_Rie")
                                                                            (("2"
                                                                              (inst
                                                                               -
                                                                               "a"
                                                                               "b"
                                                                               "f"
                                                                               "gg")
                                                                              (("2"
                                                                                (split
                                                                                 -)
                                                                                (("1"
                                                                                  (inst
                                                                                   -
                                                                                   "P"
                                                                                   "xis2")
                                                                                  (("1"
                                                                                    (assert)
                                                                                    nil
                                                                                    nil))
                                                                                  nil)
                                                                                 ("2"
                                                                                  (propax)
                                                                                  nil
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil)
                                                                           ("3"
                                                                            (lemma
                                                                             "Riemann?_Rie")
                                                                            (("3"
                                                                              (inst
                                                                               -
                                                                               "a"
                                                                               "b"
                                                                               "f"
                                                                               "gg")
                                                                              (("3"
                                                                                (split
                                                                                 -)
                                                                                (("1"
                                                                                  (inst
                                                                                   -
                                                                                   "P"
                                                                                   "xis1")
                                                                                  (("1"
                                                                                    (assert)
                                                                                    nil
                                                                                    nil))
                                                                                  nil)
                                                                                 ("2"
                                                                                  (propax)
                                                                                  nil
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil)
                                                                       ("2"
                                                                        (replace
                                                                         -1
                                                                         1
                                                                         :dir
                                                                         rl)
                                                                        (("2"
                                                                          (replace
                                                                           -2
                                                                           1
                                                                           :dir
                                                                           rl)
                                                                          (("2"
                                                                            (replace
                                                                             -3
                                                                             1)
                                                                            (("2"
                                                                              (replace
                                                                               -4
                                                                               1)
                                                                              (("2"
                                                                                (hide-all-but
                                                                                 1)
                                                                                (("2"
                                                                                  (expand
                                                                                   "Rie_sum")
                                                                                  (("2"
                                                                                    (split
                                                                                     +)
                                                                                    (("1"
                                                                                      (lemma
                                                                                       "sigma_scal[below(P`length-1)]")
                                                                                      (("1"
                                                                                        (inst
                                                                                         -
                                                                                         "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                   (-gg)(P`seq(1 + n)) * f(xis1`seq(n)) -
                                                                                                                                                                                                    (-gg)(P`seq(n)) * f(xis1`seq(n))"
                                                                                         "-1"
                                                                                         "P`length-2"
                                                                                         "0")
                                                                                        (("1"
                                                                                          (replace
                                                                                           -1
                                                                                           :dir
                                                                                           rl)
                                                                                          (("1"
                                                                                            (hide
                                                                                             -1)
                                                                                            (("1"
                                                                                              (lemma
                                                                                               "sigma_restrict_eq[below(P`length-1)]")
                                                                                              (("1"
                                                                                                (inst?)
                                                                                                (("1"
                                                                                                  (assert)
                                                                                                  (("1"
                                                                                                    (hide
                                                                                                     2)
                                                                                                    (("1"
                                                                                                      (expand
                                                                                                       "restrict")
                                                                                                      (("1"
                                                                                                        (expand
                                                                                                         "-")
                                                                                                        (("1"
                                                                                                          (assert)
                                                                                                          nil
                                                                                                          nil))
                                                                                                        nil))
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil)
                                                                                       ("2"
                                                                                        (skosimp*)
                                                                                        (("2"
                                                                                          (assert)
                                                                                          nil
                                                                                          nil))
                                                                                        nil))
                                                                                      nil)
                                                                                     ("2"
                                                                                      (lemma
                                                                                       "sigma_scal[below(P`length-1)]")
                                                                                      (("1"
                                                                                        (inst
                                                                                         -
                                                                                         "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                   (-gg)(P`seq(1 + n)) * f(xis2`seq(n)) -
                                                                                                                                                                                                    (-gg)(P`seq(n)) * f(xis2`seq(n))"
                                                                                         "-1"
                                                                                         "P`length-2"
                                                                                         "0")
                                                                                        (("1"
                                                                                          (replace
                                                                                           -1
                                                                                           :dir
                                                                                           rl)
                                                                                          (("1"
                                                                                            (hide
                                                                                             -)
                                                                                            (("1"
                                                                                              (lemma
                                                                                               "sigma_restrict_eq[below(P`length-1)]")
                                                                                              (("1"
                                                                                                (inst?)
                                                                                                (("1"
                                                                                                  (assert)
                                                                                                  (("1"
                                                                                                    (hide
                                                                                                     2)
                                                                                                    (("1"
                                                                                                      (expand
                                                                                                       "restrict")
                                                                                                      (("1"
                                                                                                        (expand
                                                                                                         "-")
                                                                                                        (("1"
                                                                                                          (assert)
                                                                                                          nil
                                                                                                          nil))
                                                                                                        nil))
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil)
                                                                                       ("2"
                                                                                        (skosimp*)
                                                                                        (("2"
                                                                                          (assert)
                                                                                          nil
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil))
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil)
     ("2" (hide 2)
      (("2" (skolem 1 ("a" "b" "f" "gg"))
        (("2" (flatten)
          (("2" (label "gincreasing?" -2)
            (("2" (hide "gincreasing?")
              (("2" (ground)
                (("1" (rewrite "integrable_lem")
                  (("1" (skeep)
                    (("1" (inst - "epsi")
                      (("1" (skeep -1)
                        (("1" (inst + "delta")
                          (("1" (skeep)
                            (("1" (inst - "P" "P")
                              (("1" (assertnil nil)) nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil)
                 ("2"
                  (case "FORALL (epsi:posreal): EXISTS (delta: posreal):
                                                                                                                               FORALL (P1, P2: partition(a,b)):
                                                                                                                                 width(a, b, P1) < delta IMPLIES
                                                                                                                                  (FORALL (RS1: (Riemann_sum?(a, b, P1, gg, f)),
                                                                                                                                           RS2: (Riemann_sum?(a, b, partition_union(a,b)(P1,P2), gg, f))):
                                                                                                                                     abs(RS1 - RS2) < epsi)")
                  (("1" (hide -2)
                    (("1" (rewrite "integrable_lem")
                      (("1" (skeep)
                        (("1" (inst - "epsi/2")
                          (("1" (skeep -1)
                            (("1" (inst + "delta")
                              (("1"
                                (skeep)
                                (("1"
                                  (inst-cp - "P1" "P2")
                                  (("1"
                                    (inst - "P2" "P1")
                                    (("1"
                                      (assert)
                                      (("1"
                                        (case
                                         "EXISTS (RS12: (Riemann_sum?(a, b, partition_union(a, b)(P1, P2), gg,f))): TRUE")
                                        (("1"
                                          (skeep -1)
                                          (("1"
                                            (skosimp*)
                                            (("1"
                                              (inst - "RS2!1" "RS12")
                                              (("1"
                                                (inst - "RS1!1" "RS12")
                                                (("1"
                                                  (hide -3)
                                                  (("1"
                                                    (hide -3)
                                                    (("1"
                                                      (grind)
                                                      nil
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil)
                                               ("2"
                                                (typepred "RS12")
                                                (("2"
                                                  (lemma
                                                   "partition_union_sym")
                                                  (("2"
                                                    (inst - "a" "b")
                                                    (("2"
                                                      (assert)
                                                      (("2"
                                                        (inst
                                                         -
                                                         "P1"
                                                         "P2")
                                                        (("2"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil)
                                         ("2"
                                          (lemma "Riemann?_Rie")
                                          (("2"
                                            (inst - "a" "b" "f" "gg")
                                            (("2"
                                              (split -)
                                              (("1"
                                                (inst
                                                 -
                                                 "partition_union(a,b)(P1,P2)"
                                                 "gen_xis(a,b,partition_union(a,b)(P1,P2))")
                                                (("1"
                                                  (inst
                                                   +
                                                   "Rie_sum(a, b, gg, partition_union(a, b)(P1, P2),
                                                                                                                                                             gen_xis(a, b, partition_union(a, b)(P1, P2)), f)")
                                                  nil
                                                  nil))
                                                nil)
                                               ("2" (propax) nil nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil)
                   ("2" (hide 2)
                    (("2" (lemma "Rie_sum_diff_extend_union")
                      (("2" (skeep)
                        (("2" (inst -2 "epsi")
                          (("2" (skeep -2)
                            (("2" (inst + "delta")
                              (("2"
                                (skolem 1 ("P" "Q"))
                                (("2"
                                  (inst - "a" "b" "f" "gg")
                                  (("2"
                                    (assert)
                                    (("2"
                                      (reveal "gincreasing?")
                                      (("2"
                                        (replace "gincreasing?")
                                        (("2"
                                          (hide "gincreasing?")
                                          (("2"
                                            (inst - "P" "Q")
                                            (("2"
                                              (flatten)
                                              (("2"
                                                (skolem
                                                 1
                                                 ("RSS1" "RSS2"))
                                                (("2"
                                                  (typepred "RSS1")
                                                  (("2"
                                                    (typepred "RSS2")
                                                    (("2"
                                                      (expand
                                                       "Riemann_sum?")
                                                      (("2"
                                                        (skolem
                                                         -1
                                                         "xispq")
                                                        (("2"
                                                          (skolem
                                                           -2
                                                           "xis")
                                                          (("2"
                                                            (inst
                                                             -
                                                             "xispq"
                                                             "xis")
                                                            (("2"
                                                              (skeep
                                                               -3)
                                                              (("2"
                                                                (inst
                                                                 -
                                                                 "P")
                                                                (("2"
                                                                  (assert)
                                                                  (("2"
                                                                    (inst
                                                                     -
                                                                     "RSS1"
                                                                     "Rie_sum(a, b, gg, P, xis2, f)")
                                                                    (("1"
                                                                      (assert)
                                                                      nil
                                                                      nil)
                                                                     ("2"
                                                                      (lemma
                                                                       "Riemann?_Rie")
                                                                      (("2"
                                                                        (inst
                                                                         -
                                                                         "a"
                                                                         "b"
                                                                         "f"
                                                                         "gg")
                                                                        (("2"
                                                                          (split
                                                                           -)
                                                                          (("1"
                                                                            (inst
                                                                             -
                                                                             "P"
                                                                             "xis2")
                                                                            nil
                                                                            nil)
                                                                           ("2"
                                                                            (propax)
                                                                            nil
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((partition_union const-decl "{PQ: partition(a, b) |
         (FORALL (x: T): member(x, PQ) IFF (member(x, P) OR member(x, Q)))
          AND strictly_increasing?(PQ)}" rs_partition nil)
    (strictly_increasing? const-decl "bool" sort_fseq "structures/")
    (member const-decl "bool" fseqs "structures/")
    (posreal_div_posreal_is_posreal application-judgement "posreal"
     real_types nil)
    (/ const-decl "[numfield, nznum -> numfield]" number_fields nil)
    (nznum nonempty-type-eq-decl nil number_fields nil)
    (/= const-decl "boolean" notequal nil)
    (gen_xis const-decl "xis?(a, b, P)" rs_integral_def nil)
    (a skolem-const-decl "T" rs_integral_prep nil)
    (b skolem-const-decl "T" rs_integral_prep nil)
    (P2 skolem-const-decl "partition[T](a, b)" rs_integral_prep nil)
    (P1 skolem-const-decl "partition[T](a, b)" rs_integral_prep nil)
    (gg skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (f skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (RS12 skolem-const-decl
     "(Riemann_sum?(a, b, partition_union(a, b)(P1, P2), gg, f))"
     rs_integral_prep nil)
    (partition_union_sym formula-decl nil rs_partition nil)
    (TRUE const-decl "bool" booleans nil)
    (Rie_sum_diff_extend_union formula-decl nil rs_integral_def nil)
    (xis2 skolem-const-decl "xis?[T](a, b, P)" rs_integral_prep nil)
    (P skolem-const-decl "partition[T](a, b)" rs_integral_prep nil)
    (integrable_lem formula-decl nil rs_integral_prep nil)
    (real_lt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (NOT const-decl "[bool -> bool]" booleans nil)
    (- const-decl "[T -> real]" real_fun_ops "reals/")
    (real_le_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (minus_real_is_real application-judgement "real" reals nil)
    (decreasing? const-decl "bool" real_fun_preds "reals/")
    (+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (xis? type-eq-decl nil rs_integral_def nil)
    (Rie_sum const-decl "real" rs_integral_def nil)
    (a skolem-const-decl "T" rs_integral_prep nil)
    (b skolem-const-decl "T" rs_integral_prep nil)
    (P skolem-const-decl "partition[T](a, b)" rs_integral_prep nil)
    (gg skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (f skolem-const-decl "[T -> real]" rs_integral_prep nil)
    (RSP1 skolem-const-decl "real" rs_integral_prep nil)
    (RSP2 skolem-const-decl "real" rs_integral_prep nil)
    (minus_odd_is_odd application-judgement "odd_int" integers nil)
    (Riemann?_Rie formula-decl nil rs_integral_def nil)
    (real_times_real_is_real application-judgement "real" reals nil)
    (sigma_scal formula-decl nil sigma "reals/")
    (integer nonempty-type-from-decl nil integers nil)
    (sigma_restrict_eq formula-decl nil sigma "reals/")
    (real_gt_is_strict_total_order name-judgement
     "(strict_total_order?[real])" real_props nil)
    (real_ge_is_total_order name-judgement "(total_order?[real])"
     real_props nil)
    (restrict const-decl "[T -> real]" sigma "reals/")
    (* const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (OR const-decl "[bool, bool -> bool]" booleans nil)
    (T_high type-eq-decl nil sigma "reals/")
    (T_low type-eq-decl nil sigma "reals/")
    (posint_plus_nnint_is_posint application-judgement "posint"
     integers nil)
    (int_minus_int_is_int application-judgement "int" integers nil)
    (integral_scal_g formula-decl nil rs_integral_prep nil)
    (* const-decl "[T -> real]" real_fun_ops "reals/")
    (P skolem-const-decl "partition[T](a, b)" rs_integral_prep nil)
    (RSP1 skolem-const-decl "real" rs_integral_prep nil)
    (RSP2 skolem-const-decl "real" rs_integral_prep nil)
    (monotonic? const-decl "bool" real_fun_preds "reals/")
    (real_minus_real_is_real application-judgement "real" reals nil)
    (number nonempty-type-decl nil numbers nil)
    (boolean nonempty-type-decl nil booleans nil)
    (number_field_pred const-decl "[number -> boolean]" number_fields
     nil)
    (number_field nonempty-type-from-decl nil number_fields nil)
    (real_pred const-decl "[number_field -> boolean]" reals nil)
    (real nonempty-type-from-decl nil reals nil)
    (T_pred const-decl "[real -> boolean]" rs_integral_prep nil)
    (T formal-nonempty-subtype-decl nil rs_integral_prep nil)
    (bool nonempty-type-eq-decl nil booleans nil)
    (IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
    (AND const-decl "[bool, bool -> bool]" booleans nil)
    (< const-decl "bool" reals nil) (<= const-decl "bool" reals nil)
    (increasing? const-decl "bool" real_fun_preds "reals/")
    (restrict const-decl "R" restrict nil)
    (IFF const-decl "[bool, bool -> bool]" booleans nil)
    (integrable? const-decl "bool" rs_integral_def nil)
    (>= const-decl "bool" reals nil)
    (nonneg_real nonempty-type-eq-decl nil real_types nil)
    (> const-decl "bool" reals nil)
    (posreal nonempty-type-eq-decl nil real_types nil)
    (nat nonempty-type-eq-decl nil naturalnumbers nil)
    (barray type-eq-decl nil fseqs "structures/")
    (fseq type-eq-decl nil fseqs "structures/")
    (= const-decl "[T, T -> boolean]" equalities nil)
    (numfield nonempty-type-eq-decl nil number_fields nil)
    (- const-decl "[numfield, numfield -> numfield]" number_fields nil)
    (increasing? const-decl "bool" sort_fseq "structures/")
    (rational_pred const-decl "[real -> boolean]" rationals nil)
    (rational nonempty-type-from-decl nil rationals nil)
    (integer_pred const-decl "[rational -> boolean]" integers nil)
    (int nonempty-type-eq-decl nil integers nil)
    (below type-eq-decl nil naturalnumbers nil)
    (partition type-eq-decl nil rs_partition nil)
    (width const-decl "posreal" rs_partition nil)
    (Riemann_sum? const-decl "bool" rs_integral_def nil)
    (- const-decl "[numfield -> numfield]" number_fields nil)
    (abs const-decl "{n: nonneg_real | n >= m AND n >= -m}" real_defs
         nil))
   nil)
  (integrable_lem2-2 nil 3492513670
   (""
    (case "FORALL (a, b: real, f, g: [real -> real]):
                                                                       a < b AND
                                                                        increasing?[(LAMBDA (x: real): a <= x AND x <= b)]
                                                                            (restrict[real, (LAMBDA (x: real): a <= x AND x <= b), real]
                                                                                 (g))
                                                                        IMPLIES
                                                                        (integrable?(a, b, g, f) IFF
                                                                          (FORALL (epsi: posreal):
                                                                             EXISTS (delta: posreal):
                                                                               FORALL (P: partition(a, b)):
                                                                                 width(a, b, P) < delta IMPLIES
                                                                                  (FORALL (RS1: (Riemann_sum?(a, b, P, g, f)),
                                                                                           RS2: (Riemann_sum?(a, b, P, g, f))):
                                                                                     abs(RS1 - RS2) < epsi)))")
    (("1" (skolem 1 ("a" "b" "f" "gg"))
      (("1" (flatten)
        (("1" (assert)
          (("1" (expand "monotonic?")
            (("1" (flatten)
              (("1" (split -)
                (("1" (inst?) (("1" (assertnil nil)) nil)
                 ("2" (case "NOT increasing?[(closed_intv(a,b))](-gg)")
                  (("1" (hide-all-but (-1 1))
                    (("1" (expand "increasing?")
                      (("1" (expand "decreasing?")
                        (("1" (skeep)
                          (("1" (inst - "x" "y")
                            (("1" (assert)
                              (("1"
                                (expand "restrict")
                                (("1"
                                  (expand "-")
                                  (("1" (assertnil nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil)
                   ("2" (hide -2)
                    (("2" (inst - "a" "b" "f" "-gg")
                      (("2" (assert)
                        (("2" (split +)
                          (("1" (flatten)
                            (("1" (case "integrable?(a,b,-gg,f)")
                              (("1"
                                (assert)
                                (("1"
                                  (hide -5)
                                  (("1"
                                    (skeep)
                                    (("1"
                                      (inst - "epsi")
                                      (("1"
                                        (skeep -4)
                                        (("1"
                                          (inst + "delta")
                                          (("1"
                                            (skeep)
                                            (("1"
                                              (inst - "P")
                                              (("1"
                                                (assert)
                                                (("1"
                                                  (skolem
                                                   1
                                                   ("RSS1" "RSS2"))
                                                  (("1"
                                                    (typepred "RSS1")
                                                    (("1"
                                                      (typepred "RSS2")
                                                      (("1"
                                                        (expand
                                                         "Riemann_sum?")
                                                        (("1"
                                                          (skolem
                                                           -1
                                                           "xis2")
                                                          (("1"
                                                            (skolem
                                                             -2
                                                             "xis1")
                                                            (("1"
                                                              (name
                                                               "RSP1"
                                                               "Rie_sum(a,b,-gg,P,xis1,f)")
                                                              (("1"
                                                                (name
                                                                 "RSP2"
                                                                 "Rie_sum(a,b,-gg,P,xis2,f)")
                                                                (("1"
                                                                  (case
                                                                   "RSP1 = -RSS1 AND RSP2 = -RSS2")
                                                                  (("1"
                                                                    (flatten)
                                                                    (("1"
                                                                      (inst
                                                                       -
                                                                       "RSP1"
                                                                       "RSP2")
                                                                      (("1"
                                                                        (hide-all-but
                                                                         (-1
                                                                          -2
                                                                          -11
                                                                          +))
                                                                        (("1"
                                                                          (grind)
                                                                          nil
                                                                          nil))
                                                                        nil)
                                                                       ("2"
                                                                        (replace
                                                                         -3
                                                                         +
                                                                         :dir
                                                                         rl)
                                                                        (("2"
                                                                          (lemma
                                                                           "Riemann?_Rie")
                                                                          (("2"
                                                                            (inst
                                                                             -
                                                                             "a"
                                                                             "b"
                                                                             "f"
                                                                             "-gg")
                                                                            (("2"
                                                                              (split
                                                                               -)
                                                                              (("1"
                                                                                (inst
                                                                                 -
                                                                                 "P"
                                                                                 "xis2")
                                                                                nil
                                                                                nil)
                                                                               ("2"
                                                                                (propax)
                                                                                nil
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil)
                                                                       ("3"
                                                                        (replace
                                                                         -4
                                                                         +
                                                                         :dir
                                                                         rl)
                                                                        (("3"
                                                                          (lemma
                                                                           "Riemann?_Rie")
                                                                          (("3"
                                                                            (inst
                                                                             -
                                                                             "a"
                                                                             "b"
                                                                             "f"
                                                                             "-gg")
                                                                            (("3"
                                                                              (split
                                                                               -)
                                                                              (("1"
                                                                                (inst
                                                                                 -
                                                                                 "P"
                                                                                 "xis1")
                                                                                nil
                                                                                nil)
                                                                               ("2"
                                                                                (propax)
                                                                                nil
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil)
                                                                   ("2"
                                                                    (replace
                                                                     -1
                                                                     1
                                                                     :dir
                                                                     rl)
                                                                    (("2"
                                                                      (replace
                                                                       -2
                                                                       1
                                                                       :dir
                                                                       rl)
                                                                      (("2"
                                                                        (replace
                                                                         -3
                                                                         1)
                                                                        (("2"
                                                                          (replace
                                                                           -4
                                                                           1)
                                                                          (("2"
                                                                            (hide-all-but
                                                                             1)
                                                                            (("2"
                                                                              (expand
                                                                               "Rie_sum")
                                                                              (("2"
                                                                                (split
                                                                                 +)
                                                                                (("1"
                                                                                  (lemma
                                                                                   "sigma_scal[below(P`length-1)]")
                                                                                  (("1"
                                                                                    (inst
                                                                                     -
                                                                                     "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                 f(xis1`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                                                                                                  f(xis1`seq(n)) * gg(P`seq(n))"
                                                                                     "-1"
                                                                                     "P`length-2"
                                                                                     "0")
                                                                                    (("1"
                                                                                      (replace
                                                                                       -1
                                                                                       :dir
                                                                                       rl)
                                                                                      (("1"
                                                                                        (hide
                                                                                         -1)
                                                                                        (("1"
                                                                                          (lemma
                                                                                           "sigma_restrict_eq[below(P`length-1)]")
                                                                                          (("1"
                                                                                            (inst?)
                                                                                            (("1"
                                                                                              (assert)
                                                                                              (("1"
                                                                                                (hide
                                                                                                 2)
                                                                                                (("1"
                                                                                                  (expand
                                                                                                   "restrict")
                                                                                                  (("1"
                                                                                                    (expand
                                                                                                     "-")
                                                                                                    (("1"
                                                                                                      (assert)
                                                                                                      nil
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil)
                                                                                   ("2"
                                                                                    (skosimp*)
                                                                                    (("2"
                                                                                      (assert)
                                                                                      nil
                                                                                      nil))
                                                                                    nil))
                                                                                  nil)
                                                                                 ("2"
                                                                                  (lemma
                                                                                   "sigma_scal[below(P`length-1)]")
                                                                                  (("1"
                                                                                    (inst
                                                                                     -
                                                                                     "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                 f(xis2`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                                                                                                  f(xis2`seq(n)) * gg(P`seq(n))"
                                                                                     "-1"
                                                                                     "P`length-2"
                                                                                     "0")
                                                                                    (("1"
                                                                                      (replace
                                                                                       -1
                                                                                       :dir
                                                                                       rl)
                                                                                      (("1"
                                                                                        (hide
                                                                                         -)
                                                                                        (("1"
                                                                                          (lemma
                                                                                           "sigma_restrict_eq[below(P`length-1)]")
                                                                                          (("1"
                                                                                            (inst?)
                                                                                            (("1"
                                                                                              (assert)
                                                                                              (("1"
                                                                                                (hide
                                                                                                 2)
                                                                                                (("1"
                                                                                                  (expand
                                                                                                   "restrict")
                                                                                                  (("1"
                                                                                                    (expand
                                                                                                     "-")
                                                                                                    (("1"
                                                                                                      (assert)
                                                                                                      nil
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil)
                                                                                   ("2"
                                                                                    (skosimp*)
                                                                                    (("2"
                                                                                      (assert)
                                                                                      nil
                                                                                      nil))
                                                                                    nil))
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil)
                               ("2"
                                (hide-all-but (-1 1))
                                (("2"
                                  (lemma "integral_scal_g")
                                  (("2"
                                    (inst - "-1" "a" "b" "f" "gg")
                                    (("2"
                                      (assert)
                                      (("2"
                                        (flatten)
                                        (("2"
                                          (assert)
                                          (("2"
                                            (expand "-")
                                            (("2"
                                              (expand "*")
                                              (("2" (assertnil nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil)
                           ("2" (flatten)
                            (("2" (case "integrable?(a,b,-gg,f)")
                              (("1"
                                (hide-all-but (-1 1))
                                (("1"
                                  (lemma "integral_scal_g")
                                  (("1"
                                    (inst - "-1" "a" "b" "f" "-gg")
                                    (("1"
                                      (assert)
                                      (("1"
                                        (flatten)
                                        (("1"
                                          (expand "-")
                                          (("1"
                                            (expand "*")
                                            (("1"
                                              (case
                                               "gg = (LAMBDA (x_1: real): -1 * -gg(x_1))")
                                              (("1" (assertnil nil)
                                               ("2"
                                                (decompose-equality 1)
                                                nil
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil)
                               ("2"
                                (hide 2)
                                (("2"
                                  (assert)
                                  (("2"
                                    (hide -3)
                                    (("2"
                                      (hide 1)
                                      (("2"
                                        (skeep)
                                        (("2"
                                          (inst - "epsi")
                                          (("2"
                                            (skeep -1)
                                            (("2"
                                              (inst + "delta")
                                              (("2"
                                                (skeep)
                                                (("2"
                                                  (inst - "P")
                                                  (("2"
                                                    (assert)
                                                    (("2"
                                                      (skolem
                                                       1
                                                       ("RSS1" "RSS2"))
                                                      (("2"
                                                        (typepred
                                                         "RSS1")
                                                        (("2"
                                                          (typepred
                                                           "RSS2")
                                                          (("2"
                                                            (expand
                                                             "Riemann_sum?")
                                                            (("2"
                                                              (skolem
                                                               -1
                                                               "xis2")
                                                              (("2"
                                                                (skolem
                                                                 -2
                                                                 "xis1")
                                                                (("2"
                                                                  (name
                                                                   "RSP1"
                                                                   "Rie_sum(a,b,gg,P,xis1,f)")
                                                                  (("2"
                                                                    (name
                                                                     "RSP2"
                                                                     "Rie_sum(a,b,gg,P,xis2,f)")
                                                                    (("2"
                                                                      (case
                                                                       "RSP1 = -RSS1 AND RSP2 = -RSS2")
                                                                      (("1"
                                                                        (flatten)
                                                                        (("1"
                                                                          (inst
                                                                           -
                                                                           "RSP1"
                                                                           "RSP2")
                                                                          (("1"
                                                                            (hide-all-but
                                                                             (-1
                                                                              -2
                                                                              -7
                                                                              +))
                                                                            (("1"
                                                                              (grind)
                                                                              nil
                                                                              nil))
                                                                            nil)
                                                                           ("2"
                                                                            (lemma
                                                                             "Riemann?_Rie")
                                                                            (("2"
                                                                              (inst
                                                                               -
                                                                               "a"
                                                                               "b"
                                                                               "f"
                                                                               "gg")
                                                                              (("2"
                                                                                (split
                                                                                 -)
                                                                                (("1"
                                                                                  (inst
                                                                                   -
                                                                                   "P"
                                                                                   "xis2")
                                                                                  (("1"
                                                                                    (assert)
                                                                                    nil
                                                                                    nil))
                                                                                  nil)
                                                                                 ("2"
                                                                                  (propax)
                                                                                  nil
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil)
                                                                           ("3"
                                                                            (lemma
                                                                             "Riemann?_Rie")
                                                                            (("3"
                                                                              (inst
                                                                               -
                                                                               "a"
                                                                               "b"
                                                                               "f"
                                                                               "gg")
                                                                              (("3"
                                                                                (split
                                                                                 -)
                                                                                (("1"
                                                                                  (inst
                                                                                   -
                                                                                   "P"
                                                                                   "xis1")
                                                                                  (("1"
                                                                                    (assert)
                                                                                    nil
                                                                                    nil))
                                                                                  nil)
                                                                                 ("2"
                                                                                  (propax)
                                                                                  nil
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil)
                                                                       ("2"
                                                                        (replace
                                                                         -1
                                                                         1
                                                                         :dir
                                                                         rl)
                                                                        (("2"
                                                                          (replace
                                                                           -2
                                                                           1
                                                                           :dir
                                                                           rl)
                                                                          (("2"
                                                                            (replace
                                                                             -3
                                                                             1)
                                                                            (("2"
                                                                              (replace
                                                                               -4
                                                                               1)
                                                                              (("2"
                                                                                (hide-all-but
                                                                                 1)
                                                                                (("2"
                                                                                  (expand
                                                                                   "Rie_sum")
                                                                                  (("2"
                                                                                    (split
                                                                                     +)
                                                                                    (("1"
                                                                                      (lemma
                                                                                       "sigma_scal[below(P`length-1)]")
                                                                                      (("1"
                                                                                        (inst
                                                                                         -
                                                                                         "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                 (-gg)(P`seq(1 + n)) * f(xis1`seq(n)) -
                                                                                                                                                                                  (-gg)(P`seq(n)) * f(xis1`seq(n))"
                                                                                         "-1"
                                                                                         "P`length-2"
                                                                                         "0")
                                                                                        (("1"
                                                                                          (replace
                                                                                           -1
                                                                                           :dir
                                                                                           rl)
                                                                                          (("1"
                                                                                            (hide
                                                                                             -1)
                                                                                            (("1"
                                                                                              (lemma
                                                                                               "sigma_restrict_eq[below(P`length-1)]")
                                                                                              (("1"
                                                                                                (inst?)
                                                                                                (("1"
                                                                                                  (assert)
                                                                                                  (("1"
                                                                                                    (hide
                                                                                                     2)
                                                                                                    (("1"
                                                                                                      (expand
                                                                                                       "restrict")
                                                                                                      (("1"
                                                                                                        (expand
                                                                                                         "-")
                                                                                                        (("1"
                                                                                                          (assert)
                                                                                                          nil
                                                                                                          nil))
                                                                                                        nil))
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil)
                                                                                       ("2"
                                                                                        (skosimp*)
                                                                                        (("2"
                                                                                          (assert)
                                                                                          nil
                                                                                          nil))
                                                                                        nil))
                                                                                      nil)
                                                                                     ("2"
                                                                                      (lemma
                                                                                       "sigma_scal[below(P`length-1)]")
                                                                                      (("1"
                                                                                        (inst
                                                                                         -
                                                                                         "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                 (-gg)(P`seq(1 + n)) * f(xis2`seq(n)) -
                                                                                                                                                                                  (-gg)(P`seq(n)) * f(xis2`seq(n))"
                                                                                         "-1"
                                                                                         "P`length-2"
                                                                                         "0")
                                                                                        (("1"
                                                                                          (replace
                                                                                           -1
                                                                                           :dir
                                                                                           rl)
                                                                                          (("1"
                                                                                            (hide
                                                                                             -)
                                                                                            (("1"
                                                                                              (lemma
                                                                                               "sigma_restrict_eq[below(P`length-1)]")
                                                                                              (("1"
                                                                                                (inst?)
                                                                                                (("1"
                                                                                                  (assert)
                                                                                                  (("1"
                                                                                                    (hide
                                                                                                     2)
                                                                                                    (("1"
                                                                                                      (expand
                                                                                                       "restrict")
                                                                                                      (("1"
                                                                                                        (expand
                                                                                                         "-")
                                                                                                        (("1"
                                                                                                          (assert)
                                                                                                          nil
                                                                                                          nil))
                                                                                                        nil))
                                                                                                      nil))
                                                                                                    nil))
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil)
                                                                                       ("2"
                                                                                        (skosimp*)
                                                                                        (("2"
                                                                                          (assert)
                                                                                          nil
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil))
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil)
     ("2" (hide 2)
      (("2" (skolem 1 ("a" "b" "f" "gg"))
        (("2" (flatten)
          (("2" (label "gincreasing?" -2)
            (("2" (hide "gincreasing?")
              (("2" (ground)
                (("1" (rewrite "integrable_lem")
                  (("1" (skeep)
                    (("1" (inst - "epsi")
                      (("1" (skeep -1)
                        (("1" (inst + "delta")
                          (("1" (skeep)
                            (("1" (inst - "P" "P")
                              (("1" (assertnil nil)) nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil)
                 ("2"
                  (case "FORALL (epsi:posreal): EXISTS (delta: posreal):
                                                                                                                    FORALL (P1, P2: partition(a,b)):
                                                                                                                      width(a, b, P1) < delta IMPLIES
                                                                                                                       (FORALL (RS1: (Riemann_sum?(a, b, P1, gg, f)),
                                                                                                                                RS2: (Riemann_sum?(a, b, partition_union(a,b)(P1,P2), gg, f))):
                                                                                                                          abs(RS1 - RS2) < epsi)")
                  (("1" (hide -2)
                    (("1" (rewrite "integrable_lem")
                      (("1" (skeep)
                        (("1" (inst - "epsi/2")
                          (("1" (skeep -1)
                            (("1" (inst + "delta")
                              (("1"
                                (skeep)
                                (("1"
                                  (inst-cp - "P1" "P2")
                                  (("1"
                                    (inst - "P2" "P1")
                                    (("1"
                                      (assert)
                                      (("1"
                                        (case
                                         "EXISTS (RS12: (Riemann_sum?(a, b, partition_union(a, b)(P1, P2), gg,f))): TRUE")
                                        (("1"
                                          (skeep -1)
                                          (("1"
                                            (skosimp*)
                                            (("1"
                                              (inst - "RS2!1" "RS12")
                                              (("1"
                                                (inst - "RS1!1" "RS12")
                                                (("1"
                                                  (hide -3)
                                                  (("1"
                                                    (hide -3)
                                                    (("1"
                                                      (grind)
                                                      nil
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil)
                                               ("2"
                                                (typepred "RS12")
                                                (("2"
                                                  (lemma
                                                   "partition_union_sym")
                                                  (("2"
                                                    (inst - "a" "b")
                                                    (("2"
                                                      (assert)
                                                      (("2"
                                                        (inst
                                                         -
                                                         "P1"
                                                         "P2")
                                                        (("2"
                                                          (assert)
                                                          nil
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil)
                                         ("2"
                                          (lemma "Riemann?_Rie")
                                          (("2"
                                            (inst - "a" "b" "f" "gg")
                                            (("2"
                                              (split -)
                                              (("1"
                                                (inst
                                                 -
                                                 "partition_union(a,b)(P1,P2)"
                                                 "gen_xis(a,b,partition_union(a,b)(P1,P2))")
                                                (("1"
                                                  (inst
                                                   +
                                                   "Rie_sum(a, b, gg, partition_union(a, b)(P1, P2),
                                                                                                                                                 gen_xis(a, b, partition_union(a, b)(P1, P2)), f)")
                                                  nil
                                                  nil))
                                                nil)
                                               ("2" (propax) nil nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil)
                   ("2" (hide 2)
                    (("2" (lemma "Rie_sum_diff_extend_union")
                      (("2" (skeep)
                        (("2" (inst -2 "epsi")
                          (("2" (skeep -2)
                            (("2" (inst + "delta")
                              (("2"
                                (skolem 1 ("P" "Q"))
                                (("2"
                                  (inst - "a" "b" "f" "gg")
                                  (("2"
                                    (assert)
                                    (("2"
                                      (reveal "gincreasing?")
                                      (("2"
                                        (replace "gincreasing?")
                                        (("2"
                                          (hide "gincreasing?")
                                          (("2"
                                            (inst - "P" "Q")
                                            (("2"
                                              (flatten)
                                              (("2"
                                                (skolem
                                                 1
                                                 ("RSS1" "RSS2"))
                                                (("2"
                                                  (typepred "RSS1")
                                                  (("2"
                                                    (typepred "RSS2")
                                                    (("2"
                                                      (expand
                                                       "Riemann_sum?")
                                                      (("2"
                                                        (skolem
                                                         -1
                                                         "xispq")
                                                        (("2"
                                                          (skolem
                                                           -2
                                                           "xis")
                                                          (("2"
                                                            (inst
                                                             -
                                                             "xispq"
                                                             "xis")
                                                            (("2"
                                                              (skeep
                                                               -3)
                                                              (("2"
                                                                (inst
                                                                 -
                                                                 "P")
                                                                (("2"
                                                                  (assert)
                                                                  (("2"
                                                                    (inst
                                                                     -
                                                                     "RSS1"
                                                                     "Rie_sum(a, b, gg, P, xis2, f)")
                                                                    (("1"
                                                                      (assert)
                                                                      nil
                                                                      nil)
                                                                     ("2"
                                                                      (lemma
                                                                       "Riemann?_Rie")
                                                                      (("2"
                                                                        (inst
                                                                         -
                                                                         "a"
                                                                         "b"
                                                                         "f"
                                                                         "gg")
                                                                        (("2"
                                                                          (split
                                                                           -)
                                                                          (("1"
                                                                            (inst
                                                                             -
                                                                             "P"
                                                                             "xis2")
                                                                            nil
                                                                            nil)
                                                                           ("2"
                                                                            (propax)
                                                                            nil
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil))
              nil))
            nil))
          nil))
        nil))
      nil))
    nil)
   ((increasing? const-decl "bool" sort_fseq "structures/")
    (fseq type-eq-decl nil fseqs "structures/")
    (barray type-eq-decl nil fseqs "structures/")
    (increasing? const-decl "bool" real_fun_preds "reals/")
    (monotonic? const-decl "bool" real_fun_preds "reals/")
    (T_low type-eq-decl nil sigma "reals/")
    (T_high type-eq-decl nil sigma "reals/")
    (restrict const-decl "[T -> real]" sigma "reals/")
    (sigma_restrict_eq formula-decl nil sigma "reals/")
    (sigma_scal formula-decl nil sigma "reals/")
    (decreasing? const-decl "bool" real_fun_preds "reals/")
    (strictly_increasing? const-decl "bool" sort_fseq "structures/")
    (member const-decl "bool" fseqs "structures/"))
   nil)
  (integrable_lem2-1 nil 3491565290
   (""
    (case "FORALL (a, b: real, f, g: [real -> real]):
                                           a < b AND
                                            increasing?[(LAMBDA (x: real): a <= x AND x <= b)]
                                                (restrict[real, (LAMBDA (x: real): a <= x AND x <= b), real]
                                                     (g))
                                            IMPLIES
                                            (integrable?(a, b, g, f) IFF
                                              (FORALL (epsi: posreal):
                                                 EXISTS (delta: posreal):
                                                   FORALL (P: partition(a, b)):
                                                     width(a, b, P) < delta IMPLIES
                                                      (FORALL (RS1: (Riemann_sum?(a, b, P, g, f)),
                                                               RS2: (Riemann_sum?(a, b, P, g, f))):
                                                         abs(RS1 - RS2) < epsi)))")
    (("1" (skolem 1 ("a" "b" "f" "gg"))
      (("1" (flatten)
        (("1" (expand "monotonic?")
          (("1" (split -)
            (("1" (inst?) (("1" (assertnil nil)) nil)
             ("2" (case "NOT increasing?[(closed_intv(a,b))](-gg)")
              (("1" (hide-all-but (-1 1))
                (("1" (expand "increasing?")
                  (("1" (expand "decreasing?")
                    (("1" (skeep)
                      (("1" (inst - "x" "y")
                        (("1" (assert)
                          (("1" (expand "restrict")
                            (("1" (expand "-") (("1" (assertnil nil))
                              nil))
                            nil))
                          nil))
                        nil))
                      nil))
                    nil))
                  nil))
                nil)
               ("2" (hide -2)
                (("2" (inst - "a" "b" "f" "-gg")
                  (("2" (assert)
                    (("2" (split +)
                      (("1" (flatten)
                        (("1" (case "integrable?(a,b,-gg,f)")
                          (("1" (assert)
                            (("1" (hide -5)
                              (("1"
                                (skeep)
                                (("1"
                                  (inst - "epsi")
                                  (("1"
                                    (skeep -4)
                                    (("1"
                                      (inst + "delta")
                                      (("1"
                                        (skeep)
                                        (("1"
                                          (inst - "P")
                                          (("1"
                                            (assert)
                                            (("1"
                                              (skolem
                                               1
                                               ("RSS1" "RSS2"))
                                              (("1"
                                                (typepred "RSS1")
                                                (("1"
                                                  (typepred "RSS2")
                                                  (("1"
                                                    (expand
                                                     "Riemann_sum?")
                                                    (("1"
                                                      (skolem
                                                       -1
                                                       "xis2")
                                                      (("1"
                                                        (skolem
                                                         -2
                                                         "xis1")
                                                        (("1"
                                                          (name
                                                           "RSP1"
                                                           "Rie_sum(a,b,-gg,P,xis1,f)")
                                                          (("1"
                                                            (name
                                                             "RSP2"
                                                             "Rie_sum(a,b,-gg,P,xis2,f)")
                                                            (("1"
                                                              (case
                                                               "RSP1 = -RSS1 AND RSP2 = -RSS2")
                                                              (("1"
                                                                (flatten)
                                                                (("1"
                                                                  (inst
                                                                   -
                                                                   "RSP1"
                                                                   "RSP2")
                                                                  (("1"
                                                                    (hide-all-but
                                                                     (-1
                                                                      -2
                                                                      -11
                                                                      +))
                                                                    (("1"
                                                                      (grind)
                                                                      nil
                                                                      nil))
                                                                    nil)
                                                                   ("2"
                                                                    (replace
                                                                     -3
                                                                     +
                                                                     :dir
                                                                     rl)
                                                                    (("2"
                                                                      (lemma
                                                                       "Riemann?_Rie")
                                                                      (("2"
                                                                        (inst
                                                                         -
                                                                         "a"
                                                                         "b"
                                                                         "f"
                                                                         "-gg")
                                                                        (("2"
                                                                          (split
                                                                           -)
                                                                          (("1"
                                                                            (inst
                                                                             -
                                                                             "P"
                                                                             "xis2")
                                                                            nil
                                                                            nil)
                                                                           ("2"
                                                                            (propax)
                                                                            nil
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil)
                                                                   ("3"
                                                                    (replace
                                                                     -4
                                                                     +
                                                                     :dir
                                                                     rl)
                                                                    (("3"
                                                                      (lemma
                                                                       "Riemann?_Rie")
                                                                      (("3"
                                                                        (inst
                                                                         -
                                                                         "a"
                                                                         "b"
                                                                         "f"
                                                                         "-gg")
                                                                        (("3"
                                                                          (split
                                                                           -)
                                                                          (("1"
                                                                            (inst
                                                                             -
                                                                             "P"
                                                                             "xis1")
                                                                            nil
                                                                            nil)
                                                                           ("2"
                                                                            (propax)
                                                                            nil
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil)
                                                               ("2"
                                                                (replace
                                                                 -1
                                                                 1
                                                                 :dir
                                                                 rl)
                                                                (("2"
                                                                  (replace
                                                                   -2
                                                                   1
                                                                   :dir
                                                                   rl)
                                                                  (("2"
                                                                    (replace
                                                                     -3
                                                                     1)
                                                                    (("2"
                                                                      (replace
                                                                       -4
                                                                       1)
                                                                      (("2"
                                                                        (hide-all-but
                                                                         1)
                                                                        (("2"
                                                                          (expand
                                                                           "Rie_sum")
                                                                          (("2"
                                                                            (split
                                                                             +)
                                                                            (("1"
                                                                              (lemma
                                                                               "sigma_scal[below(P`length-1)]")
                                                                              (("1"
                                                                                (inst
                                                                                 -
                                                                                 "LAMBDA (n: below(P`length - 1)):
                                                                                                         f(xis1`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                          f(xis1`seq(n)) * gg(P`seq(n))"
                                                                                 "-1"
                                                                                 "P`length-2"
                                                                                 "0")
                                                                                (("1"
                                                                                  (replace
                                                                                   -1
                                                                                   :dir
                                                                                   rl)
                                                                                  (("1"
                                                                                    (hide
                                                                                     -1)
                                                                                    (("1"
                                                                                      (lemma
                                                                                       "sigma_restrict_eq[below(P`length-1)]")
                                                                                      (("1"
                                                                                        (inst?)
                                                                                        (("1"
                                                                                          (assert)
                                                                                          (("1"
                                                                                            (hide
                                                                                             2)
                                                                                            (("1"
                                                                                              (expand
                                                                                               "restrict")
                                                                                              (("1"
                                                                                                (expand
                                                                                                 "-")
                                                                                                (("1"
                                                                                                  (assert)
                                                                                                  nil
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil))
                                                                                  nil))
                                                                                nil)
                                                                               ("2"
                                                                                (skosimp*)
                                                                                (("2"
                                                                                  (assert)
                                                                                  nil
                                                                                  nil))
                                                                                nil))
                                                                              nil)
                                                                             ("2"
                                                                              (lemma
                                                                               "sigma_scal[below(P`length-1)]")
                                                                              (("1"
                                                                                (inst
                                                                                 -
                                                                                 "LAMBDA (n: below(P`length - 1)):
                                                                                                         f(xis2`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                          f(xis2`seq(n)) * gg(P`seq(n))"
                                                                                 "-1"
                                                                                 "P`length-2"
                                                                                 "0")
                                                                                (("1"
                                                                                  (replace
                                                                                   -1
                                                                                   :dir
                                                                                   rl)
                                                                                  (("1"
                                                                                    (hide
                                                                                     -)
                                                                                    (("1"
                                                                                      (lemma
                                                                                       "sigma_restrict_eq[below(P`length-1)]")
                                                                                      (("1"
                                                                                        (inst?)
                                                                                        (("1"
                                                                                          (assert)
                                                                                          (("1"
                                                                                            (hide
                                                                                             2)
                                                                                            (("1"
                                                                                              (expand
                                                                                               "restrict")
                                                                                              (("1"
                                                                                                (expand
                                                                                                 "-")
                                                                                                (("1"
                                                                                                  (assert)
                                                                                                  nil
                                                                                                  nil))
                                                                                                nil))
                                                                                              nil))
                                                                                            nil))
                                                                                          nil))
                                                                                        nil))
                                                                                      nil))
                                                                                    nil))
                                                                                  nil))
                                                                                nil)
                                                                               ("2"
                                                                                (skosimp*)
                                                                                (("2"
                                                                                  (assert)
                                                                                  nil
                                                                                  nil))
                                                                                nil))
                                                                              nil))
                                                                            nil))
                                                                          nil))
                                                                        nil))
                                                                      nil))
                                                                    nil))
                                                                  nil))
                                                                nil))
                                                              nil))
                                                            nil))
                                                          nil))
                                                        nil))
                                                      nil))
                                                    nil))
                                                  nil))
                                                nil))
                                              nil))
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil)
                           ("2" (hide-all-but (-1 1))
                            (("2" (lemma "integral_scal_g")
                              (("2"
                                (inst - "-1" "a" "b" "f" "gg")
                                (("2"
                                  (assert)
                                  (("2"
                                    (flatten)
                                    (("2"
                                      (assert)
                                      (("2"
                                        (expand "-")
                                        (("2"
                                          (expand "*")
                                          (("2" (assertnil nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil))
                          nil))
                        nil)
                       ("2" (flatten)
                        (("2" (case "integrable?(a,b,-gg,f)")
                          (("1" (hide-all-but (-1 1))
                            (("1" (lemma "integral_scal_g")
                              (("1"
                                (inst - "-1" "a" "b" "f" "-gg")
                                (("1"
                                  (assert)
                                  (("1"
                                    (flatten)
                                    (("1"
                                      (expand "-")
                                      (("1"
                                        (expand "*")
                                        (("1"
                                          (case
                                           "gg = (LAMBDA (x_1: real): -1 * -gg(x_1))")
                                          (("1" (assertnil nil)
                                           ("2"
                                            (decompose-equality 1)
                                            nil
                                            nil))
                                          nil))
                                        nil))
                                      nil))
                                    nil))
                                  nil))
                                nil))
                              nil))
                            nil)
                           ("2" (hide 2)
                            (("2" (assert)
                              (("2"
                                (hide -3)
                                (("2"
                                  (hide 1)
                                  (("2"
                                    (skeep)
                                    (("2"
                                      (inst - "epsi")
                                      (("2"
                                        (skeep -1)
                                        (("2"
                                          (inst + "delta")
                                          (("2"
                                            (skeep)
                                            (("2"
                                              (inst - "P")
                                              (("2"
                                                (assert)
                                                (("2"
                                                  (skolem
                                                   1
                                                   ("RSS1" "RSS2"))
--> --------------------

--> maximum size reached

--> --------------------

Messung V0.5 in Prozent
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.925 Sekunden  (vorverarbeitet am  2026-04-28) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge